[ncl-talk] attempting to get grid point counts

Dennis Shea shea at ucar.edu
Mon Jun 17 07:22:37 MDT 2019


[1]
If you use:

%> *ncl_filedump *
<https://www.ncl.ucar.edu/Document/Tools/ncl_filedump.shtml>
MCD19A2.A2019071.h10v11.006.2019073033901.*hdf|* less

Variable: f
Type: file
filename:       *MCD19A2.A2019071.*h10v11.006.2019073033901
path:   MCD19A2.A2019071.h10v11.006.2019073033901.hdf
   file global attributes:


*HDFEOSVersion : HDFEOS_V2.19      StructMetadata_0 : GROUP=SwathStructure*
*END_GROUP=SwathStructure*

[SNIP]

This indicates the file use the* HDF-EOS *'convention'
HDF-EOS supports three geospatial data types: grid, point, and swath,
These data types are *not* accessible via standard HDF library calls.
NCL has a very nice simple feature that will return additional
[value-added] information.
For example: There are no latitude/longitude variables on the original .
*hdf* file.

NCL recognizes addtional 'virtual' file extensions: .*he2* [*.he5*] or
*hdfeos*.

%> *ncl_filedump *
<https://www.ncl.ucar.edu/Document/Tools/ncl_filedump.shtml>
MCD19A2.A2019071.h10v11.006.2019073033901.*hdf.he2|* less

The file will be 'cleaned-up' . Further, it will create classic
latitude/longitude arrays. EG

      double *GridLat_grid1km ( YDim_grid1km, XDim_grid1km )*
         projection :   Sinusoidal
         corners :      ( -20.00416666486723, -20.00416666486723,
-29.99583333063962, -29.99583333063962 )
         long_name :    latitude
         units :        degrees_north

      double *GridLon_grid1km ( YDim_grid1km, XDim_grid1km )*
         projection :   Sinusoidal
         corners :      ( -85.13204127176456, -74.49885022173193,
-80.83045538778872, -92.36735390691214 )
         long_name :    longitude
         units :        degrees_east

These can be read and used by an NCL script.

----
The attached *MCD19A2.JasonHerd.ncl *should do what you want. *It uses the
virtual .he2 file extension.* It is a slight modification of:

*https://www.ncl.ucar.edu/Applications/binning.shtml*
<https://www.ncl.ucar.edu/Applications/binning.shtml>
Example 1

There is much about Example 1 that is a bit out of date ...but it works!
Note that this is 'read-and-plot' script. No filtering by data quality
flags has been performed. That is your job.

*I do not have a complete set of MCD19A2 files for March 12, 2019. *However,
the attached plot gives the flavor of what you will get.

===
The golden rule of data processing is look at tour data. The are multiple
orbits per file.

Good luck

On Fri, Jun 14, 2019 at 12:48 PM Herb, Jason <jherb at albany.edu> wrote:

> Hello,
>
> I am working with the MCD19A2 aerosol data. To get an idea as to the
> overall coverage extent and quantity of measurements for each 1x1km grid
> box, I am attempting to make all measured data to be " 1 " and then add
> with each orbit pass in the file (Ex. the location being studied has a max
> of 6 passes for a day.) Assuming the full number of passes over the studied
> area and say fully clear skies to give no missing data when I map the
> replaced 1 into each grid point and sum the data points the map should show
> a uniform map of 6.
> That being said how can I replace any of the AOD data that falls in to the
> range of 0.00-1.00 to become 1 and sum up for from the array data?
>
> Thanks,
>
> Jason
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190617/a84060b5/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MCD19A2.JasonHerd.ncl
Type: application/octet-stream
Size: 7491 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190617/a84060b5/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MCD19A2_binning_20190312.png
Type: image/png
Size: 349891 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190617/a84060b5/attachment-0001.png>


More information about the ncl-talk mailing list