Model variables

The variable meta-data (i.e., all instances of veros.variables.Variable) are available in a dictionary as the attribute Veros.variables. The actual data arrays are added directly as attributes to Veros. The following code snippet (as commonly used in the Diagnostics) illustrates this behavior:

var_meta = {key: val for key, val in vs.variables.items() if val.time_dependent and val.output}
var_data = {key: getattr(veros, key) for key in var_meta.keys()}

In this case, var_meta is a dictionary containing all metadata for variables that are time dependent and should be added to the output, while var_data is a dictionary with the same keys containing the corresponding data arrays.

Variable class

class veros.variables.Variable(name, dims, units, long_description, dtype=None, output=False, time_dependent=True, scale=1.0, write_to_restart=False, extra_attributes=None)[source]

Bases: object

Available variables

There are two kinds of variables in Veros. Main variables are always present in a simulation, while conditional variables are only available if their respective condition is True at the time of variable allocation.

Attributes:
: Time-dependent
: Included in snapshot output by default
: Written to restart files by default

Main variables

VerosState.dxt
Units

m

Dimensions

xt

Type

float

Attributes

Zonal (x) spacing of T-grid point

VerosState.dxu
Units

m

Dimensions

xu

Type

float

Attributes

Zonal (x) spacing of U-grid point

VerosState.dyt
Units

m

Dimensions

yt

Type

float

Attributes

Meridional (y) spacing of T-grid point

VerosState.dyu
Units

m

Dimensions

yu

Type

float

Attributes

Meridional (y) spacing of U-grid point

VerosState.zt
Units

m

Dimensions

zt

Type

float

Attributes

Vertical coordinate

VerosState.zw
Units

m

Dimensions

zw

Type

float

Attributes

Vertical coordinate

VerosState.dzt
Units

m

Dimensions

zt

Type

float

Attributes

Vertical spacing

VerosState.dzw
Units

m

Dimensions

zw

Type

float

Attributes

Vertical spacing

VerosState.cost
Units

1

Dimensions

yt

Type

float

Attributes

Metric factor for spherical coordinates

VerosState.cosu
Units

1

Dimensions

yu

Type

float

Attributes

Metric factor for spherical coordinates

VerosState.tantr
Units

1

Dimensions

yt

Type

float

Attributes

Metric factor for spherical coordinates

VerosState.coriolis_t
Units

1/s

Dimensions

xt, yt

Type

float

Attributes

Coriolis frequency at T grid point

VerosState.coriolis_h
Units

1/s

Dimensions

xt, yt

Type

float

Attributes

Horizontal Coriolis frequency at T grid point

VerosState.kbot
Units

Dimensions

xt, yt

Type

int

Attributes

Index of the deepest grid cell (counting from 1, 0 means all land)

VerosState.ht
Units

m

Dimensions

xt, yt

Type

float

Attributes

Total depth of the water column

VerosState.hu
Units

m

Dimensions

xu, yt

Type

float

Attributes

Total depth of the water column

VerosState.hv
Units

m

Dimensions

xt, yu

Type

float

Attributes

Total depth of the water column

VerosState.hur
Units

m

Dimensions

xu, yt

Type

float

Attributes

Total depth of the water column (masked)

VerosState.hvr
Units

m

Dimensions

xt, yu

Type

float

Attributes

Total depth of the water column (masked)

VerosState.beta
Units

1/(ms)

Dimensions

xt, yt

Type

float

Attributes

Change of Coriolis frequency with latitude

VerosState.area_t
Units

m^2

Dimensions

xt, yt

Type

float

Attributes

Area of T-box

VerosState.area_u
Units

m^2

Dimensions

xu, yt

Type

float

Attributes

Area of U-box

VerosState.area_v
Units

m^2

Dimensions

xt, yu

Type

float

Attributes

Area of V-box

VerosState.maskT
Units

Dimensions

xt, yt, zt

Type

int8

Attributes

Mask in physical space for tracer points

VerosState.maskU
Units

Dimensions

xu, yt, zt

Type

int8

Attributes

Mask in physical space for U points

VerosState.maskV
Units

Dimensions

xt, yu, zt

Type

int8

Attributes

Mask in physical space for V points

VerosState.maskW
Units

Dimensions

xt, yt, zw

Type

int8

Attributes

Mask in physical space for W points

