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

Veros.dxt
Units

m

Dimensions

xt

Type

float

Attributes

Zonal (x) spacing of T-grid point

Veros.dxu
Units

m

Dimensions

xu

Type

float

Attributes

Zonal (x) spacing of U-grid point

Veros.dyt
Units

m

Dimensions

yt

Type

float

Attributes

Meridional (y) spacing of T-grid point

Veros.dyu
Units

m

Dimensions

yu

Type

float

Attributes

Meridional (y) spacing of U-grid point

Veros.zt
Units

m

Dimensions

zt

Type

float

Attributes

Vertical coordinate

Veros.zw
Units

m

Dimensions

zw

Type

float

Attributes

Vertical coordinate

Veros.dzt
Units

m

Dimensions

zt

Type

float

Attributes

Vertical spacing

Veros.dzw
Units

m

Dimensions

zw

Type

float

Attributes

Vertical spacing

Veros.cost
Units

1

Dimensions

yt

Type

float

Attributes

Metric factor for spherical coordinates

Veros.cosu
Units

1

Dimensions

yu

Type

float

Attributes

Metric factor for spherical coordinates

Veros.tantr
Units

1

Dimensions

yt

Type

float

Attributes

Metric factor for spherical coordinates

Veros.coriolis_t
Units

1/s

Dimensions

xt, yt

Type

float

Attributes

Coriolis frequency at T grid point

Veros.coriolis_h
Units

1/s

Dimensions

xt, yt

Type

float

Attributes

Horizontal Coriolis frequency at T grid point

Veros.kbot
Units

Dimensions

xt, yt

Type

int

Attributes

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

Veros.ht
Units

m

Dimensions

xt, yt

Type

float

Attributes

Total depth of the water column

Veros.hu
Units

m

Dimensions

xu, yt

Type

float

Attributes

Total depth of the water column

Veros.hv
Units

m

Dimensions

xt, yu

Type

float

Attributes

Total depth of the water column

Veros.hur
Units

m

Dimensions

xu, yt

Type

float

Attributes

Total depth of the water column (masked)

Veros.hvr
Units

m

Dimensions

xt, yu

Type

float

Attributes

Total depth of the water column (masked)

Veros.beta
Units

1/(ms)

Dimensions

xt, yt

Type

float

Attributes

Change of Coriolis frequency with latitude

Veros.area_t
Units

m^2

Dimensions

xt, yt

Type

float

Attributes

Area of T-box

Veros.area_u
Units

m^2

Dimensions

xu, yt

Type

float

Attributes

Area of U-box

Veros.area_v
Units

m^2

Dimensions

xt, yu

Type

float

Attributes

Area of V-box

Veros.maskT
Units

Dimensions

xt, yt, zt

Type

int8

Attributes

Mask in physical space for tracer points

Veros.maskU
Units

Dimensions

xu, yt, zt

Type

int8

Attributes

Mask in physical space for U points

Veros.maskV
Units

Dimensions

xt, yu, zt

Type

int8

Attributes

Mask in physical space for V points

Veros.maskW
Units

Dimensions

xt, yt, zw

Type

int8

Attributes

Mask in physical space for W points

Veros.maskZ
Units

Dimensions

xu, yu, zt

Type

int8

Attributes

Mask in physical space for Zeta points

Veros.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

Veros.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 (equal to in-situ density anomaly for equation of state 1 to 4)

Veros.int_drhodT
Units

?

Dimensions

xt, yt, zt, timesteps

Type

float

Attributes

Partial derivative of dynamic enthalpy by temperature

Veros.int_drhodS
Units

?

Dimensions

xt, yt, zt, timesteps

Type

float

Attributes

Partial derivative of dynamic enthalpy by salinity

Veros.Nsqr
Units

1/s^2

Dimensions

xt, yt, zw, timesteps

Type

float

Attributes

Square of stability frequency

Veros.Hd
Units

m^2/s^2

Dimensions

xt, yt, zt, timesteps

