from wrfimportgetvar,ALL_TIMESwrflist=[Dataset("wrfout_d01_2016-10-07_00_00_00"),Dataset("wrfout_d01_2016-10-07_01_00_00"),Dataset("wrfout_d01_2016-10-07_02_00_00")]# 提取所有时刻的P变量 p_join=getvar(wrflist,"P",timeidx=ALL_TIMES,method="join")print(p_join) 返回(大部...
extracted_vars.append(getvar(ncfile, "va", units="m s-1")) elif var_name == "wa": extracted_vars.append(getvar(ncfile, "wa", units="m s-1")) elif var_name == "sh": extracted_vars.append(mpcalc.specific_humidity_from_mixing_ratio(getvar(ncfile, 'QVAPOR'))) elif var_name...
wrf_user_getvar这个函数在读取变量时能get到很多头文件里没有但是常用的变量,官网函数说明里也有 wrf_user_getvar (ucar.edu) 记录一些自己常用常忘的变量 1.z = wrf_user_getvar(a_1, "z",-1) ; grid point height 2.pt = wrf_user_getvar(a_1, "th",-1) ; potential temperature (theta) ...
function wrf_user_getvar (nc_file, fld, it) Usage: ter = wrf_user_getvar (a, “HGT”, 0) nc_file:wrfout的nc文件名称 fld:变量名 it:时间设置。假如it=-1,则所有时间均输出。 例如:tc=wrf_user_getvar(f,"tc",-1) === ;*** load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code...
List of available diagnostics:(也就是wrf_user_getvar这个函数可以⾃⼰计算以下这些诊断变量,⽽这些诊断变量在wrf模式⾥本⾝是没有的)avo: Absolute Vorticity [10-5 s-1]eth: Equivalent PotentialTtemperature [K]cape_2d: Returns 2D fields mcape/mcin/lcl/lfc cape_3d: Returns 3D fields cape...
提取所需的变量:可以使用getvarWRF输出文件中提取您希望绘制的变量,例如温度、降水量、风速等。 创建网格:如果您的WRF输出数据是经纬度坐标的,您可以使用latlon_coords函数来创建网格,以便在等值线图中绘制。 绘制等值线图:使用Matplotlib的contour函数或contourf函数来绘制等值线图。contour函数绘制轮廓线,contourf函数绘...
[WRF]wrf_user_getvar 函数的使用 摘要:function wrf_user_getvar (nc_file, fld, it)Usage: ter = wrf_user_getvar (a, “HGT”, 0)nc_file:wrfout的nc文件名称fld:变量名it:时间设置。假如it=-1,则所有时间均输出。例如:tc=wrf_user_getvar(f,"tc",-1)===;***阅读全文 posted @2013-04-...
绝对涡度等于相对涡度加行星涡度f(也是垂直分量) wrfpython可以直接使用getvar函数提取,变量名是avo 绝对涡度获取 代码语言:javascript 复制 代码语言:javascript 复制 avo=getvar(wrf_file,'avo',timeidx=0)avo850=interplevel(avo,p,850)avo850 由wrfpython内部计算得到的绝对涡度,其单位是10-5 s-1,所以在...
slp = getvar(wrflist, "slp",timeidx=ALL_TIMES, method="cat") 1. 2. 3. 4. 5. 对于wrf文件中的诊断变量种类与对应变量,可参考:Available diagnostics 插值 1、水平面插值 将有的3D数据,插值至对应气压面上,如根据3D的位势高度变量,插值到500hPa等压面。
(rainnc,Opt)time = wrf_user_getvar(a,"XTIME",-1)nlon = dimsizes(v10_regrid&lon)nlat = dimsizes(v10_regrid&lat)ofile = "wrfout_d01_2022-07-10_01:00:00.nc"system("rm -rf "+ofile)fout = addfile(ofile,"c")dimNames = (/"lat", "lon"/)dimSizes = (/nlat, nlon/)dim...