Page 1 of 1

l2gen for MODIST -- mismatch in ntime

Posted: Wed Nov 19, 2025 2:29 pm America/New_York
by oo_processing
Dear Support,

Example files
https://oceandata.sci.gsfc.nasa.gov/getfile/T2025320041500.L1A_LAC.bz2
https://oceandata.sci.gsfc.nasa.gov/getfile/TERRA_MODIS.20251116T041501.GEO.NRT.hdf

My OCSSW is V2025.5, and I was running the following commands:
$ bunzip2 -d T2025320041500.L1A_LAC.bz2
$ modis_L1B T2025320041500.L1A_LAC TERRA_MODIS.20251116T041501.GEO.NRT.hdf -o=test.L1B_LAC.nc
$ l2gen ifile=test.L1B_LAC.nc geofile=TERRA_MODIS.20251116T041501.GEO.NRT.hdf ofile=test.L2_LAC.nc

The error was:
...
Loading XCAL rvs and polarization sensitivities from /V2025.5/var/modist/xcal/OPER/xcal_modist_txc_oc_v4.11b_412.hdf
-E- /V2025.5/ocssw_src/oel_hdf4/libl1/xcal.c Line 148: mismatch in ntime


My workaround is to use the old v4.7b xcal files, but what happened to those newer versions?

Thanks,
-Yuyuan

Re: l2gen for MODIST -- mismatch in ntime

Posted: Wed Nov 19, 2025 2:42 pm America/New_York
by OB ODPS - towens
I know there was a decades-old bug in the original code that didn't expect the life of the satellite to exceed 25 years and the latest update exceeded the allocated array size. That has since been patched. Have you tried updating V2025.5?

Re: l2gen for MODIST -- mismatch in ntime

Posted: Wed Nov 19, 2025 7:20 pm America/New_York
by oo_processing
Thanks a lot for the hint.

I like to stay with the V tags. A small change and rebuild works for me.

Code: Select all

--- a/V2025.5/ocssw_src/oel_hdf4/libl1/xcal.h
+++ b/T2025.17/ocssw_src/oel_hdf4/libl1/xcal.h
@@ -3,7 +3,7 @@

 #include "l1.h"

-#define XTNTIME 300
+#define XTNTIME 360
-Yuyuan