[ncl-talk] Question about vertical integration in NCL

Lyndz olagueralyndonmark429 at gmail.com
Fri Jun 21 03:19:13 MDT 2019


Dear NCL-experts,

*Details/Problem:*
I am calculating vertically integrated moisture flux and its divergence.
But, I am getting incorrect results. There should be convergence along
5-10N. The fluxes are also weird.

Attached in this email are the script, the expected output image, and the
output of the script.
I already used the *::-1* to sort the latitudes.

*Input Files:*
I uploaded my files here:
https://www.dropbox.com/sh/43iscphbydw43w2/AABobBktPuOX3V8VxqmvFtiGa?dl=0

*What I have so far:*
Below is the part of the attached script.



  fu  = addfile("lyndz_uv_file.nc","r")       ; open netcdf file
  fq  = addfile("lyndz_shum_file.nc","r"); moisutre file

  u   = fu->U_GRD_2_ISBL(:,{1000:300},::-1,:)       ; pull u off file
  v   = fu->V_GRD_2_ISBL(:,{1000:300},::-1,:)       ; pull v off file
  q   = fq->shum(:,{1000:300},::-1,:)               ; pull q off file

;*******************************************************************************
;Vertical Integration
;*******************************************************************************
  qu = q*u
  qv = q*v

  ptop = 300.0
  psfc = 1000.0

  dp = dpres_plevel_Wrap(lev,psfc,ptop,0)
  DP = conform(qu,dp,1)
  vopt = 1
  quint = wgt_vertical_n(qu,DP,vopt,1)
  quint := tofloat(quint)
  quint at long_name = "QUFLUX: vertically integrated"
  quint at units = "kg m-1 s-1"

  qvint = wgt_vertical_n(qv,DP,vopt,1)
  qvint := tofloat(qvint)
  qvint at long_name = "QVFLUX: vertically integrated"
  qvint at units = "kg m-1 s-1"

  qdiv = uv2dvF_Wrap(quint,qvint)
  qdiv := tofloat(qdiv)
  qdiv at units = "kg m-2 s-1"
  qdiv at long_name = "QDIV: vertically integrated"



I'll appreciate any help.

Sincerely,

Lyndz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190621/e92eca27/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mconv.ncl
Type: application/octet-stream
Size: 2470 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190621/e92eca27/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: output_of_script.png
Type: image/png
Size: 492188 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190621/e92eca27/attachment-0002.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: expected_output.png
Type: image/png
Size: 294127 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20190621/e92eca27/attachment-0003.png>


More information about the ncl-talk mailing list