willmorrison1 / pixpy

Capture optris images and save to netcdf
0 stars 0 forks source link

time fillvalue may cause issues with ncview #5

Open willmorrison1 opened 2 years ago

willmorrison1 commented 2 years ago

https://stackoverflow.com/questions/45693688/xarray-automatically-applying-fillvalue-to-coordinates-on-netcdf-output

willmorrison1 commented 2 years ago

or set fillvalue to -999

dimensions:
        time = UNLIMITED ; // (3 currently)
        y = 120 ;
        x = 160 ;
variables:
        ushort t_b_median(time, y, x) ;
        ushort t_b_min(time, y, x) ;
        ushort t_b_max(time, y, x) ;
        ushort t_b_std(time, y, x) ;
        ushort t_b_snapshot(time, y, x) ;
        double t_box(time) ;
                t_box:_FillValue = NaN ;
        double t_chip(time) ;
                t_chip:_FillValue = NaN ;
        ushort flag_state(time) ;
        uint counter(time) ;
        uint counterHW(time) ;
        double fps(time) ;
                fps:_FillValue = NaN ;
        ushort n_images(time) ;
        int x(x) ;
        int y(y) ;
        double time(time) ;
                time:_FillValue = NaN ;
                time:units = "seconds since 1970-01-01 00:00:00.000" ;

// global attributes:
                :description = "pixpy" ;
                :serial = 12080016 ;
}

vs CL61

dimensions:
        range = 3276 ;
        layer = 5 ;
        time = UNLIMITED ; // (20 currently)
variables:
        int cloud_base_heights(time, layer) ;
                cloud_base_heights:_FillValue = -99 ;
                cloud_base_heights:units = "m" ;
                cloud_base_heights:long_name = "heights (range) of the detected cloud bases" ;
                cloud_base_heights:coordinates = "time layer longitude latitude" ;
        int vertical_visibility(time) ;
                vertical_visibility:_FillValue = -99 ;
                vertical_visibility:units = "m" ;
                vertical_visibility:long_name = "visibility in the direction of the instrument beam" ;
                vertical_visibility:coordinates = "time longitude latitude" ;
        float p_pol(time, range) ;
                p_pol:_FillValue = -999.f ;
                p_pol:units = "1/(m∙sr)" ;
                p_pol:long_name = "parallel-polarized component of the backscattered light" ;
                p_pol:coordinates = "time range longitude latitude" ;
                p_pol:averaging\ time\ in\ seconds = 15 ;
        float x_pol(time, range) ;
                x_pol:_FillValue = -999.f ;
                x_pol:units = "1/(m∙sr)" ;
                x_pol:long_name = "cross-polarized component of the backscattered light" ;
                x_pol:coordinates = "time range longitude latitude" ;
                x_pol:averaging\ time\ in\ seconds = 15 ;
        float beta_att(time, range) ;
                beta_att:_FillValue = -999.f ;
                beta_att:units = "1/(m∙sr)" ;
                beta_att:long_name = "attenuated volume backscatter coefficient" ;
                beta_att:coordinates = "time range longitude latitude" ;
                beta_att:averaging\ time\ in\ seconds = 15 ;
        float linear_depol_ratio(time, range) ;
                linear_depol_ratio:_FillValue = -999.f ;
                linear_depol_ratio:long_name = "linear depolarisation ratio of the backscatter volume" ;
                linear_depol_ratio:coordinates = "time range longitude latitude" ;
                linear_depol_ratio:averaging\ time\ in\ seconds = 15 ;
        double time(time) ;
                time:_FillValue = -999. ;
                time:units = "seconds since 1970-01-01 00:00:00.000" ;
                time:long_name = "Time" ;
                time:axis = "T" ;
                time:standard_name = "time" ;
                time:cf_role = "profile_id" ;
        double range(range) ;
                range:_FillValue = -999. ;
                range:units = "m" ;
                range:long_name = "measurement distance from the instrument in the direction of the transmitted laser beam" ;
                range:axis = "Z" ;
                range:positive = "up" ;
        int layer(layer) ;
                layer:_FillValue = -999 ;
                layer:units = "layer" ;
                layer:long_name = "number of the observed cloud layer (1,2,...,5)" ;
        double longitude ;
                longitude:_FillValue = -999. ;
                longitude:units = "degrees_east" ;
                longitude:long_name = "longitude" ;
                longitude:standard_name = "longitude" ;
        double latitude ;
                latitude:_FillValue = -999. ;
                latitude:units = "degrees_north" ;
                latitude:long_name = "latitude" ;
                latitude:standard_name = "latitude" ;
        int elevation ;
                elevation:_FillValue = -999 ;
                elevation:units = "m" ;
                elevation:long_name = "elevation" ;
                elevation:standard_name = "ground_level_altitude" ;
                elevation:comment = "measurement site height above or below a fixed reference point, most commonly a reference geoid" ;
        double beta_att_sum(time) ;
                beta_att_sum:_FillValue = -999. ;
                beta_att_sum:units = "1/(10^4∙sr)" ;
                beta_att_sum:long_name = "scaled integral of the attenuated volume backscatter coefficient" ;
        double beta_att_noise_level(time) ;
                beta_att_noise_level:_FillValue = -999. ;
                beta_att_noise_level:long_name = "a unitless number describing the noise level of the attenuated volume backscatter coefficient" ;
        short tilt_correction(time) ;
                tilt_correction:_FillValue = -999s ;
                tilt_correction:long_name = "tilt correction" ;
                tilt_correction:comment = "on/off (1/0)" ;
        float tilt_angle(time) ;
                tilt_angle:_FillValue = -999.f ;
                tilt_angle:units = "°" ;
                tilt_angle:standard_name = "zenith_angle" ;
                tilt_angle:long_name = "instrument tilt angle from the vertical" ;
        short height_offset(time) ;
                height_offset:_FillValue = -999s ;
                height_offset:long_name = "instrument height offset to reference level" ;
                height_offset:comment = "positive, if the instrument is placed e.g. on the roof of a building. Negative, if the instrument is placed below the ground level altitude e.g. in a pit. This value will be added to the cloud base height results." ;
                height_offset:units = "m" ;
        short sky_condition_total_cloud_cover(time) ;
                sky_condition_total_cloud_cover:_FillValue = -99s ;
                sky_condition_total_cloud_cover:units = "oktas" ;
                sky_condition_total_cloud_cover:long_name = "total amount of cloud cover" ;
                sky_condition_total_cloud_cover:comment = "aggregated across layers" ;
                sky_condition_total_cloud_cover:coordinates = "time longitude latitude" ;
        short sky_condition_cloud_layer_covers(time, layer) ;
                sky_condition_cloud_layer_covers:_FillValue = -99s ;
                sky_condition_cloud_layer_covers:units = "oktas" ;
                sky_condition_cloud_layer_covers:long_name = "amount of cloud cover in different cloud layers" ;
                sky_condition_cloud_layer_covers:comment = "for up to 3 layers" ;
                sky_condition_cloud_layer_covers:coordinates = "time layer longitude latitude" ;
        int sky_condition_cloud_layer_heights(time, layer) ;
                sky_condition_cloud_layer_heights:_FillValue = -99 ;
                sky_condition_cloud_layer_heights:units = "m" ;
                sky_condition_cloud_layer_heights:long_name = "height of different cloud layers" ;
                sky_condition_cloud_layer_heights:comment = "for up to 3 layers" ;
                sky_condition_cloud_layer_heights:coordinates = "time layer longitude latitude" ;

