使用python处理wrfout文件
在前文已经成功驱动WRF模式的背景下,记录如何使用python处理wrfout文件。
参考网址:
wrf-python 1.3.4.1 documentation
首先在anaconda环境中安装wrf-python包:
1 | conda install -c conda-forge wrf-python |
读取文件,获取变量
这是wrf-python中的一些命令与ncl中的一些命令的对应关系。
NCL | wrf-python | 作用 |
---|---|---|
wrf_user_get_var | wrf.getvar | 提取和计算变量,变量名参考wrf_user_getvar |
wrf_user_interp_level | wrf.vinterp或wrf.interplevel | 将3D数据场插值到某个/些垂直层上 |
wrf_user_vert_cross | wrf.vertcross | 将3D数据场插值到某个水平线上 |
wrf_user_interp_line | wrf.interpline | 将2D数据场插值到某个线上 |
wrf_user_ll_to_xy | wrf.ll_to_xy | Lat/Lon <-> XY Routines |
获取文件中的诊断变量:
1 | from __future__ import print_function |
常用的一些诊断变量:
varname | Description |
---|---|
lat | latitude |
lon | longitude |
p/pres | Full model pressure [Pa] |
pressure | Full model pressure [hPa] |
z/height | Full model height [m] |
geopt/geopotential | |
pvo | potential vorticity [PVU] |
slp | Sea level pressure [hPa] |
ter | Model terrain height [m] |
tc | Temperature [C] |
tk | Temperature [K] |
th/theta | Potential temperature [K] |
times | Times in file (return strings - recommended) |
Times | Times in file (return characters) |
ua | U component of wind on mass points |
va | V component of wind on mass points |
wa | W component of wind on mass points |
uvmet10 | 10m U and V components of wind rotated to earth coordinates |
uvmet | U and V components of wind rotated to earth coordinates |
以数组的方式获取变量:disable xarray
1 | from __future__ import print_function |
读取多时次单文件
如果一个wrfout文件中存储了多个时次,读取的时候如何获得完成的数据:
1 | from netCDF4 import Dataset |
批量读取单时次文件并拼接
用Python批处理指定数据-以WRF输出结果为例演示按照指定维度合并(附示例代码)-腾讯云开发者社区-腾讯云
1 |
画图
画全球图
1 | proj = ccrs.PlateCarree(central_longitude=0) |
画wrf domain
Cartopy 系列:为 Lambert 投影地图添加刻度 - 炸鸡人博客
wrf模拟的domain图绘制 - xiaofeifeixd - 博客园
Cartopy 系列:探索 shapefile - 炸鸡人博客
1 | from __future__ import print_function |
画多子图
Cartopy地图投影绘制 | ZSYXY Meteorological workshop (yxy-biubiubiu.github.io)
运算
插值到规则经纬网格
将WRF模拟结果与站点观测或者再分析资料进行对比之前,我们需要对WRF输出的网格资料进行插值(或regrid)
1 | import salem |
1 | from scipy.interpolate import griddata |
注意,使用以上这些插值的效果,特别是scipy中的插值效果都不如ncl的rcm2rgrid_wrap命令,所以考虑找到这个命令在python中的替代,发现了geocat项目。
Geocat
Installation — GeoCAT-f2py = “2023.03.0” %} documentation
Installation (geocat-comp.readthedocs.io)
不知道哪个可以用,就都安装试一下,但是貌似只能在linux下使用,在win下是不行的。
使用了,goecat.comp以及被淘汰,目前新的在使用的是geocat.f2py
wrfout文件解读(按照开头字母)
https://bbs.06climate.com/forum.php?mod=viewthread&tid=13277
float LU_INDEX(Time, south_north, west_east) ;
LU_INDEX:description = “LAND USE CATEGORY” ;
LU_INDEX:units = “” ;
土地利用类型(如城市、植被、湖泊等)
float ZNU(Time, bottom_top) ;
ZNU:description = “eta values on half (mass) levels” ;
ZNU:units = “” ;
eta半层(质量点)坐标值
float ZNW(Time, bottom_top_stag) ;
ZNW:description = “eta values on full (w) levels” ;
ZNW:units = “” ;
eta整层(w点)坐标值
float ZS(Time, soil_layers_stag) ;
ZS:description = “DEPTHS OF CENTERS OF SOIL LAYERS” ;
ZS:units = “m” ;
土壤层各层中间的深度
float DZS(Time, soil_layers_stag) ;
DZS:description = “THICKNESSES OF SOIL LAYERS” ;
DZS:units = “m” ;
土壤层厚度
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方向风分量
float W(Time, bottom_top_stag, south_north, west_east) ;
W:description = “z-wind component” ;
W:units = “m s-1” ;
垂直风分量
float PH(Time, bottom_top_stag, south_north, west_east) ;
PH:description = “perturbation geopotential” ;
PH:units = “m2 s-2” ;
扰动位势高度
float PHB(Time, bottom_top_stag, south_north, west_east) ;
PHB:description = “base-state geopotential” ;
PHB:units = “m2 s-2” ;
基准态位势高度
float T(Time, bottom_top, south_north, west_east) ;
T:description = “perturbation potential temperature (theta-t0)” ;
T:units = “K” ;
扰动位温(theta-t0)
float MU(Time, south_north, west_east) ;
MU:description = “perturbation dry air mass in column” ;
MU:units = “Pa” ;
柱内扰动干空气质量
float MUB(Time, south_north, west_east) ;
MUB:description = “base state dry air mass in column” ;
MUB:units = “Pa” ;
柱内基准态干空气质量
float NEST_POS(Time, south_north, west_east) ;
NEST_POS:description = “-“ ;
NEST_POS:units = “-“ ;
作多层嵌套时粗(母)网格位置
float P(Time, bottom_top, south_north, west_east) ;
P:description = “perturbation pressure” ;
P:units = “Pa” ;
扰动气压
float PB(Time, bottom_top, south_north, west_east) ;
PB:description = “BASE STATE PRESSURE” ;
PB:units = “Pa” ;
基准态气压
float SR(Time, south_north, west_east) ;
SR:description = “fraction of frozen precipitation” ;
SR:units = “-“ ;
固体降水比例
float POTEVP(Time, south_north, west_east) ;
POTEVP:description = “accumulated potential evaporation” ;
POTEVP:units = “W m-2” ;
累计的潜在蒸发
float SNOPCX(Time, south_north, west_east) ;
SNOPCX:description = “snow phase change heat flux” ;
SNOPCX:units = “W m-2” ;
雪相态改变的热通量
float SOILTB(Time, south_north, west_east) ;
SOILTB:description = “bottom soil temperature” ;
SOILTB:units = “K” ;
土壤底部温度
float FNM(Time, bottom_top) ;
FNM:description = “upper weight for vertical stretching” ;
FNM:units = “” ;
作垂直方向展开时上层权重
float FNP(Time, bottom_top) ;
FNP:description = “lower weight for vertical stretching” ;
FNP:units = “” ; 作垂直方向展开时下层权重
float RDNW(Time, bottom_top) ;
RDNW:description = “inverse d(eta) values between full (w) levels” ;
RDNW:units = “” ;
1除以整层(w层)间eta值之差
float RDN(Time, bottom_top) ;
RDN:description = “inverse d(eta) values between half (mass) levels” ;
RDN:units = “” ;
1除以半层(质量层)间eta值之差
float DNW(Time, bottom_top) ;
DNW:description = “d(eta) values between full (w) levels” ;
DNW:units = “” ;
整层(w层)间eta值之差
float DN(Time, bottom_top) ;
DN:description = “d(eta) values between half (mass) levels” ;
DN:units = “” ;
半层(质量层)间eta值之差
float CFN(Time) ;
CFN:description = “extrapolation constant” ;
CFN:units = “” ;
外推常数
float CFN1(Time) ;
CFN1:description = “extrapolation constant” ;
CFN1:units = “” ;
外推常数1
float Q2(Time, south_north, west_east) ;
Q2:description = “QV at 2 M” ;
Q2:units = “kg kg-1” ;
地面上2m高度的比湿
float T2(Time, south_north, west_east) ;
T2:description = “TEMP at 2 M” ;
T2:units = “K” ;
地面上2m高度的温度
float TH2(Time, south_north, west_east) ;
TH2:description = “POT TEMP at 2 M” ;
TH2:units = “K” ;
地面上2m高度的位温
float PSFC(Time, south_north, west_east) ;
PSFC:description = “SFC PRESSURE” ;
PSFC:units = “Pa” ; 地面气压
float U10(Time, south_north, west_east) ;
U10:description = “U at 10 M” ;
U10:units = “m s-1” ;
地面上10m风场的纬向分量
float V10(Time, south_north, west_east) ;
V10:description = “V at 10 M” ;
V10:units = “m s-1” ;
地面上10m风场的经向分量
float RDX(Time) ;
RDX:description = “INVERSE X GRID LENGTH” ;
RDX:units = “” ;
1除以x方向网格距
float RDY(Time) ;
RDY:description = “INVERSE Y GRID LENGTH” ;
RDY:units = “” ;
1除以y方向网格距
float RESM(Time) ;
RESM:description = “TIME WEIGHT CONSTANT FOR SMALL STEPS” ;
RESM:units = “” ;
对小时间步长时的时间权重常数
float ZETATOP(Time) ;
ZETATOP:description = “ZETA AT MODEL TOP” ;
ZETATOP:units = “” ;
模式大气层顶的eta值
float CF1(Time) ;
CF1:description = “2nd order extrapolation constant” ;
CF1:units = “” ;
2阶外推常数1
float CF2(Time) ;
CF2:description = “2nd order extrapolation constant” ;
CF2:units = “” ;
2阶外推常数2
float CF3(Time) ;
CF3:description = “2nd order extrapolation constant” ;
CF3:units = “” ;
2阶外推常数3
int ITIMESTEP(Time) ;
ITIMESTEP:description = “” ;
ITIMESTEP:units = “” ;
时间步长计数
float XTIME(Time) ;
XTIME:description = “minutes since simulation start” ;
XTIME:units = “” ;
已经模拟时间的长度
float QVAPOR(Time, bottom_top, south_north, west_east) ;
QVAPOR:description = “Water vapor mixing ratio” ;
QVAPOR:units = “kg kg-1” ;
水汽混合比
float QCLOUD(Time, bottom_top, south_north, west_east) ;
QCLOUD:description = “Cloud water mixing ratio” ;
QCLOUD:units = “kg kg-1” ;
云水混合比
float QRAIN(Time, bottom_top, south_north, west_east) ;
QRAIN:description = “Rain water mixing ratio” ;
QRAIN:units = “kg kg-1” ;
雨水混合比
float LANDMASK(Time, south_north, west_east) ;
LANDMASK:description = “LAND MASK (1 FOR LAND, 0 FOR WATER)” ;
LANDMASK:units = “” ;
陆面指标(1是陆地,0是水体)
float TSLB(Time, soil_layers_stag, south_north, west_east) ;
TSLB:description = “SOIL TEMPERATURE” ;
TSLB:units = “K” ;
各层土壤温度
float SMOIS(Time, soil_layers_stag, south_north, west_east) ;
SMOIS:description = “SOIL MOISTURE” ;
SMOIS:units = “m3 m-3” ;
各层土壤湿度
float SH2O(Time, soil_layers_stag, south_north, west_east) ;
SH2O:description = “SOIL LIQUID WATER” ;
SH2O:units = “m3 m-3” ;
各层土壤液态水含量?
float SEAICE(Time, south_north, west_east) ;
SEAICE:description = “SEA ICE FLAG” ;
SEAICE:units = “” ;
海冰标志
float XICEM(Time, south_north, west_east) ;
XICEM:description = “SEA ICE FLAG (PREVIOUS STEP)” ;
XICEM:units = “” ;
上一步时的海冰标志
float SFROFF(Time, south_north, west_east) ;
SFROFF:description = “SURFACE RUNOFF” ;
SFROFF:units = “mm” ;
地表径流
float UDROFF(Time, south_north, west_east) ;
UDROFF:description = “UNDERGROUND RUNOFF” ;
UDROFF:units = “mm” ;
地下径流
int IVGTYP(Time, south_north, west_east) ;
IVGTYP:description = “DOMINANT VEGETATION CATEGORY” ;
IVGTYP:units = “” ;
占主导的植被种类
int ISLTYP(Time, south_north, west_east) ;
ISLTYP:description = “DOMINANT SOIL CATEGORY” ;
ISLTYP:units = “” ;
占主导的土壤种类
float VEGFRA(Time, south_north, west_east) ;
VEGFRA:description = “VEGETATION FRACTION” ;
VEGFRA:units = “” ;
植被比例
float GRDFLX(Time, south_north, west_east) ;
GRDFLX:description = “GROUND HEAT FLUX” ;
GRDFLX:units = “W m-2” ;
地面热通量
float SNOW(Time, south_north, west_east) ;
SNOW:description = “SNOW WATER EQUIVALENT” ;
SNOW:units = “kg m-2” ;
雪水当量
float SNOWH(Time, south_north, west_east) ;
SNOWH:description = “PHYSICAL SNOW DEPTH” ;
SNOWH:units = “m” ;
实际雪厚
float RHOSN(Time, south_north, west_east) ;
RHOSN:description = “ SNOW DENSITY” ;
RHOSN:units = “kg m-3” ;
雪密度
float CANWAT(Time, south_north, west_east) ;
CANWAT:description = “CANOPY WATER” ;
CANWAT:units = “kg m-2” ;
冠层中的水
float SST(Time, south_north, west_east) ;
SST:description = “SEA SURFACE TEMPERATURE” ;
SST:units = “K” ;
海表面温度
float QNDROPSOURCE(Time, bottom_top, south_north, west_east) ;
QNDROPSOURCE:description = “Droplet number source” ;
QNDROPSOURCE:units = “ /kg/s” ;
水滴数源
float MAPFAC_M(Time, south_north, west_east) ;
MAPFAC_M:description = “Map scale factor on mass grid” ;
MAPFAC_M:units = “” ;
质量格点处的地图比例系数
float MAPFAC_U(Time, south_north, west_east_stag) ;
MAPFAC_U:description = “Map scale factor on u-grid” ;
MAPFAC_U:units = “” ;
u-格点处的地图比例系数
float MAPFAC_V(Time, south_north_stag, west_east) ;
MAPFAC_V:description = “Map scale factor on v-grid” ;
MAPFAC_V:units = “” ;
v-格点处的地图比例系数
float MAPFAC_MX(Time, south_north, west_east) ;
MAPFAC_MX:description = “Map scale factor on mass grid, x direction” ;
MAPFAC_MX:units = “” ;
x方向上质量格点处的地图比例系数
float MAPFAC_MY(Time, south_north, west_east) ;
MAPFAC_MY:description = “Map scale factor on mass grid, y direction” ;
MAPFAC_MY:units = “” ;
y方向上质量格点处的地图比例系数
float MAPFAC_UX(Time, south_north, west_east_stag) ;
MAPFAC_UX:description = “Map scale factor on u-grid, x direction” ;
MAPFAC_UX:units = “” ;
x方向上u-格点处的地图比例系数
float MAPFAC_UY(Time, south_north, west_east_stag) ;
MAPFAC_UY:description = “Map scale factor on u-grid, y direction” ;
MAPFAC_UY:units = “” ;
y方向上u-格点处的地图比例系数
float MAPFAC_VX(Time, south_north_stag, west_east) ;
MAPFAC_VX:description = “Map scale factor on v-grid, x direction” ;
MAPFAC_VX:units = “” ;
x方向上v-格点处的地图比例系数
float MF_VX_INV(Time, south_north_stag, west_east) ;
MF_VX_INV:description = “Inverse map scale factor on v-grid, x direction”
MF_VX_INV:units = “” ;
1除以x方向上v-格点处的地图比例系数
float MAPFAC_VY(Time, south_north_stag, west_east) ;
MAPFAC_VY:description = “Map scale factor on v-grid, y direction” ;
MAPFAC_VY:units = “” ;
y方向上v-格点处的地图比例系数
float F(Time, south_north, west_east) ;
F:description = “Coriolis sine latitude term” ;
F:units = “s-1” ;
科氏力中sin(Ω)的部分,Ω为纬度
float E(Time, south_north, west_east) ;
E:description = “Coriolis cosine latitude term” ;
E:units = “s-1” ;
科氏力中cos(Ω)的部分,Ω为纬度
float SINALPHA(Time, south_north, west_east) ;
SINALPHA:description = “Local sine of map rotation” ;
SINALPHA:units = “” ;
局地sin(地图旋转角)
float COSALPHA(Time, south_north, west_east) ;
COSALPHA:description = “Local cosine of map rotation” ;
COSALPHA:units = “” ;
局地cos(地图旋转角)
float HGT(Time, south_north, west_east) ;
HGT:description = “Terrain Height” ;
HGT:units = “m” ;
地形高度
float HGT_SHAD(Time, south_north, west_east) ;
HGT_SHAD:description = “Height of orographic shadow” ;
HGT_SHAD:units = “m” ;
山岳背光坡的高度
float TSK(Time, south_north, west_east) ;
TSK:description = “SURFACE SKIN TEMPERATURE” ;
TSK:units = “K” ;
地表温度
float P_TOP(Time) ;
P_TOP:description = “PRESSURE TOP OF THE MODEL” ;
P_TOP:units = “Pa” ;
模式顶的气压
float MAX_MSTFX(Time) ;
MAX_MSTFX:description = “Max map factor in domain” ;
MAX_MSTFX:units = “” ;
区域内的最大地图比例系数
float RAINC(Time, south_north, west_east) ;
RAINC:description = “ACCUMULATED TOTAL CUMULUS PRECIPITATION” ;
RAINC:units = “mm” ;
累积的积云对流降水
float RAINNC(Time, south_north, west_east) ;
RAINNC:description = “ACCUMULATED TOTAL GRID SCALE PRECIPITATION” ;
RAINNC:units = “mm” ;
累积的格点降水
float PRATEC(Time, south_north, west_east) ;
PRATEC:description = “PRECIP RATE FROM CUMULUS SCHEME” ;
PRATEC:units = “mm s-1” ;
由积云方案算的对流降水率
float RAINCV(Time, south_north, west_east) ;
RAINCV:description = “TIME-STEP CUMULUS PRECIPITATION” ;
RAINCV:units = “mm” ;
计算对流降水的时间步长
float SNOWNC(Time, south_north, west_east) ;
SNOWNC:description = “ACCUMULATED TOTAL GRID SCALE SNOW AND ICE” ;
SNOWNC:units = “mm” ;
累积的格点降雪和冰量
float GRAUPELNC(Time, south_north, west_east) ;
GRAUPELNC:description = “ACCUMULATED TOTAL GRID SCALE GRAUPEL” ;
GRAUPELNC:units = “mm” ;
累积的格点降雪丸量
float EDT_OUT(Time, south_north, west_east) ;
EDT_OUT:description = “EDT FROM GD SCHEME” ;
EDT_OUT:units = “” ;
Grell-Devenyi方案计算的edt场
float SWDOWN(Time, south_north, west_east) ;
SWDOWN:description = “DOWNWARD SHORT WAVE FLUX AT GROUND SURFACE” ;
SWDOWN:units = “W m-2” ;
地表处的向下短波辐射通量
float GLW(Time, south_north, west_east) ;
GLW:description = “DOWNWARD LONG WAVE FLUX AT GROUND SURFACE” ;
GLW:units = “W m-2” ;
地表处的向下长波辐射通量
float OLR(Time, south_north, west_east) ;
OLR:description = “TOA OUTGOING LONG WAVE” ;
OLR:units = “W m-2” ;
TOA处的向上长波辐射通量
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-格点的经度(西半球为负值)
float ALBEDO(Time, south_north, west_east) ;
ALBEDO:description = “ALBEDO” ;
ALBEDO:units = “-“ ;
反照率
float ALBBCK(Time, south_north, west_east) ;
ALBBCK:description = “BACKGROUND ALBEDO” ;
ALBBCK:units = “” ;
背景反照率
float EMISS(Time, south_north, west_east) ;
EMISS:description = “SURFACE EMISSIVITY” ;
EMISS:units = “” ;
地面发射率
float TMN(Time, south_north, west_east) ;
TMN:description = “SOIL TEMPERATURE AT LOWER BOUNDARY” ;
TMN:units = “K” ;
更低边界处的土壤温度
float XLAND(Time, south_north, west_east) ;
XLAND:description = “LAND MASK (1 FOR LAND, 2 FOR WATER)” ;
XLAND:units = “” ;
陆面指标(1是陆地,2是水体)
float UST(Time, south_north, west_east) ;
UST:description = “U* IN SIMILARITY THEORY” ;
UST:units = “m s-1” ;
相似性理论中的摩擦速度
float PBLH(Time, south_north, west_east) ;
PBLH:description = “PBL HEIGHT” ;
PBLH:units = “m” ;
行星边界层高度
float HFX(Time, south_north, west_east) ;
HFX:description = “UPWARD HEAT FLUX AT THE SURFACE” ;
HFX:units = “W m-2” ;
地表面处向上的热量通量(感热通量)
float QFX(Time, south_north, west_east) ;
QFX:description = “UPWARD MOISTURE FLUX AT THE SURFACE” ;
QFX:units = “kg m-2 s-1” ;
地表面处向上的水汽通量
float LH(Time, south_north, west_east) ;
LH:description = “LATENT HEAT FLUX AT THE SURFACE” ;
LH:units = “W m-2” ;
地表面处的潜热通量
float SNOWC(Time, south_north, west_east) ;
SNOWC:description = “FLAG INDICATING SNOW COVERAGE (1 FOR SNOW COVER)” ;
SNOWC:units = “” ;
雪盖标志(1是有雪)
降水处理
WRF后处理:降雨量的说明以及降雨的绘制_wrf模拟降水量偏小-CSDN博客
1 | RAINC: ACCUMULATED TOTAL CUMULUS PRECIPITATION |
RAINC: 积云深对流过程产生的累积降水量,也就是模式中的积云对流参数化方案导致的降雨( cu_physics)。对于高分辨率的模拟,比如dx<5km,通常会将积云对流参数化方案关闭,此时RAINC为0。
RANNC: 此类降雨来源于云微物理参数化方案(mp_physics),如大尺度抬升过程产生的凝结等微物理过程降水,也就是非对流产生的降水。
RAINSH: 积云对流参数化方案主要是反映深对流的降水过程,但是一些积云对流参数化方案,能够支持浅对流导致的降水,此时总降水还需要加上RAINSH。WRF中支持浅对流的参数化方案(cu_physics)有以下几种:KF,SAS,G3,BMJ,Tiedtke。WRF中也有独立于深对流过程的浅对流方案,通过namelist中设置shcu_physics。一般情况下,浅对流产生的降水量较小。
云量
Total cloud fraction (definition & calculation method) | WRF & MPAS-A Support Forum (ucar.edu)
wrf.cloudfrac — wrf-python 1.3.4.1 documentation
The UPP (Unified Post-Processing) column max method is a technique used to calculate the total cloud fraction from atmospheric model output files, such as WRF (Weather Research and Forecasting) model output. Let’s break down how it works:
Objective:
- The goal is to determine the total cloud fraction within each grid cell of the model domain.
Vertical Levels:
- Atmospheric models represent the atmosphere in vertical layers (levels). These levels can be categorized as low, mid, and high.
- For cloud fraction calculations, we consider these vertical levels.
Cloud Fraction Variable:
- In WRF output files (e.g.,
wrfout_d0*
), there is a variable calledCLDFRA
(cloud fraction). - This variable provides the fraction of each grid cell covered by clouds at different vertical levels.
- In WRF output files (e.g.,
Methodology:
- For each grid cell, we examine the cloud fraction values at all vertical levels.
- The UPP column max method selects the maximum cloud fraction value across all vertical levels within that grid cell.
- This maximum value represents the total cloud fraction for that specific grid cell.
Calculation:
Suppose we have cloud fraction values for low, mid, and high levels (denoted as
CLDFRA_low
,CLDFRA_mid
, andCLDFRA_high
).The total cloud fraction (
CLDFRA_total
) is calculated as:CLDFRAtotal=max(CLDFRAlow,CLDFRAmid,CLDFRAhigh)
Application:
- Researchers and meteorologists use this method to analyze cloud cover patterns, study cloud processes, and assess model performance.
- It’s essential to consider the limitations and assumptions associated with this approach when interpreting results.
单位为mm的变量
205
1 | GRAUPELNC |
206
1 | HAILNC |
201
1 | RAINC |
203
1 | RAINNC |
202
1 | RAINSH |
150
1 | SFROFF |
204
1 | SNOWNC |
151
1 | UDROFF |
instantaneous & accumulated
instantaneous output
accumulation over hours 0-3 = 10
output at hr 03 = 10
accumulation over hours 3-6 = 5
output at hr 06 = 5
accumulation over hours 6-9 = 7
output at hr 09 = 7
accumulated output
accumulation over hours 0-3 = 10
output at hr 03 = 10
accumulation over hours 3-6 = 5
output at hr 06 = 15
accumulation over hours 6-9 = 7
output at hr 09 = 22
地表能量平衡的诊断
Confusing names for variables in wrfout | WRF & MPAS-A Support Forum (ucar.edu)
WRF surface net radiation | WRF & MPAS-A Support Forum (ucar.edu)
How to calculate Net radiation in WRF | WRF & MPAS-A Support Forum (ucar.edu)
Sensible heat flux | WRF & MPAS-A Support Forum (ucar.edu)
WRF energy and moisture budget? | WRF & MPAS-A Support Forum (ucar.edu)
n general, the following calculations can be used for radiative flux calculations:
$GSW=(1-ALBEDO)SWDOWN$: net shortwave radiative flux
GLW: downward longwave radiative flux
$LWUPFLUX = STBOLTTSK*4$: where STBOLT is the Stefan-Boltzmann constant
$netLW = EMISS(GLW-LWUPFLUX)$: net long wave radiative flux
net radiative flux: $RNET=GSW+netLW$
Surface energy budget can be computed as $RNET-GRDFLX-HFX-LH = 0$
世纪巨坑:
如果从陆面的角度拆解潜热和感热的话:
$HFX/SH=F_{veg}SHG+(1-F_{veg})SHB+SHC$
$LH=F_{veg}EVG+(1-F_{veg})EVB+EVC+TR$
其中$F_{veg}$为植被分数,读取VEGFRA变量并除以100.
HFX就是感热通量。