VerosState.maskZ
Units

Dimensions

xu, yu, zt

Type

int8

Attributes

Mask in physical space for Zeta points

VerosState.rho
Units

kg/m^3

Dimensions

xt, yt, zt, timesteps

Type

float

Attributes

In-situ density anomaly, relative to the surface mean value of 1024 kg/m^3

VerosState.prho
Units

kg/m^3

Dimensions

xt, yt, zt

Type

float

Attributes

Potential density anomaly, relative to the surface mean value of 1024 kg/m^3 (identical to in-situ density anomaly for equation of state type 1, 2, and 4)

VerosState.int_drhodT
Units

?

Dimensions

xt, yt, zt, timesteps

Type

float

Attributes

Partial derivative of dynamic enthalpy by temperature

VerosState.int_drhodS
Units

?

Dimensions

xt, yt, zt, timesteps

Type

float

Attributes

Partial derivative of dynamic enthalpy by salinity

VerosState.Nsqr
Units

1/s^2

Dimensions

xt, yt, zw, timesteps

Type

float

Attributes

Square of stability frequency

VerosState.Hd
Units

m^2/s^2

Dimensions

xt, yt, zt, timesteps

Type

float

Attributes

Dynamic enthalpy

VerosState.dHd
Units

m^2/s^3

Dimensions

xt, yt, zt, timesteps

Type

float

Attributes

Change of dynamic enthalpy due to advection

VerosState.temp
Units

deg C

Dimensions

xt, yt, zt, timesteps

Type

float

Attributes

Conservative temperature

VerosState.dtemp
Units

deg C/s

Dimensions

xt, yt, zt, timesteps

Type

float

Attributes

Conservative temperature tendency

VerosState.salt
Units

g/kg

Dimensions

xt, yt, zt, timesteps

Type

float

Attributes

Salinity

VerosState.dsalt
Units

g/(kg s)

Dimensions

xt, yt, zt, timesteps

Type

float

Attributes

Salinity tendency

VerosState.dtemp_vmix
Units

deg C/s

Dimensions

xt, yt, zt

Type

float

Attributes

Change of temperature due to vertical mixing

VerosState.dtemp_hmix
Units

deg C/s

Dimensions

xt, yt, zt

Type

float

Attributes

Change of temperature due to horizontal mixing

VerosState.dsalt_vmix
Units

deg C/s

Dimensions

xt, yt, zt

Type

float

Attributes

Change of salinity due to vertical mixing

VerosState.dsalt_hmix
Units

deg C/s

Dimensions

xt, yt, zt

Type

float

Attributes

Change of salinity due to horizontal mixing

VerosState.dtemp_iso
Units

deg C/s

Dimensions

xt, yt, zt

Type

float

Attributes

Change of temperature due to isopycnal mixing plus skew mixing

VerosState.dsalt_iso
Units

deg C/s

Dimensions

xt, yt, zt

Type

float

Attributes

Change of salinity due to isopycnal mixing plus skew mixing

VerosState.forc_temp_surface
Units

m K/s

Dimensions

xt, yt

Type

float

Attributes

Surface temperature flux

VerosState.forc_salt_surface
Units

m g/s kg

Dimensions

xt, yt

Type

float

Attributes

Surface salinity flux

VerosState.flux_east
Units

?

Dimensions

xu, yt, zt

Type

float

Attributes

Multi-purpose flux

VerosState.flux_north
Units

?

Dimensions

xt, yu, zt

Type

float

Attributes

Multi-purpose flux

VerosState.flux_top
Units

?

Dimensions

xt, yt, zw

Type

float

Attributes

Multi-purpose flux

VerosState.u
Units

m/s

Dimensions

xu, yt, zt, timesteps

Type

float

Attributes

Zonal velocity

VerosState.v
Units

m/s

Dimensions

xt, yu, zt, timesteps

Type

float

Attributes

Meridional velocity

VerosState.w
Units

m/s

Dimensions

xt, yt, zw, timesteps

Type

float

Attributes

Vertical velocity

VerosState.du
Units

m/s

Dimensions

xu, yt, zt, timesteps

Type

float

Attributes

Zonal velocity tendency

VerosState.dv
Units

m/s

Dimensions

xt, yu, zt, timesteps

Type

float

Attributes

Meridional velocity tendency