// global attributes:
                :_NCProperties = "version=1|netcdflibversion=4.4.1.1|hdf5libversion=1.8.18" ;
                :title = "CL61D, CL61 with Depolarization, J" ;
                :institution = "" ;
                :source = "CL61-T2920393" ;
                :conventions = "CF-1.8" ;
                :schema_version = "1.2" ;
                :sw_version = "1.1.10" ;
                :history = "" ;
                :comment = "" ;
                :unit = "m" ;
                :temporal\ span\ of\ this\ file\ in\ minutes = 5. ;
                :time\ between\ consecutive\ profiles\ in\ seconds = 15 ;

group: status {

  // group attributes:
                :Timestamp = "1657695840.086924" ;
                :Window_blower_fan = "OK: 0" ;
                :Window_blower_heater = "OK: 0" ;
                :Window_blower_temperature_sensor = "OK: 0" ;
                :Device_controller_temperature = "OK: 0" ;
                :Device_controller_electronics = "OK: 0" ;
                :Device_controller_overall = "OK: 0" ;
                :Device_controller_voltage = "OK: 0" ;
                :Inside_heater = "OK: 0" ;
                :Optics_unit_accelerometer = "OK: 0" ;
                :Optics_unit_electronics = "OK: 0" ;
                :Optics_unit_environmental_sensor = "OK: 0" ;
                :Optics_unit_overall = "OK: 0" ;
                :Optics_unit_memory = "OK: 0" ;
                :Optics_unit_tilt_angle = "OK: 0" ;
                :Receiver_electronics = "OK: 0" ;
                :Receiver_overall = "OK: 0" ;
                :Receiver_memory = "OK: 0" ;
                :Receiver_solar_saturation = "OK: 0" ;
                :Receiver_voltage = "OK: 0" ;
                :Window_blocking = "OK: 0" ;
                :Window_condition = "OK: 0" ;
                :Servo_drive_electronics = "OK: 0" ;
                :Servo_drive_overall = "OK: 0" ;
                :Servo_drive_memory = "OK: 0" ;
                :Servo_drive_control = "OK: 0" ;
                :Servo_drive_ready = "OK: 0" ;
                :Transmitter_electronics = "OK: 0" ;
                :Transmitter_light_source = "OK: 0" ;
                :Transmitter_light_source_power = "OK: 0" ;
                :Transmitter_light_source_safety = "OK: 0" ;
                :Transmitter_overall = "OK: 0" ;
                :Transmitter_memory = "OK: 0" ;
                :Transmitter_voltage = "OK: 0" ;
                :Hardware_overall = "OK: 0" ;
                :Maintenance_overall = "OK: 0" ;
                :Device_overall = "Device overall alert level: A" ;
                :Recently_started = "OK: 0" ;
                :Measurement_status = "OK: 0" ;
                :Datacom_overall = "Data communication overall alert level: A" ;
                :Data_generation_status = "OK: 0" ;
                :Data_sending_status = "Reporting data sending failure: A" ;
                :Measurement_data_destination_not_set = "Reporting destination URL for output data set: 0" ;
  } // group status

group: monitoring {

  // group attributes:
                :Timestamp = "1657695840.086924" ;
                :internal_humidity = 34.071f ;
                :internal_pressure = 1014.156f ;
                :internal_temperature = 28.4f ;
                :laser_temperature = 18.78136f ;
                :laser_power_percent = 94.83334f ;
                :window_condition = 100.f ;
                :background_radiance = 37.4f ;
  } // group monitoring
}