Default and specialized CF specs#

This appendix refers to the searching and formatting specifications for data variables and coordinates, and related tools, available in the xoa.cf module. Their usage is introduced in the Naming conventions with xoa.cf section.

Specialized configurations#

A few configurations are made available internally for decoding specialized datasets. You can use them at your own risk.

For instance, load the croco specs with directly:

import xoa.cf
xoa.cf.set_cf_specs("croco")

Register it with:

xoa.cf.register_cf_specs("croco")

You can access the associated .cfg file with xoa.cf_congs.get_cf_conf_file().

The default configuration#

Note

You can define you own specifications for each of your datasets. Have a look to the Naming conventions with xoa.cf section and to the Examples.

As a .cfg file#

Look at CF specifications for default datasets.

Data variables (data_vars)#

ptemp

Potential temperature

ctemp

Conservative temperature

temp

Sea water in situ temperature

asal

Absolute salinity

pfsal

Preformed salinity

psal

Practical salinity

sal

Salinity

sst

Sea surface temperature

sss

Sea surface salinity

sigmat

Sea water density minus 1000

ndens

Sea water neutral density

sigmatheta

Sea water potential density minus 1000

pdens

Sea water potential density

sigma0

Sea water potential density

sigma1

Sea water potential density with ref at 1000 dbar

sigma2

Sea water potential density with ref at 2000 dbar

sigma3

Sea water potential density with ref at 3000 dbar

sigma4

Sea water potential density with ref at 4000 dbar

dens

Sea water density

pres

Sea water pressure

ssd

Sea surface density

conduct

Sea water electrial conductivity

sndspd

Speed of sound in water

mld

Mixed layer depth

ped

Potential energy deficit

ohc

Ocean heat content

osc

Ocean salt content

cp

Specific heat capacity

ssh

Sea surface height

u

Sea water velocity along X

v

Sea water velocity along Y

w

Sea water velocity along Z at W location

ubt

Sea water barotropic velocity along X

vbt

Sea water barotropic velocity along Y

ubc

Sea water baroclinic velocity along X

vbc

Sea water baroclinic velocity along Y

usurf

Sea surface velocity along X

vsurf

Sea surface velocity along Y

ugbt

Sea water barotropic geostrophic velocity along X

vgbt

Sea water barotropic geostrophic velocity along Y

cspd

Sea water speed

speed

Sea water speed

cdir

Direction of sea water velocity

ke

Kinetic energy

eke

Eddy kinetic energy

tke

Turbulent kinetic energy

mke

Mke

kz

Vertical diffusivity

akt

Vertical heat diffusivity

vaisa

Brunt Vaisala frequency

bathy

Bathymetry

meanlev

Mean Sea Level

dx

Mesh size along x

dy

Mesh size along y

ex

Inverse of mesh size along x

ey

Inverse of mesh size along y

dz

Ocean layer thickness

dlon

Mesh size along x

dlat

Mesh step along y

angle

Angle between x-axis and east

mask

Land binary mask

cvol

Volume of the cell

vol

Volume of the sea water

corio

Coriolis parameter

beta

Meridional derivative of coriolis parameter

oro

Orography for SLEVE vertical coordinates

orosm

Smoothed orography for SLEVE vertical coordinates

nethf

Net radiation

lwnhf

Net longwave radiation (positive when directed downward)

swnhf

Net shortwave radiation (positive when directed downward)

ghf

Ground heat flux (SW + LW - LE - H)

lwuhf

Longwave radiation (positive when directed upward)

swuhf

Shortwave radiation (positive when directed upward)

lwdhf

Longwave radiation (positive when directed downward)

swdhf

Shortwave radiation (positive when directed downward)

lathf

Latent heat flux (positive when directed downward)

hflat

Latent heat flux (positive when directed upward)

senhf

Sensible heat flux (positive when directed downward)

hfsen

Sensible heat flux (positive when directed upward)

evap

evaporation (positive when directed downward)

rain

Precipitation [Downward (positive when it is raining)]

t2m

T2m

q2m

2 m specific humidity

hu2m

2 m specific humidity

z0a

Air roughness length