VerosState.du_cor
Units

m/s^2

Dimensions

xu, yt, zt

Type

float

Attributes

Change of u due to Coriolis force

VerosState.dv_cor
Units

m/s^2

Dimensions

xt, yu, zt

Type

float

Attributes

Change of v due to Coriolis force

VerosState.du_mix
Units

m/s^2

Dimensions

xu, yt, zt

Type

float

Attributes

Change of u due to implicit vertical mixing

VerosState.dv_mix
Units

m/s^2

Dimensions

xt, yu, zt

Type

float

Attributes

Change of v due to implicit vertical mixing

VerosState.du_adv
Units

m/s^2

Dimensions

xu, yt, zt

Type

float

Attributes

Change of u due to advection

VerosState.dv_adv
Units

m/s^2

Dimensions

xt, yu, zt

Type

float

Attributes

Change of v due to advection

VerosState.p_hydro
Units

m^2/s^2

Dimensions

xt, yt, zt

Type

float

Attributes

Hydrostatic pressure

VerosState.kappaM
Units

m^2/s

Dimensions

xt, yt, zt

Type

float

Attributes

Vertical viscosity

VerosState.kappaH
Units

m^2/s

Dimensions

xt, yt, zw

Type

float

Attributes

Vertical diffusivity

VerosState.surface_taux
Units

N/m^2

Dimensions

xu, yt

Type

float

Attributes

Zonal surface wind stress

VerosState.surface_tauy
Units

N/m^2

Dimensions

xt, yu

Type

float

Attributes

Meridional surface wind stress

VerosState.forc_rho_surface
Units

?

Dimensions

xt, yt

Type

float

Attributes

Surface potential density flux

VerosState.psi
Units

m^3/s

Dimensions

xu, yu, timesteps

Type

float

Attributes

Barotropic streamfunction

VerosState.dpsi
Units

m^3/s^2

Dimensions

xu, yu, timesteps

Type

float

Attributes

Streamfunction tendency

VerosState.land_map
Units

Dimensions

xt, yt

Type

float

Attributes

Land map

VerosState.isle
Units

Dimensions

isle

Type

float

Attributes

Island number

VerosState.psin
Units

m^3/s

Dimensions

xu, yu, isle

Type

float

Attributes

Boundary streamfunction

VerosState.dpsin
Units

?

Dimensions

isle, timesteps

Type

float

Attributes

Boundary streamfunction factor

VerosState.line_psin
Units

?

Dimensions

isle, isle

Type

float

Attributes

Boundary line integrals

VerosState.boundary_mask
Units

Dimensions

xt, yt, isle

Type

float

Attributes

Boundary mask

VerosState.line_dir_south_mask
Units

Dimensions

xt, yt, isle

Type

float

Attributes

Line integral mask

VerosState.line_dir_north_mask
Units

Dimensions

xt, yt, isle

Type

float

Attributes

Line integral mask

VerosState.line_dir_east_mask
Units

Dimensions

xt, yt, isle

Type

float

Attributes

Line integral mask

VerosState.line_dir_west_mask
Units

Dimensions

xt, yt, isle

Type

float

Attributes

Line integral mask

VerosState.K_gm
Units

m^2/s

Dimensions

xt, yt, zw

Type

float

Attributes

GM diffusivity, either constant or from EKE model

VerosState.K_iso
Units

m^2/s

Dimensions

xt, yt, zw

Type

float

Attributes

Along-isopycnal diffusivity

VerosState.K_diss_v
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Kinetic energy dissipation by vertical, rayleigh and bottom friction

VerosState.K_diss_bot
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Mean energy dissipation by bottom and rayleigh friction

VerosState.K_diss_h
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Kinetic energy dissipation by horizontal friction

VerosState.K_diss_gm
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Mean energy dissipation by GM (TRM formalism only)

VerosState.P_diss_v
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Potential energy dissipation by vertical diffusion

VerosState.P_diss_nonlin
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Potential energy dissipation by nonlinear equation of state

VerosState.P_diss_iso
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Potential energy dissipation by isopycnal mixing

VerosState.P_diss_skew
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Potential energy dissipation by GM (w/o TRM)

VerosState.P_diss_hmix
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Potential energy dissipation by horizontal mixing

VerosState.P_diss_adv
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Potential energy dissipation by advection

