Skip to content

Conversation

martin-rdz
Copy link
Contributor

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


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.

@djhoese
Copy link
Member

djhoese commented Jul 28, 2025

Tests are failing and it seems to be from the long_name in the YAML needing the quotes I suggested.

@martin-rdz
Copy link
Contributor Author

Ah, sorry for triggering the CI chain. I tried to update my fork and the merge got pushed automatically.
Thanks for pointing out the issue with the quotes again. I hope find some time to fix the issue the next days.
Again sorry for causing hassle.

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