MODIS 250m Processing
MODIS 250m Processing
Working with qkm files needs a lot more memory than the km files. Systems with 32G work nicely. How much RAM does your system have? Can you work with subsets of the data (fewer bands and smaller region)?
Filters:
MODIS 250m Processing
Hi
Yes, I can subset the data -- am working on that.
I am working between my server and Mac as on my Mac I can not generate GEO and L1B files and can not get L2 file on my server as l2gen has problem!
I am setting resolution=250 in my l2gen processing
1) When I run l2gen from command line or batch script my infile is still the 1KM MODIS (L!B_LAC) file right? Or should it be QKM?
2) I use lonlat2pixline to select ___domain before calling l2gen - should the resolution be -r 1000 or -r 250?
Thanks.
Amita
Yes, I can subset the data -- am working on that.
I am working between my server and Mac as on my Mac I can not generate GEO and L1B files and can not get L2 file on my server as l2gen has problem!
I am setting resolution=250 in my l2gen processing
1) When I run l2gen from command line or batch script my infile is still the 1KM MODIS (L!B_LAC) file right? Or should it be QKM?
2) I use lonlat2pixline to select ___domain before calling l2gen - should the resolution be -r 1000 or -r 250?
Thanks.
Amita
-
- Posts: 1519
- Joined: Wed Sep 18, 2019 6:15 pm America/New_York
- Been thanked: 9 times
MODIS 250m Processing
The most efficient processing would be to extract the L1A file. Generate the GEO file from the extracted L1A file. Process to L1B, then use resolution=250 (to get a nominal 250m resolution output) when processing with l2gen using theL1B_LAC file as the input file.
Keep in mind, only two bands (and only one of those in the visible range, 645nm) are at 250m resolution (and only two at 500m in the visible 469nm and 555nm). The rest will be upscaled to match. There is NO additional information to be obtained in the 1km bands. The SNR for the 250 and 500m resolution bands low relative to the 1km bands....so there isn't much benefit to use resolution=500m or 250m (except maybe to make pretty pictures) for ocean color products. If, however, you are using the reflectance at 645nm band to track features, well, then it can be useful to process at the higher resolution.
Sean
Keep in mind, only two bands (and only one of those in the visible range, 645nm) are at 250m resolution (and only two at 500m in the visible 469nm and 555nm). The rest will be upscaled to match. There is NO additional information to be obtained in the 1km bands. The SNR for the 250 and 500m resolution bands low relative to the 1km bands....so there isn't much benefit to use resolution=500m or 250m (except maybe to make pretty pictures) for ocean color products. If, however, you are using the reflectance at 645nm band to track features, well, then it can be useful to process at the higher resolution.
Sean
MODIS 250m Processing
Hi Sean,
Yes, the goal is to track features in the Chesapeake Bay - that is why the 250 m resolution.
I first do the following
lonlat2pixline A2019297182500.L1B_LAC A2019297182500.GEO -r 1000 -x 1 -y 1 -77.01 36.7 -75.66 39.73
Then I run l2gen with the same GEO file
l2gen ifile=A2019297182500.L1B_LAC ofile=A2019297182500_L2_LAC_OC geofile=A2019297182500.GEO par=parfile.txt par=A2019297182500.L1B_LAC.anc
The parfile.txt looks like this:
resolution=250
land=/RAID2/avmehta/CBWQ/MODIS/lwm_CONUS_SRTM60m_v3.1.nc
l2prod=l2_flags,rhos_412,rhos_443,rhos_469,rhos_488,rhos_531,rhos_547,rhos_555,rhos_645,rhos_667,rhos_678
sline=147
eline=495
spixl=375
epixl=536
Then I reproject the file:
gpt.sh ReprojectGeoLatLon.xml -p ReprojectGeoLatLon.par -Ssource=A2019297182500_L2_LAC_OC -t $A2019297182500_L2_LAC_OC_reproject.nc
The resulting (cropped) file is not on the Chesapeake Bay - the outfile of l2gen and reprojected file both are to the east of the Bay in the Atlantic!
I have used the same procedure for OLCI, OLI and seems to work fine (no GEO file of course).
Thanks a lot for your help.
Amita
Yes, the goal is to track features in the Chesapeake Bay - that is why the 250 m resolution.
I first do the following
lonlat2pixline A2019297182500.L1B_LAC A2019297182500.GEO -r 1000 -x 1 -y 1 -77.01 36.7 -75.66 39.73
Then I run l2gen with the same GEO file
l2gen ifile=A2019297182500.L1B_LAC ofile=A2019297182500_L2_LAC_OC geofile=A2019297182500.GEO par=parfile.txt par=A2019297182500.L1B_LAC.anc
The parfile.txt looks like this:
resolution=250
land=/RAID2/avmehta/CBWQ/MODIS/lwm_CONUS_SRTM60m_v3.1.nc
l2prod=l2_flags,rhos_412,rhos_443,rhos_469,rhos_488,rhos_531,rhos_547,rhos_555,rhos_645,rhos_667,rhos_678
sline=147
eline=495
spixl=375
epixl=536
Then I reproject the file:
gpt.sh ReprojectGeoLatLon.xml -p ReprojectGeoLatLon.par -Ssource=A2019297182500_L2_LAC_OC -t $A2019297182500_L2_LAC_OC_reproject.nc
The resulting (cropped) file is not on the Chesapeake Bay - the outfile of l2gen and reprojected file both are to the east of the Bay in the Atlantic!
I have used the same procedure for OLCI, OLI and seems to work fine (no GEO file of course).
Thanks a lot for your help.
Amita
-
- Posts: 1519
- Joined: Wed Sep 18, 2019 6:15 pm America/New_York
- Been thanked: 9 times
MODIS 250m Processing
This is one reason I said to extract the L1A (that and the processing will be faster). If you run lonlat2pixline on theL1B_LAC (or L2, or even just the GEO file) the output will be pixels in the 1km space. Calling l2gen with those extents while also setting the resolution to 250m will result in an extract NOT where you expect it to be. You could run lonlat2pixline with
Sean
-r 250
, it'll take longer, but will give you an output in the QKM space, which will (when passed to l2gen with resolution=250m) extract the region of interest. Sean
MODIS 250m Processing
Hi Sean,
So just to clarify:
Should I use gpt (geocrop?) to first extract ___domain in L1A and GEO files? Then generate L1B?
I am not sure if I use lonlat2linpix to get line-pix limits for L1A how would that be communicated to modis_L1B.py. And the GEO file will still correspond to 1KM data
right?
I apologize for these questions - which basically shows my confusion - as I am still learning the process!
Thank you for your help and patience.
Amita
So just to clarify:
Should I use gpt (geocrop?) to first extract ___domain in L1A and GEO files? Then generate L1B?
I am not sure if I use lonlat2linpix to get line-pix limits for L1A how would that be communicated to modis_L1B.py. And the GEO file will still correspond to 1KM data
right?
I apologize for these questions - which basically shows my confusion - as I am still learning the process!
Thank you for your help and patience.
Amita
-
- Posts: 1519
- Joined: Wed Sep 18, 2019 6:15 pm America/New_York
- Been thanked: 9 times
MODIS 250m Processing
No. Use lonlat2pixline (no need to pass -r to it) to get the extents to pass to l1aextract_modis:
Process the resulting extracted L1A file to GEO/L1B/L2 with NO further geographic extents passed to l2gen.
Sean
Usage: l1aextract_modis infile spixl epixl sline eline outfile
where:
infile - input MODIS L1A datafile
spixl - start pixel number (1-based)
epixl - end pixel number (1-based)
sline - start line (1-based)
eline - end line (1-based)
outfile - output file name
Process the resulting extracted L1A file to GEO/L1B/L2 with NO further geographic extents passed to l2gen.
Sean
MODIS 250m Processing
Hello Sean,
Your suggestion about extracting ___domain from L1A file and then doing L1B and L2 works great! Thank you for your help.
In the getting L2 data I am using resolution=250m, however, when I checked the output -- I am checking Rhos for all optical and NIR bands -- the resolution appears to be close to 400 to 500 meters. I most bands have native resolution of 1 km and just two are at 250m. I just want to make sure that I am not missing something because I am getting the output at lower that 250 m resolution.
Thanks.
Amita
Your suggestion about extracting ___domain from L1A file and then doing L1B and L2 works great! Thank you for your help.
In the getting L2 data I am using resolution=250m, however, when I checked the output -- I am checking Rhos for all optical and NIR bands -- the resolution appears to be close to 400 to 500 meters. I most bands have native resolution of 1 km and just two are at 250m. I just want to make sure that I am not missing something because I am getting the output at lower that 250 m resolution.
Thanks.
Amita
-
- Posts: 1519
- Joined: Wed Sep 18, 2019 6:15 pm America/New_York
- Been thanked: 9 times
MODIS 250m Processing
The nominal resolution is at nadir. At the edge of the MODIS swath, that 1km pixel will be more like a 3x5km trapazoid...same pixel growth will be seen at all "resolutions".
Sean
Sean