VerosState.P_diss_comp
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Potential energy dissipation by compression

VerosState.P_diss_sources
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Potential energy dissipation by external sources (e.g. restoring zones)

VerosState.u_wgrid
Units

m/s

Dimensions

xt, yt, zw

Type

float

Attributes

Zonal velocity interpolated to W grid points

VerosState.v_wgrid
Units

m/s

Dimensions

xt, yt, zw

Type

float

Attributes

Meridional velocity interpolated to W grid points

VerosState.w_wgrid
Units

m/s

Dimensions

xt, yt, zw

Type

float

Attributes

Vertical velocity interpolated to W grid points

Conditional variables

coord_degree

VerosState.xt
Units

degrees_east

Dimensions

xt

Type

float

Attributes

Zonal (x) coordinate of T-grid point

VerosState.xu
Units

degrees_east

Dimensions

xu

Type

float

Attributes

Zonal (x) coordinate of U-grid point

VerosState.yt
Units

degrees_north

Dimensions

yt

Type

float

Attributes

Meridional (y) coordinate of T-grid point

VerosState.yu
Units

degrees_north

Dimensions

yu

Type

float

Attributes

Meridional (y) coordinate of U-grid point

not coord_degree

VerosState.xt
Units

km

Dimensions

xt

Type

float

Attributes

Zonal (x) coordinate of T-grid point

VerosState.xu
Units

km

Dimensions

xu

Type

float

Attributes

Zonal (x) coordinate of U-grid point

VerosState.yt
Units

km

Dimensions

yt

Type

float

Attributes

Meridional (y) coordinate of T-grid point

VerosState.yu
Units

km

Dimensions

yu

Type

float

Attributes

Meridional (y) coordinate of U-grid point

enable_tempsalt_sources

VerosState.temp_source
Units

K/s

Dimensions

xt, yt, zt

Type

float

Attributes

Non-conservative source of temperature

VerosState.salt_source
Units

g/(kg s)

Dimensions

xt, yt, zt

Type

float

Attributes

Non-conservative source of salt

enable_momentum_sources

VerosState.u_source
Units

m/s^2 (?)

Dimensions

xu, yt, zt

Type

float

Attributes

Non-conservative source of zonal velocity

VerosState.v_source
Units

m/s^2 (?)

Dimensions

xt, yu, zt

Type

float

Attributes

Non-conservative source of meridional velocity

enable_neutral_diffusion

VerosState.K_11
Units

?

Dimensions

xt, yt, zt

Type

float

Attributes

Isopycnal mixing tensor component

VerosState.K_13
Units

?

Dimensions

xt, yt, zt

Type

float

Attributes

Isopycnal mixing tensor component

VerosState.K_22
Units

?

Dimensions

xt, yt, zt

Type

float

Attributes

Isopycnal mixing tensor component

VerosState.K_23
Units

?

Dimensions

xt, yt, zt

Type

float

Attributes

Isopycnal mixing tensor component

VerosState.K_31
Units

?

Dimensions

xt, yt, zt

Type

float

Attributes

Isopycnal mixing tensor component

VerosState.K_32
Units

?

Dimensions

xt, yt, zt

Type

float

Attributes

Isopycnal mixing tensor component

VerosState.K_33
Units

?

Dimensions

xt, yt, zt

Type

float

Attributes

Isopycnal mixing tensor component

VerosState.Ai_ez
Units

?

Dimensions

xt, yt, zt, tensor1, tensor2

Type

float

Attributes

?

VerosState.Ai_nz
Units

?

Dimensions

xt, yt, zt, tensor1, tensor2

Type

float

Attributes

?

VerosState.Ai_bx
Units

?

Dimensions

xt, yt, zt, tensor1, tensor2

Type

float

Attributes

?

VerosState.Ai_by
Units

?

Dimensions

xt, yt, zt, tensor1, tensor2

Type

float

Attributes

?

enable_skew_diffusion

VerosState.B1_gm
Units

m^2/s

Dimensions

xt, yu, zt

Type

float

Attributes

Zonal component of GM streamfunction

VerosState.B2_gm
Units

m^2/s

Dimensions

xu, yt, zt

Type

float

Attributes

Meridional component of GM streamfunction

enable_bottom_friction_var

VerosState.r_bot_var_u
Units

?

Dimensions

xu, yt

Type

float