Type

float

Attributes

Dynamic enthalpy

Veros.dHd
Units

m^2/s^3

Dimensions

xt, yt, zt, timesteps

Type

float

Attributes

Change of dynamic enthalpy due to advection

Veros.temp
Units

deg C

Dimensions

xt, yt, zt, timesteps

Type

float

Attributes

Conservative temperature

Veros.dtemp
Units

deg C/s

Dimensions

xt, yt, zt, timesteps

Type

float

Attributes

Conservative temperature tendency

Veros.salt
Units

g/kg

Dimensions

xt, yt, zt, timesteps

Type

float

Attributes

Salinity

Veros.dsalt
Units

g/(kg s)

Dimensions

xt, yt, zt, timesteps

Type

float

Attributes

Salinity tendency

Veros.dtemp_vmix
Units

deg C/s

Dimensions

xt, yt, zt

Type

float

Attributes

Change of temperature due to vertical mixing

Veros.dtemp_hmix
Units

deg C/s

Dimensions

xt, yt, zt

Type

float

Attributes

Change of temperature due to horizontal mixing

Veros.dsalt_vmix
Units

deg C/s

Dimensions

xt, yt, zt

Type

float

Attributes

Change of salinity due to vertical mixing

Veros.dsalt_hmix
Units

deg C/s

Dimensions

xt, yt, zt

Type

float

Attributes

Change of salinity due to horizontal mixing

Veros.dtemp_iso
Units

deg C/s

Dimensions

xt, yt, zt

Type

float

Attributes

Change of temperature due to isopycnal mixing plus skew mixing

Veros.dsalt_iso
Units

deg C/s

Dimensions

xt, yt, zt

Type

float

Attributes

Change of salinity due to isopycnal mixing plus skew mixing

Veros.forc_temp_surface
Units

m K/s

Dimensions

xt, yt

Type

float

Attributes

Surface temperature flux

Veros.forc_salt_surface
Units

m g/s kg

Dimensions

xt, yt

Type

float

Attributes

Surface salinity flux

Veros.flux_east
Units

?

Dimensions

xu, yt, zt

Type

float

Attributes

Multi-purpose flux

Veros.flux_north
Units

?

Dimensions

xt, yu, zt

Type

float

Attributes

Multi-purpose flux

Veros.flux_top
Units

?

Dimensions

xt, yt, zw

Type

float

Attributes

Multi-purpose flux

Veros.u
Units

m/s

Dimensions

xu, yt, zt, timesteps

Type

float

Attributes

Zonal velocity

Veros.v
Units

m/s

Dimensions

xt, yu, zt, timesteps

Type

float

Attributes

Meridional velocity

Veros.w
Units

m/s

Dimensions

xt, yt, zw, timesteps

Type

float

Attributes

Vertical velocity

Veros.du
Units

m/s

Dimensions

xu, yt, zt, timesteps

Type

float

Attributes

Zonal velocity tendency

Veros.dv
Units

m/s

Dimensions

xt, yu, zt, timesteps

Type

float

Attributes

Meridional velocity tendency

Veros.du_cor
Units

m/s^2

Dimensions

xu, yt, zt

Type

float

Attributes

Change of u due to Coriolis force

Veros.dv_cor
Units

m/s^2

Dimensions

xt, yu, zt

Type

float

Attributes

Change of v due to Coriolis force

Veros.du_mix
Units

m/s^2

Dimensions

xu, yt, zt

Type

float

Attributes

Change of u due to implicit vertical mixing

Veros.dv_mix
Units

m/s^2

Dimensions

xt, yu, zt

Type

float

Attributes

Change of v due to implicit vertical mixing

Veros.du_adv
Units

m/s^2

Dimensions

xu, yt, zt

Type

float

Attributes

Change of u due to advection

Veros.dv_adv
Units

m/s^2

Dimensions

xt, yu, zt

Type

float

Attributes

Change of v due to advection

Veros.p_hydro
Units

