[ncl-talk] Attempting to average modis aod for certain points

Dennis Shea shea at ucar.edu
Mon Jan 20 21:10:40 MST 2020


The script you keep modifying was created for grids with different
lat2d/lon2d arrays for each orbit.
The lat2d/lon2d arrays in the files you attached are the same for each
file.The following is verification:

%> ncl tst.lat2d_lon2d.ncl
   :
====
I have attached a script that extracts the value for each orbit at the one
location you specified as follows:

;********** New code addition for printing location
data**********************
  latloc  =  40.821                           ; can be more than on location
  lonloc  = -73.949

Using the function* getind_latlon2d
<http://www.ncl.ucar.edu/Document/Functions/Contributed/getind_latlon2d.shtml>*
, the grid point closest to (latloc,lonloc) was identified.

%> ncl daily_orbit.ncl

*nl=1101  ml=484 * lat2d(nl,ml)=40.82083332967001
 lon2d(nl,ml)=-73.9503820767582

The values for each of the 5 orbits are as follows:
Variable: X
Dimensions and sizes: [*Orbits_grid1km | 5*]
  _FillValue : -28672

(0) 0.041
(1) -28672
(2) -28672
(3) 0.146
(4) -28672

===
These are very different from what you mention.

On Sun, Jan 19, 2020 at 6:04 PM Herb, Jason via ncl-talk <ncl-talk at ucar.edu>
wrote:

> Hello,
>
> I am attempting to have ncl do the averaging of all swaths for a given day
> for a certain location. The script i have appears to not be averaging the
> data properly when I look at a given day and manually average the swaths
> together i get get the correct average of 0.05 but on 1/2/2002 my output
> file says the average is 0.05 but the swath location values are 0.12, 0.05
> and 0.08 which average to 0.08. I have attached a copy of my script and two
> hdf files. Any suggestions?
>
> 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/20200120/2edc073a/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tst.lat2d_lon2d.ncl
Type: application/octet-stream
Size: 421 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200120/2edc073a/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: daily_orbit.ncl
Type: application/octet-stream
Size: 3358 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200120/2edc073a/attachment-0001.obj>


More information about the ncl-talk mailing list