<div dir="rtl"><div dir="ltr">Hi,</div><div dir="ltr">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.</div><div dir="ltr">Does the function of  "wgt_areasum2 " make that?, and what is the unit of its output?</div><div dir="ltr">Also, in the example of "wgt_areasum2",  the variable of dxdy in conform, needs to be corrected to dydx as defined.</div><div dir="ltr"><br></div><div dir="ltr"><pre style="margin-top:0px;margin-bottom:0px;padding:0px;font-size:13.3333px;line-height:12pt;font-family:courier;border-style:solid;border-width:0px 0px 15px;border-color:transparent;color:rgb(0,0,0)">   re   = 6.37122e06
   rad  = 4.0 * <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/atan.shtml" style="margin:0px;padding:0px;text-decoration-line:none;color:rgb(133,45,133);font-family:verdana,sans-serif"><strong style="margin:0px;padding:0px">atan</strong></a>(1.0) / 180.o
   con  = re * rad                 
   clat = <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/cos.shtml" style="margin:0px;padding:0px;text-decoration-line:none;color:rgb(133,45,133);font-family:verdana,sans-serif"><strong style="margin:0px;padding:0px">cos</strong></a>(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  = <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/new.shtml" style="margin:0px;padding:0px;text-decoration-line:none;color:rgb(133,45,133);font-family:verdana,sans-serif"><strong style="margin:0px;padding:0px">new</strong></a>((/nlat, mlon/), <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/typeof.shtml" style="margin:0px;padding:0px;text-decoration-line:none;color:rgb(133,45,133);font-family:verdana,sans-serif"><strong style="margin:0px;padding:0px">typeof</strong></a>(q))
   wgt  = <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/conform.shtml" style="margin:0px;padding:0px;text-decoration-line:none;color:rgb(133,45,133);font-family:verdana,sans-serif"><strong style="margin:0px;padding:0px">conform</strong></a>(wgt, dxdy, 0)
  
   qSum = <strong style="margin:0px;padding:0px">wgt_areasum2</strong>(q, wgt, opt) </pre></div><div dir="ltr"><br></div><div dir="ltr">Thank you in advance.</div><div dir="ltr">Best regards.</div><div dir="ltr">Zeinab</div><div dir="ltr"><br></div><div dir="ltr"><br></div></div>