3D Subsampled Output (fields3d) & Master 3D Field List
1. Overview of fields3d
The fields3d output stream (Fields3D.py) writes 3D model variables to per-timestep HDF5 files in <output_directory>/<simname>/fields3d/DDd-HHh-MMm-SSs-MMMms.h5.
Unlike fields.zarr (which dumps the entire full-resolution model state for restarts in float64), fields3d is designed for analysis and diagnostics:
- Vertical level subsampling (output_levels): Write only a selected list of 0-based vertical model level indices (e.g., dense sampling in the boundary layer, moderate in the free troposphere, coarse in the stratosphere).
- Variable filtering (include_variables): Write only the requested scalar and diagnostic 3D variables, while always including the three velocity components (u, v, w).
- 32-bit floating-point precision (float32 default): Cuts file size and MPI communication volume in half compared to float64 (configurable via "dtype").
- Self-contained coordinates & 1D reference profiles: Each .h5 file includes time, X, Y, the subsampled Z coordinate, the 0-based level index Z_index, and the 1D reference state profiles rho0(Z), p0(Z), and T0(Z).
2. Example JSON Configuration
Add a "fields3d" block to the simulation input .json file:
"fields3d": {
"frequency": 3600,
"dtype": "float32",
"include_variables": [
"T",
"qv",
"qc",
"qr",
"qi1",
"qnc",
"qni1",
"thetav",
"buoyancy",
"reflectivity",
"rh",
"dynamic pressure",
"p_hydrostatic"
],
"output_levels": [
0, 2, 4, 6, 8, 10, 12, 14,
17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 53, 56, 59, 62, 65, 68, 71, 74,
84, 94, 104, 114, 124, 134, 144, 154, 164
]
},
Note: If "fields3d" is omitted from the JSON file (or "frequency" \(\le 0\)), 3D HDF5 output is disabled (Fields3DNone).
3. Coordinate & Reference Datasets in fields3d/*.h5
Every fields3d/*.h5 file contains the following coordinate and reference datasets:
| Dataset Name | Dimensions | Type | Units | Description |
|---|---|---|---|---|
time |
(1,) |
float64 |
s |
Seconds since the simulation started (dimension scale 0) |
X |
(nx,) |
float64 |
m |
Cell-center x-coordinate (dimension scale 1) |
Y |
(ny,) |
float64 |
m |
Cell-center y-coordinate (dimension scale 2) |
Z |
(nz_out,) |
float64 |
m |
Cell-center z-coordinate of selected output_levels (dimension scale 3) |
Z_index |
(Z,) |
int32 |
1 |
0-based vertical model level index (output_levels) |
rho0 |
(Z,) |
float32 |
kg m^-3 |
Anelastic reference state density profile at output levels |
p0 |
(Z,) |
float32 |
Pa |
Anelastic reference state pressure profile at output levels |
T0 |
(Z,) |
float32 |
K |
Anelastic reference state temperature profile at output levels |
lon, lat |
(nx, ny) |
float32 |
deg |
Longitude and latitude (written only when map projection is active) |
4. Master List of Available 3D Variables
All 3D field datasets in fields3d/*.h5 have dimensions (time, X, Y, Z) of shape (1, nx, ny, nz_out).
4.1 Velocity Variables (VelocityState — Always Included)
These three velocity components are always written to fields3d/*.h5 (they do not need to be listed in include_variables). Note that w is interpolated from vertical cell edges to cell centers so all variables share the same Z dimension scale.
| Variable Name | Long Name | Units | Staggering (Internal -> Output) | Source File |
|---|---|---|---|---|
u |
u velocity component | m/s |
u (x-edge, z-center) |
SimulationStandard.py |
v |
v velocity component | m/s |
v (y-edge, z-center) |
SimulationStandard.py |
w |
w velocity component | m/s |
w (z-edge -> interpolated to z-center) |
SimulationStandard.py |
4.2 Core Thermodynamic & Pressure Variables (ScalarState & DiagnosticState)
| Variable Name | Container | Long Name | Units | Availability | Source File |
|---|---|---|---|---|---|
s |
ScalarState |
static energy | K |
All cases | Thermodynamics.py |
qv |
ScalarState |
water vapor mixing ratio | kg kg^{-1} |
All cases | Microphysics / ThermodynamicsDry.py |
T |
DiagnosticState |
Temperature | K |
All cases | Thermodynamics.py |
alpha |
DiagnosticState |
Specific Volume | m^3 K^{-1} |
All cases | Thermodynamics.py |
buoyancy |
DiagnosticState |
buoyancy | m s^{-2} |
All cases | Thermodynamics.py |
buoyancy_gradient_mag |
DiagnosticState |
buoyancy gradient magnitude | 1/s^{-2} |
All cases | Thermodynamics.py |
bvf |
DiagnosticState |
Brunt–Väisälä frequency squared | s^-2 |
All cases | ThermodynamicsMoist.py |
thetav |
DiagnosticState |
Virtual Potential Temperature | K |
All cases | ThermodynamicsMoist.py |
s_dry |
DiagnosticState |
Dry Static Energy | K |
All cases | ThermodynamicsMoist.py |
qt |
DiagnosticState |
Total water specific humidity | kg/kg |
Moist thermodynamics | ThermodynamicsMoist.py |
thetal |
DiagnosticState |
Liquid-Ice Potential Temperature | K |
Moist thermodynamics | ThermodynamicsMoist.py |
p_hydrostatic |
DiagnosticState |
hydrostatic pressure | Pa |
Moist thermodynamics | ThermodynamicsMoist.py |
dynamic pressure |
DiagnosticState |
Dynamic Pressure | Pa |
All cases | PressureSolver.py |
horizontal divergence |
DiagnosticState |
Horizontal Divergence | kg/(m^3 s) |
Periodic pressure solver | PressureSolver.py |
4.3 Kinematics, Turbulence & Subgrid-Scale (SGS) Variables
| Variable Name | Container | Long Name | Units | Availability | Source File |
|---|---|---|---|---|---|
strain_rate_mag |
DiagnosticState |
Magnitude of strain rate tensor | s^{-1} |
All cases | Kinematics.py |
Q_criterion |
DiagnosticState |
Q criterion | m^2 s^-2 |
All cases | Kinematics.py |
vertical_vorticity |
DiagnosticState |
Vertical Component of Vorticity | s^{-1} |
All cases | Kinematics.py |
helicity |
DiagnosticState |
helicity | m s^{-2} |
All cases | Kinematics.py |
grad_ri |
DiagnosticState |
gradient Richardson | [-] |
All cases | Kinematics.py |
u_earth |
DiagnosticState |
Zonal wind | m/s |
Map projection active | Kinematics.py |
v_earth |
DiagnosticState |
Meridional wind | m/s |
Map projection active | Kinematics.py |
tke_sgs |
DiagnosticState or ScalarState |
Subgrid-scale turbulence kinetic energy | m^2s^-2 |
Smagorinsky (DiagnosticState) or TKE (ScalarState) |
SGSSmagorinsky.py / SGSTKE.py |
eddy_diffusivity_horizontal |
DiagnosticState |
Horizontal Eddy Diffusivity | m^2s^-1 |
All SGS models | SGSSmagorinsky.py |
eddy_diffusivity_vertical |
DiagnosticState |
Vertical Eddy Diffusivity | m^2s^-1 |
Smagorinsky / TKE | SGSSmagorinsky.py |
eddy_viscosity_horizontal |
DiagnosticState |
Horizontal Eddy Viscosity | m^2s^-1 |
All SGS models | SGSSmagorinsky.py |
eddy_viscosity_vertical |
DiagnosticState |
Vertical Eddy Viscosity | m^2s^-1 |
Smagorinsky / TKE | SGSSmagorinsky.py |
uw_sgs |
DiagnosticState |
Vertical SGS flux of u velocity | m^2 s^-2 |
All cases | MomentumDiffusion.py |
vw_sgs |
DiagnosticState |
Vertical SGS flux of v velocity | m^2 s^-2 |
All cases | MomentumDiffusion.py |
4.4 Radiation Variables (DiagnosticState)
| Variable Name | Container | Long Name | Units | Availability | Source File |
|---|---|---|---|---|---|
heating_rate_lw |
DiagnosticState |
Longwave radiative heating rate ($\rho_0 c_p \frac{dT}{dt}\big | _{\text{LW}}$) | W m^{-3} |
radiation.type = rce or rrtmg |
heating_rate_sw |
DiagnosticState |
Shortwave radiative heating rate ($\rho_0 c_p \frac{dT}{dt}\big | _{\text{SW}}$) | W m^{-3} |
radiation.type = rce or rrtmg |
dTdt_rad |
DiagnosticState |
Total radiative temperature tendency | K s^{-1} |
rce, rrtmg, dycoms |
RadiationRCE.py / RadiationDycoms.py |
4.5 Microphysics Variables: P3 Scheme (microphysics.scheme = "p3")
Defined in WRF_Micro_P3.py.
Prognostic Hydrometeor & Number Variables (ScalarState)
| Variable Name | Long Name | Units |
|---|---|---|
qv |
water vapor mixing ratio | kg kg^{-1} |
qc |
cloud water mixing ratio | kg kg^{-1} |
qnc |
cloud number concentration | # kg^{-1} |
qr |
rain water mixing ratio | kg kg^{-1} |
qnr |
rain number concentration | # kg^{-1} |
qi1 |
total ice mixing ratio | kg kg^{-1} |
qni1 |
ice number concentration | # kg^{-1} |
qir1 |
rime ice mixing ratio | kg kg^{-1} |
qib1 |
ice rime volume mixing ratio | m^{-3} kg^{-1} |
P3 3D Diagnostic & Process Rate Variables (DiagnosticState)
| Variable Name | Long Name | Units |
|---|---|---|
reflectivity |
radar reflectivity | dBz |
rh |
relative humidity | % |
diag_effc_3d |
cloud droplet effective radius | m |
diag_effi_3d |
cloud ice effective radius | m |
liq_sed |
liquid water sedimentation tendency | kg kg^{-1} s^{-1} |
ice_sed |
ice water sedimentation tendency | kg kg^{-1} s^{-1} |
s_tend_liq_sed |
s tend liquid water sedimentation | K s^{-1} |
s_tend_ice_sed |
s tend ice water sedimentation | K s^{-1} |
p3_qcacc |
cloud droplet accretion by rain | kg kg-1 s-1 |
p3_qrevp |
rain evaporation | kg kg-1 s-1 |
p3_qccon |
cloud droplet condensation | kg kg-1 s-1 |
p3_qcaut |
cloud droplet autoconversion to rain | kg kg-1 s-1 |
p3_qcevp |
cloud droplet evaporation | kg kg-1 s-1 |
p3_qrcon |
rain condensation | kg kg-1 s-1 |
p3_qcnuc |
activation of cloud droplets from CCN | kg kg-1 s-1 |
p3_ncacc |
change in cloud droplet number from accretion by rain | kg-1 |
p3_ncnuc |
change in cloud droplet number from activation of CCN | kg-1 |
p3_ncslf |
change in cloud droplet number from self-collection | kg-1 |
p3_ncautc |
change in cloud droplet number from autoconversion | kg-1 |
p3_nrslf |
change in rain number from self-collection | kg-1 |
p3_nrevp |
change in rain number from evaporation | kg-1 |
p3_ncautr |
change in rain number from autoconversion of cloud water | kg-1 |
4.6 Other Microphysics Schemes
Kessler (WRF_Micro_Kessler.py) & Saturation Adjustment (Microphysics_SA.py)
ScalarState:qv,qc,qrDiagnosticState(Kessler only):liq_sed,s_tend_liq_sed
SAM M2005 with Modal Aerosols (SAM_Micro_M2005_MA.py)
ScalarState:qv,qc,qi,qr,qs,qg,qnc,qnci,qnr,qns,qng,qad,qaw,qar,qnad,qad2,qnad2,DMS,SO2,H2SO4DiagnosticState:qtot_sed,qice_sed,s_tend_liq_sed,s_tend_ice_sed,diag_effc_3d,diag_effi_3d
Spectral Bin Microphysics (WRF_Micro_SBM.py)
ScalarState:qv,qc,qr,qnc,qnr,qna,qna_nucl(note: bin variablesff*are automatically excluded fromfields3d)DiagnosticState:MA,LH_rate,CE_rate,CldNucl_rate,difful_tend,diffur_tend,tempdiffl,saturation,n_reg_ccn,EFFR,c_RV,liq_sed,s_tend_liq_sed,T_sbm_in,qv_sbm_in,qc_sbm_in,qr_sbm_in,qnc_sbm_in,qnr_sbm_in,qna_sbm_in,qna_nucl_sbm_in