WRF快速增减wrfout输出变量
2018-10-23 本文已影响308人
气象备忘录
在运行wrf的时候,除了通过注册表修改输出变量外,我们还可以通过在namelist.input中的'&time_control'块增加一个iofields文件来快速并且有效地增减wrfout中的变量。
如:iofields_filename = "iofield_list.txt"
不带路径则表示在工作目录,也可以选择指定其他目录
如:iofields_filename = "/public/home/ranlk/jiaobf/ref_inputdir/iofield_list.txt"
iofield_list.txt文件的内容类似
-:h:0:SHDMAX,SHDMIN,SNOALB,TSLB,SMOIS,SEAICE,XICEM
+:h:0:ZNT,RMOL,LANDUSEF
第一列表示减去或者增加变量
第二列的h表示history文件
0表示标准流
后边就是操作的变量
参考 http://forum.wrfforum.com/viewtopic.php?f=12&t=3293
修改注册表的贴子 http://hejianjun520520.blog.163.com/blog/static/41789395201111111525130/
有一点特别需要注意,WRF的code中设定了一个常数
INTEGER, PARAMETER :: max_hst_mods = 200
也就是说iofield_list.txt中指定的变量最多为200个,超过这个上限,程序会报错中断。如果要增加的话,只需要把这个常数放大,然后重新编译就可以了。脚本位于WRFV3/frame/module_domain.F
自己测试的iofield_list.txt文件:
-:h:0:ZS,DZS,VAR_SSO,HFX_FORCE,LH_FORCE,TSK_FORCE,LH_FORCE_TEND,TSK_FORCE_TEND,NEST_POS,CFN
-:h:0:CFN1,RDX,CF1,CF2,CF3,ITIMESTEP,XTIME,QNICE,QNSNOW,QNRAIN,QNGRAUPEL,SH2O,SMCREL
-:h:0:SFROFF,ACGRDFLX,ACSNOM,VAR,O3RAD,MAPFAC_U,MAPFAC_V,MAPFAC_MY,MAPFAC_UX,MAPFAC_UY
-:h:0:MAPFAC_VX,MF_VX_INV,F,E,SINALPHA,COSALPHA,TSK,P_TOP,T00,P00,TLP,TISO,TLP_STRAT
-:h:0:MAX_MSTFX,RAINSH,SNOWNC,GRAUPELNC,HAILNC,CLDFRA,GLW,SWNORM,ACSWUPT,ACSWUPTC
-:h:0:ACSWDNT,ACSWDNTC,ACSWUPB,ACSWUPBC,ACSWDNB,ACSWDNB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LANDMASK,LAKEMASK,SST,SST_INPUT,LU_INDEX,HFX_FORCE_TEND
-:h:0:FNM,FNP,RDNW,RDN,DNW,DN,THIS_IS_AN_IDEAL_RUN,P_HYD,Q2,T2,TH2,RDY,RESM,ZETATOP
-:h:0:SHDMAX,SHDMIN,SNOALB,TSLB,SMOIS,SEAICE,XICEM
-:h:0:SNOW,SNOWH,CANWAT,SSTSK,COSZEN,LAI,MAPFAC_M,MAPFAC_MX,MAPFAC_VY,P_STRAT,MAX_MSTFY
-:h:0:SWDOWN,ALBEDO,CLAT,LH,ACLHF,ISEEDARR_SPPT,UDROFF,IVGTYP,ISLTYP,VEGFRA,GRDFLX
输出的变量名列表
netcdf wrfout_d01_2018-06-03_09\:00\:00 {
dimensions:
Time = UNLIMITED ; // (1 currently)
DateStrLen = 19 ;
west_east = 600 ;
south_north = 600 ;
bottom_top = 50 ;
bottom_top_stag = 51 ;
west_east_stag = 601 ;
south_north_stag = 601 ;
variables:
char Times(Time, DateStrLen) ;
float XLAT(Time, south_north, west_east) ;
XLAT:FieldType = 104 ;
XLAT:MemoryOrder = "XY " ;
XLAT:description = "LATITUDE, SOUTH IS NEGATIVE" ;
XLAT:units = "degree_north" ;
XLAT:stagger = "" ;
XLAT:coordinates = "XLONG XLAT" ;
float XLONG(Time, south_north, west_east) ;
XLONG:FieldType = 104 ;
XLONG:MemoryOrder = "XY " ;
XLONG:description = "LONGITUDE, WEST IS NEGATIVE" ;
XLONG:units = "degree_east" ;
XLONG:stagger = "" ;
XLONG:coordinates = "XLONG XLAT" ;
float ZNU(Time, bottom_top) ;
ZNU:FieldType = 104 ;
ZNU:MemoryOrder = "Z " ;
ZNU:description = "eta values on half (mass) levels" ;
ZNU:units = "" ;
ZNU:stagger = "" ;
float ZNW(Time, bottom_top_stag) ;
ZNW:FieldType = 104 ;
ZNW:MemoryOrder = "Z " ;
ZNW:description = "eta values on full (w) levels" ;
ZNW:units = "" ;
ZNW:stagger = "Z" ;
float U(Time, bottom_top, south_north, west_east_stag) ;
U:FieldType = 104 ;
U:MemoryOrder = "XYZ" ;
U:description = "x-wind component" ;
U:units = "m s-1" ;
U:stagger = "X" ;
U:coordinates = "XLONG_U XLAT_U XTIME" ;
float V(Time, bottom_top, south_north_stag, west_east) ;
V:FieldType = 104 ;
V:MemoryOrder = "XYZ" ;
V:description = "y-wind component" ;
V:units = "m s-1" ;
V:stagger = "Y" ;
V:coordinates = "XLONG_V XLAT_V XTIME" ;
float W(Time, bottom_top_stag, south_north, west_east) ;
W:FieldType = 104 ;
W:MemoryOrder = "XYZ" ;
W:description = "z-wind component" ;
W:units = "m s-1" ;
W:stagger = "Z" ;
W:coordinates = "XLONG XLAT XTIME" ;
float PH(Time, bottom_top_stag, south_north, west_east) ;
PH:FieldType = 104 ;
PH:MemoryOrder = "XYZ" ;
PH:description = "perturbation geopotential" ;
PH:units = "m2 s-2" ;
PH:stagger = "Z" ;
PH:coordinates = "XLONG XLAT XTIME" ;
float PHB(Time, bottom_top_stag, south_north, west_east) ;
PHB:FieldType = 104 ;
PHB:MemoryOrder = "XYZ" ;
PHB:description = "base-state geopotential" ;
PHB:units = "m2 s-2" ;
PHB:stagger = "Z" ;
PHB:coordinates = "XLONG XLAT XTIME" ;
float T(Time, bottom_top, south_north, west_east) ;
T:FieldType = 104 ;
T:MemoryOrder = "XYZ" ;
T:description = "perturbation potential temperature (theta-t0)" ;
T:units = "K" ;
T:stagger = "" ;
T:coordinates = "XLONG XLAT XTIME" ;
float MU(Time, south_north, west_east) ;
MU:FieldType = 104 ;
MU:MemoryOrder = "XY " ;
MU:description = "perturbation dry air mass in column" ;
MU:units = "Pa" ;
MU:stagger = "" ;
MU:coordinates = "XLONG XLAT XTIME" ;
float MUB(Time, south_north, west_east) ;
MUB:FieldType = 104 ;
MUB:MemoryOrder = "XY " ;
MUB:description = "base state dry air mass in column" ;
MUB:units = "Pa" ;
MUB:stagger = "" ;
MUB:coordinates = "XLONG XLAT XTIME" ;
float P(Time, bottom_top, south_north, west_east) ;
P:FieldType = 104 ;
P:MemoryOrder = "XYZ" ;
P:description = "perturbation pressure" ;
P:units = "Pa" ;
P:stagger = "" ;
P:coordinates = "XLONG XLAT XTIME" ;
float PB(Time, bottom_top, south_north, west_east) ;
PB:FieldType = 104 ;
PB:MemoryOrder = "XYZ" ;
PB:description = "BASE STATE PRESSURE" ;
PB:units = "Pa" ;
PB:stagger = "" ;
PB:coordinates = "XLONG XLAT XTIME" ;
float PSFC(Time, south_north, west_east) ;
PSFC:FieldType = 104 ;
PSFC:MemoryOrder = "XY " ;
PSFC:description = "SFC PRESSURE" ;
PSFC:units = "Pa" ;
PSFC:stagger = "" ;
PSFC:coordinates = "XLONG XLAT XTIME" ;
float U10(Time, south_north, west_east) ;
U10:FieldType = 104 ;
U10:MemoryOrder = "XY " ;
U10:description = "U at 10 M" ;
U10:units = "m s-1" ;
U10:stagger = "" ;
U10:coordinates = "XLONG XLAT XTIME" ;
float V10(Time, south_north, west_east) ;
V10:FieldType = 104 ;
V10:MemoryOrder = "XY " ;
V10:description = "V at 10 M" ;
V10:units = "m s-1" ;
V10:stagger = "" ;
V10:coordinates = "XLONG XLAT XTIME" ;
float QVAPOR(Time, bottom_top, south_north, west_east) ;
QVAPOR:FieldType = 104 ;
QVAPOR:MemoryOrder = "XYZ" ;
QVAPOR:description = "Water vapor mixing ratio" ;
QVAPOR:units = "kg kg-1" ;
QVAPOR:stagger = "" ;
QVAPOR:coordinates = "XLONG XLAT XTIME" ;
float QCLOUD(Time, bottom_top, south_north, west_east) ;
QCLOUD:FieldType = 104 ;
QCLOUD:MemoryOrder = "XYZ" ;
QCLOUD:description = "Cloud water mixing ratio" ;
QCLOUD:units = "kg kg-1" ;
QCLOUD:stagger = "" ;
QCLOUD:coordinates = "XLONG XLAT XTIME" ;
float QRAIN(Time, bottom_top, south_north, west_east) ;
QRAIN:FieldType = 104 ;
QRAIN:MemoryOrder = "XYZ" ;
QRAIN:description = "Rain water mixing ratio" ;
QRAIN:units = "kg kg-1" ;
QRAIN:stagger = "" ;
QRAIN:coordinates = "XLONG XLAT XTIME" ;
float QICE(Time, bottom_top, south_north, west_east) ;
QICE:FieldType = 104 ;
QICE:MemoryOrder = "XYZ" ;
QICE:description = "Ice mixing ratio" ;
QICE:units = "kg kg-1" ;
QICE:stagger = "" ;
QICE:coordinates = "XLONG XLAT XTIME" ;
float QSNOW(Time, bottom_top, south_north, west_east) ;
QSNOW:FieldType = 104 ;
QSNOW:MemoryOrder = "XYZ" ;
QSNOW:description = "Snow mixing ratio" ;
QSNOW:units = "kg kg-1" ;
QSNOW:stagger = "" ;
QSNOW:coordinates = "XLONG XLAT XTIME" ;
float QGRAUP(Time, bottom_top, south_north, west_east) ;
QGRAUP:FieldType = 104 ;
QGRAUP:MemoryOrder = "XYZ" ;
QGRAUP:description = "Graupel mixing ratio" ;
QGRAUP:units = "kg kg-1" ;
QGRAUP:stagger = "" ;
QGRAUP:coordinates = "XLONG XLAT XTIME" ;
float HGT(Time, south_north, west_east) ;
HGT:FieldType = 104 ;
HGT:MemoryOrder = "XY " ;
HGT:description = "Terrain Height" ;
HGT:units = "m" ;
HGT:stagger = "" ;
HGT:coordinates = "XLONG XLAT XTIME" ;
float RAINC(Time, south_north, west_east) ;
RAINC:FieldType = 104 ;
RAINC:MemoryOrder = "XY " ;
RAINC:description = "ACCUMULATED TOTAL CUMULUS PRECIPITATION" ;
RAINC:units = "mm" ;
RAINC:stagger = "" ;
RAINC:coordinates = "XLONG XLAT XTIME" ;
float RAINNC(Time, south_north, west_east) ;
RAINNC:FieldType = 104 ;
RAINNC:MemoryOrder = "XY " ;
RAINNC:description = "ACCUMULATED TOTAL GRID SCALE PRECIPITATION" ;
RAINNC:units = "mm" ;
RAINNC:stagger = "" ;
RAINNC:coordinates = "XLONG XLAT XTIME" ;
// global attributes:
:TITLE = " OUTPUT FROM WRF V3.9.1 MODEL" ;
:START_DATE = "2018-06-01_00:00:00" ;
:SIMULATION_START_DATE = "2018-06-01_00:00:00" ;
:WEST-EAST_GR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AL = 0.12f ;
:AER_ANGEXP_VAL = 1.3f ;
:AER_SSA_VAL = 0.85f ;
:AER_ASY_VAL = 0.9f ;
:MOIST_ADV_OPT = 1 ;
:SCALAR_ADV_OPT = 1 ;
:TKE_ADV_OPT = 1 ;
:DIFF_6TH_OPT = 0 ;
:DIFF_6TH_FACTOR = 0.12f ;
:OBS_NUDGE_OPT = 0 ;
:BUCKET_MM = -1.f ;
:BUCKET_J = -1.f ;
:PREC_ACC_DT = 0.f ;
:ISFTCFLX = 0 ;
:ISHALLOW = 0 ;
:ISFFLX = 1 ;
:ICLOUD = 1 ;
:ICLOUD_CU = 0 ;
:TRACER_PBLMIX = 1 ;
:SCALAR_PBLMIX = 0 ;
:YSU_TOPDOWN_PBLMIX = 1 ;
:GRAV_SETTLING = 0 ;
:DFI_OPT = 0 ;
:SIMULATION_INITIALIZATION_TYPE = "REAL-DATA CASE" ;
:WEST-EAST_PATCH_START_UNSTAG = 1 ;
:WEST-EAST_PATCH_END_UNSTAG = 600 ;
:WEST-EAST_PATCH_START_STAG = 1 ;
:WEST-EAST_PATCH_END_STAG = 601 ;
:SOUTH-NORTH_PATCH_START_UNSTAG = 1 ;
:SOUTH-NORTH_PATCH_END_UNSTAG = 600 ;
:SOUTH-NORTH_PATCH_START_STAG = 1 ;
:SOUTH-NORTH_PATCH_END_STAG = 601 ;
:BOTTOM-TOP_PATCH_START_UNSTAG = 1 ;
:BOTTOM-TOP_PATCH_END_UNSTAG = 50 ;
:BOTTOM-TOP_PATCH_START_STAG = 1 ;
:BOTTOM-TOP_PATCH_END_STAG = 51 ;
:GRID_ID = 1 ;
:PARENT_ID = 1 ;
:I_PARENT_START = 1 ;
:J_PARENT_START = 1 ;
:PARENT_GRID_RATIO = 1 ;
:CEN_LAT = 42.02501f ;
:CEN_LON = 87.03f ;
:TRUELAT1 = 35.f ;
:TRUELAT2 = 45.f ;
:MOAD_CEN_LAT = 42.02501f ;
:STAND_LON = 87.03f ;
:POLE_LAT = 90.f ;
:POLE_LON = 0.f ;
:GMT = 0.f ;
:JULYR = 2018 ;
:JULDAY = 152 ;
:MAP_PROJ = 1 ;
:MAP_PROJ_CHAR = "Lambert Conformal" ;
:MMINLU = "MODIFIED_IGBP_MODIS_NOAH" ;
:NUM_LAND_CAT = 21 ;
:ISWATER = 17 ;
:ISLAKE = 21 ;
:ISICE = 15 ;
:ISURBAN = 13 ;
:ISOILWATER = 14 ;
:HYBRID_OPT = -1 ;
:ETAC = 0.f ;
}