MODIS l2gen issue with xcal files

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
lindseysfei
Posts: 2
Joined: Mon Apr 20, 2026 4:04 pm America/New_York
Answers: 0

MODIS l2gen issue with xcal files

by lindseysfei » Mon Apr 20, 2026 4:21 pm America/New_York

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!

Filters:

lindseysfei
Posts: 2
Joined: Mon Apr 20, 2026 4:04 pm America/New_York
Answers: 0

Re: MODIS l2gen issue with xcal files

by lindseysfei » Wed May 20, 2026 5:20 pm America/New_York

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.

OB SeaDAS - dshea
Subject Matter Expert
Subject Matter Expert
Posts: 286
Joined: Thu Mar 05, 2009 10:25 am America/New_York
Answers: 0
Endorsed: 3 times

Re: MODIS l2gen issue with xcal files

by OB SeaDAS - dshea » Fri Jul 10, 2026 1:44 pm America/New_York

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

Post Reply