Hi!
I downloaded the Meris L3 chlor_a monthly data (e.g.M20070012007031.L3m_MO_CHL_chlor_a_9km) directly from the website, and found that there is no lat/lon info stored in the nc files. I also downloaded chlor_a data by other sensors (AquaModis, SeaWiFs, etc) but there are lat/lon. I am new to nc files, so I am unsure if my way of accessing the data is correct. Does the Meris data include the lat/lon info (I can only find the chlor_a conc. named "l3m_data")? Or does it share the same lat/lon info as other sensors?
Thanks a lot!
Z
No lat/lon info in Meris L3 chlor_a
-
- Subject Matter Expert
- Posts: 147
- Joined: Tue Feb 09, 2021 8:19 am America/New_York
No lat/lon info in Meris L3 chlor_a
Hi Z,
You do not need to read lat/lon information for any of our level-3, mapped files (L3m)
because the data are already in a known projection, namely, plate carrée (also
known as simple cylindrical) centered on the prime meridian.
We have not yet reprocessed our MERIS data holdings, so the level-3 files are
still in the old HDF4 format (not NetCDF4 as our SeaWiFS, MODIS, and VIIRS
products are). This accounts for the differences you are seeing.
Determining the central latitude and longitude for any pixel in the MERIS L3m
files you are downloading is a fairly straightforward procedure. Here is one
possibility using the hdp program and Perl. The width of 4320 is appropriate
for 9 kilometer resolution files such as the MERIS example below.
I hope this helps.
Regards,
Norman
You do not need to read lat/lon information for any of our level-3, mapped files (L3m)
because the data are already in a known projection, namely, plate carrée (also
known as simple cylindrical) centered on the prime meridian.
We have not yet reprocessed our MERIS data holdings, so the level-3 files are
still in the old HDF4 format (not NetCDF4 as our SeaWiFS, MODIS, and VIIRS
products are). This accounts for the differences you are seeing.
Determining the central latitude and longitude for any pixel in the MERIS L3m
files you are downloading is a fairly straightforward procedure. Here is one
possibility using the hdp program and Perl. The width of 4320 is appropriate
for 9 kilometer resolution files such as the MERIS example below.
wget https://oceandata.sci.gsfc.nasa.gov/cgi/getfile/M20070012007031.L3m_MO_CHL_chlor_a_9km.bz2
bunzip2 M20070012007031.L3m_MO_CHL_chlor_a_9km.bz2
hdp dumpsds -n l3m_data -b -d M20070012007031.L3m_MO_CHL_chlor_a_9km \
| perl \
-e '$wid=4320;' \
-e '$hgt=$wid/2;' \
-e '$inc=360/$wid;' \
-e '$nodata=pack "f",-32767;' \
-e 'print "lat lon chl\n";' \
-e 'for($y=0;$y<$hgt;$y++){' \
-e ' $lat=90-$y*$inc-$inc/2;' \
-e ' for($x=0;$x<$wid;$x++){' \
-e ' read(STDIN,$flt,4)==4 or die "Error reading input ($!)";' \
-e ' next if $flt eq $nodata;' \
-e ' $lon=-180+$x*$inc+$inc/2;' \
-e ' $val=unpack "f",$flt;' \
-e ' printf "%.3f %.3f %.3g\n",$lat,$lon,$val;' \
-e ' }' \
-e '}' \
> lat_lon_chl.txt
I hope this helps.
Regards,
Norman
No lat/lon info in Meris L3 chlor_a
Hi Norman,
Thank you so much for your detailed explanation and sorry for my slow response. It makes sense to me :)
Cheers,
Z
Thank you so much for your detailed explanation and sorry for my slow response. It makes sense to me :)
Cheers,
Z