Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cloud_Optical_Thickness to viirs_l2.yaml #2885

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions satpy/etc/readers/viirs_l2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,15 @@ datasets:
file_type: cldprop_l2_viirs
standard_name: cloud_top_height

Cloud_Optical_Thickness:
name: Cloud_Optical_Thickness
long_name: Cloud Optical Thickness two-channel retrieval using 2.2 um and either 0.65 um, 0.86 um or 1.24um (specified in Quality_Assurance) from best points: not failed in any way, not marked for clear sky restoral
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this value is in the file I don't think it should be needed here if the python code pulls it from the file and puts in in the DataArray's .attrs. If it is needed here, then it should be surrounded by double quotes:

Suggested change
long_name: Cloud Optical Thickness two-channel retrieval using 2.2 um and either 0.65 um, 0.86 um or 1.24um (specified in Quality_Assurance) from best points: not failed in any way, not marked for clear sky restoral
long_name: "Cloud Optical Thickness two-channel retrieval using 2.2 um and either 0.65 um, 0.86 um or 1.24um (specified in Quality_Assurance) from best points: not failed in any way, not marked for clear sky restoral"

Copy link
Contributor Author

@martin-rdz martin-rdz Sep 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True point, the long_name is covered in the netcdf. Shortened ncdump below:

short Cloud_Optical_Thickness(number_of_lines, number_of_pixels) ; 
    Cloud_Optical_Thickness:long_name = "Cloud Optical Thickness two-channel retrieval using 2.2 um and either 0.65 um, 0.86 um or 1.24um (specified in Quality_Assurance) from best points: not failed in any way, not marked for clear sky restoral" ; 
    Cloud_Optical_Thickness:_FillValue = -9999s ;
    Cloud_Optical_Thickness:valid_min = 0s ;
    Cloud_Optical_Thickness:valid_max = 15000s ;
    Cloud_Optical_Thickness:scale_factor = 0.01 ;
    Cloud_Optical_Thickness:add_offset = 0. ; 
    Cloud_Optical_Thickness:units = "none" ; 

My very first thought was to match it to Cloud_Top_Height and the variables in aerdb_l2_viirs, but I see the point in not having these information redundant. Can we just leave out the long_name tag or does it need to be specified, that this value should be taken from the .attrs?

Thanks for the review!
Martin

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'd have to test it to be sure, but these lines in the python seem to do what we'd want:

i = getattr(self[var_path], "attrs", {})
i.update(ds_info)

So if you leave long_name out of the YAML then the reader should pull it from the file's variable's attributes.

units: '1'
martin-rdz marked this conversation as resolved.
Show resolved Hide resolved
coordinates: [cld_lon,cld_lat]
file_key: geophysical_data/Cloud_Optical_Thickness
file_type: cldprop_l2_viirs
standard_name: cloud_optical_thickness

##########################################
# Datasets in files aerdb_l2_viirs
##########################################
Expand Down
Loading