Meteogram script - GrADS

All other topics about postprocessing model data (GrADS and other software), about other numerical weather prediction software (including WRF-NMM and WRF-ARW discussion unrelated to UEMS/WRF EMS), and general meteorology talk go in this forum.
meteoadriatic
Posts: 1601
Joined: Wed Aug 19, 2009 10:05 am

Meteogram script - GrADS

Post by meteoadriatic » Sat Sep 12, 2009 3:00 pm

Few months ago I had hard time to find some useful meteogram script for GrADS. So I decided to write my own and now I would like to share it with world, I hope it will help someone. I know it isn't perfect and most likely you will have to tune it to your needs, especially in part where wind vectors are plotted. Maybe someone improve it further and share his results back with us.

This is script:

Code: Select all

function main(args)
lat = subwrd(args,1)
lon = subwrd(args,2)
maxtime = subwrd(args,3)
location = subwrd(args,4)
product = subwrd(args,5)
resolution = subwrd(args,6)
date = subwrd(args,7)
run = subwrd(args,8)
domain = subwrd(args,9)


'reinit'

'open /usr1/wrf/runs/'domain'/wrfpost/grads/wrf.ctl'
'set background 0'
'c'


* RELATIVE HUMIDITY, TEMPERATURE

'set vpage 0.63 8.5 4.4 11'
'set display color white'
'set lat 'lat
'set lon 'lon
'set t 1 'maxtime+1

'set clopts -1 -1 0.08'
'set clskip 1 3.5'

'set lev 1013 250'
'set gxout shaded'
'set grid off'
'set grads off'
'set rgb 30 234 245 234'
'set rgb 50 200 215 200'
'set rgb 70 120 215 120'
'set rgb 90 0 255 0'
'set rgb 95 0 195 0'
'set clevs   30 50 70 90 95'
'set ccols 0 30 50 70 90 95'
'set csmooth on'
'set ylint 100'
'd rhprs'
'set gxout contour'
'set cthick 1'
'set cstyle 5'
'set clevs 30 50 70 90'
'set ccols 15 15 15 15'
'set ylpos 0 r'
'd rhprs'

'set gxout contour'
'set ccolor 1'
'set cint 5'
'set clab forced'
'd tmpprs-273.15'
'set cthick 6'
'set clevs 0'
'set ccols 1'
'd tmpprs-273.15'

'draw title 'location ' 'product ' 'resolution

'set vpage 0 3.5 0 11'
'set string 1'
'set strsiz 0.10'
'draw string 0.3 8.2 Temperatura'
'draw string 0.6 8.0 (st.C)'
'set string 3'
'draw string 0.22 7.7 Relativna vlaga'
'draw string 0.7 7.5 (%)'
'set string 1'
'set strsiz 0.15'
'draw string 0.1 10.7 init: '
'draw string 0.1 10.5 'date' 'run'z'
'set strsiz 0.08'
'draw string 0.1 10.1 Forecast model by'
'draw string 0.1 10.0 www.meteoadriatic.net'
'set strsiz 0.10'




* MSLP, TEMPERATURE 2M

'set vpage 0 8.5 2.5 5.55'
'set grads off'
'set xlab off'
'set t 1 'maxtime+1
'set lev 1013'
'set gxout line'
'set ccolor 1'
'set cmark 0'
'set csmooth on'
'set ylint 3'
'd prmslmsl/100'
'set ccolor 2'
'set cmark 0'
'set ylint 2'
'set ylpos 0 r'
'set ylopts 2'
'set grid horizontal 5 2'
'd tmp2m-273.15'

'set string 1'
'draw string 0.15 1.7 Atmosferski tlak'
'draw string 0.6 1.5 (hPa)'
'set string 2'
'draw string 0.12 1.2 Temperatura 2m'
'draw string 0.6 1.0 (st.C)'



* WIND SPEED, WIND BARBS

'set vpage 0 8.5 1.2 4.0'
'set grads off'
'set gxout line'
'set cmark 0'
'set ylopts 3'
'set ylevs 1 5 10 15 20 30 40 50'
'set ylpos 0 l'
'set ccolor 3'
'set cthick 6'
'set grid horizontal 5 3'
'd mag(ugrd10m,vgrd10m)'
'set parea 2 8.0 0.2 2.6'
lap1 = lat + 0.01
lam1 = lat - 0.01
'set lat 'lam1' 'lap1
'set frame off'
'set xyrev on'
'set ylab off'
'set cthick 1'
'set gxout barb'
'd skip(ugrd10m*1.95,1,4);vgrd10m*1.95'
'set parea off'
'set lat 'lat
'set frame on'
'set ylab on'
'set string 1'
'draw string 0.3 1.4 Brzina i smjer'
'draw string 0.6 1.2 vjetra'
'draw string 0.6 1.0 (m/s)'




* PRECITPITATION

'set vpage 0 8.5 0 2.7'
'set xlab on'
count = 2
'set gxout contour'
maxprec = 0.1
maxcount = maxtime+2
while ( count < maxcount )
'set t 'count
'd apcpsfc'
mprec = subwrd(result,10)
if ( mprec > maxprec )
'd apcpsfc'
maxprec = subwrd(result,10)
endif
count = count + 1
endwhile

'set grads off'
'set t 1 'maxtime+1
'set lev 1013'
'set gxout bar'
'set ccolor 4'
'set ylopts 4'
if ( maxprec < 1 )
'set ylevs 0.1 0.2 0.4 0.6 0.8 1'
endif
if ( maxprec >= 1 & maxprec < 10 )
'set ylevs 0.5 1 2 4 6 8 10'
endif
if ( maxprec >= 10 )
'set ylevs 1 5 10 20 30 50 70 100'
endif
'set vrange 0 'maxprec+maxprec/20
'set grid horizontal 5 4'
'd apcpsfc'
'set string 4'
'draw string 0.2 1.5 Ukupna oborina'
'draw string 0.5 1.3 (mm/1h)'

'printim /tmp/wrf/nmm/'domain'/meteogrami/'location'.png x695 y900'
'quit'

return
This is result (click to see it larger):

Image

wettersat
Posts: 32
Joined: Fri Aug 21, 2009 9:30 pm

Re: Meteogram script

Post by wettersat » Sat Sep 12, 2009 4:07 pm

Here is my script

Code: Select all

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
* meteogram_gfs.gs
*
* This script draws a meteogram based on NCEP forecast data.
* The data is available through the GrADS-DODS Server at COLA.
* You MUST be using a DODS-enabled version of GrADS.
*
* Usage:   meteogram_gfs <name> <yyyymmddhh> <lon> <lat> <e>
* Example: meteogram_gfs Boston  2003031300   -71    42   e 
*
* The GFS forecasts are global. Check the GDS URL 
* http://monsoondata.org:9090/dods/gfs for a complete 
* listing of all available forecast times. 
*
* The 'e' argument is for British units. Default is metric.
*
* Note: This script must be run in a directory in which 
* you have write permission because intermediate files 
* are written out to disk in order to speed up the display
* and minimize the number of hits to the data server. 
*  
* Originally written by Paul Dirmeyer
* Modification History:
* J.M. Adams   Oct 2001
* Jim Kinter   Oct 2001
* J.M. Adams   Dec 2001
* Joe Wielgosz Jan 2002
* J.M. Adams   Jul 2002
* J.M. Adams   Mar 2003 
* J.M. Adams   Jul 2005
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
function main(args)

* Make sure GrADS is in portrait mode
'q gxinfo'
pagesize = sublin(result,2)
xsize = subwrd(pagesize,4)
ysize = subwrd(pagesize,6)
if (xsize != 8.5 & ysize != 11)
  say 'You must be in PORTRAIT MODE to draw a meteogram'
  return
endif

* Parse the arguments: name, date, longitude, latitude, units
if (args = '')
  name = 'Salzburg'
  date = '2007010100'
  hilon = '13.03'
  hilat = '47.81'
  metric = '10'
  if (metric='n' | metric='N') ; units='e' ; endif
else 
  name  = subwrd(args,1)
  date  = subwrd(args,2)
  hilon = subwrd(args,3)
  hilat = subwrd(args,4)
  units = subwrd(args,5)
endif

* Open the data file
'reinit'
'open /wrfems/runs/Austria4/emsprd/grib/wrfout.ctl'


* Get info from the descriptor file
'q ctlinfo'
_ctl = result
_undef = getctl(undef)
_tdef = getctl(tdef)
_zdef = getctl(zdef)

* Get the Time axis info
tsize = subwrd(_tdef,2)
_t1 = 2
_t2 = tsize
'set t '_t1' '_t2
'q dims'
times  = sublin(result,5)
_time1 = subwrd(times,6)  
_time2 = subwrd(times,8)
_tdim = _time1' '_time2

tincr = subwrd(_tdef,5)
_tdef = 'tdef 'tsize' linear '_time1' 'tincr

* Get Vertical grid info 
zsize = subwrd(_zdef,2)
z = 1
zlevs = ''
rhzlevs = ''
while (z <= zsize)
  'set z 'z
  lev = subwrd(result,4)
  if lev = 500 ; z500 = z ; endif
  zlevs = zlevs%lev%' '
  z = z + 1
endwhile

* Find the grid point closest to requsted location
'set lon 'hilon
hilon = subwrd(result,4)
'set lat 'hilat
hilat = subwrd(result,4)
_xdim = hilon' 'hilon 
_ydim = hilat' 'hilat

