@@ -7,9 +7,12 @@ function pollySavePOLIPHON(data, POLIPHON1)
77%
88% HISTORY:
99% - 2023-06-26: first edition by Athena A. Floutsi
10- % - 2024-05-17: updates on startTime/endTime writing and on variable name
10+ % - 2024-05-17: updates on startTime/endTime writing and on variable name
11+ % - 2025-09-15: updates to fix bug that didn't allow proper time
12+ % writting
1113%
1214% .. Authors: - floutsi@tropos.de
15+
1316global PicassoConfig CampaignConfig PollyDataInfo PollyConfig
1417missing_value = - 999 ;
1518
@@ -28,15 +31,14 @@ function pollySavePOLIPHON(data, POLIPHON1)
2831dimID_method = netcdf .defDim(ncID , ' method' , 1 );
2932dimID_time = netcdf .defDim(ncID , ' time' , length(data .mTime ));
3033
31-
3234% define variables
3335varID_altitude = netcdf .defVar(ncID , ' altitude' , ' NC_FLOAT' , dimID_method );
3436varID_longitude = netcdf .defVar(ncID , ' longitude' , ' NC_FLOAT' , dimID_method );
3537varID_latitude = netcdf .defVar(ncID , ' latitude' , ' NC_FLOAT' , dimID_method );
3638varID_startTime = netcdf .defVar(ncID , ' start_time' , ' NC_DOUBLE' , dimID_method );
3739varID_endTime = netcdf .defVar(ncID , ' end_time' , ' NC_DOUBLE' , dimID_method );
3840varID_height = netcdf .defVar(ncID , ' height' , ' NC_FLOAT' , dimID_height );
39- varID_time = netcdf .defVar(ncID , ' time' , ' NC_FLOAT ' , dimID_time );
41+ varID_time = netcdf .defVar(ncID , ' time' , ' NC_DOUBLE ' , dimID_time );
4042
4143varID_aerBsc_klett_355 = netcdf .defVar(ncID , ' aerBsc_klett_355' , ' NC_FLOAT' , dimID_height );
4244varID_aerBscStd_klett_355 = netcdf .defVar(ncID , ' uncertainty_aerBsc_klett_355' , ' NC_FLOAT' , dimID_height );
@@ -163,6 +165,7 @@ function pollySavePOLIPHON(data, POLIPHON1)
163165netcdf .putVar(ncID , varID_startTime , datenum_2_unix_timestamp(startTime ));
164166netcdf .putVar(ncID , varID_endTime , datenum_2_unix_timestamp(endTime ));
165167netcdf .putVar(ncID , varID_height , single(data .height ));
168+ netcdf .putVar(ncID , varID_time , datenum_2_unix_timestamp(data .mTime ));
166169
167170netcdf .putVar(ncID , varID_aerBsc_klett_355 , single(fillmissing(data .aerBsc355_klett(iGrp , : ), missing_value )));
168171netcdf .putVar(ncID , varID_aerBscStd_klett_355 , single(fillmissing(data .aerBscStd355_klett(iGrp , : ), missing_value )));
0 commit comments