m^2/s^2

Dimensions

xt, yt, zt

Type

float

Attributes

Hydrostatic pressure

Veros.kappaM
Units

m^2/s

Dimensions

xt, yt, zt

Type

float

Attributes

Vertical viscosity

Veros.kappaH
Units

m^2/s

Dimensions

xt, yt, zw

Type

float

Attributes

Vertical diffusivity

Veros.surface_taux
Units

N/s^2

Dimensions

xu, yt

Type

float

Attributes

Zonal surface wind stress

Veros.surface_tauy
Units

N/s^2

Dimensions

xt, yu

Type

float

Attributes

Meridional surface wind stress

Veros.forc_rho_surface
Units

?

Dimensions

xt, yt

Type

float

Attributes

Surface potential density flux

Veros.psi
Units

m^3/s

Dimensions

xu, yu, timesteps

Type

float

Attributes

Barotropic streamfunction

Veros.dpsi
Units

m^3/s^2

Dimensions

xu, yu, timesteps

Type

float

Attributes

Streamfunction tendency

Veros.land_map
Units

Dimensions

xt, yt

Type

float

Attributes

Land map

Veros.isle
Units

Dimensions

isle

Type

float

Attributes

Island number

Veros.psin
Units

m^3/s

Dimensions

xu, yu, isle

Type

float

Attributes

Boundary streamfunction

Veros.dpsin
Units

?

Dimensions

isle, timesteps

Type

float

Attributes

Boundary streamfunction factor

Veros.line_psin
Units

?

Dimensions

isle, isle

Type

float

Attributes

Boundary line integrals

Veros.boundary_mask
Units

Dimensions

xt, yt, isle

Type

float

Attributes

Boundary mask

Veros.line_dir_south_mask
Units

Dimensions

xt, yt, isle

Type

float

Attributes

Line integral mask

Veros.line_dir_north_mask
Units

Dimensions

xt, yt, isle

Type

float

Attributes

Line integral mask

Veros.line_dir_east_mask
Units

Dimensions

xt, yt, isle

Type

float

Attributes

Line integral mask

Veros.line_dir_west_mask
Units

Dimensions

xt, yt, isle

Type

float

Attributes

Line integral mask

Veros.K_gm
Units

m^2/s

Dimensions

xt, yt, zw

Type

float

Attributes

GM diffusivity, either constant or from EKE model

Veros.K_iso
Units

m^2/s

Dimensions

xt, yt, zw

Type

float

Attributes

Along-isopycnal diffusivity

Veros.K_diss_v
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Kinetic energy dissipation by vertical, rayleigh and bottom friction

Veros.K_diss_bot
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Mean energy dissipation by bottom and rayleigh friction

Veros.K_diss_h
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Kinetic energy dissipation by horizontal friction

Veros.K_diss_gm
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Mean energy dissipation by GM (TRM formalism only)

Veros.P_diss_v
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Potential energy dissipation by vertical diffusion

Veros.P_diss_nonlin
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Potential energy dissipation by nonlinear equation of state

Veros.P_diss_iso
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Potential energy dissipation by isopycnal mixing

Veros.P_diss_skew
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Potential energy dissipation by GM (w/o TRM)

Veros.P_diss_hmix
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Potential energy dissipation by horizontal mixing

Veros.P_diss_adv
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Potential energy dissipation by advection

Veros.P_diss_comp
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Potential energy dissipation by compression

Veros.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)

Veros.u_wgrid
Units

m/s

Dimensions

xt, yt, zw

Type

float

Attributes

Zonal velocity interpolated to W grid points

Veros.v_wgrid
Units

m/s

Dimensions

xt, yt, zw

Type

float

Attributes

Meridional velocity interpolated to W grid points

Veros.w_wgrid
Units

m/s

Dimensions

xt, yt, zw

Type

float

Attributes

Vertical velocity interpolated to W grid points

Conditional variables

coord_degree

Veros.xt
Units

degrees_east

