No lat/lon info in Meris L3 chlor_a

Use this Forum to find information on, or ask a question about, NASA Earth Science data.
Post Reply
zzy2014
Posts: 2
Joined: Wed May 23, 2018 3:04 pm America/New_York
Answers: 0

No lat/lon info in Meris L3 chlor_a

by zzy2014 » Wed May 23, 2018 4:10 pm America/New_York

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

Filters:

OB WebDev - norman
Subject Matter Expert
Subject Matter Expert
Posts: 147
Joined: Tue Feb 09, 2021 8:19 am America/New_York
Answers: 0

No lat/lon info in Meris L3 chlor_a

by OB WebDev - norman » Wed May 23, 2018 4:58 pm America/New_York

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.

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

zzy2014
Posts: 2
Joined: Wed May 23, 2018 3:04 pm America/New_York
Answers: 0

No lat/lon info in Meris L3 chlor_a

by zzy2014 » Wed May 30, 2018 2:33 pm America/New_York

Hi Norman,

Thank you so much for your detailed explanation and sorry for my slow response. It makes sense to me :)

Cheers,
Z

Post Reply