I encountered a persistent error while running l2gen for MODIS data that was not present a few days ago. The same command that previously worked now fails with the following message:
Loading XCAL rvs and polarization sensitivities from /home/johan_ma/ocssw/var/modist/xcal/OPER/xcal_modist_txc_oc_v4.9b_412.hdf
-E- /accounts/dshea/ocssw/oel_hdf4/libl1/xcal.c Line 148: mismatch in ntime
This error appears on two different machines, both running independent installations of OCSSW
Environment
OCSSW TAG V2025.5
System: Ubuntu 22.04 (WSL2)
OCSSW install path: /home/johan_ma/ocssw
$OCSSWROOT = /home/johan_ma/ocssw
which l2gen = /home/johan_ma/ocssw/bin/l2gen
XCAL file MD5: d1a4fcd02de0a8087378f7f16109cca4
Error occurs even when using previously successful L1B input files
Tested on two independent systems, both showing the same behavior
MODIS L2GEN error: "mismatch in ntime" when reading XCAL file xcal_modist_txc_oc_v4.9b_412.hdf
-
OB SeaDAS - dshea
- Subject Matter Expert

- Posts: 277
- Joined: Thu Mar 05, 2009 10:25 am America/New_York
- Endorsed: 3 times
Re: MODIS L2GEN error: "mismatch in ntime" when reading XCAL file xcal_modist_txc_oc_v4.9b_412.hdf
The problem is that we did not expect Terra to last this long... We only had space in the code for 300 date records and the current xcal file for modist (xcal_modist_txc_oc_v4.12b) has ndates = 307. The fix for this first appearers in T2025.16 so any tag after that should work. Sorry it is not in any "V" tag you have access to.
don shea
don shea