Page 1 of 1
Wrong valid_max attribute for ipar
Posted: Tue Jul 18, 2023 1:38 am America/New_York
by gbourdin
Hi all,
I was missing all ipar data after running l2gen on MODISA, MODIST, and OLCI. I noticed l2gen is defining the wrong "valid_max" attribute for ipar, both "valid_min = 0" and "valid_max = 0".
I found a workaround forcing "valid_max = 30000" to prevent ipar data to disappear during the next step of my processing.
Just wanted to know if I am the only one having this problem?
I am using OCSSW V2023.2
Best,
Guillaume
Re: Wrong valid_max attribute for ipar
Posted: Tue Jul 18, 2023 12:39 pm America/New_York
by OB SeaDAS - xuanyang02
I have valid ipar data after running l2gen on A2023164100000.L1A_LAC.
gbourdin wrote: ↑Tue Jul 18, 2023 1:38 am America/New_York
I noticed l2gen is defining the wrong "valid_max" attribute for ipar, both "valid_min = 0" and "valid_max = 0".
I looked at ipar in ocssw/share/common/product.xml, but did not see "valid_max=0". Where did you change "valid_max=0" to "valid_max=30000"?
Re: Wrong valid_max attribute for ipar
Posted: Wed Jul 19, 2023 3:04 am America/New_York
by gbourdin
The "valid_max=0" is in the attributes of the ipar variable in the output L2 netCDF file.
I also looked at ipar in ocssw/share/common/product.xml and I have a good max value:
Code: Select all
</product>
<product name="ipar">
<standardName>downwelling_photosynthetic_photon_radiance_in_sea_water</standardName>
<units>einstein m^-2 s^-1</units>
<category>Derived</category>
<type>short</type>
<range>
<displayMin>0</displayMin>
<displayMax>0.0025</displayMax>
<scaleFactor>1e-07</scaleFactor>
<addOffset>0</addOffset>
</range>
<algorithm>
<cat_ix>84</cat_ix>
<description>Instantaneous Photosynthetically Available Radiation</description>
</algorithm>
I am not sure where is the problem coming from but all (several hundreds) L2 images out of l2gen have this problem.
Best,
Guillaume
Re: Wrong valid_max attribute for ipar
Posted: Wed Jul 19, 2023 2:54 pm America/New_York
by OB SeaDAS - xuanyang02
The issue is that valid_min and valid_max for ipar are not defined in product.xml, and l2gen assigned 0 to valid_min and valid_max by default. We'll fix the issue for the next V tag.
In the mean time, you can change valid_min and valid_max in product.xml, so l2gen will create L2 files with valid_min and valid_max for ipar that you defined.
However, the L2 files generated by l2gen should have valid ipar data if you display the ipar band with SeaDAS GUI.
Re: Wrong valid_max attribute for ipar
Posted: Wed Jul 19, 2023 6:08 pm America/New_York
by gbourdin
Perfect thank you! I will make it work until the next V tag.
I guess I noticed the issue because I am not using the GUI.
Best,
Guillaume