Attributes

Zonal bottom friction coefficient

VerosState.r_bot_var_v
Units

?

Dimensions

xt, yu

Type

float

Attributes

Meridional bottom friction coefficient

enable_TEM_friction

VerosState.kappa_gm
Units

m^2/s

Dimensions

xt, yt, zw

Type

float

Attributes

Vertical diffusivity

enable_tke

VerosState.tke
Units

m^2/s^2

Dimensions

xt, yt, zw, timesteps

Type

float

Attributes

Turbulent kinetic energy

VerosState.sqrttke
Units

m/s

Dimensions

xt, yt, zw

Type

float

Attributes

Square-root of TKE

VerosState.dtke
Units

m^2/s^3

Dimensions

xt, yt, zw, timesteps

Type

float

Attributes

Turbulent kinetic energy tendency

VerosState.Prandtlnumber
Units

Dimensions

xt, yt, zw

Type

float

Attributes

Prandtl number

VerosState.mxl
Units

m

Dimensions

xt, yt, zw

Type

float

Attributes

Mixing length

VerosState.forc_tke_surface
Units

m^3/s^3

Dimensions

xt, yt

Type

float

Attributes

TKE surface flux

VerosState.tke_diss
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

TKE dissipation

VerosState.tke_surf_corr
Units

m^3/s^3

Dimensions

xt, yt

Type

float

Attributes

Correction of TKE surface flux

enable_eke

VerosState.eke
Units

m^2/s^2

Dimensions

xt, yt, zw, timesteps

Type

float

Attributes

meso-scale energy

VerosState.deke
Units

m^2/s^3

Dimensions

xt, yt, zw, timesteps

Type

float

Attributes

meso-scale energy tendency

VerosState.sqrteke
Units

m/s

Dimensions

xt, yt, zw

Type

float

Attributes

square-root of eke

VerosState.L_rossby
Units

m

Dimensions

xt, yt

Type

float

Attributes

Rossby radius

VerosState.L_rhines
Units

m

Dimensions

xt, yt, zw

Type

float

Attributes

Rhines scale

VerosState.eke_len
Units

m

Dimensions

xt, yt, zt

Type

float

Attributes

Eddy length scale

VerosState.eke_diss_iw
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Dissipation of EKE to internal waves

VerosState.eke_diss_tke
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Dissipation of EKE to TKE

VerosState.eke_bot_flux
Units

m^3/s^3

Dimensions

xt, yt

Type

float

Attributes

Flux by bottom friction

enable_eke_leewave_dissipation

VerosState.eke_topo_hrms
Units

?

Dimensions

xt, yt

Type

float

Attributes

?

VerosState.eke_topo_lam
Units

?

Dimensions

xt, yt

Type

float

Attributes

?

VerosState.hrms_k0
Units

?

Dimensions

xt, yt

Type

float

Attributes

?

VerosState.c_lee
Units

1/s

Dimensions

xt, yt

Type

float

Attributes

Lee wave dissipation coefficient

VerosState.eke_lee_flux
Units

m^3/s^3

Dimensions

xt, yt

Type

float

Attributes

Lee wave flux

VerosState.c_Ri_diss
Units

1/s

Dimensions

xt, yt, zw

Type

float

Attributes

Interior dissipation coefficient

enable_idemix

VerosState.E_iw
Units

m^2/s^2

Dimensions

xt, yt, zw, timesteps

Type

float

Attributes

Internal wave energy

VerosState.dE_iw
Units

m^2/s^2

Dimensions

xt, yt, zw, timesteps

Type

float

Attributes

Internal wave energy tendency

VerosState.c0
Units

m/s

Dimensions

xt, yt, zw

Type

float

Attributes

Vertical internal wave group velocity

VerosState.v0
Units

m/s

Dimensions

xt, yt, zw

Type

float

Attributes

Horizontal internal wave group velocity

VerosState.alpha_c
Units

?

Dimensions

xt, yt, zw

Type

float

Attributes

?

VerosState.iw_diss
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Internal wave dissipation

VerosState.forc_iw_surface
Units

m^3/s^3

Dimensions

xt, yt

Type

float

Attributes

Internal wave surface forcing

VerosState.forc_iw_bottom
Units

m^3/s^3

Dimensions

xt, yt

Type

float

Attributes

Internal wave bottom forcing