[gradsusr] OpenGrads/Grads: Cannot plot colorbar, no shading information

Tim Van Damme tim at stormcell.be
Sat Feb 23 08:47:05 EST 2019


UPDATE: when I leave the mpvals but enlarge the set lon set lat it seems to
work fine. 

 

 

Met vriendelijke groeten,

 

Tim Van Damme

tim at stormcell.be <mailto:tim at stormcell.be> 

 

From: gradsusr [mailto:gradsusr-bounces at gradsusr.org] On Behalf Of Tim Van
Damme
Sent: 23 February 2019 11:50
To: gradsusr at gradsusr.org
Subject: [gradsusr] OpenGrads/Grads: Cannot plot colorbar, no shading
information

 

Hello all,

 

Lately I am experiencing some issues with plotting GFS data on charts. I
used the cbarn.gs from the old opengrads version and the newer version as
well as cbar cbarb cbarc etc. It all comes down to the same error: Cannot
plot colorbar, no shading information

 

Once I start plotting a timeseries some of them go well and get the
colorbar, others don't. I have been searching for an explanation but
couldn't come up with one. I have it on the 0.25 0.50 and 1 degree GFS data.
I have it for some charts, others don't seem to have the issue. For example
the Cape and Cinh charts do struggle with it, the temperature, dewpoint and
low level shear don't.

 

An example is below. It is the script that is started through a .bat file
that plots the cape 180mb  data. Maybe someone of you guys might find the
error? 

 

**

 

function main(args)

 

* Parse the arguments: date, hour

  if (args = '')

  prompt 'Enter forecast date (example, 20110717) --> ' 

  pull date

  prompt 'Enter forecast hour (example, 00 or 06 or 12 or 18) --> ' 

  pull hour

  else 

  date = subwrd(args,1)

  hour  = subwrd(args,2)

  endif

 

'reinit'

'sdfopen
https://nomads.ncep.noaa.gov:9090/dods/gfs_0p25/gfs'date'/gfs_0p25_'hour'z'

SAY 180Cape

 

* Get info from the descriptor file

'q ctlinfo'

_ctl = result

_undef = getctl(undef)

_tdef = getctl(tdef)

_zdef = getctl(zdef)

 

maps = 66

 

* Get the Time axis info

tsize = subwrd(_tdef,2)

_t1 = 1       ;* 2nd half of timeseries

_t2 = 45

tsize = _t2 - _t1 + 1

'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

 

huh = subwrd(_tdef,4)

 

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

* 180-0mb Caoe

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

 

  i = 3

  while ( i<maps )

 

* Set up a few preliminary characteristics

setmap(1)

'set rgb 16 0 100 254'

'set rgb 17 0 150 254'

'set rgb 18 0 200 254'

'set rgb 19 0 230 240'

'set rgb 20 0 230 160'

'set rgb 21 0 230 120'

'set rgb 21 0 230 80'

'set rgb 22 0 240 40'

'set rgb 23 0 250 0'

'set rgb 24 254 254 0'

'set rgb 25 254 225 0'

'set rgb 26 254 200 0'

'set rgb 27 254 175 0'

'set rgb 28 254 150 0'

'set rgb 29 230 125 0'

'set rgb 30 230 100 0'

'set rgb 31 220 75 30'

'set rgb 32 200 50 30'

'set rgb 33 180 25 30'

'set rgb 34 170 0 30'

'set rgb 35 180 0 50'

'set rgb 36 200 0 100'

'set rgb 37 254 0 150'

'set rgb 38 254 0 200'

'set rgb 39 254 0 254'

'set rgb 40 254 90 254'

'set rgb 41 255 150 255'

 

'set t 'i

 

 

'set gxout shaded'

'set csmooth on'

'set clevs  0 200 400 600 800 1000 1200 1400 1600 1800 2000 2200 2400 2600
2800 3000 3200 3400 3600 3800 4000'

'set ccols  16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
37 38 39 40 41'

'd cape180_0mb'

 

'cbarn'

 

'query time'

time = subwrd(result,3)

day = subwrd(result,6)

fcsttime = substr(time,1,13)

fcstday = substr(day,1,3)

 

'q dims'

times  = sublin(result,5)

hub = subwrd(times,6) 

 

 

'set strsiz 0.12'

'set string 0 r 3 90' ; 'draw string 9.3 6 Cape in Joules/kg'

'set string 0 r 3 0' ; 'draw string 8.7 8.4 Valid: 'fcstday' 'fcsttime

'set string 0 l 3 0' ; 'draw string 0.1 0.1 Data: NOAA NCEP GFS 0.25 -
WWW.STORMCELL.BE <http://WWW.STORMCELL.BE> '

'set string 2 r 3 0' ; 'draw string 8.7 0.1 GFS Run: 'huh

 

* Draw Labels at the top of the page

'set string 0 r 11 0'

'set strsiz 0.12'

'set string 4 l 3 0' ; 'draw string 0.1 8.4 180-0mb above ground cape'

'gxprint bel_180cape'i'.png x1000 y844 -f overlay.png'

 

i = i+1

endwhile

 

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

* END OF MAIN SCRIPT

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

 

**

 

 

Met vriendelijke groeten,

 

Tim Van Damme

+32 499 61 25 61

tim at stormcell.be <mailto:tim at stormcell.be> 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20190223/7f18e1b1/attachment.html>


More information about the gradsusr mailing list