* Determine pressure range for hovmoellers
getseries(pressfc,pshov,1000)
'set lon 'hilon
'set lat 'hilat
'd ave(pshov,t='_t1',t='_t2')*0.01-15.0'

data = sublin(result,2)
mmm = subwrd(data,4)
meanps = math_nint(mmm)
cnt = 1
while (cnt<zsize)
  el1 = subwrd(zlevs,cnt)
  el2 = subwrd(zlevs,cnt+1)
  if (meanps > el2)
    elb = el1
    elt = subwrd(zlevs,z500+cnt-1)
    break
  endif
  cnt=cnt+1
endwhile
if (elt < 500) ; elt = 500 ; endif
_zbot = elb
_ztop = elt
_zgrd = _zbot' '_ztop

* Get number of pressure levels between _zbot and _ztop
n = 1
p = subwrd(zlevs,n)
while (p != _zbot)
  n = n + 1
  p = subwrd(zlevs,n)
endwhile
levs = p
nlevs = 1
while (p > _ztop)
  n = n + 1
  p = subwrd(zlevs,n)
  levs = levs%' 'p
  nlevs = nlevs + 1
endwhile
_newzsize = nlevs
_zdef = 'zdef '_newzsize' levels 'levs

* Get the Z,T grids for the upper air variables
getgrid(rhprs,rhum)
getgrid(tmpprs,tmpprs)
getgrid(ugrdprs,ugrdprs)
getgrid(vgrdprs,vgrdprs) 
getgrid('hgtprs',hgt)

* Set up a few preliminary characteristics
setcols(1)
'set display color white'
'c'

* Determine the plot areas for each panel
* Panels: Xsect, thickness, stability, slp, u10, t2m, rh2m, precip
npanels = 8  
x1 =  1.20
x2 =  8.15
y1 =  7.50
y2 = 10.10
panel.npanels = x1' 'x2' 'y1' 'y2   ;* hovmoeller panel
ytop = 7.5  ;* y boundaries for rest of panels except precip
ybot = 1.7
int = (ytop-ybot)/(npanels-2)     ;* get height of middle panels
int = 0.001 * (math_nint(1000*int))
n=npanels-1
y2 = ytop
while (n >= 2)
  y2 = ytop - (npanels-n-1)*int
  y1 = ytop - (npanels-n)*int
  panel.n = x1' 'x2' 'y1' 'y2        ;* coords of middle panels
  n = n - 1
endwhile
xincr = (8.15 - 1.2)/tsize           ;* size of one time step
xincr = 0.01 * math_nint(100*xincr)
panel.1 = x1+xincr' 'x2' 0.55 'y1     ;* coords of precip panel

* Set the Plot Area for the Upper Air Panel
p = npanels
'set parea 'panel.p
'set vpage off'
'set grads off'
'set grid on'

* Draw the Relative Humidity Shading
'set gxout shaded'
'set csmooth on'
'set clevs  30 50 70 90 100'
'set ccols 0 20 21 23 25 26'
'set xlopts 1 4 0.16'
'set xlpos 0 t'
*'set ylab `1%g'
'set ylab %g'
'set ylint 100'
if (units = 'e')
  'define temp =  (tmpprs-273.16)*1.8+32'
  'define uwnd =  ugrdprs*2.2374'
  'define vwnd =  vgrdprs*2.2374'
else
  'define temp =  tmpprs-273.16'
  'define uwnd =  ugrdprs'
  'define vwnd =  vgrdprs'
endif
'set t '_t1-0.5' '_t2+0.5
'set lev '_zbot+50' '_ztop-50
'd rhum'
'set gxout contour'
'set grid off'
'set ccolor 15'
'set clab off'
'set clevs 10 30 50 70 90'
'd rhum'
'set ccolor 0'
'set clab on'
'set cstyle 5'
'set clopts 15'
'set clevs 10 30 50 70 90'
'd rhum'

*Draw the Temperature Contours
 'set clopts -1'
 'set cstyle 1'
 'set ccolor rainbow'
 'set rbcols 9 14 4 11 5 13 12 8 2 6'
 if (units = 'e')
  'set cint 10'
  'set cthick 6'
  'd temp'
  'set clevs 32'
  'set cthick 12'
  'set ccolor 1'
  'set clab off'
  'd temp'
  'set background 1'
  'set ccolor 20'
  'set clevs 32'
  'set cthick 3'
  'set clab on'
  'set clab `4FR'
 else
  'set cint 5'
 'set cthick 1'
  'd temp'
 'set clevs 0'
  'set cthick 1'
  'set ccolor 1'
  'set clab off'
  'd temp'
  'set background 1'
  'set ccolor 1'
  'set clevs 0'
  'set cthick 1'
  'set clab on'
 endif
 'd temp'

* Draw the Wind Barbs
'set background 0'
'set gxout vector'
'set arrlab off'
'set ccolor 15'
'set xlab off'
'set ylab off'
'd uwnd;vwnd'

* Draw a rectangle over the year to clear the area for a title
'set line 0'
'draw recf 0.5 10.6 2.5 11.0'

* Definisco Geopotentiale
'set lev 1000'
'set t '_t1' '_t2
*getseries('hgtprs',hgt,1000)
getseries('hgtprs',z5,500)
getseries('hgtprs',z10,1000)
'define geop = z5'

* Next Panel: Geopotenziale 500
p = p - 1
'set parea 'panel.p
'set gxout line'
'set vpage off'
'set grads off'
'set grid on'
'set xlab on'
'set ylab on'
vrng(geop, geop)
'set ccolor 5'
'set cmark 0'
'set t '_t1-0.5' '_t2+0.5
'd geop'

* Draw a rectangle over the x-axis labels
xlo = subwrd(panel.p,1)
xhi = subwrd(panel.p,2)
ylo = subwrd(panel.p,3)
yhi = subwrd(panel.p,4)





* Draw a rectangle over the x-axis labels
xlo = subwrd(panel.p,1)
xhi = subwrd(panel.p,2)
ylo = subwrd(panel.p,3)
yhi = subwrd(panel.p,4)
'set line 0'
'draw recf 'xlo-0.4' 'ylo-0.8' 'xhi+0.4' 'ylo-0.02

* Next Panel: SLP
getseries(prmslmsl,prmslmsl,1000)
'define slp = prmslmsl*0.01'
p = p - 1
'set parea 'panel.p
'set vpage off'
'set lon 'hilon
'set lat 'hilat
'set grid on'
'set gxout contour'
vrng(slp,slp)
'set ccolor 11'
'set cmark 0'
'set t '_t1-0.5' '_t2+0.5
'd slp'

* Draw a rectangle over the x-axis labels
xlo = subwrd(panel.p,1)
xhi = subwrd(panel.p,2)
ylo = subwrd(panel.p,3)
yhi = subwrd(panel.p,4)
'set line 0'
'draw recf 'xlo-0.4' 'ylo-0.8' 'xhi+0.4' 'ylo-0.02

* Next Panel: Surface Wind Speed
p = p - 1

'define u10m=ugrd10m*3.6'
'define v10m=vgrd10m*3.6'

getseries(ugrd10m,ubot,1000)
getseries(vgrd10m,vbot,1000)
'set parea 'panel.p
'set vpage off'
'set grads off'
if (units = 'e')
'define ubot = 2.2374*ubot'
'define vbot = 2.2374*vbot'
else
'define ubot = 3.6*ubot'
'define vbot = 3.6*vbot'
endif
'define wind = mag(ubot,vbot)'
vrng(wind,wind)
'set ccolor 26'
'set cmark 0'
'set grid on'
'set t '_t1-0.5' '_t2+0.5
'set gxout contour'
'd wind'

* Draw a rectangle over the x-axis labels
xlo = subwrd(panel.p,1)
xhi = subwrd(panel.p,2)
ylo = subwrd(panel.p,3)
yhi = subwrd(panel.p,4)
'set line 0'
'draw recf 'xlo-0.4' 'ylo-0.8' 'xhi+0.4' 'ylo-0.02

* Next Panel: 2m Temperatures and Indices
getseries(tmp2m,tmp2m,1000)
getseries(rh2m,rh2m,1000)
p = p - 1
'set parea 'panel.p
'set vpage off'
'set frame on'
'set grads off'
'set ylab on'
'set gxout line'
'set grid on'
if (units = 'e')
  'define t2mc = const((tmp2m-273.16),0,-u)'
  'define tmp2m  = const((tmp2m-273.16)*9/5+32,0,-u)'
  'define dewpt = tmp2mc-((14.55+0.114*t2mc)*(1-0.01*rh2m)+pow((2.5+0.007*t2mc)*(1-0.01*rh2m),3)+(15.9+0.117*t2mc)*pow((1-0.01*rh2m),14))'
  'define dewpt = dewpt*9/5+32'
else
  'define t2mf = const((tmp2m-273.16)*1.8+32,0,-u)'
  'define tmp2m  = const((tmp2m-273.16),0,-u)'
  'define dewpt = tmp2m-((14.55+0.114*tmp2m)*(1-0.01*rh2m)+pow((2.5+0.007*tmp2m)*(1-0.01*rh2m),3)+(15.9+0.117*tmp2m)*pow((1-0.01*rh2m),14))'

endif
vrng(tmp2m,dewpt)
'set t '_t1-0.5' '_t2+0.5
if (units = 'e')
  'set ylint 10'
  'set gxout linefill'
  expr = 'tmp2m;const(tmp2m'
  'set lfcols  9 0' ; 'd 'expr',-60,-a)'
  'set lfcols  9 0' ; 'd 'expr',-60,-a)'
  'set lfcols 14 0' ; 'd 'expr',-10,-a)'
  'set lfcols  4 0' ; 'd 'expr',0,-a)'
  'set lfcols 11 0' ; 'd 'expr',10,-a)'
  'set lfcols  5 0' ; 'd 'expr',20,-a)'
  'set lfcols 13 0' ; 'd 'expr',30,-a)'
  'set lfcols  3 0' ; 'd 'expr',40,-a)'
  'set lfcols 10 0' ; 'd 'expr',50,-a)'
  'set lfcols  7 0' ; 'd 'expr',60,-a)'
  'set lfcols 12 0' ; 'd 'expr',70,-a)'
  'set lfcols  8 0' ; 'd 'expr',80,-a)'
  'set lfcols  2 0' ; 'd 'expr',90,-a)'
  'set lfcols  6 0' ; 'd 'expr',100,-a)'
  'set gxout line'
  'set ccolor 15'
  'set cstyle 3'
  'set cmark 0'
  'd tmp2m'
else

  'set ylint 3'
  'set gxout linefill'
  expr = 'tmp2m;const(tmp2m'
  'set lfcols 50 0' ; 'd 'expr',-24,-a)'
  'set lfcols 51 0' ; 'd 'expr',-22,-a)'
  'set lfcols 52 0' ; 'd 'expr',-20,-a)'
  'set lfcols 53 0' ; 'd 'expr',-18,-a)'
  'set lfcols 54 0' ; 'd 'expr',-16,-a)'
  'set lfcols 55 0' ; 'd 'expr',-14,-a)'
  'set lfcols 56 0' ; 'd 'expr',-12,-a)'
  'set lfcols 57 0' ; 'd 'expr',-10,-a)'
  'set lfcols 58 0' ; 'd 'expr',-8,-a)'
  'set lfcols 59 0' ; 'd 'expr',-6,-a)'
  'set lfcols 60 0' ; 'd 'expr',-4,-a)'
  'set lfcols 61 0' ; 'd 'expr',-2,-a)'
  'set lfcols 62 0' ; 'd 'expr',0,-a)'
  'set lfcols 63 0' ; 'd 'expr',2,-a)'
  'set lfcols 64 0' ; 'd 'expr',4,-a)'
  'set lfcols 65 0' ; 'd 'expr',6,-a)'
  'set lfcols 66 0' ; 'd 'expr',8,-a)'
  'set lfcols 67 0' ; 'd 'expr',10,-a)'
  'set lfcols 68 0' ; 'd 'expr',12,-a)'
  'set lfcols 69 0' ; 'd 'expr',14,-a)'
  'set lfcols 70 0' ; 'd 'expr',16,-a)'
  'set lfcols 71 0' ; 'd 'expr',18,-a)'
  'set lfcols 72 0' ; 'd 'expr',20,-a)'
  'set lfcols 73 0' ; 'd 'expr',22,-a)'
  'set lfcols 74 0' ; 'd 'expr',24,-a)'
  'set lfcols 75 0' ; 'd 'expr',26,-a)'
  'set lfcols 76 0' ; 'd 'expr',28,-a)'
  'set lfcols 77 0' ; 'd 'expr',30,-a)'
  'set lfcols 78 0' ; 'd 'expr',32,-a)'
  'set lfcols 79 0' ; 'd 'expr',34,-a)'
  'set lfcols 80 0' ; 'd 'expr',36,-a)'
  'set lfcols 81 0' ; 'd 'expr',38,-a)'
  'set lfcols 82 0' ; 'd 'expr',40,-a)'
  'set lfcols 83 0' ; 'd 'expr',42,-a)'
  'set lfcols 84 0' ; 'd 'expr',44,-a)'
  'set lfcols 85 0' ; 'd 'expr',46,-a)'
  'set lfcols 86 0' ; 'd 'expr',48,-a)'
  'set gxout line'
  'set ccolor 15'
  'set cstyle 3'
  'set cmark 0'
  'd tmp2m'
endif
'set grid on'
'set cmark 8'
'set ccolor 2'
'd tmp2m'

*'set ccolor 97'
*'set cmark 0'
*'d dewpt'

* Draw a rectangle over the x-axis labels
xlo = subwrd(panel.p,1)
xhi = subwrd(panel.p,2)
ylo = subwrd(panel.p,3)
yhi = subwrd(panel.p,4)
'set line 0'
'draw recf 'xlo-0.4' 'ylo-0.8' 'xhi+0.4' 'ylo-0.02

* Back up to Previous Panel: 10m Wind Barbs
p = p + 1
'set parea 'panel.p
'set ccolor 1'
'set lat 'hilat
res=sublin(result,1)
latcross2=subwrd(res,4)
lap1 = latcross2 + 0.03
lam1 = latcross2 - 0.03
*'set lon 'hilon ;* ??
'set lon 'hilon
'set lat 'lam1' 'lap1
'set frame off'
'set grid off'
'set gxout vector'
'set arrlab off'
'set xyrev on'
'set xlab off'
'set ylab off'
if (units = 'e')
  'd skip(2.2374*ugrd10m.1,2,1);2.2374*vgrd10m.1'
else
  'd skip(ugrd10m.1,2,1);vgrd10m.1'
endif

* Reset dimension and graphics parameters
'set lat 'hilat
'set lon 'hilon
'set vpage off'
'set frame on'
'set grads off'
'set ylab on'
'set xlab on'
'set gxout line'
'set grid off'

* Skip to Next Panel: 2m Relative Humidity
p = p - 2
'set parea 'panel.p
*'set vpage off'
*'set grads off'
rh2vrng(rh2m)
'set gxout linefill'

'set lfcols 99 0' ; 'd rh2m;const(rh2m,16.01,-a)'
'set lfcols 98 0' ; 'd rh2m;const(rh2m,20.01,-a)'
'set lfcols 97 0' ; 'd rh2m;const(rh2m,24.01,-a)'
'set lfcols 96 0' ; 'd rh2m;const(rh2m,28.01,-a)'
'set lfcols 95 0' ; 'd rh2m;const(rh2m,32.01,-a)'
'set lfcols 94 0' ; 'd rh2m;const(rh2m,36.01,-a)'
'set lfcols 93 0' ; 'd rh2m;const(rh2m,40.01,-a)'
'set lfcols 92 0' ; 'd rh2m;const(rh2m,44.01,-a)'
'set lfcols 91 0' ; 'd rh2m;const(rh2m,48.01,-a)'
'set lfcols 90 0' ; 'd rh2m;const(rh2m,52.01,-a)'
'set lfcols 89 0' ; 'd rh2m;const(rh2m,56.01,-a)'
'set lfcols 88 0' ; 'd rh2m;const(rh2m,60.01,-a)'
'set lfcols 87 0' ; 'd rh2m;const(rh2m,64.01,-a)'
'set lfcols 86 0' ; 'd rh2m;const(rh2m,68.01,-a)'
'set lfcols 85 0' ; 'd rh2m;const(rh2m,72.01,-a)'
'set lfcols 84 0' ; 'd rh2m;const(rh2m,76.01,-a)'
'set lfcols 83 0' ; 'd rh2m;const(rh2m,80.01,-a)'
'set lfcols 82 0' ; 'd rh2m;const(rh2m,84.01,-a)'
'set lfcols 19 0' ; 'd rh2m;const(rh2m,88.01,-a)'
'set lfcols 18 0' ; 'd rh2m;const(rh2m,92.01,-a)'
'set lfcols 17 0' ; 'd rh2m;const(rh2m,96.01,-a)'

'set ccolor 28'
'set gxout line'
'set grid on'
'set cmark 2'
'd rh2m'





* Draw a rectangle over the x-axis labels
xlo = subwrd(panel.p,1)
xhi = subwrd(panel.p,2)
ylo = subwrd(panel.p,3)
yhi = subwrd(panel.p,4)
'set line 0'
'draw recf 'xlo-0.4' 'ylo-0.8' 'xhi+0.4' 'ylo-0.02




* Skip to Next Panel: Temperatura 850hPa
p = p - 1
'set lev 850'
'define temp=tmpprs-273.15'
'set parea 'panel.p
'set gxout line'
'set vpage off'
'set grads off'
'set grid on'
'set xlab on'
'set ylab on'
vrng(temp,temp)
'set ccolor 8'
'set cmark 0'
'set t '_t1-0.5' '_t2+0.5
'd temp'
*'set string 26 c 4 90' ; 'draw string 0.65 'ymid' Umidita'


* Draw a rectangle over the x-axis labels
xlo = subwrd(panel.p,1)
xhi = subwrd(panel.p,2)
ylo = subwrd(panel.p,3)
yhi = subwrd(panel.p,4)
'set line 0'
'draw recf 'xlo-0.4' 'ylo-0.8' 'xhi+0.4' 'ylo-0.02


*
* Next Panel: Soil Moisture
*p = p -1
*'set parea 'panel.p
*getseries(runoff,runoff,1000)
*getseries(soilm2,sm,1000)
*
*'define sm = const(sm,0,-u)'
*'set t 1'
*'d sm(t=1)'
*sm1 = subwrd(result,4)
*'set t '_t1' '_t2
*'define ss = sm(t-1)/4 + sm/2 + sm(t+1)/4'
*if (units = 'e')
*  'define runoff  = const(runoff,0,-u)/25.4'
*  'define dsoilm = (ss-ss(t-1))*39.37*1.9'
*else
*  'define runoff  = const(runoff,0,-u)'
*  'define dsoilm = (ss-ss(t-1))*1000*1.9'
*endif
*'set vpage off'
*vrng(runoff,dsoilm)
*'set t '_t1+0.5' '_t2+0.5
*'set gxout bar'
*'set barbase 0'
*'set bargap 20'
*'set ccolor 5'
*'set grid on'
*'d runoff'
*'set grid on'
*'set ccolor 96'
*'set bargap 60'
*'d dsoilm'
*
* Draw a rectangle over the x-axis labels
*xlo = subwrd(panel.p,1)
*xhi = subwrd(panel.p,2)
*ylo = subwrd(panel.p,3)
*yhi = subwrd(panel.p,4)
*'set line 0'
*'draw recf 'xlo-0.4' 'ylo-0.8' 'xhi+0.4' 'ylo-0.02
*




* Final Panel: Precipitation
getseries(APCPsfc,APCPsfc,1000)
getseries(ACPCPsfc,ACPCPsfc,1000)

getseries(WEASDsfc,WEASDsfc,1000)
getseries(cfrzrsfc,cfrzrsfc,1000)
getseries(cicepsfc,cicepsfc,1000)

p = p - 1
'set parea 'panel.p
'set vpage off'
'set grid on'
'set grads off'
'define ptot  = APCPsfc'
'define pconv = ACPCPsfc'
'define psnow = WEASDsfc'
if (units = 'e')
  'define ptot  = const(ptot,0,-u)/25.4'
  'define pconv = const(pconv,0,-u)/25.4'
  'define psnow = const(psnow,0,-u)/25.4'
else
  'define ptot  = const(ptot,0,-u)'
  'define pconv = const(pconv,0,-u)'
  'define psnow = const(psnow,0,-u)'
endif

* Get Total Precipitation Range
'set gxout stat'
'd ptot'
data = sublin(result,8)
pmx = subwrd(data,5)
if (units = 'e')
  if (pmx < 0.05) 
    pmx = 0.0499
  else
    pmx = pmx + (0.05*pmx)
  endif
else
  if (pmx < 1.0) 
    pmx = 0.99
  else
    pmx = pmx + (0.05*pmx)
  endif
endif
'set vrange 0 'pmx
incr = 0.01 * (math_nint(100*pmx/5))
'set ylint 'incr
'set t '_t1+0.5' '_t2+0.5

* Rain (Total Precipitation)
'set gxout bar'
'set barbase 0'
'set bargap 20'
'set ccolor 42'
'd ptot'

* Snow
'set bargap 60'
'set ccolor 44'
'd psnow'

* Freezing rain
'set bargap 60'
'set ccolor 45'
'd ptot*cfrzrsfc'

* Convective Precipitation
'set gxout bar'
'set bargap 60'
'set ccolor 2'
'd pconv'

* Ice pellets
'set bargap 80'
'set ccolor 46'
'd ptot*cicepsfc'


* Draw all the Y-axis labels

* First panel
'set line 21' ; 'draw recf 0.4 7.65 0.62  8.18'
'set line 22' ; 'draw recf 0.4 7.65 0.58  8.18'
'set line 23' ; 'draw recf 0.4 7.65 0.535 8.18'
'set line 25' ; 'draw recf 0.4 7.65 0.49  8.18'
'set line 26' ; 'draw recf 0.4 7.65 0.445 8.18'
'set string 0 c 4 90' ; 'draw string 0.5 7.93 RH (%)'
if (units = 'e')
  'set string 2 l 4 90' ; 'draw string 0.5 8.79 (F)'
  'set string 1 c 4 90' ; 'draw string 0.5 9.40 Temp.(C) & Wind (nodi)'
else
  'set string 1 c 4 90' ; 'draw string 0.5 9.40 Temp.(C) & Wind (km/h)'
endif

* Next Panel
'set strsiz 0.08 0.12'
p = npanels - 1 
ylo = subwrd(panel.p,3)
yhi = subwrd(panel.p,4)
ymid = ylo + (yhi-ylo)/2
'set string  5 c 4 90'  
'draw string 0.3 'ymid' Geop. 500hPa'
'set string 1 c 4 90'
'draw string 0.5 'ymid' (hPa)'



* Next Panel
p = p - 1 
ylo = subwrd(panel.p,3)
yhi = subwrd(panel.p,4)
ymid = ylo + (yhi-ylo)/2
'set string 11 c 4 90' ; 'draw string 0.3 'ymid' Press.SLM'
'set string  1 c 4 90' ; 'draw string 0.5 'ymid' (hPa)'

* Next Panel
p = p - 1 
ylo = subwrd(panel.p,3)
yhi = subwrd(panel.p,4)
ymid = ylo + (yhi-ylo)/2
'set string 26 c 4 90' ; 'draw string 0.15 'ymid' Wind 10m'
'set string 26 c 4 90' ; 'draw string 0.35 'ymid' Speed & Direction.'
if (units = 'e')
  'set string 1 c 4 90'
  'draw string 0.75 'ymid' (mph)'
else
  'set string 1 c 4 90'
  'draw string 0.5 'ymid' (Km/h)'
endif

* Next Panel
p = p - 1 
ylo = subwrd(panel.p,3)
yhi = subwrd(panel.p,4)
ymid = ylo + (yhi-ylo)/2
'set string  2 c 4 90' ; 'draw string 0.3 'ymid' Temp. 2m '
*'set string 97 c 4 90' ; 'draw string 0.35 'ymid' 2m Dew Point '
*'set string 31 c 4 90' ; 'draw string 0.35 'ymid' Wind Chill'
*'set string 30 c 4 90' ; 'draw string 0.55 'ymid' Indice di Calore'
if (units = 'e')
  'set string 1 c 4 90'
  'draw string 0.6 'ymid' (F)'
else
  'set string 1 c 4 90'
  'draw string 0.5 'ymid' (C)'
endif

* Next Panel
p = p - 1 
ylo = subwrd(panel.p,3)
yhi = subwrd(panel.p,4)
ymid = ylo + (yhi-ylo)/2
'set string 26 c 4 90' ; 'draw string 0.3 'ymid' Humidity'



*
* Next Panel
*p = p - 1
*ylo = subwrd(panel.p,3)
*yhi = subwrd(panel.p,4)
*ymid = ylo + (yhi-ylo)/2
*'set string  5 c 4 90' ; 'draw string 0.35 'ymid' Runoff'
*'set string 96 c 4 90' ; 'draw string 0.55 'ymid' `3d`0[ Moist]'
*
if (units = 'e')
  'set string 1 c 4 90' ; 'draw string 0.6 'ymid' (pollici)'
else
  'set string 1 c 4 90' ; 'draw string 0.5 'ymid' (%)'
endif


* Next Panel
p = p - 1 
ylo = subwrd(panel.p,3)
yhi = subwrd(panel.p,4)
ymid = ylo + (yhi-ylo)/2
'set string  8 c 4 90' ; 'draw string 0.3 'ymid' Temp.850hPa '

if (units = 'e')
  'set string 1 c 4 90'
  'draw string 0.75 'ymid' (F)'
else
  'set string 1 c 4 90'
  'draw string 0.5 'ymid' (C)'
endif


* Next Panel
*p = p - 1 
*ylo = subwrd(panel.p,3)
*yhi = subwrd(panel.p,4)
*ymid = ylo + (yhi-ylo)/2
*'set string  4 c 4 90' ; 'draw string  0.15 'ymid' Rain '
*'set string  2 c 4 90' ; 'draw string  0.35 'ymid' Snow.'

*if (units = 'e')
*  'set string 1 c 4 90'
*  'draw string 0.75 'ymid' (pollici/6hr)'
*else
*  'set string 1 c 4 90'
*  'draw string 0.6 'ymid' (mm/hr)'
*  'draw string 0.8 'ymid' (cm/hr)'
*endif


* Bottom Panel

'set string  1 c 4 90'; 'draw string .85 1.10 (mm/hr)'
'set string 42 r 4 0' ; 'draw string 0.7 1.5 Total Rain'

'set string  2 r 4 0' ; 'draw string 0.7 1.3 Convective'

'set string 45 r 4 0' ; 'draw string 0.7 1.1 Frzg. Rain'

'set string 44 r 4 0' ; 'draw string 0.7 0.9 Snow (cm)'

'set string 46 r 4 0' ; 'draw string 0.7 0.7 Ice Pellets'





* Draw Labels at the top of the page
'set gxout stat'
'set lat 'hilat
'set lon 'hilon
*'set lev 1000'
'd HGTsfc'
hgtline=sublin(result,9)
hnn=subwrd(hgtline,4)
hnn=round(hnn)

'set string 1 r 1 0'
'set strsiz 0.14 .17'
hilat= round(100.0*hilat)/100.0
hilon= round(100.0*hilon)/100.0

label = '(c)G.Ihninger - WRF Meteogram for ('
if (hilon < 0)  ; label = label%hilon*(-1.0)'W, ' ; endif
if (hilon >= 0) ; label = label%hilon'E, ' ; endif
if (hilat < 0)  ; label = label%hilat*(-1.0)'S)'; endif
if (hilat >= 0) ; label = label%hilat'N)' ; endif
'draw string 8.15 10.89 'label
'draw string 8.15 10.68 H='hnn' m'

* Draw the station label
'set strsiz 0.13 0.17'
'set string 21 l 12 0' ; 'draw string 0.12 10.79 `1'name
'set string  1 l  8 0' ; 'draw string 0.10 10.81 `1'name



* Remove the dummy files
'!rm -f dummy.ctl'
'!rm -f dummy.dat'
'printim /wrfems/gmaps/Austria4/meteo.png x1000 y1000 png'

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
* END OF MAIN SCRIPT
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 

* Assegna colori ausiliari

function setcols(args)
 'set rgb 20 234 245 234'
 'set rgb 21 200 215 200'
 'set rgb 22 160 205 160'
 'set rgb 23 120 215 120'
 'set rgb 24  80 235  80'
 'set rgb 25   0 255   0'
 'set rgb 26   0 195   0'
 'set rgb 27   0 160   0'
 'set rgb 28   0 125   0'

 'set rgb 30 255 160 120'
 'set rgb 31 160 120 255'
 'set rgb 32 160 180 205'

 'set rgb 42  32 208  32'
 'set rgb 43 208  32 208'
 'set rgb 44  64  64 255'
 'set rgb 45 255 120  32'
 'set rgb 46  32 208 208'
 'set rgb 47 240 240   0'

'set rgb 50 250 18  250'
'set rgb 51 230 24  230'
'set rgb 52 210 30  220'
'set rgb 53 190 30  210'
'set rgb 54 170 30  200'
'set rgb 55 131 27  190'
'set rgb 56 90  27  180' 
'set rgb 57 0   0   255'
'set rgb 58 80  80  255'
'set rgb 59 120 120 255'
'set rgb 60 160 160 255'
'set rgb 61 200 200 255'
'set rgb 62 255 255 255'
'set rgb 63 255 250 200'
'set rgb 64 255 240 100'
'set rgb 65 255 230 0'
'set rgb 66 255 220 0'
'set rgb 67 255 210 0'
'set rgb 68 255 200 0'
'set rgb 69 255 190 0'
'set rgb 70 255 170 0'
'set rgb 71 255 150 0'
'set rgb 72 255 130 0'
'set rgb 73 255 110 0'
'set rgb 74 245 90  0'
'set rgb 75 220 70  0'
'set rgb 76 200 40  0'
'set rgb 77 180 0   0'
'set rgb 78 150 40  0'
'set rgb 79 120 0   0'
'set rgb 80  90 40  0'
'set rgb 81  60 0   0'



'set rgb 17    0  0 255'
'set rgb 18   30  30 255'
'set rgb 19   60  60 255'
'set rgb 82   80  80 255'
'set rgb 83  100 100 255'
'set rgb 84  120 120 255'
'set rgb 85  130 130 255'
'set rgb 86  140 140 255'
'set rgb 87  150 150 255'
'set rgb 88  160 160 255'
'set rgb 89  170 170 255'
'set rgb 90  180 180 255'
'set rgb 91  190 190 255'
'set rgb 92  200 200 255'
'set rgb 93  210 210 255'
'set rgb 94  220 220 255'
'set rgb 95  230 230 255'
'set rgb 96  235 235 255'
'set rgb 97  240 240 255'
'set rgb 98  245 245 255'
'set rgb 99  250 250 255'







return

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
function vrng(f1,f2)
'set gxout stat'
'd 'f1
data = sublin(result,8)
ymx = subwrd(data,5)
ymn = subwrd(data,4)
'd 'f2
data = sublin(result,8)
zmx = subwrd(data,5)
zmn = subwrd(data,4)
if (zmx > ymx) ; ymx = zmx ; endif
if (zmn < ymn) ; ymn = zmn ; endif
dy = ymx-ymn
ymx = ymx + 0.08 * dy
ymn = ymn - 0.08 * dy
if ((ymx-ymn)/2.2 < 1)
  incr = (ymx-ymn)/4
  incr = 0.01 * (math_nint(100*incr))
else
  incr = math_nint((ymx-ymn)/4)
endif
'set vrange 'ymn' 'ymx
'set ylint 'incr
*say 'vrng: 'ymn' 'ymx' 'incr
if (ymn=0 & ymx=0 & incr=0)
*  say 'vrng: resetting zeros to -.9 .9 1'
  'set vrange -.9 .9'
  'set ylint 1'
endif
'set gxout line'
return

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
function rh2vrng(f1)
'set gxout stat'
'd 'f1
data = sublin(result,8)
ymn = subwrd(data,4)
ymx = subwrd(data,5)
if (ymn < 20) 
  miny = 0 
  'set ylevs 20 40 60 80 100'
endif
if (ymn >= 20 & ymn < 30) 
  miny = 20 
  'set ylevs  40 60 80 100'
endif
if (ymn >= 30 & ymn < 40) 
  miny = 30 
  'set ylevs 40 50 60 70 80 90 100'
endif
if (ymn >= 40 & ymn < 50) 
  miny = 40 
  'set ylevs 40 50 60 70 80 90 100'
endif
if (ymn >= 50 & ymn < 60) 
  miny = 50
  'set ylevs 50 60 70 80 90 100'
endif
if (ymn >= 60) 
  miny = 60
  'set ylevs 70 80 90 100'
endif
'set vrange 'miny' 'ymx+3
return

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
function getctl(handle)
line = 1
found = 0
while (!found)
  info = sublin(_ctl,line)
  if (subwrd(info,1)=handle)
    _handle = info
    found = 1
  endif
  line = line + 1
endwhile
return _handle

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
function getgrid(dodsvar,myvar)

'set lon '_xdim
'set lat '_ydim
'set lev '_zgrd
'set time '_tdim

* Write the variable to a file
'set gxout fwrite'
'set fwrite dummy.dat'
'd 'dodsvar
'disable fwrite'

* Write a descriptor file 
rc = write(dummy.ctl,'dset ^dummy.dat')
rc = write(dummy.ctl,_undef,append)
rc = write(dummy.ctl,'xdef 1 linear 1 1',append)
rc = write(dummy.ctl,'ydef 1 linear 1 1',append)
rc = write(dummy.ctl,_zdef,append)
rc = write(dummy.ctl,_tdef,append)
rc = write(dummy.ctl,'vars 1',append)
rc = write(dummy.ctl,'dummy '_newzsize' -999 dummy',append)
rc = write(dummy.ctl,'endvars',append)
rc = close (dummy.ctl)

* Open the dummy file, define variable, close dummy file
'open dummy.ctl'
line = sublin(result,2)
dummyfile = subwrd(line,8)
'set dfile 'dummyfile
'set lon 1'
'set lat 1'
'set lev '_zbot' '_ztop
'set time '_time1' '_time2
'define 'myvar' = dummy.'dummyfile
'close 'dummyfile
'set dfile 1'
return

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
function getetarh(dodsvar,myvar)

* swap out original pressure vars
tmpzgrd = _zgrd
tmpzdef = _zdef
tmpzbot = _zbot
tmpztop = _ztop
tmpzsize = _newzsize

* retrieve rh data over the rh pressure range
_zgrd = _rhzgrd
_zdef = _trhzdef
_ztop = _rhztop
_zbot = _rhzbot
_newzsize = _trhzsize
getgrid(dodsvar,tmprh)

* swap in original pressure vars
_zgrd = tmpzgrd
_zdef = tmpzdef
_zbot = tmpzbot
_ztop = tmpztop
_newzsize = tmpzsize

'set lon '_xdim
'set lat '_ydim
'set lev '_rhzgrd
'set time '_tdim

* Write the variable to a file
'set gxout fwrite'
'set fwrite dummy.dat'
t = _t1
while (t <= _t2)
  'set t 't
  z = 1
  while (z <= _newrhzsize)
    level = subwrd(_rhlevs,z) 
    'set lev 'level
    'd tmprh'
    z = z + 1
  endwhile
  t = t + 1
endwhile
'disable fwrite'

* Write a descriptor file 
rc = write(dummy.ctl,'dset ^dummy.dat')
rc = write(dummy.ctl,_undef,append)
rc = write(dummy.ctl,'xdef 1 linear 1 1',append)
rc = write(dummy.ctl,'ydef 1 linear 1 1',append)
rc = write(dummy.ctl,_rhzdef,append)
rc = write(dummy.ctl,_tdef,append)
rc = write(dummy.ctl,'vars 1',append)
rc = write(dummy.ctl,'dummy '_newrhzsize' -999 dummy',append)
rc = write(dummy.ctl,'endvars',append)
rc = close (dummy.ctl)

* Open the dummy file, define variable, close dummy file
'open dummy.ctl'
line = sublin(result,2)
dummyfile = subwrd(line,8)
'set dfile 'dummyfile
'set lon 1'
'set lat 1'
'set lev '_rhzbot' '_rhztop
'set time '_time1' '_time2
'q dims'
'define 'myvar' = dummy.'dummyfile
'close 'dummyfile
'set dfile 1'

return

* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
function getseries(dodsvar,myvar,level)

'set lon '_xdim
'set lat '_ydim
'set lev 'level' 'level
'set time '_tdim

* Write the variable to a file
'set fwrite dummy.dat'
'set gxout fwrite'
'd 'dodsvar
'disable fwrite'

* Write a descriptor file 
rc = write(dummy.ctl,'dset ^dummy.dat')
rc = write(dummy.ctl,_undef,append)
rc = write(dummy.ctl,'xdef 1 linear 1 1',append)
rc = write(dummy.ctl,'ydef 1 linear 1 1',append)
rc = write(dummy.ctl,'zdef 1 linear 1 1',append)
rc = write(dummy.ctl,_tdef,append)
rc = write(dummy.ctl,'vars 1',append)
rc = write(dummy.ctl,'dummy 0 -999 dummy',append)
rc = write(dummy.ctl,'endvars',append)
rc = close(dummy.ctl)

* Open the dummy file, define variable, close dummy file
'open dummy.ctl'
line = sublin(result,2)
dummyfile = subwrd(line,8)
'set dfile 'dummyfile
'set lon 1'
'set lat 1'
'set lev 'level
'set time '_time1' '_time2
'define 'myvar' = dummy.'dummyfile
'close 'dummyfile
'set dfile 1'
'set gxout contour'

return


***********************************************************************
function round(i)

rr=abs(1.0*i)
rr=int(rr+0.5)
if (i < 0)
   rr=-1*rr      
endif
return(rr)
 

**************************************************************************


function int(i0)

*--------------------------
* Return integer of i0
*--------------------------
  i=0
  while(i<12)
    i=i+1
    if(substr(i0,i,1)='.')
      i0=substr(i0,1,i-1)
      break
    endif
  endwhile
return(i0)

*************************************************************************

function abs(i)

*----------------------------
* return absolute value of i
*----------------------------

  if (i < 0) 
     absval=-i
  else 
     absval=i
  endif

return(absval)


See sample http://wettersat.heim.at/wrf/meteo.png

But I am missing a cloud chart. Maybe someone can add this.

Gerald

meteoadriatic
Posts: 1601
Joined: Wed Aug 19, 2009 10:05 am

Re: Meteogram script

Post by meteoadriatic » Thu Oct 01, 2009 8:50 pm

Hey, Gerald, I tried your script and it took over 10 minutes in work for single one meteogram and it still didn't finished so I stoped it. It was working something, CPU load at gradsc process was 100% all the time. How long does it take on your system to draw a meteogram?

wettersat
Posts: 32
Joined: Fri Aug 21, 2009 9:30 pm

Re: Meteogram script

Post by wettersat » Fri Oct 02, 2009 6:26 am

It takes about 2 seconds and some other users use same script.
Gerald

meteoadriatic
Posts: 1601
Joined: Wed Aug 19, 2009 10:05 am

Re: Meteogram script

Post by meteoadriatic » Fri Oct 02, 2009 11:19 am

Then it should be that it gone into endless loop, I will investigate where is the problem, thanks.

meteosciez
Posts: 55
Joined: Sat Sep 05, 2009 6:36 am

Re: Meteogram script

Post by meteosciez » Fri Oct 02, 2009 6:23 pm

meteoadriatic wrote:Then it should be that it gone into endless loop, I will investigate where is the problem, thanks.
I have the same problem with this script : the png image is created and saved, but the gradsc process does not terminate. I have to kill manually the process.
meteo-sciez.fr

meteoadriatic
Posts: 1601
Joined: Wed Aug 19, 2009 10:05 am

Re: Meteogram script

Post by meteoadriatic » Fri Oct 02, 2009 7:28 pm

No, this is not the same problem. Open script and navigate to around line 914, locate printim line and after it add 'quit'. GrADS will exit then after finish. It seems you might also have little problem with some variable names, but it's easy to find what to correct. I made few more tweaks (for example wind vectors were too dense, and also changed them back to barbs which I more like on meteograms).

Anyway I found where was my problem, it was completely my mistake, I substituted lat and lon coordinates at script input... now it works nicely :)

cubemonkey
Posts: 13
Joined: Wed Aug 26, 2009 1:48 am

Re: Meteogram script

Post by cubemonkey » Mon Dec 28, 2009 10:02 pm

I've been using NCL, but grads has some scripts out there that I much prefer. I really like the meteograms posted here, but I'm running into a problem. Keep in mind, this is my first time messing with grads, so I could be missing something extremely simple.

The problem: Both of the above scripts look for variables that I don't have.

Code: Select all

Syntax Error:  Invalid Operand
  'rhprs' not a variable or function name
  Error ocurred at column 1
DISPLAY error:  Invalid expression
  Expression = rhprs
Syntax Error:  Invalid Operand
  'rhprs' not a variable or function name
  Error ocurred at column 1
DISPLAY error:  Invalid expression
  Expression = rhprs
Syntax Error:  Invalid Operand
  'tmpprs' not a variable or function name
  Error ocurred at column 1
DISPLAY error:  Invalid expression
  Expression = tmpprs-273.15
Syntax Error:  Invalid Operand
  'tmpprs' not a variable or function name
  Error ocurred at column 1
DISPLAY error:  Invalid expression
  Expression = tmpprs-273.15
Syntax Error:  Invalid Operand
  'prmslmsl' not a variable or function name
  Error ocurred at column 1
DISPLAY error:  Invalid expression
  Expression = prmslmsl/100
Syntax Error:  Invalid Operand
  'tmp2m' not a variable or function name
  Error ocurred at column 1
DISPLAY error:  Invalid expression
  Expression = tmp2m-273.15
Syntax Error:  Invalid Operand
  'ugrd10m' not a variable or function name
Operation Error:  Error from mag function
  Error ocurred at column 1
DISPLAY error:  Invalid expression
  Expression = mag(ugrd10m,vgrd10m)
Syntax Error:  Invalid Operand
  'ugrd10m' not a variable or function name
Operation Error:  Error from skip function
  Error ocurred at column 1
DISPLAY error:  Invalid expression
  Expression = skip(ugrd10m*1.95,1,4)
Syntax Error:  Invalid Operand
  'apcpsfc' not a variable or function name
  Error ocurred at column 1

..... etc

And Wettersat's script dies on these:

Code: Select all

getgrid(rhprs,rhum)
getgrid(tmpprs,tmpprs)
getgrid(ugrdprs,ugrdprs)
getgrid(vgrdprs,vgrdprs)
getgrid('hgtprs',hgt)


I'm guessing it's a problem with how I converted the wrfout file with ARWpost ?

Here's my namelist.ARWpost:

(just noticed the start/end date.. it's pulling from a 5 day run, so those are clearly wrong .. or maybe it doesn't matter?)

Code: Select all

cat /usr/local/bin/namelist.ARWpost
&datetime
 start_date = '2000-01-24_12:00:00',
 end_date   = '2000-01-25_00:00:00',
 interval_seconds = 10800,
 tacc = 0,
 debug_level = 0,
/

&io
 io_form_input  = 2,
 input_root_name = './wrfout_d01_2000-01-24_12:00:00'
 output_root_name = './test'
 plot = 'all_list'
 fields = 'height,pressure,tk,tc'
 output_type = 'grads'
 mercator_defs = .true.
/
 split_output = .true.
 frames_per_outfile = 2

 output_type = 'grads'
 output_type = 'v5d'

 plot = 'all'
 plot = 'list'
 plot = 'all_list'
! Below is a list of all available diagnostics
 fields = 'height,geopt,theta,tc,tk,td,td2,rh,rh2,umet,vmet,pressure,u10m,v10m,wdir,wspd,wd10,ws10,slp,mcape,mcin,lcl,lfc,cape,cin,dbz,max_dbz,clfr'


&interp
 interp_method = 0,
 interp_levels = 1000.,950.,900.,850.,800.,750.,700.,650.,600.,550.,500.,450.,400.,350.,300.,250.,200.,150.,100.,
/
extrapolate = .true.

 interp_method = 0,     ! 0 is model levels, -1 is nice height levels, 1 is user specified pressure/height

 interp_levels = 1000.,950.,900.,850.,800.,750.,700.,650.,600.,550.,500.,450.,400.,350.,300.,250.,200.,150.,100.,
 interp_levels = 0.25, 0.50, 0.75, 1.00, 2.00, 3.00, 4.00, 5.00, 6.00, 7.00, 8.00, 9.00, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 16.0, 17.0, 18.0, 19.0, 20.0,

And here's the resulting .ctl file:


Code: Select all

dset ^test.dat
options  byteswapped
undef 1.e30
title  OUTPUT FROM WRF V3.1.1 MODEL
pdef   94  77 lcc  36.494  -84.898   47.500   39.000  36.49400  36.49400  -84.89800  34800.000  34800.000
xdef  288 linear -107.51287   0.15675676
ydef  178 linear   21.96337   0.15675676
zdef   44 linear 1 1
tdef   41 linear 00Z01JAN2009     180MN
VARS  172
LU_INDEX       1  0  LAND USE CATEGORY (-)
U             44  0  x-wind component (m s-1)
V             44  0  y-wind component (m s-1)
W             44  0  z-wind component (m s-1)
PH            44  0  perturbation geopotential (m2 s-2)
PHB           44  0  base-state geopotential (m2 s-2)
T             44  0  perturbation potential temperature (theta-t0) (K)
MU             1  0  perturbation dry air mass in column (Pa)
MUB            1  0  base state dry air mass in column (Pa)
TKE           44  0  TURBULENCE KINETIC ENERGY (m2 s-2)
P             44  0  perturbation pressure (Pa)
PB            44  0  BASE STATE PRESSURE (Pa)
SR             1  0  fraction of frozen precipitation (-)
POTEVP         1  0  accumulated potential evaporation (W m-2)
SNOPCX         1  0  snow phase change heat flux (W m-2)
SOILTB         1  0  bottom soil temperature (K)
Q2             1  0  QV at 2 M (kg kg-1)
T2             1  0  TEMP at 2 M (K)
TH2            1  0  POT TEMP at 2 M (K)
PSFC           1  0  SFC PRESSURE (Pa)
U10            1  0  U at 10 M (m s-1)
V10            1  0  V at 10 M (m s-1)
WSPD10MAX      1  0  WIND SPD MAX 10 M (m s-1)
W_UP_MAX       1  0  MAX Z-WIND UPDRAFT (m s-1)
W_DN_MAX       1  0  MAX Z-WIND DOWNDRAFT (m s-1)
REFD_MAX       1  0  MAX DERIVED RADAR REFL (dbZ)
UH             1  0  UPDRAFT HELICITY (m2 s-2)
UP_HELI_MA     1  0  MAX UPDRAFT HELICITY (m2 s-2)
GRPL_MAX       1  0  MAX COL INT GRAUPEL (kg m-2)
QVAPOR        44  0  Water vapor mixing ratio (kg kg-1)
QCLOUD        44  0  Cloud water mixing ratio (kg kg-1)
QRAIN         44  0  Rain water mixing ratio (kg kg-1)
QICE          44  0  Ice mixing ratio (kg kg-1)
QSNOW         44  0  Snow mixing ratio (kg kg-1)
QGRAUP        44  0  Graupel mixing ratio (kg kg-1)
LANDMASK       1  0  LAND MASK (1 FOR LAND, 0 FOR WATER) (-)
TSLB           4  0  SOIL TEMPERATURE (K)
SMOIS          4  0  SOIL MOISTURE (m3 m-3)
SH2O           4  0  SOIL LIQUID WATER (m3 m-3)
SEAICE         1  0  SEA ICE FLAG (-)
XICEM          1  0  SEA ICE FLAG (PREVIOUS STEP) (-)
SMSTAV         1  0  MOISTURE AVAILABILITY (-)
SMSTOT         1  0  TOTAL SOIL MOISTURE (m3 m-3)
SFROFF         1  0  SURFACE RUNOFF (mm)
UDROFF         1  0  UNDERGROUND RUNOFF (mm)
IVGTYP         1  0  DOMINANT VEGETATION CATEGORY (-)
ISLTYP         1  0  DOMINANT SOIL CATEGORY (-)
VEGFRA         1  0  VEGETATION FRACTION (-)
SFCEVP         1  0  SURFACE EVAPORATION (kg m-2)
GRDFLX         1  0  GROUND HEAT FLUX (W m-2)
ACGRDFLX       1  0  ACCUMULATED GROUND HEAT FLUX (J m-2)
SFCEXC         1  0  SURFACE EXCHANGE COEFFICIENT (m s-1)
ACSNOW         1  0  ACCUMULATED SNOW (kg m-2)
ACSNOM         1  0  ACCUMULATED MELTED SNOW (kg m-2)
SNOW           1  0  SNOW WATER EQUIVALENT (kg m-2)
SNOWH          1  0  PHYSICAL SNOW DEPTH (m)
RHOSN          1  0   SNOW DENSITY (kg m-3)
CANWAT         1  0  CANOPY WATER (kg m-2)
SST            1  0  SEA SURFACE TEMPERATURE (K)
SSTSK          1  0  SKIN SEA SURFACE TEMPERATURE (K)
LAI            1  0  Leaf area index (area/area)
THZ0           1  0  POTENTIAL TEMPERATURE AT ZNT (K)
Z0             1  0  Background ROUGHNESS LENGTH (m)
QZ0            1  0  SPECIFIC HUMIDITY AT ZNT (kg kg-1)
UZ0            1  0  U WIND COMPONENT AT ZNT (m s-1)
VZ0            1  0  V WIND COMPONENT AT ZNT (m s-1)
QSFC           1  0  SPECIFIC HUMIDITY AT LOWER BOUNDARY (kg kg-1)
AKHS           1  0  SFC EXCH COEFF FOR HEAT (m s-1)
AKMS           1  0  SFC EXCH COEFF FOR MOMENTUM (m s-1)
KPBL           1  0  LEVEL OF PBL TOP (-)
TSHLTR         1  0  SHELTER THETA FROM MYJ (K)
QSHLTR         1  0  SHELTER SPECIFIC HUMIDITY FROM MYJ (kg kg-1)
PSHLTR         1  0  SHELTER PRESSURE FROM MYJ (Pa)
TH10           1  0  10-M THETA FROM MYJ (K)
Q10            1  0  10-M SPECIFIC HUMIDITY FROM MYJ (kg kg-1)
VAR            1  0  OROGRAPHIC VARIANCE (-)
CON            1  0  OROGRAPHIC CONVEXITY (-)
OA1            1  0  OROGRAPHIC DIRECTION ASYMMETRY FUNCTION (-)
OA2            1  0  OROGRAPHIC DIRECTION ASYMMETRY FUNCTION (-)
OA3            1  0  OROGRAPHIC DIRECTION ASYMMETRY FUNCTION (-)
OA4            1  0  OROGRAPHIC DIRECTION ASYMMETRY FUNCTION (-)
OL1            1  0  OROGRAPHIC DIRECTION ASYMMETRY FUNCTION (-)
OL2            1  0  OROGRAPHIC DIRECTION ASYMMETRY FUNCTION (-)
OL3            1  0  OROGRAPHIC DIRECTION ASYMMETRY FUNCTION (-)
OL4            1  0  OROGRAPHIC DIRECTION ASYMMETRY FUNCTION (-)
HTOP           1  0  TOP OF CONVECTION LEVEL (-)
HBOT           1  0  BOT OF CONVECTION LEVEL (-)
CUPPT          1  0  ACCUMULATED CONVECTIVE RAIN SINC LAST CALL TO THE RADIATION (-)
MAPFAC_M       1  0  Map scale factor on mass grid (-)
HGT            1  0  Terrain Height (m)
HGT_FINE       1  0  Fine Terrain Height (m)
TSK            1  0  SURFACE SKIN TEMPERATURE (K)
RAINC          1  0  ACCUMULATED TOTAL CUMULUS PRECIPITATION (mm)
RAINNC         1  0  ACCUMULATED TOTAL GRID SCALE PRECIPITATION (mm)
I_RAINC        1  0  BUCKET FOR RAINC (-)
I_RAINNC       1  0  BUCKET FOR RAINNC (-)
RAINCV         1  0  TIME-STEP CUMULUS PRECIPITATION (mm)
RAINNCV        1  0  TIME-STEP NONCONVECTIVE PRECIPITATION (mm)
SNOWNC         1  0  ACCUMULATED TOTAL GRID SCALE SNOW AND ICE (mm)
GRAUPELNC      1  0  ACCUMULATED TOTAL GRID SCALE GRAUPEL (mm)
CLDFRA        44  0  CLOUD FRACTION (-)
SWDOWN         1  0  DOWNWARD SHORT WAVE FLUX AT GROUND SURFACE (W m-2)
GLW            1  0  DOWNWARD LONG WAVE FLUX AT GROUND SURFACE (W m-2)
ACSWUPT        1  0  ACCUMULATED UPWELLING SHORTWAVE FLUX AT TOP (J m-2)
ACSWUPTC       1  0  ACCUMULATED UPWELLING CLEAR SKY SHORTWAVE FLUX AT TOP (J m-2)
ACSWDNT        1  0  ACCUMULATED DOWNWELLING SHORTWAVE FLUX AT TOP (J m-2)
ACSWDNTC       1  0  ACCUMULATED DOWNWELLING CLEAR SKY SHORTWAVE FLUX AT TOP (J m-2)
ACSWUPB        1  0  ACCUMULATED UPWELLING SHORTWAVE FLUX AT BOTTOM (J m-2)
ACSWUPBC       1  0  ACCUMULATED UPWELLING CLEAR SKY SHORTWAVE FLUX AT BOTTOM (J m-2)
ACSWDNB        1  0  ACCUMULATED DOWNWELLING SHORTWAVE FLUX AT BOTTOM (J m-2)
ACSWDNBC       1  0  ACCUMULATED DOWNWELLING CLEAR SKY SHORTWAVE FLUX AT BOTTOM (J m-2)
ACLWUPT        1  0  ACCUMULATED UPWELLING LONGWAVE FLUX AT TOP (J m-2)
ACLWUPTC       1  0  ACCUMULATED UPWELLING CLEAR SKY LONGWAVE FLUX AT TOP (J m-2)
ACLWDNT        1  0  ACCUMULATED DOWNWELLING LONGWAVE FLUX AT TOP (J m-2)
ACLWDNTC       1  0  ACCUMULATED DOWNWELLING CLEAR SKY LONGWAVE FLUX AT TOP (J m-2)
ACLWUPB        1  0  ACCUMULATED UPWELLING LONGWAVE FLUX AT BOTTOM (J m-2)
ACLWUPBC       1  0  ACCUMULATED UPWELLING CLEAR SKY LONGWAVE FLUX AT BOTTOM (J m-2)
ACLWDNB        1  0  ACCUMULATED DOWNWELLING LONGWAVE FLUX AT BOTTOM (J m-2)
ACLWDNBC       1  0  ACCUMULATED DOWNWELLING CLEAR SKY LONGWAVE FLUX AT BOTTOM (J m-2)
I_ACSWUPT      1  0  BUCKET FOR UPWELLING SHORTWAVE FLUX AT TOP (J m-2)
I_ACSWUPTC     1  0  BUCKET FOR UPWELLING CLEAR SKY SHORTWAVE FLUX AT TOP (J m-2)
I_ACSWDNT      1  0  BUCKET FOR DOWNWELLING SHORTWAVE FLUX AT TOP (J m-2)
I_ACSWDNTC     1  0  BUCKET FOR DOWNWELLING CLEAR SKY SHORTWAVE FLUX AT TOP (J m-2)
I_ACSWUPB      1  0  BUCKET FOR UPWELLING SHORTWAVE FLUX AT BOTTOM (J m-2)
I_ACSWUPBC     1  0  BUCKET FOR UPWELLING CLEAR SKY SHORTWAVE FLUX AT BOTTOM (J m-2)
I_ACSWDNB      1  0  BUCKET FOR DOWNWELLING SHORTWAVE FLUX AT BOTTOM (J m-2)
I_ACSWDNBC     1  0  BUCKET FOR DOWNWELLING CLEAR SKY SHORTWAVE FLUX AT BOTTOM (J m-2)
I_ACLWUPT      1  0  BUCKET FOR UPWELLING LONGWAVE FLUX AT TOP (J m-2)
I_ACLWUPTC     1  0  BUCKET FOR UPWELLING CLEAR SKY LONGWAVE FLUX AT TOP (J m-2)
I_ACLWDNT      1  0  BUCKET FOR DOWNWELLING LONGWAVE FLUX AT TOP (J m-2)
I_ACLWDNTC     1  0  BUCKET FOR DOWNWELLING CLEAR SKY LONGWAVE FLUX AT TOP (J m-2)
I_ACLWUPB      1  0  BUCKET FOR UPWELLING LONGWAVE FLUX AT BOTTOM (J m-2)
I_ACLWUPBC     1  0  BUCKET FOR UPWELLING CLEAR SKY LONGWAVE FLUX AT BOTTOM (J m-2)
I_ACLWDNB      1  0  BUCKET FOR DOWNWELLING LONGWAVE FLUX AT BOTTOM (J m-2)
I_ACLWDNBC     1  0  BUCKET FOR DOWNWELLING CLEAR SKY LONGWAVE FLUX AT BOTTOM (J m-2)
SWUPT          1  0  INSTANTANEOUS UPWELLING SHORTWAVE FLUX AT TOP (J m-2)
SWUPTC         1  0  INSTANTANEOUS UPWELLING CLEAR SKY SHORTWAVE FLUX AT TOP (J m-2)
SWDNT          1  0  INSTANTANEOUS DOWNWELLING SHORTWAVE FLUX AT TOP (J m-2)
SWDNTC         1  0  INSTANTANEOUS DOWNWELLING CLEAR SKY SHORTWAVE FLUX AT TOP (J m-2)
SWUPB          1  0  INSTANTANEOUS UPWELLING SHORTWAVE FLUX AT BOTTOM (J m-2)
SWUPBC         1  0  INSTANTANEOUS UPWELLING CLEAR SKY SHORTWAVE FLUX AT BOTTOM (J m-2)
SWDNB          1  0  INSTANTANEOUS DOWNWELLING SHORTWAVE FLUX AT BOTTOM (J m-2)
SWDNBC         1  0  INSTANTANEOUS DOWNWELLING CLEAR SKY SHORTWAVE FLUX AT BOTTOM (J m-2)
LWUPT          1  0  INSTANTANEOUS UPWELLING LONGWAVE FLUX AT TOP (J m-2)
LWUPTC         1  0  INSTANTANEOUS UPWELLING CLEAR SKY LONGWAVE FLUX AT TOP (J m-2)
LWDNT          1  0  INSTANTANEOUS DOWNWELLING LONGWAVE FLUX AT TOP (J m-2)
LWDNTC         1  0  INSTANTANEOUS DOWNWELLING CLEAR SKY LONGWAVE FLUX AT TOP (J m-2)
LWUPB          1  0  INSTANTANEOUS UPWELLING LONGWAVE FLUX AT BOTTOM (J m-2)
LWUPBC         1  0  INSTANTANEOUS UPWELLING CLEAR SKY LONGWAVE FLUX AT BOTTOM (J m-2)
LWDNB          1  0  INSTANTANEOUS DOWNWELLING LONGWAVE FLUX AT BOTTOM (J m-2)
LWDNBC         1  0  INSTANTANEOUS DOWNWELLING CLEAR SKY LONGWAVE FLUX AT BOTTOM (J m-2)
OLR            1  0  TOA OUTGOING LONG WAVE (W m-2)
XLAT           1  0  LATITUDE, SOUTH IS NEGATIVE (degree_north)
XLONG          1  0  LONGITUDE, WEST IS NEGATIVE (degree_east)
ALBEDO         1  0  ALBEDO (-)
ALBBCK         1  0  BACKGROUND ALBEDO (-)
EMISS          1  0  SURFACE EMISSIVITY (-)
NOAHRES        1  0  RESIDUAL OF THE NOAH SURFACE ENERGY BUDGET (W m{-2})
TMN            1  0  SOIL TEMPERATURE AT LOWER BOUNDARY (K)
XLAND          1  0  LAND MASK (1 FOR LAND, 2 FOR WATER) (-)
UST            1  0  U* IN SIMILARITY THEORY (m s-1)
PBLH           1  0  PBL HEIGHT (m)
HFX            1  0  UPWARD HEAT FLUX AT THE SURFACE (W m-2)
QFX            1  0  UPWARD MOISTURE FLUX AT THE SURFACE (kg m-2 s-1)
LH             1  0  LATENT HEAT FLUX AT THE SURFACE (W m-2)
ACHFX          1  0  ACCUMULATED UPWARD HEAT FLUX AT THE SURFACE (J m-2)
ACLHF          1  0  ACCUMULATED UPWARD LATENT HEAT FLUX AT THE SURFACE (J m-2)
SNOWC          1  0  FLAG INDICATING SNOW COVERAGE (1 FOR SNOW COVER) (-)
pressure      44  0  Model pressure (hPa)
height        44  0  Model height (km)
tk            44  0  Temperature (K)
tc            44  0  Temperature (C)
ENDVARS
@ global String comment TITLE =  OUTPUT FROM WRF V3.1.1 MODEL
@ global String comment SIMULATION_START_DATE = 2009-12-20_06:00:00
@ global String comment GRIDTYPE = C
@ global String comment MMINLU = USGS
@ global String comment WEST-EAST_GRID_DIMENSION =    95
@ global String comment SOUTH-NORTH_GRID_DIMENSION =    78
@ global String comment BOTTOM-TOP_GRID_DIMENSION =    45
@ global String comment MAP_PROJ =     1
@ global String comment DX =     34800.00
@ global String comment DY =     34800.00
@ global String comment CEN_LAT =        36.49
@ global String comment CEN_LON =       -84.90
@ global String comment TRUELAT1 =        36.49
@ global String comment TRUELAT2 =        36.49
@ global String comment MOAD_CEN_LAT =        36.49
@ global String comment STAND_LON =       -84.90
@ global String comment DIFF_OPT =     1
@ global String comment KM_OPT =     4
@ global String comment DAMP_OPT =     3
@ global String comment KHDIF =         0.00
@ global String comment KVDIF =         0.00
@ global String comment MP_PHYSICS =     2
@ global String comment RA_LW_PHYSICS =     4
@ global String comment RA_SW_PHYSICS =     4
@ global String comment SF_SFCLAY_PHYSICS =     1
@ global String comment SF_SURFACE_PHYSICS =     2
@ global String comment BL_PBL_PHYSICS =     1
@ global String comment CU_PHYSICS =     1
@ global String comment SURFACE_INPUT_SOURCE =     1
@ global String comment SST_UPDATE =     0
@ global String comment GRID_FDDA =     0
@ global String comment FEEDBACK =     1
@ global String comment SMOOTH_OPTION =     1
@ global String comment W_DAMPING =     1
@ global String comment OBS_NUDGE_OPT =     0
@ global String comment GRID_ID =     1
@ global String comment PARENT_ID =     1
@ global String comment I_PARENT_START =     1
@ global String comment J_PARENT_START =     1
@ global String comment PARENT_GRID_RATIO =     1
@ global String comment DT =        90.00
@ global String comment ISWATER =    16
@ global String comment ISICE =    24
@ global String comment ISURBAN =     1
@ global String comment ISOILWATER =    14