cda

Averaged drag momentum coefficient

cha

Averaged drag thermal coefficient

cea

Averaged latent heat flux coefficient

wspd

Wind speed

wdir

Wind direction

wfdir

Wind from direction

wtdir

Wind to direction

uair

Zonal wind speed (westerly)

vair

Meridional wind speed (northerly)

wair

Upward wind speed

tair

Temperature

pa

Absolute pressure

ps

Surface air pressure

plev

Air pressure

ptop

Air pressure at top of model

tkea

Turbulent Kinetic Energy

u10m

10-m zonal wind speed (westerly)

v10m

10-m meridional wind speed (northerly)

w10m

10-m meridional wind speed (northerly)

ux10m

10-m wind speed along X

vy10m

10-m wind speed along Y

tauu

Surface eastward wind stress

tauv

Surface northward wind stress

taux

Surface wind stress along X

tauy

Surface wind stress along Y

topheight

Height of the top level

hbl

Depth of planetary boundary layer

hs

Significant wave height

mssx

Eastward mean square slope

mssy

Northward mean square slope

mss

mean square slope

mlw

Mean wave length

t0m1

Mean wave period

dp

Peak direction

tp

Peak period

fp

Peak frequency

th1p

Mean wave direction

char

Charnock coefficient for surface roughness length for momentum in air

ubr

Near bottom rms velocities

uubr

Rms of near bottom zonal velocities

vubr

Rms of near bottom meridional velocities

bhd

Radiation pressure (Bernoulli head)

foc

Wave mixing kinetic turbulent energy due to surface breaking wave

utwo

Zonal component of the surface wave-ocean momentum flux

vtwo

Meridional component of the surface wave-ocean momentum flux

utaw

Eastward wave supported wind stress

vtaw

Northward wave supported wind stress

fbb

Wave dissipation in bottom boundary layer

utbb

Zonal component of the bottom wave-ocean momentum flux

vtbb

Meridional component of the bottom wave-ocean momentum flux

uuss

Eastward surface stokes drift

vuss

Northward surface stokes drift

utus

Eastward stokes transport

vtus

Northward stokes transport

mapsta

Status map

wlv

Wlv

sig

Sigma level

cs

S-coordinate stretching curves

hc

Sigma-coordinate critical depth

thetas

Ocean s coordinate surface control

thetab

Ocean s coordinate bottom control

depth

Depth

altitude

Altitude

station

Station number

calday

Calendar day

echoint

Echo intensity

Coordinates (coords)#

x

X-dimension of the grid

y

Y-dimension of the grid

level

Model level number

lon

Longitude

lat

Latitude

depth

Depth

altitude

Altitude

sig

Sigma level

time

Time

forecast

Forecast horizon

freq

Frequency

station

Station number

member

Ensemble member

Dimensions (dims)#

x

x, lon, xi, nx, ni, x, imt, ipi, longitude, nav_lon, longitudes, lons

y

y, lat, yi, ny, nj, y, jmt, jpj, latitude, nav_lat, latitudes, lats

z

level, depth, altitude, sig, station, model_level, lev, nz, nk, z, kmt, zi, dep, altitudet, altitudeu, altitudev, s_level, sigma, s, sigma_level, stations

t

time, nt

f

forecast, nf, fcst

Other sections#

register

Registration

sglocator

Staggered grid localisation

vertical

Vertical coordinate system

accessors

Accessor configuration

The configuration syntax specifications#

The syntax of all configurations are validated with these specifications.

See configobj.

Details#

exclude_names#
default: None
type: strings

Exclude these names from all parsings

[register]#

Registration

name#
default:
type: string
[[attrs]]#

Search within attributes for matching purpose

__many__#
default: None
type: strings
[sglocator]#

Staggered grid localisation

name_format#
default: False
type: boolstr
valid_locations#
default: None
type: strings
[accessors]#

Accessor configuration

[[properties]]#

Shortcut accessor properties

coords#
default: lon, lat, depth, sig, level, altitude, time, forecast
type: strings

Coord names that are added as shortcut properties

data_vars#
default: temp, sal, u, v, bathy, ssh
type: strings

