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

Conversation

martin-rdz
Copy link
Contributor

Add the cloud optical thickness derived from the two channel retrieval to the CLDPROP_L2 reader of VIIRS.

@@ -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.

Copy link
Member

@djhoese djhoese left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants