[gradsusr] Question about displaying minutes properly on Grads image

Nimrod Micael nmicael at aggies.ncat.edu
Fri May 24 12:44:56 EDT 2013


Sure.

Here's an example.

It should say Forecast Valid:  16APR2011 19Z or 16APR2011 19:10Z


It should be that.






On Fri, May 24, 2013 at 12:35 PM, Jeff Duda <jeffduda319 at gmail.com> wrote:

> Can you give an example of how it's not working the way you'd like it?
>
>
> On Fri, May 24, 2013 at 8:06 AM, Nimrod Micael <nmicael at aggies.ncat.edu>wrote:
>
>> I am trying to display on where it says Forecast Valid:
>>
>> Date: Month: Yr        Time:   with the Z  at the end of it. But there's
>> issues with it displaying the minutes.
>>
>> Can you find out what the problem is? Also I would like the output file
>> where the printim image to be in the format of:
>>
>> Date_Month_Yr_Time:   with the Z  at the end of it.
>>
>> My Code:
>>
>> ''reinit'
>> 'clear'
>> 'open 20110416_d03.ctl'
>> 'set display color white'
>> 'set map 1 1 5'
>> 'set annot 1 6'
>> 'set xlopts 1 6 .17'
>> 'set ylopts 1 6 .16'
>> 'set mpdset hires'
>> *'set lon -105 -60'
>> *'set lat 24 54'
>> 'set clab on'
>> 'set grid off'
>> 'set timelab off'
>> 'set gxout grfill'
>>
>>
>>
>>
>> ***************************************************
>> *           Begin loop for levels and time
>> **************************************************
>>
>>
>> tt=170
>> while (tt<=190)
>> 'clear'
>> 'set grads off'
>> 'set t 'tt
>> 'q time'
>> time1=subwrd(result,3)
>> say time1
>>
>> hour=substr(time1,1,2)
>> say hour
>>
>>  day=substr(time1,5,2)
>> say day
>>
>> mon=substr(time1,6,3)
>>
>> if (JAN = mon) ; mon = 01 ; endif
>> if (FEB = mon) ; mon = 02 ; endif
>> if (MAR = mon) ; mon = 03 ; endif
>> if (APR = mon) ; mon = 04 ; endif
>> if (MAY = mon) ; mon = 05 ; endif
>> if (JUN = mon) ; mon = 06 ; endif
>> if (JUL = mon) ; mon = 07 ; endif
>> if (AUG = mon) ; mon = 08 ; endif
>>  if (SEP = mon) ; mon = 09 ; endif
>> if (OCT = mon) ; mon = 10 ; endif
>> if (NOV = mon) ; mon = 11 ; endif
>> if (DEC = mon) ; mon = 12 ; endif
>>
>> say mon
>>
>> year=substr(time1,9,5)
>> say year
>>
>> date = year''mon''day'_'hour''
>> say date
>>
>> time1=subwrd(result,3)
>> say time1
>> timeA=substr(time1,3,11)
>> timeB=substr(time1,7,16)
>> timeC=substr(time1,1,6)
>> 'q dims'
>> lev1=subwrd(result,37)
>>
>> ********************************************************
>> *
>> *         Color Shades
>> *******************************************************
>>
>> *Black To white
>> 'set rgb 59 0 0 0'
>> 'set rgb 60 15 15 15'
>> 'set rgb 61 30 30 30'
>> 'set rgb 62 45 45 45'
>> 'set rgb 63 60 60 60'
>> 'set rgb 64 75 75 75'
>> 'set rgb 65 90 90 90'
>> 'set rgb 66 105 105 105'
>> 'set rgb 67 120 120 120'
>> 'set rgb 68 135 135 135'
>> 'set rgb 69 150 150 150'
>> 'set rgb 70 165 165 165'
>> 'set rgb 71 180 180 180'
>> 'set rgb 72 195 195 195'
>> 'set rgb 73 210 210 210'
>> 'set rgb 74 225 225 225'
>> 'set rgb 75 245 245 245'
>> 'set rgb 76 255 255 255'
>>
>>
>> *light yellow to dark red
>> 'set rgb 21 255 250 170'
>> 'set rgb 22 255 232 120'
>> 'set rgb 23 255 192  60'
>> 'set rgb 24 255 160   0'
>> 'set rgb 25 255  96   0'
>> 'set rgb 26 255  50   0'
>> 'set rgb 27 225  20   0'
>> 'set rgb 28 192   0   0'
>> 'set rgb 29 165   0   0'
>>
>> *light blue to dark blue
>> 'set rgb 41 225 255 255'
>> 'set rgb 42 180 240 250'
>> 'set rgb 43 150 210 250'
>> 'set rgb 44 120 185 250'
>> 'set rgb 45  80 165 245'
>> 'set rgb 46  60 150 245'
>> 'set rgb 47  40 130 240'
>> 'set rgb 48  30 110 235'
>> 'set rgb 49  20 100 210'
>>
>> *light green to dark green
>> 'set rgb 31 230 255 225'
>> 'set rgb 32 200 255 190'
>> 'set rgb 33 180 250 170'
>> 'set rgb 34 150 245 140'
>> 'set rgb 35 120 245 115'
>> 'set rgb 36  80 240  80'
>> 'set rgb 37  55 210  60'
>> 'set rgb 38  30 180  30'
>> 'set rgb 39  15 160  15'
>> *set rgb 39   5 150   5
>>
>> *light pink to dark rose
>> 'set rgb 101 255 230 230'
>> 'set rgb 102 255 200 200'
>> 'set rgb 103 248 160 160'
>> 'set rgb 104 230 140 140'
>> 'set rgb 105 230 112 112'
>> 'set rgb 106 230  80  80'
>> 'set rgb 107 200  60  60'
>> 'set rgb 108 180  40  40'
>> 'set rgb 109 164  32  32'
>>
>> 'set xlint 3'
>> ********************************
>> *     Winds Speed Plot (shaded)
>>  ********************************
>> 'set gxout shaded'
>> 'set clevs 0 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80'
>> 'set ccols 76 41 43 44 35 36 37 38 21 22 23 24 25 26 27 28 106 104 102 42
>> 44 46'
>> 'd max_dbz'
>>
>> **************************************
>> *
>> *        Settings for contour plot
>> ***************************************
>> 'set gxout contour'
>> 'set clab masked'
>> 'set cthick 12'
>> 'set clevs 32'
>> 'set ccolor 1'
>>
>>
>>
>> 'set gxout vector'
>> 'set cthick 5'
>> 'set ccolor 1'
>> 'set arrscl 0.15'
>> 'd skip(u10m,4,4);v10m'
>>
>>
>>
>>
>> *********************************************
>> *     Draw Title, Run Cbar, Draw Map
>> **********************************************
>> 'draw map'
>> 'run cbarn'
>> 'draw shp c_02ap13'
>>
>> 'set t 1'
>> 'q time'
>> time2=subwrd(result,3)
>>
>> 'set string 1 tl 5'
>> 'set strsiz 0.17'
>> 'draw string 1.9 8.2 `14km, GFS Initialization: 'time2''
>> 'draw string 1.9 8 `1Reflectivity and Surface Winds'
>>
>>
>> 'set string 1 tr 5'
>> 'set strsiz 0.12'
>> 'draw string 10.9 0.2 `1WRFV3.3.1'
>>
>>
>> 'set string 1 tl 6'
>> 'set strsiz 0.17'
>> 'draw string 1.9 8.4 `1Forecast Valid:'timeB' 'timeC''
>>
>>
>> ***********************************************
>> *          Print picture file
>> ***********************************************
>> 'printim 'timeB  '_reflectivity_sfc_wind.png x1000 y800'
>>
>> "
>>
>> Thanks!
>>
>> --
>> Nimrod Micael
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>>
>
>
> --
> Jeff Duda
> Graduate research assistant
> University of Oklahoma School of Meteorology
> Center for Analysis and Prediction of Storms
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
>


-- 
Nimrod Micael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20130524/cb294b29/attachment-0003.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: APR2011_reflectivity_sfc_wind.png
Type: image/png
Size: 43295 bytes
Desc: not available
Url : http://gradsusr.org/pipermail/gradsusr/attachments/20130524/cb294b29/attachment-0003.png 


More information about the gradsusr mailing list