爱气象,爱气象家园! 

气象家园

 找回密码
 立即注册

QQ登录

只需一步,快速开始

新浪微博登陆

只需一步, 快速开始

搜索
查看: 8140|回复: 5

fortran读取wrf输出文件

[复制链接]

新浪微博达人勋

发表于 2013-5-1 16:28:28 | 显示全部楼层 |阅读模式

登录后查看更多精彩内容~

您需要 登录 才可以下载或查看,没有帐号?立即注册 新浪微博登陆

x
在使用fortran读取wrf输出文件(.dat)时,想读取某时次的数据,总共33个时次,假如想读取第20个时次的rainc数据,fortran程序该怎么写?求大神指导。。。ctl文件如下:
dset f:/2004/wrfout-d3_040630.dat
options  byteswapped
undef 1.e30
title  OUTPUT FROM WRF V3.2.1 MODEL
pdef   66  48 lcc  21.640  111.922   33.500   24.500  60.00000  30.00000  111.92208   3000.000   3000.000
xdef  154 linear  110.87812   0.01351351
ydef  110 linear   20.89588   0.01351351
zdef    2 levels  
850.00000
500.00000
tdef   33 linear 12Z30JUN2004     720MN      
VARS   10
PH             2  0  perturbation geopotential (m2 s-2)
PHB            2  0  base-state geopotential (m2 s-2)
T              2  0  perturbation potential temperature (theta-t0) (K)
T2             1  0  TEMP at 2 M (K)
HGT            1  0  Terrain Height (m)
RAINC          1  0  ACCUMULATED TOTAL CUMULUS PRECIPITATION (mm)
RAINNC         1  0  ACCUMULATED TOTAL GRID SCALE PRECIPITATION (mm)
XLAT           1  0  LATITUDE, SOUTH IS NEGATIVE (degree_north)
XLONG          1  0  LONGITUDE, WEST IS NEGATIVE (degree_east)
height         2  0  Model height (KM)
ENDVARS
@ global String comment TITLE =  OUTPUT FROM WRF V3.2.1 MODEL
@ global String comment SIMULATION_START_DATE = 2004-06-30_12:00:00
@ global String comment GRIDTYPE = C
@ global String comment MMINLU = USGS
@ global String comment WEST-EAST_GRID_DIMENSION =    67
@ global String comment SOUTH-NORTH_GRID_DIMENSION =    49
@ global String comment BOTTOM-TOP_GRID_DIMENSION =    28
@ global String comment MAP_PROJ =     1
@ global String comment DX =      3000.00
@ global String comment DY =      3000.00
@ global String comment CEN_LAT =        21.64
@ global String comment CEN_LON =       111.92
@ global String comment TRUELAT1 =        30.00
@ global String comment TRUELAT2 =        60.00
@ global String comment MOAD_CEN_LAT =        21.64
@ global String comment STAND_LON =       111.92
@ global String comment DIFF_OPT =     1
@ global String comment KM_OPT =     4
@ global String comment DAMP_OPT =     0
@ global String comment KHDIF =         0.00
@ global String comment KVDIF =         0.00
@ global String comment MP_PHYSICS =     1
@ global String comment RA_LW_PHYSICS =     1
@ global String comment RA_SW_PHYSICS =     1
@ global String comment SF_SFCLAY_PHYSICS =     2
@ global String comment SF_SURFACE_PHYSICS =     2
@ global String comment BL_PBL_PHYSICS =     2
@ global String comment CU_PHYSICS =     0
@ global String comment SURFACE_INPUT_SOURCE =     1
@ global String comment SST_UPDATE =     0
@ global String comment GRID_FDDA =     0
@ global String comment FEEDBACK =     1
@ global String comment SMOOTH_OPTION =     0
@ global String comment W_DAMPING =     0
@ global String comment OBS_NUDGE_OPT =     0
@ global String comment GRID_ID =     3
@ global String comment PARENT_ID =     2
@ global String comment I_PARENT_START =    23
@ global String comment J_PARENT_START =    17
@ global String comment PARENT_GRID_RATIO =     3
@ global String comment DT =        15.00
@ global String comment ISWATER =    16
@ global String comment ISICE =    24
@ global String comment ISURBAN =     1
@ global String comment ISOILWATER =    14
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2013-5-2 23:48:59 | 显示全部楼层
你这个不是wrf的输出文件吧,wrf的输出文件是nc格式的wrfout什么的,你这个是不是用ARWpost转的格式,如果是这样,要取第20个时次的rainc,你可以直接在namelist.ARWpost文件里改。或者,你在现在的数据基础上,用grads的set gxout fwrite导出你相应的数据就好。
密码修改失败请联系微信:mofangbao
回复 支持 1 反对 0

使用道具 举报

新浪微博达人勋

 楼主| 发表于 2013-5-4 19:18:08 | 显示全部楼层
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2013-6-20 22:22:04 | 显示全部楼层
您好,我是一名研究生新生,请教一下,有没有现成的fortran程序可以读出wrfout里面的经纬度及对应的风场啊?多谢多谢!
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2013-10-10 10:38:57 | 显示全部楼层
敏芬 发表于 2013-6-20 22:22
您好,我是一名研究生新生,请教一下,有没有现成的fortran程序可以读出wrfout里面的经纬度及对应的风场啊? ...

ncdump就可以
密码修改失败请联系微信:mofangbao

新浪微博达人勋

发表于 2013-10-10 10:44:02 | 显示全部楼层
敏芬 发表于 2013-6-20 22:22
您好,我是一名研究生新生,请教一下,有没有现成的fortran程序可以读出wrfout里面的经纬度及对应的风场啊? ...

俺还是觉得NCL处理起来比较好,比较方便~~~
密码修改失败请联系微信:mofangbao
您需要登录后才可以回帖 登录 | 立即注册 新浪微博登陆

本版积分规则

Copyright ©2011-2014 bbs.06climate.com All Rights Reserved.  Powered by Discuz! (京ICP-10201084)

本站信息均由会员发表,不代表气象家园立场,禁止在本站发表与国家法律相抵触言论

快速回复 返回顶部 返回列表