[ncl-talk] precipitation over area in m3

Zeinab Salah zeinabsalah at gmail.com
Thu Jul 23 08:45:05 MDT 2020


Hi,
I want to calculate the sum of precipitation over an area from netcdf and
the area selected by shapefile and the value to be in m3.
Does the function of  "wgt_areasum2 " make that?, and what is the unit of
its output?
Also, in the example of "wgt_areasum2",  the variable of dxdy in conform,
needs to be corrected to dydx as defined.

   re   = 6.37122e06
   rad  = 4.0 * *atan*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/atan.shtml>(1.0)
/ 180.o
   con  = re * rad
   clat = *cos*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/cos.shtml>(lat *
rad)           ; cosine of latitude

   dlon = (lon(2) - lon(1))        ; assume dlon is constant
   dlat = (lat(2) - lat(1))        ; assume dlat is constant

   dx   = con * dlon * clat        ; dx at each latitude
   dy   = con * dlat               ; dy is constant
   dydx = dy * dx                  ; dydx(nlat)

   wgt  = *new*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/new.shtml>((/nlat,
mlon/), *typeof*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/typeof.shtml>(q))
   wgt  = *conform*
<https://www.ncl.ucar.edu/Document/Functions/Built-in/conform.shtml>(wgt,
dxdy, 0)

   qSum = *wgt_areasum2*(q, wgt, opt)


Thank you in advance.
Best regards.
Zeinab
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200723/d7e8f9c0/attachment.html>


More information about the ncl-talk mailing list