Dimensions

xt

Type

float

Attributes

Zonal (x) coordinate of T-grid point

Veros.xu
Units

degrees_east

Dimensions

xu

Type

float

Attributes

Zonal (x) coordinate of U-grid point

Veros.yt
Units

degrees_north

Dimensions

yt

Type

float

Attributes

Meridional (y) coordinate of T-grid point

Veros.yu
Units

degrees_north

Dimensions

yu

Type

float

Attributes

Meridional (y) coordinate of U-grid point

not coord_degree

Veros.xt
Units

km

Dimensions

xt

Type

float

Attributes

Zonal (x) coordinate of T-grid point

Veros.xu
Units

km

Dimensions

xu

Type

float

Attributes

Zonal (x) coordinate of U-grid point

Veros.yt
Units

km

Dimensions

yt

Type

float

Attributes

Meridional (y) coordinate of T-grid point

Veros.yu
Units

km

Dimensions

yu

Type

float

Attributes

Meridional (y) coordinate of U-grid point

enable_tempsalt_sources

Veros.temp_source
Units

K/s

Dimensions

xt, yt, zt

Type

float

Attributes

Non-conservative source of temperature

Veros.salt_source
Units

g/(kg s)

Dimensions

xt, yt, zt

Type

float

Attributes

Non-conservative source of salt

enable_momentum_sources

Veros.u_source
Units

m/s^2 (?)

Dimensions

xu, yt, zt

Type

float

Attributes

Non-conservative source of zonal velocity

Veros.v_source
Units

m/s^2 (?)

Dimensions

xt, yu, zt

Type

float

Attributes

Non-conservative source of meridional velocity

enable_neutral_diffusion

Veros.K_11
Units

?

Dimensions

xt, yt, zt

Type

float

Attributes

Isopycnal mixing tensor component

Veros.K_13
Units

?

Dimensions

xt, yt, zt

Type

float

Attributes

Isopycnal mixing tensor component

Veros.K_22
Units

?

Dimensions

xt, yt, zt

Type

float

Attributes

Isopycnal mixing tensor component

Veros.K_23
Units

?

Dimensions

xt, yt, zt

Type

float

Attributes

Isopycnal mixing tensor component

Veros.K_31
Units

?

Dimensions

xt, yt, zt

Type

float

Attributes

Isopycnal mixing tensor component

Veros.K_32
Units

?

Dimensions

xt, yt, zt

Type

float

Attributes

Isopycnal mixing tensor component

Veros.K_33
Units

?

Dimensions

xt, yt, zt

Type

float

Attributes

Isopycnal mixing tensor component

Veros.Ai_ez
Units

?

Dimensions

xt, yt, zt, tensor1, tensor2

Type

float

Attributes

?

Veros.Ai_nz
Units

?

Dimensions

xt, yt, zt, tensor1, tensor2

Type

float

Attributes

?

Veros.Ai_bx
Units

?

Dimensions

xt, yt, zt, tensor1, tensor2

Type

float

Attributes

?

Veros.Ai_by
Units

?

Dimensions

xt, yt, zt, tensor1, tensor2

Type

float

Attributes

?

enable_skew_diffusion

Veros.B1_gm
Units

m^2/s

Dimensions

xt, yu, zt

Type

float

Attributes

Zonal component of GM streamfunction

Veros.B2_gm
Units

m^2/s

Dimensions

xu, yt, zt

Type

float

Attributes

Meridional component of GM streamfunction

enable_bottom_friction_var

Veros.r_bot_var_u
Units

?

Dimensions

xu, yt

Type

float

Attributes

Zonal bottom friction coefficient

Veros.r_bot_var_v
Units

?

Dimensions

xt, yu

Type

float

Attributes

Meridional bottom friction coefficient

enable_TEM_friction

Veros.kappa_gm
Units

m^2/s

Dimensions

xt, yt, zw

Type

float

Attributes

Vertical diffusivity

enable_tke

