Produce a new grib data

Charles g941001 at CCIT.EDU.TW
Thu Apr 21 21:00:26 EDT 2005


Hi, Mark!
Thanks for your reply.
I've fixed my ctl file according to your suggestion, displayed one of the
variable, and got this error message:
        segmentation fault (core dumped)
I don't know what's wrong with my program.
I attach my script and ctl file. so you or other users may find my faults
out.
********script producing grib file
'reinit'
'open /u141/zhong/f97/run/Gsm851031-8602/output/pgb.ctlprs'
'set gxout fwrite'
'set fwrite pgb.fcst.1985.dat'
*--------t=1
*--------PRES
'define PRES=ave(presmsl,time=00Z01DEC1985,time=12Z31DEC1985)'
'd PRES'
*--------HGT
'set lev 1000'
'define HGT1000=ave(hgtprs,time=00Z01DEC1985,time=12Z31DEC1985)'
'd HGT1000'
'set lev 850'
'define HGT850=ave(hgtprs,time=00Z01DEC1985,time=12Z31DEC1985)'
'd HGT850'
'set lev 700'
'define HGT700=ave(hgtprs,time=00Z01DEC1985,time=12Z31DEC1985)'
'd HGT700'
'set lev 500'
'define HGT500=ave(hgtprs,time=00Z01DEC1985,time=12Z31DEC1985)'
'd HGT500'
'set lev 300'
'define HGT300=ave(hgtprs,time=00Z01DEC1985,time=12Z31DEC1985)'
'd HGT300'
*--------UGRD
'set lev 1000'
'define UGRD1000=ave(ugrdprs,time=00Z01DEC1985,time=12Z31DEC1985)'
'd UGRD1000'
'set lev 850'
'define UGRD850=ave(ugrdprs,time=00Z01DEC1985,time=12Z31DEC1985)'
'd UGRD850'
'set lev 700'
'define UGRD700=ave(ugrdprs,time=00Z01DEC1985,time=12Z31DEC1985)'
'd UGRD700'
'set lev 500'
'define UGRD500=ave(ugrdprs,time=00Z01DEC1985,time=12Z31DEC1985)'
'd UGRD500'
'set lev 300'
'define UGRD300=ave(ugrdprs,time=00Z01DEC1985,time=12Z31DEC1985)'
'd UGRD300'
*--------VGRD
'set lev 1000'
'define VGRD1000=ave(vgrdprs,time=00Z01DEC1985,time=12Z31DEC1985)'
'd VGRD1000'
'set lev 850'
'define VGRD850=ave(vgrdprs,time=00Z01DEC1985,time=12Z31DEC1985)'
'd VGRD850'
'set lev 700'
'define VGRD700=ave(vgrdprs,time=00Z01DEC1985,time=12Z31DEC1985)'
'd VGRD700'
'set lev 500'
'define VGRD500=ave(vgrdprs,time=00Z01DEC1985,time=12Z31DEC1985)'
'd VGRD500'
'set lev 300'
'define VGRD300=ave(vgrdprs,time=00Z01DEC1985,time=12Z31DEC1985)'
'd VGRD300'
*--------t=2
*--------PRES
'define PRES2=ave(presmsl,time=00Z01JAN1986,time=12Z31JAN1986)'
'd PRES2'
*--------HGT
'set lev 1000'
'define HGT10002=ave(hgtprs,time=00Z01JAN1986,time=12Z31JAN1986)'
'd HGT10002'
'set lev 850'
'define HGT8502=ave(hgtprs,time=00Z01JAN1986,time=12Z31JAN1986)'
'd HGT8502'
'set lev 700'
'define HGT7002=ave(hgtprs,time=00Z01JAN1986,time=12Z31JAN1986)'
'd HGT7002'
'set lev 500'
'define HGT5002=ave(hgtprs,time=00Z01JAN1986,time=12Z31JAN1986)'
'd HGT5002'
'set lev 300'
'define HGT3002=ave(hgtprs,time=00Z01JAN1986,time=12Z31JAN1986)'
'd HGT3002'
*--------UGRD
'set lev 1000'
'define UGRD10002=ave(ugrdprs,time=00Z01JAN1986,time=12Z31JAN1986)'
'd UGRD10002'
'set lev 850'
'define UGRD8502=ave(ugrdprs,time=00Z01JAN1986,time=12Z31JAN1986)'
'd UGRD8502'
'set lev 700'
'define UGRD7002=ave(ugrdprs,time=00Z01JAN1986,time=12Z31JAN1986)'
'd UGRD7002'
'set lev 500'
'define UGRD5002=ave(ugrdprs,time=00Z01JAN1986,time=12Z31JAN1986)'
'd UGRD5002'
'set lev 300'
'define UGRD3002=ave(ugrdprs,time=00Z01JAN1986,time=12Z31JAN1986)'
'd UGRD3002'
*--------VGRD
'set lev 1000'
'define VGRD10002=ave(vgrdprs,time=00Z01JAN1986,time=12Z31JAN1986)'
'd VGRD10002'
'set lev 850'
'define VGRD8502=ave(vgrdprs,time=00Z01JAN1986,time=12Z31JAN1986)'
'd VGRD8502'
'set lev 700'
'define VGRD7002=ave(vgrdprs,time=00Z01JAN1986,time=12Z31JAN1986)'
'd VGRD7002'
'set lev 500'
'define VGRD5002=ave(vgrdprs,time=00Z01JAN1986,time=12Z31JAN1986)'
'd VGRD5002'
'set lev 300'
'define VGRD3002=ave(vgrdprs,time=00Z01JAN1986,time=12Z31JAN1986)'
'd VGRD3002'
*----------------------------------------------------------------
'disable fwrite'

*************the control file
dset pgb.fcst.1985.dat
dtype grib
options sequential
undef -9.99E+33
title EXP1
xdef  180 linear    0.000    2.000
ydef   91 linear  -90.000    2.000
zdef    5 levels
    1000     850     700     500     300
tdef 2 linear OCT1985         1mo
vars 4
hgtprs        20   7,100,0 GEOPOTENTIAL HEIGHT
(M)
ugrdprs       20  33,100,0 ZONAL WIND
(M/S)
vgrdprs       20  34,100,0 MERIDIONAL WIND
(M/S)
presmsl        0   1,102,0 PRESSURE
(PA)
endvars

Charles



More information about the gradsusr mailing list