[gradsusr] (no subject)

Evgeny Gavrilov eugen420 at gmail.com
Sun May 9 15:02:02 EDT 2021


All the same. The maps are not drawn

You can run my script:

'reinit'

'sdfopen https://nomads.ncep.noaa.gov/dods/gfs_0p25/gfs20210509/gfs_0p25_12z
'

'set lon 30 50'
'set lat 40 50'

'set display color white'

maps = 20
  i = 1
  while ( i<maps )
'set t ' i

'set t 1 20'
'define t=tmpprs(lev=850)'
'set t 1 20'
'define rh=rhprs(lev=850)'
'set t 1 20'
'define
dewp850mb=(t-273.15)-((14.55+0.114*(t-273.15))*(1-0.01*rh)+pow((2.5+0.007*(t-273.15))*(1-0.01*rh),3)+(15.9+0.117*(t-273.15))*pow((1-0.01*rh),14))'
'set t 1 20'
'define vapr850mb=6.112*exp((17.67*dewp850mb)/(dewp850mb+243.5))'
'set t 1 20'
'define e850mb=vapr850mb*1.001+(850-100)/900*0.0034'
'set t 1 20'
'define w850mb=0.62197*(e850mb/(850-e850mb))'
'set t 1 20'
'define te850mb=(t+(2260000*w850mb/1004))'
'set t 1 20'
'define epa=(te850mb*pow((1000/850),(287/1004)))-273.16'

'set gxout shaded'
'define a = thetae'
'd a - a(t-1)'
'cbarm'

'printim C:\Users\123\for\temp_'i'.png x800 y600'

'clear'

i=i+1
endwhile

return

On Sun, May 9, 2021 at 8:54 PM Jeff Duda <jeffduda319 at gmail.com> wrote:

> Oh, yeah...I missed that. Good catch, James!
>
> But the display command I suggested to him (d a - a(t-1)) certainly is
> valid for plotting the 1-time-step change in thetae, which I presume is
> what he wanted originally. It depends on the final graphic type he is
> trying to produce.
>
> On Sun, May 9, 2021 at 10:41 AM James Potemra <jimp at hawaii.edu> wrote:
>
>> You are not defining the time correctly.  In this new script you define
>> "thetae", and this is still only defined for a single time-step.  You need
>> to put the "set t 1 81" before any variable you want to be a function of
>> time.  Also, your statement "d a-a(t-1)" doesn't make sense since "a" (if
>> defined properly) will be a function of time/lat/lon.  If you want to plot
>> 81 contour plots, each one as a different between current time and time
>> before, you'll have to script that like you did in your first example.
>>
>> Jim
>> On 5/8/21 12:52 PM, Evgeny Gavrilov wrote:
>>
>> this command: 'set t 1 81' before 'define' does not solve this problem
>>
>> On Sun, May 9, 2021 at 1:11 AM Jeff Duda <jeffduda319 at gmail.com> wrote:
>>
>>> What do you mean by "doesn't help"? We need specifics to be able to
>>> fully help you.
>>>
>>> Jeff Duda
>>>
>>> On Sat, May 8, 2021 at 1:53 PM Evgeny Gavrilov <eugen420 at gmail.com>
>>> wrote:
>>>
>>>>   still doesn't help 'set t 1 81'
>>>>
>>>> 'reinit'
>>>>
>>>> 'sdfopen
>>>> https://nomads.ncep.noaa.gov/dods/gfs_0p25/gfs20210508/gfs_0p25_12z'
>>>>
>>>> 'set mpdset hires'
>>>> 'set lon 10 30'
>>>> 'set lat 40 50'
>>>>
>>>> 'set display color white'
>>>>
>>>> 'set gxout shaded'
>>>> 'define tc = tmpprs(lev=850)'
>>>> 'define rh = rhprs(lev=850)'
>>>> 'define dewp850mb =
>>>> (tc-273.15)-((14.55+0.114*(tc-273.15))*(1-0.01*rh)+pow((2.5+0.007*(tc-273.15))*(1-0.01*rh),3)+(15.9+0.117*(tc-273.15))*pow((1-0.01*rh),14))'
>>>> 'define vapr850mb = 6.112*exp((17.67*dewp850mb)/(dewp850mb+243.5))'
>>>> 'define e850mb = vapr850mb*1.001+(850-100)/900*0.0034'
>>>> 'define w850mb = 0.62197*(e850mb/(850-e850mb))'
>>>> 'define te850mb = (tc+(2260000*w850mb/1004))'
>>>> 'define thetae = (te850mb*pow((1000/850),(287/1004)))-273.16'
>>>>
>>>> 'set t 1 81'
>>>> 'define a = thetae'
>>>> 'd a-a(t-1)'
>>>> 'cbarm'
>>>>
>>>> 'printim C:\Users\for\temp.png x800 y600'
>>>>
>>>> 'clear'
>>>>
>>>> return
>>>>
>>>> On Sat, May 8, 2021 at 11:15 PM Evgeny Gavrilov <eugen420 at gmail.com>
>>>> wrote:
>>>>
>>>>> still doesn't help 'set t 1 81'
>>>>>
>>>>> 'reinit'
>>>>>
>>>>> 'sdfopen
>>>>> https://nomads.ncep.noaa.gov/dods/gfs_0p25/gfs20210508/gfs_0p25_12z'
>>>>>
>>>>> 'set mpdset hires'
>>>>> 'set lon 10 30'
>>>>> 'set lat 40 50'
>>>>>
>>>>> 'set display color white'
>>>>>
>>>>> 'set gxout shaded'
>>>>> 'define tc = tmpprs(lev=850)'
>>>>> 'define rh = rhprs(lev=850)'
>>>>> 'define dewp850mb =
>>>>> (tc-273.15)-((14.55+0.114*(tc-273.15))*(1-0.01*rh)+pow((2.5+0.007*(tc-273.15))*(1-0.01*rh),3)+(15.9+0.117*(tc-273.15))*pow((1-0.01*rh),14))'
>>>>> 'define vapr850mb = 6.112*exp((17.67*dewp850mb)/(dewp850mb+243.5))'
>>>>> 'define e850mb = vapr850mb*1.001+(850-100)/900*0.0034'
>>>>> 'define w850mb = 0.62197*(e850mb/(850-e850mb))'
>>>>> 'define te850mb = (tc+(2260000*w850mb/1004))'
>>>>> 'define thetae = (te850mb*pow((1000/850),(287/1004)))-273.16'
>>>>>
>>>>> 'set t 1 81'
>>>>> 'define a = thetae'
>>>>> 'd a-a(t-1)'
>>>>> 'cbarm'
>>>>>
>>>>> 'printim C:\Users\for\temp.png x800 y600'
>>>>>
>>>>> 'clear'
>>>>>
>>>>> return
>>>>>
>>>>> On Sat, May 8, 2021 at 10:54 PM James T. Potemra <jimp at hawaii.edu>
>>>>> wrote:
>>>>>
>>>>>> You will have to set the time range before defining variable 'a',
>>>>>> otherwise it will only be defined for a single time step.  Try add 'set t 1
>>>>>> 81' before defining 'a'.
>>>>>>
>>>>>> Jim
>>>>>> On 5/8/21 8:42 AM, Evgeny Gavrilov wrote:
>>>>>>
>>>>>> "i" from while.
>>>>>>
>>>>>> maps = 20
>>>>>>   i = 1
>>>>>>   while ( i<maps )
>>>>>> 'set t ' i
>>>>>>
>>>>>> 2) a-a(t=1) also has a report about constant field (value=0)
>>>>>>
>>>>>> 'reinit'
>>>>>>
>>>>>> 'sdfopen
>>>>>> https://nomads.ncep.noaa.gov/dods/gfs_0p25/gfs20210508/gfs_0p25_12z'
>>>>>>
>>>>>> 'set mpdset hires'
>>>>>> 'set lon 10 30'
>>>>>> 'set lat 40 50'
>>>>>>
>>>>>> 'set display color white'
>>>>>>
>>>>>> 'set gxout shaded'
>>>>>> 'define a = tmp2m'
>>>>>> 'd a-a(t-1)'
>>>>>> 'cbarm'
>>>>>>
>>>>>> 'printim C:\Users\for\temp.png x800 y600'
>>>>>>
>>>>>> 'clear'
>>>>>>
>>>>>> return
>>>>>>
>>>>>> On Sat, May 8, 2021 at 10:11 PM Jeff Duda <jeffduda319 at gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>>> 1a) How is 'i' set?
>>>>>>> 1b) I don't think the grads scripting language supports math in a
>>>>>>> command line command like that. You'd have to do something like
>>>>>>> i = 1
>>>>>>> i2 = i-1
>>>>>>> 'd a(t='i') - a(t='i2')'
>>>>>>>
>>>>>>> 2) This command is equivalent and does not require a script variable
>>>>>>> (provided your dimension environment is set appropriately): 'd a - a(t-1)'
>>>>>>>
>>>>>>> Jeff Duda
>>>>>>>
>>>>>>> On Sat, May 8, 2021 at 12:01 PM Evgeny Gavrilov <eugen420 at gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> why this method does not working?
>>>>>>>>
>>>>>>>> 'set gxout shaded'
>>>>>>>> 'define a=tmp2m'
>>>>>>>> 'd a(t='i') - a(t='i-1')'
>>>>>>>>
>>>>>>>> report: constant field. value = 0
>>>>>>>> _______________________________________________
>>>>>>>> gradsusr mailing list
>>>>>>>> gradsusr at gradsusr.org
>>>>>>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Jeff Duda, Research Scientist
>>>>>>> University of Colorado Boulder
>>>>>>> Cooperative Institute for Research in Environmental Sciences
>>>>>>> NOAA/OAR/ESRL/Global Systems Laboratory
>>>>>>> Boulder, CO
>>>>>>> _______________________________________________
>>>>>>> gradsusr mailing list
>>>>>>> gradsusr at gradsusr.org
>>>>>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> gradsusr mailing listgradsusr at gradsusr.orghttp://gradsusr.org/mailman/listinfo/gradsusr
>>>>>>
>>>>>> _______________________________________________
>>>> gradsusr mailing list
>>>> gradsusr at gradsusr.org
>>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>>
>>>
>>>
>>> --
>>> Jeff Duda, Research Scientist
>>> University of Colorado Boulder
>>> Cooperative Institute for Research in Environmental Sciences
>>> NOAA/OAR/ESRL/Global Systems Laboratory
>>> Boulder, CO
>>> _______________________________________________
>>> gradsusr mailing list
>>> gradsusr at gradsusr.org
>>> http://gradsusr.org/mailman/listinfo/gradsusr
>>>
>>
>> _______________________________________________
>> gradsusr mailing listgradsusr at gradsusr.orghttp://gradsusr.org/mailman/listinfo/gradsusr
>>
>> _______________________________________________
>> gradsusr mailing list
>> gradsusr at gradsusr.org
>> http://gradsusr.org/mailman/listinfo/gradsusr
>>
>
>
> --
> Jeff Duda, Research Scientist
> University of Colorado Boulder
> Cooperative Institute for Research in Environmental Sciences
> NOAA/OAR/ESRL/Global Systems Laboratory
> Boulder, CO
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20210509/d167d34a/attachment-0001.html>


More information about the gradsusr mailing list