Veros.tke
Units

m^2/s^2

Dimensions

xt, yt, zw, timesteps

Type

float

Attributes

Turbulent kinetic energy

Veros.sqrttke
Units

m/s

Dimensions

xt, yt, zw

Type

float

Attributes

Square-root of TKE

Veros.dtke
Units

m^2/s^3

Dimensions

xt, yt, zw, timesteps

Type

float

Attributes

Turbulent kinetic energy tendency

Veros.Prandtlnumber
Units

Dimensions

xt, yt, zw

Type

float

Attributes

Prandtl number

Veros.mxl
Units

m

Dimensions

xt, yt, zw

Type

float

Attributes

Mixing length

Veros.forc_tke_surface
Units

m^3/s^3

Dimensions

xt, yt

Type

float

Attributes

TKE surface flux

Veros.tke_diss
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

TKE dissipation

Veros.tke_surf_corr
Units

m^3/s^3

Dimensions

xt, yt

Type

float

Attributes

Correction of TKE surface flux

enable_eke

Veros.eke
Units

m^2/s^2

Dimensions

xt, yt, zw, timesteps

Type

float

Attributes

meso-scale energy

Veros.deke
Units

m^2/s^3

Dimensions

xt, yt, zw, timesteps

Type

float

Attributes

meso-scale energy tendency

Veros.sqrteke
Units

m/s

Dimensions

xt, yt, zw

Type

float

Attributes

square-root of eke

Veros.L_rossby
Units

m

Dimensions

xt, yt

Type

float

Attributes

Rossby radius

Veros.L_rhines
Units

m

Dimensions

xt, yt, zw

Type

float

Attributes

Rhines scale

Veros.eke_len
Units

m

Dimensions

xt, yt, zt

Type

float

Attributes

Eddy length scale

Veros.eke_diss_iw
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Dissipation of EKE to internal waves

Veros.eke_diss_tke
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Dissipation of EKE to TKE

Veros.eke_bot_flux
Units

m^3/s^3

Dimensions

xt, yt

Type

float

Attributes

Flux by bottom friction

enable_eke_leewave_dissipation

Veros.eke_topo_hrms
Units

?

Dimensions

xt, yt

Type

float

Attributes

?

Veros.eke_topo_lam
Units

?

Dimensions

xt, yt

Type

float

Attributes

?

Veros.hrms_k0
Units

?

Dimensions

xt, yt

Type

float

Attributes

?

Veros.c_lee
Units

1/s

Dimensions

xt, yt

Type

float

Attributes

Lee wave dissipation coefficient

Veros.eke_lee_flux
Units

m^3/s^3

Dimensions

xt, yt

Type

float

Attributes

Lee wave flux

Veros.c_Ri_diss
Units

1/s

Dimensions

xt, yt, zw

Type

float

Attributes

Interior dissipation coefficient

enable_idemix

Veros.E_iw
Units

m^2/s^2

Dimensions

xt, yt, zw, timesteps

Type

float

Attributes

Internal wave energy

Veros.dE_iw
Units

m^2/s^2

Dimensions

xt, yt, zw, timesteps

Type

float

Attributes

Internal wave energy tendency

Veros.c0
Units

m/s

Dimensions

xt, yt, zw

Type

float

Attributes

Vertical internal wave group velocity

Veros.v0
Units

m/s

Dimensions

xt, yt, zw

Type

float

Attributes

Horizontal internal wave group velocity

Veros.alpha_c
Units

?

Dimensions

xt, yt, zw

Type

float

Attributes

?

Veros.iw_diss
Units

m^2/s^3

Dimensions

xt, yt, zw

Type

float

Attributes

Internal wave dissipation

Veros.forc_iw_surface
Units

m^3/s^3

Dimensions

xt, yt

Type

float

Attributes

Internal wave surface forcing

Veros.forc_iw_bottom
Units

m^3/s^3

Dimensions

xt, yt

Type

float

Attributes

Internal wave bottom forcing