Page 1 of 1

MODIS l2gen issue with xcal files

Posted: Mon Apr 20, 2026 4:21 pm America/New_York
by lindseysfei
I'm working with MODIS imagery to get L1C imagery via l2gen. It worked previously, but after a break, I tried it again with a different date/imagery, and it is failing.

Previously I had OCSSW version T2025.16 based off this post (viewtopic.php?t=7294), so I tried reinstalling with the latest test version T2026.4 and it still fails.

These are the last few lines before it fails:

Loading XCAL rvs and polarization sensitivities from /home/lindseys/ocssw/var/modist/xcal/OPER/xcal_modist_txc_oc_v4.13b_412.nc
ERROR: FAILURE TO READ NETCDF xcal file
No such file or directory
file: /home/dshea/linux_64/ocssw/opt/src/netcdf/netcdf-cxx4/cxx4/ncFile.cpp line:88

In the directory /home/lindseys/ocssw/var/modist/xcal/OPER, the file xcal_modist_txc_oc_v4.13b_412.hdf exists but not xcal_modist_txc_oc_v4.13b_412.nc. I think I see the issue here, but not sure how to resolve it (maybe reinstalling a specific version, but outside of trial and error not sure how to decide which one).

If it makes a difference, the old input MODIS data that worked were in HDF, the newer ones are NetCDF. I believe they all came off the LAADS DAAC, but now I feel like I'm unsure about the .hdf data I used that worked (searching for exact same params shows order page with only .nc files now).

Thanks!

Re: MODIS l2gen issue with xcal files

Posted: Wed May 20, 2026 5:20 pm America/New_York
by lindseysfei
I found a way around this for now. I went into ~/ocssw/var/modis/xcal/OPER/ and manually converted all the .hdf files in there to .nc using the HDF4 CF Conversion Toolkit (https://www.hdfeos.org/software/h4cflib.php). It's a bit hacky and there's probably a better solution to this, but it got me moving forward for now.

Re: MODIS l2gen issue with xcal files

Posted: Fri Jul 10, 2026 1:44 pm America/New_York
by OB SeaDAS - dshea
l2gen does not support MODIS collection7 yet. We do not have LUTs that calibrate MODIS collection7 correctly.

Currently you need to get the L1A file from us or LAADS which must be an HDF4 file. To get the correct calibration use modis_GEO and modis_L1B to get the GEO and L1B files to feed into l2gen.

don