[ncl-talk] Plotting a variable's isosurface in 3D by tdez3d
Armağan Gözütok
armagango at gmail.com
Sat Dec 9 08:16:08 MST 2017
Hello,
I wanted to create 3d plots recently, bye some modification on the scripts
here:
https://www.ncl.ucar.edu/Applications/tdpack.shtml
I did manage to plot the surface plots by tdez2d function (plotted HGT from
the WRF outputs), however my 3d variables cannot be plotted, getting always
an error somehow although i check all the dimensions properly which they
coincide.
I couldn't manage to upload an .nc outputs to the ftp server,
Here is my NCL script to create isosurface plot of graupel mixing ratio
(called isosurf.ncl) different than 3d_hgt.ncl:
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
begin
a = addfile("wrfout_d01_2017-07-27_12:00:00.nc","r")
qgraup = a->QGRAUP(49,:,:,:) ; Graupel mixing ratio at
iteration #49
lat = a->XLAT(0,:,0) ; latitude
lon = a->XLONG(0,0,:) ; longitude
xi = lat
yi = lon
zi = ispan(1,49,1)*1. ;vertical pressure level # 50 different pressure
levels
ui = 0.0001 ; graupel mixing ratio defined for isosurface plot
;dimlat = dimsizes(lat)
;dimlon = dimsizes(lon)
dimz = dimsizes(zi)
;dimgraup = dimsizes(qgraup)
;print(dimlat)
;print(dimlon)
print(dimz)
;print(dimgraup)
wks = gsn_open_wks("png","3d_isosurface_qgraup")
tdez3d(wks,xi,yi,zi,qgraup,ui,1.8,-45.,58.,-4)
frame(wks)
end
Armagan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171209/3202435e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3d_hgt.ncl
Type: application/octet-stream
Size: 509 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171209/3202435e/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tdpack.png
Type: image/png
Size: 166356 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171209/3202435e/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: isosurf.ncl
Type: application/octet-stream
Size: 670 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171209/3202435e/attachment-0001.obj>
More information about the ncl-talk
mailing list