1.先用Fortran编了一个grads空的可识别的站点资料。grads站点资料格式如下:
struct reportheader { char id[8]; float lat; float lon; float t; int nlev; int flag; };
2.站点和格点的描述文件
dsetE:\data\T639\2006\gtost\st.grd dtype station stnmap E:\data\T639\2006\gtost\st.map undef -9999.90 title rains to station tdef 1 linear 29Dec2006 1dy vars 1 gtostr 0 99 station rain2 endvars
Dset E:\data\T639\2006\cutdata\20061229 undef-9999.90 title 20061229 xdef 225 linear 27.0 0.5625 ydef 129 linear 0.0 0.5625 zdef 1 levels 999 tdef 1 linear 29Dec2006 1dy vars 1 LSP 0 99 rain endvars
3.使用函数gr2stn插值
'reinit'
'open E:\data\T639\2006\gtost\g.ctl'
'open E:\data\T639\2006\gtost\st.ctl'
'set gxout print'
'set t 1'
'd gr2stn(LSP.1,gtostr.2)'
rc=write('E:\data\T639\2006\gtost\out.txt',result)
4.得到的结果
Printing Stations -- 160 Reports -- Undef = -9999.9 54836118.2 36.18 -9.99e+33 9.8324e-01 54904 115.5 35.58 -9.99e+33 2.5427e+00 54905 115.9 35.6 -9.99e+33 1.8573e+00 54906 115.4 35.25 -9.99e+33 2.5794e+00 54907 116.7 34.98 -9.99e+33 2.0643e+00 54908 115.1 35.28 -9.99e+33 3.2358e+00 54909 115.6 35.1 -9.99e+33 2.3791e+00 54910 116.1 35.8 -9.99e+33 1.7107e+00 54912 116.5 35.72 -9.99e+33 1.4634e+00 54913 116.8 35.75 -9.99e+33 1.5159e+00 54914 116.1 35.42 -9.99e+33 1.8098e+00
GRADS中gr2stn插值实践
本文介绍了一次使用GRADS软件中的gr2stn函数进行站点数据插值的实际操作过程。作者通过编写FORTRAN代码创建站点数据文件,并详细记录了从准备站点描述文件到使用GRADS内置函数进行插值的步骤。最后展示了插值后的站点数据结果。

1977

被折叠的 条评论
为什么被折叠?



