[ncl-talk] How to calculate over a crop

Dennis Shea shea at ucar.edu
Wed May 2 14:28:54 MDT 2018


Please look at:

http://www.ncl.ucar.edu/Document/Functions/Contributed/region_ind.shtml

Look at both examples.

You can use 'ji' (below) the mangle the data as you see fit

f     = *addfile*
<http://www.ncl.ucar.edu/Document/Functions/Built-in/addfile.shtml>("wrf_...nc"
, "r")
glon2d =  f->XLAT(0,:,:)
glat2d =  f->XLONG(0,:,:)

 * printMinMax*
<http://www.ncl.ucar.edu/Document/Functions/Contributed/printMinMax.shtml>(glat2d,
0)
  *printMinMax*
<http://www.ncl.ucar.edu/Document/Functions/Contributed/printMinMax.shtml>(glon2d,
0)

  latS   = 30                      ; California [*rough*]
  latN   = 43
  lonW   = -125
  lonE   = -113

  ji = *region_ind* (glat2d,glon2d, latS, latN, lonW, lonE)

  jStrt = ji(0)      ; lat start
  jLast = ji(1)      ; lat last
  iStrt = ji(2)      ; lon start
  iLast = ji(3)      ; lon last

  LAT2D = glat2d(jStrt:jLast,iStrt:iLast)
  LON2D = glon2d(jStrt:jLast,iStrt:iLast)


On Wed, May 2, 2018 at 12:53 PM, Christian Adrián Álvarez Báez <
christian.alvarez813 at gmail.com> wrote:

> Hello, I'm using ncl with WRF output. I would like to do some calculations
> over an area. I can make a crop with the mpMaxLatF, mpMinLatF, mpMaxLonF
> and mpMinLonF resources, but I would like to make calculations over that
> area without touching the area out of the crop. Is this possible?
>
> Thank you very much,
> Christian
>
> _______________________________________________
> 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/20180502/a917bc75/attachment.html>


More information about the ncl-talk mailing list