1,而不是自己想要的时间变量,请确保你的wrf中积分步长可以被你的wrfout输出间隔整除同时你的ARWpost中的时间间隔=wrfout输出时间间隔,满足的话就可以生成了
在linux下我通常是用ncdump和ncview先看查看netcdf文件,确定要读取的变量及其维数后,再用fortran读,只要三条语句就可以搞定了(下面程序中的红色部分)。下面是一个简单的Fortran程序读取wrfout文件,程序名为read_netcdf.f90
! This program is for reading wrfout
implicit none
integer, parameter :: LLm=144, MMm=96, Ndas=25 !定义维数
integer ierr,ncid,varid,len_file
real h(LLm,MMm,Ndas) !变量名:地形高度
character*299 file_wrfout!文件名路径
include 'netcdf.inc'
file_wrfout='/data/zlzang/fly_wrfout/wrfout_d03_2010-06-03_00:00:00'
len_file=len_trim(file_wrfout)
WRF模式为完全可压缩以及非静力模式,为了兼顾计算效率和稳定性,水平方向采用Arakawa C(荒川C)网格点(重点考虑1-10km),垂直方向则采用地形跟随质量坐标。Arakawa-C网格点为交错格点,以下为图示说明:
因此,在以下U、V变量定义中:
float U(Time, bottom_top, south_north, west_east_stag)
U:description = "x-wind component"
U:units = "m s-1"
x方向风分量(即纬向风)
float V(Time, bottom_top, south_north_stag, west_east)
V:description = "y-wind component"
V:units = "m s-1"
y方向风分量(即经向风)
Time为时间维度数, bottom_top为垂直方向的层数,south_north为质量点南北方向的格点数,west_east为质量点东西方向的格点数,而west_east_stag(=west_east+1)是纬向风U东西方向的格点数,south_north_stag(=south_north+1)是经向风V南北方向的格点数。
正因为WRF模式水平方向采用的是交错网格点,所以在变量定义中分别定义了质量点、纬向风U-格点、经向风V-格点的经纬度,说明如下:
float XLAT(Time, south_north, west_east)
XLAT:description = "LATITUDE, SOUTH IS NEGATIVE"
XLAT:units = "degree_north"
质量点的纬度(南半球为负值)
float XLONG(Time, south_north, west_east)
XLONG:description = "LONGITUDE, WEST IS NEGATIVE"
XLONG:units = "degree_east"
质量点的经度(西半球为负值)
float XLAT_U(Time, south_north, west_east_stag)
XLAT_U:description = "LATITUDE, SOUTH IS NEGATIVE"
XLAT_U:units = "degree_north"
U-格点的纬度(南半球为负值)
float XLONG_U(Time, south_north, west_east_stag)
XLONG_U:description = "LONGITUDE, WEST IS NEGATIVE"
XLONG_U:units = "degree_east"
U-格点的经度(西半球为负值)
float XLAT_V(Time, south_north_stag, west_east)
XLAT_V:description = "LATITUDE, SOUTH IS NEGATIVE"
XLAT_V:units = "degree_north"
V-格点的纬度(南半球为负值)
float XLONG_V(Time, south_north_stag, west_east)
XLONG_V:description = "LONGITUDE, WEST IS NEGATIVE"
XLONG_V:units = "degree_east"
V-格点的经度(西半球为负值)
因此,纬向风U(Time, bottom_top, south_north, west_east_stag) 所对应的经纬度坐标分别由是XLAT_U和XLONG_U所定义,V(Time,bottom_top, south_north_stag, west_east)对应的经纬度坐标即XLAT_V和XLONG_V对应的坐标。
如果你需要某一个坐标上的U、V数据,由于WRF模式输出的U、V数据的网格点是交错的,需要用相邻的纬向风U-格点、经向风V-格点的U、V数据分别进行插值得到;如果你需要的是多个格点的U、V数据,建议先将模式输出数据插值到统一的网格坐标点上,再读取你需要坐标点的U、V数据。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)