-
Notifications
You must be signed in to change notification settings - Fork 300
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
base: main
Are you sure you want to change the base?
Conversation
@@ -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 |
There was a problem hiding this comment.
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:
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" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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:
satpy/satpy/readers/viirs_l2.py
Lines 102 to 103 in 5d2b1fd
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some comments that should hopefully make pre-commit other tests happier.
Co-authored-by: David Hoese <[email protected]>
Add the cloud optical thickness derived from the two channel retrieval to the CLDPROP_L2 reader of VIIRS.
AUTHORS.md
if not there already