Hope that's enough info to point to where I screwed up :)

wrfbrasil
Posts: 7
Joined: Tue Sep 29, 2009 6:16 pm

Re: Meteogram script

Post by wrfbrasil » Tue Dec 29, 2009 11:07 am

The problem is that the variables of the script and be grads ctl file are not equal. Note that the script tmpprs is temperature, already in the ctl file is called tc.

Code: Select all

getgrid(tmpprs,tmpprs)

Code: Select all

tc            44  0  Temperature (C)
Indeed, this ctl file is strange, as it is being generated the ctl?

Sorry for the bad english
tempo.web44.net - WRF Model 15 Km - South of Brazil and WRF 40 Km - South America

cubemonkey
Posts: 13
Joined: Wed Aug 26, 2009 1:48 am

Re: Meteogram script

Post by cubemonkey » Tue Dec 29, 2009 12:46 pm

The .ctl file is unmodified.. When I compiled ARWpost, it came with a template namelist.ARWpost, which is what I used to convert the wrfout file.

All of my NCL scripts refer to temperature as 'tc'. I thought that was just standard for wrf, and was surprised to see these grads scripts looking for different variable names (considering we're all using wrfems). So I'm thinking I'm missing something in the ARWpost conversion? Maybe my namelist.ARWpost is not the correct one to be using?

Sorry to hijack the thread here, perhaps this should have been a separate post ;)

Post Reply