l2gen for MODIST -- mismatch in ntime

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
oo_processing
Posts: 342
Joined: Wed Apr 06, 2005 12:11 pm America/New_York
Answers: 0
Endorsed: 3 times

l2gen for MODIST -- mismatch in ntime

by oo_processing » Wed Nov 19, 2025 2:29 pm America/New_York

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

Filters:

OB ODPS - towens
Subject Matter Expert
Subject Matter Expert
Posts: 469
Joined: Fri Feb 05, 2021 9:17 am America/New_York
Answers: 0
Endorsed: 10 times

Re: l2gen for MODIST -- mismatch in ntime

by OB ODPS - towens » Wed Nov 19, 2025 2:42 pm America/New_York

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?

oo_processing
Posts: 342
Joined: Wed Apr 06, 2005 12:11 pm America/New_York
Answers: 0
Endorsed: 3 times

Re: l2gen for MODIST -- mismatch in ntime

by oo_processing » Wed Nov 19, 2025 7:20 pm America/New_York

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

Post Reply