2024年2月22日发(作者:)
Wrf修改土壤湿度思路与方法(初始场替换数据)
思路:不同下垫面的土壤湿度不同,但NCEP资料初始化的时候因为模拟区域太小,湿度值基本不变,用不同下垫面类型修改对应的不同土壤湿度,用MODIS_landuse资料20种土地类型判别替换裸地,耕地,草地的土壤湿度。
Read_wrf_nc可以查看,修改wrf模式的初始场,结果等netcdf格式的文件
1. 下载read_wrf_nc.f(wrf主页)
2. pgf90 read_wrf_nc.f -L/usr/local/netcdf/lib -lnetcdf -lm
-I/usr/local/netcdf/include -Mfree -o read_wrf_nc
3. 命令与用法参考usersGuide,例如:
-h / help Print help information. 列出帮助文件
-m Print list of fields available for each time, plus the min and maxvalues for each
field. 列出变量信息(相当于ncdump –h)
-ts ll lat lon VAR VAR …..will generate time series output for all VAR’s at x/y
locationnearest to lat/lon 列出时间变量序列值
-V
VAR
查看当前时间变量值
4. 初始场文件wrfinput_d01拷贝到read_wrf_nc文件夹下
5. 打开read_wrf_nc.f 到1600行,
添加变量data_real1 real, dimension(dim1,dim2,dim3) :: data_real, data_real1
到1620行添加语句:
open(9999,file='/root/download/readwrfnc/')
if ( var == 'LU_INDEX') then
data_real1=data_real !写入到文本文件
write(9999,*)data_real1
重新编译一下read_wrf_nc.f文件,修改变量的命令为:
./read_wrf_nc wrfinput_d03 –EditData LU_INDEX
选yes
6.在文本编辑器里按照wrf的文件查看MODIS的相应的土壤湿度值,替换数据。例如:
1, 12., .30, .95, 50., 4., 3.33, 29.2e5, 'Evergreen Needleleaf Forest' 常绿针叶林
2, 12., .50, .95, 50., 5., 1.67, 29.2e5, 'Evergreen Broadleaf Forest' 常绿阔叶林
3, 14., .30, .94, 50., 4., 2.86, 25.0e5, 'Deciduous Needleleaf Forest' 落叶针叶林
4, 16., .30, .93, 50., 4., 2.63, 25.0e5, 'Deciduous Broadleaf Forest' 落叶阔叶林
5, 13., .30, .97, 50., 4., 2.11, 41.8e5, 'Mixed Forests' 混交林
6, 22., .10, .93, 5., 3., 1.56, 20.8e5, 'Closed Shrublands' 封闭灌丛
7, 20., .15, .95, 6., 3., 2.14, 20.8e5, 'Open Shrublands' 开放灌丛
8, 22., .10, .93, 5., 3., 1.56, 20.8e5, 'Woody Savannas' 热带稀疏草原
9, 20., .15, .92, 15., 3., 2.00, 25.0e5, 'Savannas' 热带、亚热带稀疏大草原
10, 19., .15, .96, 12., 3., 2.37, 20.8e5, 'Grasslands' 草场、牧场
11, 14., .42, .95, 30., 5.5, 1.32 35.5e5 'Permanent wetlands' 永久湿地
12, 17., .30, .985, 15., 4., 2.71, 25.0e5, 'Croplands' 农田、耕地
13, 15., .10, .88, 80., 3., 1.67, 18.9e5, 'Urban and Built-Up' 城市和建筑
14 18., .25, .98, 14., 4., 2.56, 25.0e5, 'cropland/natural vegetation mosaic' 耕地、自然植被镶嵌
15, 55., .95, .95, 0.1, 5., 0., 9.0e25, 'Snow and Ice' 冰雪
16, 25., .02, .90, 1., 2., 0.81, 12.0e5, 'Barren or Sparsely Vegetated' 稀疏荒芜植被
17, 8., 1.0, .98, 0.01, 6., 0., 9.0e25, 'Water' 水体
18, 15., .50, .93, 30., 5., 2.67, 9.0e25, 'Wooded Tundra' 林地苔藓
19, 15., .50, .92, 15., 5., 2.67, 9.0e25, 'Mixed Tundra' 混合苔藓
20, 25., .02, .90, 10., 2., 1.60, 12.0e5, 'Barren Tundra' 贫瘠苔藓
7. wrfinput_d03的SMOIS量有4层,LU_INDEX只有一层,把修改过的文本内容往下复制3次,这样把每层土壤湿度都用同一值了,有时间在乘以系数修订。
8. 替换:
open(9999,file='/root/download/readwrfnc/')
read(9999,*)data_real1
if ( var == 'SMOIS') then
data_real=data_real1 !替换
再重新编译一下read_wrf_nc.f文件,修改变量的命令为:
./read_wrf_nc wrfinput_d03 –EditData SMOIS
选yes
9. 把修改过的wrfinput_d03替换原始文件,直接运行./
10. 最保险的做法是把wps前处理的初始场文件met_em做修改,但是嵌套和时次太多,麻烦。


发布评论