[ncl-talk] Fwd: Question about vertical integration in NCL

Lyndz olagueralyndonmark429 at gmail.com
Sat Jun 22 04:30:40 MDT 2019


Dear NCL-experts,

This is in relation to my previous email about the vertical integration in
NCL.
**********************************************************************
*Details*
I am calculating vertically integrated moisture flux convergence.
But,I am not sure If I am implementing this correctly.

I modified my script this way:

;************************************************
; Moisture convergence
;************************************************
  dv    = new ( dimsizes(u), typeof(u))         ; divergence
  ud    = new ( dimsizes(dv),typeof(dv))        ; zonal divergent wind
  vd    = new ( dimsizes(dv),typeof(dv))        ; meridional divergent wind

  uv2dvF_Wrap(u,v,dv)          ; u,v ==> divergence
  dv2uvF_Wrap(dv,ud,vd)        ; dv  ==> divergent wind components

  qu = q*ud
  qv = q*vd

  ptop = 300.0
  psfc = 1000.0

  dp = dpres_plevel_Wrap(lev,psfc,ptop,0)
  DU = conform(qu,dp,1)

  vopt = 1
  quint = wgt_vertical_n(qu,DU,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,DU,vopt,1)
  qvint := tofloat(qvint)
  qvint at long_name = "QVFLUX: vertically integrated"
  qvint at units = "kg m-1 s-1"

  qdiv = wgt_vertical_n(dv,DU,vopt,1)
  qdiv := tofloat(qdiv)
  qdiv at units = "kg m-2 s-1"
  qdiv at long_name = "QDIV: vertically integrated"
;***********************************************************

*Problem/Error:*
I am getting the following error messages:

  _FillValue : 9.96921e+36
(0) wgt_vertical_n: No _FillValue allowed
(0) wgt_vertical_n: X: nFill=84096


Any suggestion on how to address this issue?
I'll appreciate any help.

Sincerely,

Lyndz



---------- Forwarded message ---------
From: Lyndz <olagueralyndonmark429 at gmail.com>
Date: Fri, Jun 21, 2019 at 6:19 PM
Subject: Question about vertical integration in NCL
To: Ncl-talk <ncl-talk at ucar.edu>


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/20190622/aae25384/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/20190622/aae25384/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/20190622/aae25384/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/20190622/aae25384/attachment-0003.png>


More information about the ncl-talk mailing list