上传者: lulu2016
|
上传时间: 2022-08-19 20:50:59
|
文件大小: 29KB
|
文件类型: GS
很多常用grads的gs代码
function main(args)
'reinit'
if(args='')
'quit'
else
ctl=subwrd(args,1)
picdir=subwrd(args,2)
maxt=subwrd(args,3)
libpath=subwrd(args,4)
endif
'open '%ctl
'set lat -30 90'
'set lon 0 180'
'set mpdset cnworld'
'set mproj nps'
t=1
while(t<=maxt)
'set t 't
level.1=1000
level.2=925
level.3=850
level.4=700
level.5=500
level.6=200
level.7=100
i=1
while(i<=7)
'set lev 'level.i
'q dims'
timeline=sublin(result,5)
time=subwrd(timeline,6)
year=substr(time,9,4)
month=substr(time,6,3)
if(month='JAN');month='01';endif
if(month='FEB');month='02';endif
if(month='MAR');month='03';endif
if(month='APR');month='04';endif
if(month='MAY');month='05';endif
if(month='JUN');month='06';endif
if(month='JUL');month='07';endif
if(month='AUG');month='08';endif
if(month='SEP');month='09';endif
if(month='OCT');month='10';endif
if(month='NOV');month='11';endif
if(month='DEC');month='12';endif
day=substr(time,4,2)
hour=substr(time,1,2)
time=year%month%day%hour
levline=sublin(result,4)
lev1=subwrd(levline,6)
say time ' ' lev1
*
* T = temperature in deg C;
* es = saturation vapor pressure in mb;
* e = vapor pressure in mb;
* RH = Relative Humidity in percent;
* lev = surface pressure in mb;
* q = specific humidity in kg/kg.
*