[gradsusr] Suggestion for an internal call.
Goodson,Ron [Edm]
Ron.Goodson at EC.gc.ca
Tue Jan 10 18:44:34 EST 2012
This doesn't answer your question re "gs" vs "gsf" .. but I had a
similar desire to output useful names .. and this is what I did:
var.1.1 = 'prmslmsl/100'
var.1.2 = 'MSL Pressure'
var.2.1 = 'tmpsfc - 273.16'
var.2.2 = 'Sfc Temperature'
var.3.1 = 'tmp - 273.16'
var.3.2 = '0.995 Temperature'
var.4.1 = 'mag(ugrdsfc,vgrdsfc) * 1.97'
var.4.2 = 'Sfc WindSpeed'
var.5.1 = 'mag(ugrd,vgrd) * 1.97'
var.5.2 = '0.995 WindSpeed'
var.6.1 = 'TCDCsfc'
var.6.2 = 'Cloud Cover'
var.7.1 = 'apcpsfc'
var.7.2 = 'accum precip'
And had statements like
'd ' var.MyVar.1
rec = sublin(result,2)
value = subwrd(rec, 4)
value = math_format('%6.1f', value)
'draw string 0.1 ' MyY ' ' value ' : ' var.MyVar.2
where MyVar was 1 -> 7. This could also be used to translate by doing
string matches and the like.
-----Original Message-----
From: gradsusr-bounces at gradsusr.org
[mailto:gradsusr-bounces at gradsusr.org] On Behalf Of Ryglicki, David CIV
FNMOC
Sent: January 10, 2012 3:58 PM
To: gradsusr at gradsusr.org
Subject: [gradsusr] Suggestion for an internal call.
(Let's try sending this to the correct email address, shall we.)
Hey-hey, GrADS list.
I need a little bit of guidance. I want to create, I guess, a
"translate" function. To put it more clearly, when you get model output,
you'll get something like airtemp or t2m or precip or ugrdprs... you get
the idea. I'm writing a script that'll translate, say, "t2m" to "Air
Temperature @ 2m." I'm trying to make this as modular as possible for a
whole host of variables. My question is should I create another .gs
script that uses arguments or should I create my own .gsf function? For
my purposes, is the only different between the two as simple as:
Translate.gs <variable name> <args args args...>
Translate(<variable name>, <args args args...>)
I suppose I'm a little unclear as to the difference between the two.
Maybe for this specific instance they aren't that different?
And oh yes, GrADS v2.0.1, Linux OS, OpenGrADS is not an option (well,
not for a few months, anyway). Thanks for any help from the list I can
get!
David Ryglicki, Ph.D.
N3 Models
Fleet Numerical Meteorology and Oceanography Center
702/146
x4519
More information about the gradsusr
mailing list