Data_var names that are added as shortcut properties

[vertical]#

Vertical coordinate system

positive#
default: None
possible choices: up, down, None
type#
default: None
possible choices: sigma, z, layer, dz, auto, None

Layer=dz, auto=none

[data_vars]#

Data variables

[[__many__]]#

Section names are pivot names

name#
default: None
type: string

Encoding name

alt_names#
default:
type: strings

Alternative names for decoding

cmap#
default: None
type: string

Color map name

inherit#
default: None
type: string
squeeze#
default: None
type: strings
search_order#
default: sn
type: string
loc#
default: None
type: string
add_loc#
default: False
type: boolean
exclude#
default: False
type: boolean
[[[add_coords_loc]]]#
__many__#
default: True
type: boolstr
[[[attrs]]]#
long_name#
default:
type: strings
standard_name#
default:
type: strings
units#
default:
type: strings
[[[select]]]#
__many__#
default: None
type: eval
[coords]#

Coordinates

[[__many__]]#
name#
default: None
type: string
alt_names#
default:
type: strings
inherit#
default: None
type: string
search_order#
default: ns
type: string
loc#
default: None
type: string
add_loc#
default: None
type: boolean
exclude#
default: False
type: boolean
[[[add_coords_loc]]]#
__many__#
default: True
type: boolstr
[[[attrs]]]#
long_name#
default:
type: strings
standard_name#
default:
type: strings
units#
default:
type: strings
axis#
default: None
type: string
[dims]#

Dimensions

x#
default:
type: strings
y#
default:
type: strings
z#
default:
type: strings
t#
default:
type: strings
f#
default:
type: strings

File#

exclude_names=strings(default=None) # Exclude these names from all parsings

[register] # Registration
name=string(default="")

    [[attrs]] # Search within attributes for matching purpose
    __many__=strings(default=None)

[sglocator] # Staggered grid localisation
name_format=boolstr(default=False)
valid_locations=strings(default=None)

[accessors] # Accessor configuration

    [[properties]]  # Shortcut accessor properties
    coords=strings(default=list(lon,lat,depth,sig,level,altitude,time,forecast)) # coord names that are added as shortcut properties
    data_vars=strings(default=list(temp,sal,u,v,bathy,ssh))  # data_var names that are added as shortcut properties


[vertical] # Vertical coordinate system
positive=option('up','down',None,default=None)
type=option('sigma','z','layer','dz','auto',None,default=None) # layer=dz, auto=None


[data_vars] # Data variables

    [[__many__]] # Section names are pivot names

    name=string(default=None) # Encoding name
    alt_names=strings(default=list()) # Alternative names for decoding
    cmap=string(default=None) # Color map name
    inherit=string(default=None)
    squeeze=strings(default=None)
    search_order=string(default=sn)
    loc=string(default=None)
    add_loc=boolean(default=False)
    exclude=boolean(default=False)

        [[[add_coords_loc]]]
        __many__=boolstr(default=True)

#        [[[add_loc_sec]]]
#        data_var=boolean(default=False)
#
#            [[[[coords]]]]
#            __many__=boolstr(default=None)

        [[[attrs]]]
        long_name=strings(default=list())
        standard_name=strings(default=list())
        units=strings(default=list())


        [[[select]]]
        __many__=eval(default=None)



[coords] # Coordinates

    [[__many__]]

    name=string(default=None)
    alt_names=strings(default=list())
    inherit=string(default=None)
    search_order=string(default=ns)
    loc=string(default=None)
    add_loc=boolean(default=None)
    exclude=boolean(default=False)

        [[[add_coords_loc]]]
        __many__=boolstr(default=True)

#        [[[add_loc_sec]]]
#        coord=boolean(default=None)
#
#            [[[[coords]]]]
#            __many__=boolean(default=None)

        [[[attrs]]]
        long_name=strings(default=list())
        standard_name=strings(default=list())
        units=strings(default=list())
        axis=string(default=None)


[dims] # Dimensions
    x=strings(default=list())
    y=strings(default=list())
    z=strings(default=list())
    t=strings(default=list())
    f=strings(default=list())