2.5.3.1.2. vacumm.data.model.nemo
– Nemo ocean model¶
Classes: |
|
---|
NEMO model data manipulation
-
NEMO
¶ Alias for
Nemo
alias of
vacumm.data.model.nemo.Nemo
-
class
Nemo
(dataset=None, time=None, lon=None, lat=None, level=None, ncobj_specs=None, nopat=False, patfreq=None, patfmtfunc=None, sort=True, check=True, **kwargs)[source]¶ Bases:
vacumm.data.misc.dataset.OceanDataset
Dataset
class to read the NEMO ocean model outputsRead the
Dataset
for more information-
apply_config
(config, **kwargs)¶ Apply passed configuration (usually internal call from load_config)
Call
apply_config()
and load datasets (if config has a Catalog section)
-
classmethod
apply_default_config
(config=None, encoding=None)¶ This will turn on debug mode of various features (config, objects stats) if the loglevel of nested Logger configuration is debug.
Set the default log level for the newly created objects based on nested Logger configuration.
Subclasses may override this to apply/update according to the new config
Params: - config: The new config loaded by
load_default_config()
.
Note
- overriding this method will obviously shunt its default beahvior, you’ll then have to call original method if needed
- config: The new config loaded by
-
arakawa_grid_type
= None¶
-
auto_generic_var_names
= ['temp', 'sal', 'u3d', 'v3d', 'ubt', 'vbt', 'kz', 'bathy', 'eke', 'tke']¶
-
close
()¶
-
config
¶ Current configuration
-
critical
= <bound class method Nemo.wrapper>¶
-
debug
= <bound class method Nemo.wrapper>¶
-
default_depth_search_mode
= None¶
-
classmethod
describe
(obj, **kwargs)¶
-
description
= 'The NEMO ocean model'¶
-
domain
= 'ocean'¶
-
error
= <bound class method Nemo.wrapper>¶
-
exception
= <bound class method Nemo.wrapper>¶
-
classmethod
exception_trace
()¶ Return a huge detailed exception traceback
-
finalize_object
(var, squeeze=False, order=None, asvar=None, torect=True, depthup=None, **kwargs)¶ Finalize a variable
Params: - squeeze, optional: If not False, squeeze singletons axes using
squeeze_variable()
. - order, optional: If not None, change the axes order of the variable. It must contains letters like ‘txyz-‘.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar_<param>: Param passed to
grow_variables()
. - torect, optinal: Try to convert curvilinear grid to rectangular
grid using
curv2rect()
. - depthup, optional: If not False, try the make depth positive up
using
makedepthup()
.
- squeeze, optional: If not False, squeeze singletons axes using
-
classmethod
from_config
(config, *args, **kwargs)¶ Create a cls instance using args and kwargs and load config.
The nested named argument (in kwargs) is extracted before creating the instance and then passed to load_config.
Params: - config: A configuration file (str) or object (ConfigObj).
- args and kwargs: Passed to the object constructor, without parmeters described above.
Return: - The created object of class cls
-
classmethod
func_name
(iframe=0)¶
-
get
(varname, **kwargs)¶ Generic way to get a variable
It first tries to find a
get_*
method, then callget_variable()
if no method is found.
-
get_axis
(name, select=None, select2=None, dataset=None, warn=True, getid=False, searchmode=None, format=True)¶ Retreive a 1D or 2D axis.
Params: - name: Generic axis name.
- select optional: Selection along this axis. Only slices are accepted for 2D axes.
- select2 optional: Selection on the other dimension for 2D axes.
- dataset optional: find axis based on this dataset.
- getid, optional: If True, only return the id (netcdf name) or None.
- warn, optional: Display a warning in case of problem.
- searchmode, optional: Search order (see
ncfind_obj()
). - format, optional: Format the axis using
format_axis()
?
Return: - cdms2 axis or None if not found, or id
-
get_bathy
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the bathymetry [m]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_bathy_t
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the bathymetry at T location [m]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_bathy_u
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the bathymetry at u-location
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_bathy_v
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the bathymetry at v-location
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
classmethod
get_class_logger
()¶ Return the
Logger
instance bound to this class.
-
get_config
(copy=True)¶ Get the instance’s config
-
classmethod
get_config_manager
(reload=False, encoding=None)¶ Get the configuration manager for this class (cls). This manager and its underlying configuration specification must not be dynamically changed as it is fixed at design time.
Note
this method is also the config manager lazy loader
-
classmethod
get_config_section_name
()¶ Return (and define) the class specification section name
-
classmethod
get_config_spec
()¶ Load the config specs as ConfigObj object
It merges the specs of the current class and those of parents classes
-
classmethod
get_config_spec_file
()¶ Return (and define) the class specification file path
-
get_config_str
()¶ Get the instance’s config as a string
-
get_corio
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the coriolis parameter [s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_corio_f
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the coriolis parameter at F location [s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_corio_t
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the coriolis parameter at T location [s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_corio_u
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the coriolis parameter at U location [s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_corio_v
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the coriolis parameter at V location [s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_ctime
(*args, **kwargs)¶ Get time axis as a list of
cdtime.comptime
It is a simple shortcut to:
>>> ds.get_time().asComponentTime()
Params: All arguments are passed to get_time()
-
classmethod
get_default_config
(encoding=None)¶ Get the default configuration (copy)
-
classmethod
get_default_config_str
(encoding=None)¶ Get the default configuration as a string
-
get_dens
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea water density [kg m-3]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - dens_<param>, optional: Passed to :func:`~vacumm.diag.thermdyn.density
- depth_<param>, optional: Passed to
get_depth()
- mode, optional: Computing mode
None
: Try all modes, in the following order."var"
: Read it from a variable."tempsal"
: Estimate from temperature and salinity.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_depth
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the depth [m]
Params: time/level/lat/lon, optional: For selection (tuples or slices).
squeeze, optional: Squeeze singleton dimensions (see
squeeze_variable()
, likeTrue
,z
or['x','y']
).mode, optional: Computing mode
None
: Try all modes, in the following order."var"
: Read it from a variable."sigma"
: Estimate from sigma coordinates."dz"
: Estimate from layer thinknesses (seeget_dz()
)"axis"
: Read it from an axis (if not sigma coordinates)
You can specifiy a list of them:
['dz', 'sigma']
You can also negate the search with a ‘-‘ sigme before:"-dz"
.asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
.asvar, optional: Reshape as this variable.
at, optional: Interpolate to this grid location using
Datatset.toloc()
.format, optional: Format the variable and its axes using
format_var()
.torect, optional: If possible, convert a curvilinear grid to a rectilinar grid using
curv2rect()
.order, optional: Change order of axes (like
'xty'
).Other keywords are passed to
ncread_files()
.
-
get_depth_t
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the depth at T location [m]
Params: time/level/lat/lon, optional: For selection (tuples or slices).
squeeze, optional: Squeeze singleton dimensions (see
squeeze_variable()
, likeTrue
,z
or['x','y']
).mode, optional: Computing mode
None
: Try all modes, in the following order."var"
: Read it from a variable."sigma"
: Estimate from sigma coordinates."dz"
: Estimate from layer thinknesses (seeget_dz()
)"axis"
: Read it from an axis (if not sigma coordinates)
You can specifiy a list of them:
['dz', 'sigma']
You can also negate the search with a ‘-‘ sigme before:"-dz"
.asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
.asvar, optional: Reshape as this variable.
at, optional: Interpolate to this grid location using
Datatset.toloc()
.format, optional: Format the variable and its axes using
format_var()
.torect, optional: If possible, convert a curvilinear grid to a rectilinar grid using
curv2rect()
.order, optional: Change order of axes (like
'xty'
).Other keywords are passed to
ncread_files()
.
-
get_depth_u
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the depth at U location [m]
Params: time/level/lat/lon, optional: For selection (tuples or slices).
squeeze, optional: Squeeze singleton dimensions (see
squeeze_variable()
, likeTrue
,z
or['x','y']
).mode, optional: Computing mode
None
: Try all modes, in the following order."var"
: Read it from a variable."sigma"
: Estimate from sigma coordinates."dz"
: Estimate from layer thinknesses (seeget_dz()
)"axis"
: Read it from an axis (if not sigma coordinates)
You can specifiy a list of them:
['dz', 'sigma']
You can also negate the search with a ‘-‘ sigme before:"-dz"
.asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
.asvar, optional: Reshape as this variable.
at, optional: Interpolate to this grid location using
Datatset.toloc()
.format, optional: Format the variable and its axes using
format_var()
.torect, optional: If possible, convert a curvilinear grid to a rectilinar grid using
curv2rect()
.order, optional: Change order of axes (like
'xty'
).Other keywords are passed to
ncread_files()
.
-
get_depth_v
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the depth at V location [m]
Params: time/level/lat/lon, optional: For selection (tuples or slices).
squeeze, optional: Squeeze singleton dimensions (see
squeeze_variable()
, likeTrue
,z
or['x','y']
).mode, optional: Computing mode
None
: Try all modes, in the following order."var"
: Read it from a variable."sigma"
: Estimate from sigma coordinates."dz"
: Estimate from layer thinknesses (seeget_dz()
)"axis"
: Read it from an axis (if not sigma coordinates)
You can specifiy a list of them:
['dz', 'sigma']
You can also negate the search with a ‘-‘ sigme before:"-dz"
.asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
.asvar, optional: Reshape as this variable.
at, optional: Interpolate to this grid location using
Datatset.toloc()
.format, optional: Format the variable and its axes using
format_var()
.torect, optional: If possible, convert a curvilinear grid to a rectilinar grid using
curv2rect()
.order, optional: Change order of axes (like
'xty'
).Other keywords are passed to
ncread_files()
.
-
get_depth_w
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the depth at W location [m]
Params: time/level/lat/lon, optional: For selection (tuples or slices).
squeeze, optional: Squeeze singleton dimensions (see
squeeze_variable()
, likeTrue
,z
or['x','y']
).mode, optional: Computing mode
None
: Try all modes, in the following order."var"
: Read it from a variable."sigma"
: Estimate from sigma coordinates."dz"
: Estimate from layer thinknesses (seeget_dz()
)"axis"
: Read it from an axis (if not sigma coordinates)
You can specifiy a list of them:
['dz', 'sigma']
You can also negate the search with a ‘-‘ sigme before:"-dz"
.asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
.asvar, optional: Reshape as this variable.
at, optional: Interpolate to this grid location using
Datatset.toloc()
.format, optional: Format the variable and its axes using
format_var()
.torect, optional: If possible, convert a curvilinear grid to a rectilinar grid using
curv2rect()
.order, optional: Change order of axes (like
'xty'
).Other keywords are passed to
ncread_files()
.
-
get_dx
(**kwargs)¶ Get the grid resolution along X
It can be stored as an variable or computed from coordinates.
-
get_dx_u
(**kwargs)¶ Get the grid resolution along X at U location
-
get_dx_v
(**kwargs)¶ Get the grid resolution along X at V location
-
get_dy
(**kwargs)¶ Get the grid resolution along Y
It can be stored as an variable or computed from coordinates.
-
get_dy_u
(**kwargs)¶ Get the grid resolution along Y at U location
-
get_dy_v
(**kwargs)¶ Get the grid resolution along Y at V location
-
get_dz
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the ocean layer thickness [m]
Params: time/level/lat/lon, optional: For selection (tuples or slices).
squeeze, optional: Squeeze singleton dimensions (see
squeeze_variable()
, likeTrue
,z
or['x','y']
).mode, optional: Computing mode
None
: Try all modes, in the following order."var"
: Read it from a variable."depth"
: Estimate from depth (seeget_depth()
)
You can also negate the search with a ‘-‘ sigme before:
"-depth"
.asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
.asvar, optional: Reshape as this variable.
at, optional: Interpolate to this grid location using
Datatset.toloc()
.format, optional: Format the variable and its axes using
format_var()
.torect, optional: If possible, convert a curvilinear grid to a rectilinar grid using
curv2rect()
.order, optional: Change order of axes (like
'xty'
).Other keywords are passed to
ncread_files()
.
-
get_dz_t
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the ocean layer thickness at T location [m]
Params: time/level/lat/lon, optional: For selection (tuples or slices).
squeeze, optional: Squeeze singleton dimensions (see
squeeze_variable()
, likeTrue
,z
or['x','y']
).mode, optional: Computing mode
None
: Try all modes, in the following order."var"
: Read it from a variable."depth"
: Estimate from depth (seeget_depth()
)
You can also negate the search with a ‘-‘ sigme before:
"-depth"
.asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
.asvar, optional: Reshape as this variable.
at, optional: Interpolate to this grid location using
Datatset.toloc()
.format, optional: Format the variable and its axes using
format_var()
.torect, optional: If possible, convert a curvilinear grid to a rectilinar grid using
curv2rect()
.order, optional: Change order of axes (like
'xty'
).Other keywords are passed to
ncread_files()
.
-
get_dz_u
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the ocean layer thickness at U location [m]
Params: time/level/lat/lon, optional: For selection (tuples or slices).
squeeze, optional: Squeeze singleton dimensions (see
squeeze_variable()
, likeTrue
,z
or['x','y']
).mode, optional: Computing mode
None
: Try all modes, in the following order."var"
: Read it from a variable."depth"
: Estimate from depth (seeget_depth()
)
You can also negate the search with a ‘-‘ sigme before:
"-depth"
.asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
.asvar, optional: Reshape as this variable.
at, optional: Interpolate to this grid location using
Datatset.toloc()
.format, optional: Format the variable and its axes using
format_var()
.torect, optional: If possible, convert a curvilinear grid to a rectilinar grid using
curv2rect()
.order, optional: Change order of axes (like
'xty'
).Other keywords are passed to
ncread_files()
.
-
get_dz_v
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the ocean layer thickness at V location [m]
Params: time/level/lat/lon, optional: For selection (tuples or slices).
squeeze, optional: Squeeze singleton dimensions (see
squeeze_variable()
, likeTrue
,z
or['x','y']
).mode, optional: Computing mode
None
: Try all modes, in the following order."var"
: Read it from a variable."depth"
: Estimate from depth (seeget_depth()
)
You can also negate the search with a ‘-‘ sigme before:
"-depth"
.asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
.asvar, optional: Reshape as this variable.
at, optional: Interpolate to this grid location using
Datatset.toloc()
.format, optional: Format the variable and its axes using
format_var()
.torect, optional: If possible, convert a curvilinear grid to a rectilinar grid using
curv2rect()
.order, optional: Change order of axes (like
'xty'
).Other keywords are passed to
ncread_files()
.
-
get_dz_w
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the ocean layer thickness at W location [m]
Params: time/level/lat/lon, optional: For selection (tuples or slices).
squeeze, optional: Squeeze singleton dimensions (see
squeeze_variable()
, likeTrue
,z
or['x','y']
).mode, optional: Computing mode
None
: Try all modes, in the following order."var"
: Read it from a variable."depth"
: Estimate from depth (seeget_depth()
)
You can also negate the search with a ‘-‘ sigme before:
"-depth"
.asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
.asvar, optional: Reshape as this variable.
at, optional: Interpolate to this grid location using
Datatset.toloc()
.format, optional: Format the variable and its axes using
format_var()
.torect, optional: If possible, convert a curvilinear grid to a rectilinar grid using
curv2rect()
.order, optional: Change order of axes (like
'xty'
).Other keywords are passed to
ncread_files()
.
-
get_eke
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the eddy kinetic energy [m2 s-2]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_extrema_location
(varname, xorymin, xorymax, xory, meridional=False, extrema='min', select=None)¶ Get positions of min/max values of variable extremas along a straight trajectory, zonal or meridional.
Coordinates xorymin and xorymax are longitudes and xory a latitude if the section is zonal, latitudes and a longitude if the section is meridonal
Level must be defined using the select parameter.
Params: varname: variable to process
xorymin: westernmost longitude or southernmost latitude coordinate
xorymax: eastermost longitude or northernmost latitude coordinate
xory: longitude or latitude coordinate
meridional: if true, hovmoller is meridional, at a longitude and along given latitude range (default is zonal)
extrema: type of extrema, one of:
- min: retrieve minimum values positions
- max: retrieve maximum values positions
select: selector (should at least restrict to one level)
- select=dict(level=slice(-1,None),time=slice(0,2))
Return: A list containing in order:
- var(time,position): loaded variable data
- latitude(position): latitude corresponding to var’s position
- longitude(position): longitude corresponding to var’s position
Example: >>> get_extrema_location(self, 'temp', -10, -6, 47, select=dict(level=slice(-1,None))):
-
get_grid
(**kwargs)¶
-
get_grid_f
(**kwargs)¶
-
get_grid_f_old
(lon=None, lat=None, format=True, warn=True)¶ Get grid at F location
-
get_grid_t
(**kwargs)¶
-
get_grid_t_old
(lon=None, lat=None, format=True, warn=True)¶ Get grid at T location
-
get_grid_u
(**kwargs)¶
-
get_grid_u_old
(lon=None, lat=None, format=True, warn=True)¶ Get grid at U location
-
get_grid_v
(**kwargs)¶
-
get_grid_v_old
(lon=None, lat=None, format=True, warn=True)¶ Get grid at V location
-
get_hovmoller
(varname, xorymin, xorymax, xory, meridional=False, method='bilinear', timeavg=False, subsamp=3, outaxis=None, time=None, lon=None, lat=None, level=None, warn=True, **kwargs)¶ Get a hovmoller(time,position) section data along a straight trajectory, zonal or meridional.
Warning
This method is deprecated and must be rewritten has a special case of method
get_transect()
.Coordinates xorymin and xorymax are longitudes and xory a latitude if the section is zonal, latitudes and a longitude if the section is meridonal
Level must be defined using the select parameter.
Params: - varname: variable to process
- xorymin: westernmost longitude or southernmost latitude coordinate
- xorymax: eastermost longitude or northernmost latitude coordinate
- xory: longitude or latitude coordinate
- meridional: if true, hovmoller is meridional, at a longitude and along given latitude range (default is zonal)
- lon/lat/level/time: Selection.
- Other keywords are passed to
get_transect()
.
Return: A list containing in order: - var(time,position): hovmoller variable - latitude(position): latitude corresponding to var’s position - longitude(position): longitude corresponding to var’s position
Example: >>> get_hovmoller(self, 'sst', -10, -6, 47):
-
get_hsection
(varname, depth, time=None, lat=None, lon=None, timeavg=False, warn=True, **kwargs)¶ Get a horizontal section of a variable for a specified depth
Params: - varname: Generic var name.
- depth: Target depth.
- timeavg, optional: Time average of results.
- depth_<param>, optional: Param is passed to
get_depth()
. - interp_<param>, optional: Param is passed to
interp1d()
.
-
get_ke
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the kinetic energy [m2 s-2]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Computing mode
None
: Try all modes, in the following order."var"
: Read it from a variable."uvgbt"
: Estimate from barotropic geostrophic velocity (get_uvgbt()
).
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_kz
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the vertical diffusivity [m2 s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_lat
(lat=None, lon=None, **kwargs)¶ Get latitude axis
-
get_lat_f
(lat=None, lon=None, **kwargs)¶ Get latitude axis at F location
-
get_lat_t
(lat=None, lon=None, **kwargs)¶ Get latitude axis at T location
-
get_lat_u
(lat=None, lon=None, **kwargs)¶ Get latitude axis at U location
-
get_lat_v
(lat=None, lon=None, **kwargs)¶ Get latitude axis at V location
-
get_latitude
(lat=None, lon=None, **kwargs)¶ Get latitude axis
-
get_layer
(varname, depth, timeavg=True, **kwargs)¶ Get an horizontal section of a variable at a specified depth
Warning
This method is now an alias for method
get_hsection()
-
get_level
(level=None, **kwargs)¶ Get level axis, based on
get_axis()
-
get_localized_computed_values
(varname, xorymin, xorymax, xory, meridional=False, operation='min', select=None)¶ Get min/max/mean values of a variable along a straight trajectory, zonal or meridional.
Coordinates xorymin and xorymax are longitudes and xory a latitude if the section is zonal, latitudes and a longitude if the section is meridonal
Level must be defined using the select parameter.
Params: varname: variable to process
xorymin: westernmost longitude or southernmost latitude coordinate
xorymax: eastermost longitude or northernmost latitude coordinate
xory: longitude or latitude coordinate
meridional: if true, hovmoller is meridional, at a longitude and along given latitude range (default is zonal)
operation: type of operation, one of:
- min: retrieve minimum values
- mean: retrieve mean values
- max: retrieve maximum values
select: selector (should at least restrict to one level)
- select=dict(level=slice(-1,None),time=slice(0,2))
Return: A list containing in order: - var(time,position): loaded variable data - latitude(position): latitude corresponding to var’s position - longitude(position): longitude corresponding to var’s position
Example: >>> get_localized_computed_values(self, 'temp', -10, -6, 47, select=dict(level=slice(-1,None))):
-
get_logger
= <bound class method Nemo.get_logger>¶
-
get_loglevel
= <bound class method Nemo.wrapper>¶
-
get_lon
(lon=None, lat=None, **kwargs)¶ Get longitude axis
-
get_lon_f
(lon=None, lat=None, **kwargs)¶ Get longitude axis at F location
-
get_lon_t
(lon=None, lat=None, **kwargs)¶ Get longitude axis at T location
-
get_lon_u
(lon=None, lat=None, **kwargs)¶ Get longitude axis at U location
-
get_lon_v
(lon=None, lat=None, **kwargs)¶ Get longitude axis at V location
-
get_longitude
(lon=None, lat=None, **kwargs)¶ Get longitude axis
-
get_mixed_layer_depth
(select)¶ Get mixed layer depth
Warning
This method is deprecated by
get_mld()
.MLD is computed for each time step and then averaged
Params: - select: selector with at least a time component
Return: - mld with shape (latitude,longitude)
-
get_mld
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the mixed layer depth [m]
Params: time/level/lat/lon, optional: For selection (tuples or slices).
squeeze, optional: Squeeze singleton dimensions (see
squeeze_variable()
, likeTrue
,z
or['x','y']
).deltadens, optional: Density difference with surface
deltatemp, optional: Temperature difference with surface.
kzmax, optional: Kz max for search for low values
mode, optional: Computing mode
None
: Try all modes, in the following order."var"
: Read it from a variable."deltatemp"
: Estimate from a difference in temperature."deltadens"
: Estimate from a difference in density."twolayers"
: Shalow water mode with two density layers."kz"
: Depth where ks becomes low.
You can specifiy a list of them:
['deltadens', 'deltatemp']
You can also negate the search with a ‘-‘ sigme before:"-kz"
.asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
.asvar, optional: Reshape as this variable.
at, optional: Interpolate to this grid location using
Datatset.toloc()
.format, optional: Format the variable and its axes using
format_var()
.torect, optional: If possible, convert a curvilinear grid to a rectilinar grid using
curv2rect()
.order, optional: Change order of axes (like
'xty'
).Other keywords are passed to
ncread_files()
.
-
classmethod
get_parent_config_spec
()¶ Get the merged config specifications of all parents
-
get_potential_energy_deficit
(select)¶ Get potential energy deficit
PED is computed for each time step and then averaged
Params: - select: selector with at least a time component
Return: - ped with shape (latitude,longitude)
-
get_resol
(degrees=False, at='t', mode=None, warn=True, **kwargs)¶ Get the horizontal grid resolutions
Params: - degrees, optional: In degrees or meters?
- local, optional: Get resolution at each point?
Return: dx,dy
See also:
-
get_sal
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the salinity [PSU]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_section
(varname, xmin, ymin, xmax, ymax, timeavg=True, **kwargs)¶ Get a (vertical) section data along a straight trajectory, not necessary zonal or meridional.
Warning
This method is deprecated by the
get_transect()
method.Params: - varname: variable to process
- xmin: westernmost longitude coordinate
- ymin: southernmost latitude coordinate
- xmax: eastermost longitude coordinate
- ymax: northernmost latitude coordinate
- timeavg: if true, average date along time if needed
Return: A list containing in order: - var(level,position): section variable - depth(level) FOR 3D VARIABLES ONLY: depth corresponding to var’s level - latitude(position): latitude corresponding to var’s position - longitude(position): longitude corresponding to var’s position
-
get_selector
(level=None, **kwargs)¶ Get a cdms2.selectors.Selector from specified time/lat/lon/level selection
Params: - time/lon/lat/level, optional: Refine or set the selector with these components.
- only, optional: Work only on one component, like “time” or “t”.
- merge, optional: Merge with selector created at initialization time (stored
in attribute
selector
.) - split, optional: return a splitted selector (see
split_selector()
)
-
get_seltimes
(time=None)¶ Get a zero to two elements time selector specifications
It is the addition of non global and local time selection specs
-
get_shape
(dims='tzyx', warn=True)¶ Get the dataset shape from known generic dims
Params: - dims, optional: Letters that select the generic dimensions to consider.
Return: A tuple of the size of dimensions. If a requested dim is not found, None is returned for its size.
-
get_ssd
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea surface density [PSU]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - dens_<param>, optional: Passed to :func:`~vacumm.diag.thermdyn.density
- mode, optional: Computing mode
None
: Try all modes, in the following order."var"
: Read it from a variable."tempsal"
: Estimate from temperature and salinity.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_ssh
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea surface height [m]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_sss
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea surface salinity [PSU]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_sst
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea surface temperature [degrees_celsius]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_stratification_data
(select, timeavg=True)¶ Get stratification data
Params: - select: selector
- timeavg: if true, average date along time if needed
Return: - temp, sal, dens, depth, deltadepth with shape ([time],depth,latitude,longitude)
- densmin, densmax, densmean with shape ([time],latitude,longitude)
-
get_temp
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the temperature [degrees_celsius]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_time
(time=None, var=None, ids=None, warn=True, **kwargs)¶ Load time axis in a best time serie fashion.
Params: - time: time selector
-
get_time_res
()¶ Get the estimated time resolution, based on the two first time coordinates
Return: - resolution as datetime.timedelta
-
get_timeid
(warn=False)¶ Get the time id
-
get_tke
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the turbulent kinetic energy [m2 s-2]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_transect
(varname, lons, lats, times=None, method='bilinear', subsamp=3, getcoords=False, timeavg=False, outaxis=None, time=None, lon=None, lat=None, level=None, warn=True, **kwargs)¶ Get a transect between two points
It uses
transect()
.Params: varname: Generic var name.
lons/lats: Specification of transect, either
- Coordinates of first and last point in degrees as
tuples in the form
(lon0,lon1)
and(lat0,lat1)
. The array of coordinates is generated usingtransect_specs()
. - Or explicit array of coordinates (as scalars, lists or arrays).
- Coordinates of first and last point in degrees as
tuples in the form
times, optional: For time transect too.
subsamp, optional: Subsampling with respect to grid cell.
method, optional: Interpolation method (see
grid2xy()
).getcoords, optional: Also get computed coordinates.
outaxis, optional: Output axis.
- A cdms2 axis.
None
or'auto'
: Longitudes or latitudes depending on the range.'lon'
or'x'
: Longitudes.'lat'
or'y'
: Latitudes.'dist'
or'd'
: Distance in km.
timeavg, optional: Time average of results.
Return: tvar
ortvar,tlons,tlats
-
get_u3d
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea water velocity along X [m s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_u3d_t
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea water velocity along X at T location [m s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_u3d_u
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea water velocity along X at U location [m s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_u3d_v
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea water velocity along X at V location [m s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_ubt
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea water barotropic velocity along X [m s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_ubt_t
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea water barotropic velocity along X at T location [m s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_ubt_u
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea water barotropic velocity along X at U location [m s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_ubt_v
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea water barotropic velocity along X at V location [m s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_ugbt
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea water barotropic geostrophic velocity along X [m s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_usurf
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea surface velocity along X [m s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_usurf_t
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea surface velocity along X at T location [m s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_usurf_u
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea surface velocity along X at U location [m s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_usurf_v
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea surface velocity along X at V location [m s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_uvgbt
(getu=True, getv=True, warn=True, mode=None, **kwargs)¶ Get zonal and meridional geostrophic velocity from SSH
-
get_v3d
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea water velocity along Y [m s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_v3d_t
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea water velocity along Y at T location [m s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_v3d_u
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea water velocity along Y at U location [m s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_v3d_v
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea water velocity along Y at V location [m s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_variable
(varname, level=None, squeeze=False, **kwargs)¶ Load a variable in a best time serie fashion.
Params: - varname: Either a generic variable name listed in
CF_VAR_SPECS
, a netcdf name with a ‘+’ a prefix, a tuple of netcdf variable names or dictionnary of specification names with a search argument ofncfind_var()
(tuple of netcdf names or dictionary). - time/lon/lat/level: Selector components.
- squeeze: If true, call
squeeze_variable()
on the returned variable. - order: If not None, specify the output variable axes order.
- depthup: Make depths up.
- torect: Make grid rectangular if possible.
- at/toloc: Interpolate the variable to another location on the grid
using
toloc()
. Note that thearakawa_grid_type
must be defined. - format: Format the variable and its axes using
format_var()
? - warn: Display a warning message if the variable can”t be retreived.
- Other kwargs are passed to
ncread_files()
.
Return: cdms2 variable or None if not found
Example: >>> get_variable('ssh', lon=(-10,0)) >>> get_variable('+xe') >>> get_variable(dict(search={'standard_name':'sea_surface_height_above_sea_level'}))
- varname: Either a generic variable name listed in
-
get_variable_names
()¶ Get the list of netcdf variable names of the first file
-
get_vbt
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea water barotropic velocity along Y [m s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_vbt_t
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea water barotropic velocity along Y at T location [m s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_vbt_u
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea water barotropic velocity along Y at U location [m s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_vbt_v
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea water barotropic velocity along Y at V location [m s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_vgbt
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea water barotropic geostrophic velocity along Y [m s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_vsurf
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea surface velocity along Y [m s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_vsurf_t
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea surface velocity along Y at T location [m s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_vsurf_u
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea surface velocity along Y at U location [m s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
get_vsurf_v
(time=None, level=None, lat=None, lon=None, squeeze=False, order=None, asvar=None, at=None, format=None, torect=True, verbose=None, warn=None, mode=None, **kwargs)¶ Read the sea surface velocity along Y at V location [m s-1]
Params: - time/level/lat/lon, optional: For selection (tuples or slices).
- squeeze, optional: Squeeze singleton dimensions
(see
squeeze_variable()
, likeTrue
,z
or['x','y']
). - mode, optional: Retreiving mode
"var"
: Get from netcdf variable only."stag"
: Get it from another grid location.
- asvar, optional: Grow variable to match the
asvar
variable, usinggrow_variables()
. - asvar, optional: Reshape as this variable.
- at, optional: Interpolate to this grid location using
Datatset.toloc()
. - format, optional: Format the variable and its axes using
format_var()
. - torect, optional: If possible, convert a curvilinear grid to
a rectilinar grid using
curv2rect()
. - order, optional: Change order of axes (like
'xty'
). - Other keywords are passed to
ncread_files()
.
-
info
= <bound class method Nemo.wrapper>¶
-
classmethod
init_class
(name, bases, dct)¶ Redefine this method if you need class initialization
-
is_debug
= <bound class method Nemo.wrapper>¶
-
is_verbose
= <bound class method Nemo.wrapper>¶
-
classmethod
kwfilter
(kwargs, filters=None, *args, **kwa)¶ Shortcut to
vacumm.misc.misc.kwfilter()
with a filters argument which defaults to this class lowercase name.
-
load_config
(config=None, nested=None, apply=True, cfgpatch=None, encoding=None, **kwargs)¶ Load / update the instance configuration
Params: - config: A configuration file (str) or object (ConfigObj) or
None to load defaults, or an
ArgumentParser
object. - nested: Load from a nested config section instead of the whole config.
- If True, use the section name returned by
get_config_section_name()
Else if a string, use the section name defined by the nested string
- cfgpatch: A manual patch to apply to the config once loaded.
- Other options are passed to
arg_parse()
.
Return: A
ConfigObj
object orConfigObj
,options tuple if anArgumentParser
object has been passed- config: A configuration file (str) or object (ConfigObj) or
None to load defaults, or an
-
load_dataset
(dataset, time=None, **kwargs)¶ Load dataset files.
Params: - dataset: can be either:
- an instance or list of strings (filepath/filepattern/url) that
will be passed to
list_forecast_files()
. - an instance of
Catalog
- an instance or list of strings (filepath/filepattern/url) that
will be passed to
- time: used with
Catalog.find_datasets()
when dataset is a string (or list of strings). - Extra keywords are passed to
list_forecast_files()
(viaCatalog.find_datasets()
).
Keyword parameters: - append: keep previously loaded datasets if True
Return: The list of (newly) loaded datasets
Example: >>> d.load_dataset('../../data/model/mars/champs_%Y%m_BOBI.nc', ('2004-01-01', '2004-04-01'), patfreq=(2,'month'), verbose=True) [2013-01-14 09:42:43 CET Catalog INFO] Searching datasets using pattern: ['../../data/model/mars/champs_%Y%m_BOBI.nc'], time: ('2004-01-01', '2004-04-01') Guessing file list using: filepattern: ../../data/model/mars/champs_%Y%m_BOBI.nc time selector: ('2004-01-01', '2004-03-31') Found 2 files [2013-01-14 09:42:43 CET Catalog INFO] Found 2 datasets [2013-01-14 09:42:43 CET Dataset INFO] Loading datasets: [2013-01-14 09:42:43 CET Dataset INFO] - ../../data/model/mars/champs_200401_BOBI.nc [2013-01-14 09:42:43 CET Dataset INFO] - ../../data/model/mars/champs_200403_BOBI.nc
-
classmethod
load_default_config
(config=None, nested=None, apply=True, encoding=None)¶ Load / update the class (unique) default configuration
-
logger
¶ A
Logger
instance. You can use this object for all logging operations related to this class
-
name
= 'nemo'¶
-
ncobj_specs
= {'depth': {'search': {'id': ['depth']}}, 'lathf': {'search': {'id': ['solhflup']}}, 'lwhf': {'search': {'id': ['solwfldo']}}, 'sal': {'search': {'id': ['vosaline']}}, 'senhf': {'search': {'id': ['sosbhfup']}}, 'soccov': {'search': {'id': ['soccov']}}, 'sohefldo': {'search': {'id': ['sohefldo']}}, 'sohefldp': {'search': {'id': ['sohefldp']}}, 'sohumspe': {'search': {'id': ['sohumspe']}}, 'sornf': {'search': {'id': ['sornf']}}, 'soshfldo': {'search': {'id': ['soshfldo']}}, 'sotemair': {'search': {'id': ['sotemair']}}, 'sowaflcd': {'search': {'id': ['sowaflcd']}}, 'sowafldp': {'search': {'id': ['sowafldp']}}, 'sowaflup': {'search': {'id': ['sowaflup']}}, 'sowapre': {'search': {'id': ['sowapre']}}, 'sowindsp': {'search': {'id': ['sowindsp']}}, 'ssh': {'search': {'id': ['sossheig']}}, 'sss': {'squeeze': 'z', 'select': {'level': slice(0, 1, None)}, 'inherit': 'sal'}, 'sst': {'squeeze': 'z', 'select': {'level': slice(0, 1, None)}, 'inherit': 'temp'}, 'temp': {'search': {'id': ['votemper']}}, 'u3d': {'search': {'id': ['vozocrtx']}}, 'usurf': {'squeeze': 'z', 'select': {'level': slice(0, 1, None)}, 'inherit': 'u3d'}, 'v3d': {'search': {'id': ['vomecrty']}}, 'vsurf': {'squeeze': 'z', 'select': {'level': slice(0, 1, None)}, 'inherit': 'v3d'}}¶
-
notice
= <bound class method Nemo.wrapper>¶
-
notset
= <bound class method Nemo.wrapper>¶
-
options
¶ Options loaded from the commandline parser or None
-
classmethod
pformat
(obj, indent=2, width=80, depth=None)¶ Pretty print an object
-
plot_extrema_location
(varname, xorymin, xorymax, xory, meridional=False, extrema='min', pmap=True, select=None, **kwargs)¶ Produce 1D plot of min/max positions.
Params: Plot params: - cur_<keyword>: are passed to the section plot function
curve2()
excepting those about post plotting described below - map_<keyword>: are passed to the map plot function
map2()
excepting those about post plotting described below - plot_[show|close|savefig|savefigs]: are passed to the post plotting function
post_plot()
at end of plotting operations
- cur_<keyword>: are passed to the section plot function
-
plot_hovmoller
(varname, xorymin, xorymax, xory, meridional=False, select=None, pmap=True, **kwargs)¶ Produce a hovmoller plot.
Params: see
get_hovmoller()
Plot params: - hov_<keyword>: are passed to the section plot function
hov2()
excepting those about post plotting described below - map_<keyword>: are passed to the map plot function
map2()
excepting those about post plotting described below - plot_[show|close|savefig|savefigs]: are passed to the post plotting function
post_plot()
at end of plotting operations
- hov_<keyword>: are passed to the section plot function
-
plot_hsection
(varname, depth, time=None, lat=None, lon=None, timeavg=False, title='%(long_name)s at %(depth)im', mask_land=False, **kwargs)¶ Plot a horizontal section of a variable for a specified depth
Section is computed with
get_hsection()
.Params: - varname: Generic var name.
- depth: Target depth.
- timeavg, optional: Time average of results.
- depth_<param>, optional: Param is passed to
get_depth()
. - interp_<param>, optional: Param is passed to
interp1d()
. - Other arguments are passed to
map2()
.
-
plot_layer
(*args, **kwargs)¶ Plot a layer
Warning
This method is deprecated by
plot_hsection()
.- Params:
- map_<keyword>: passed to
map2()
- plot_<keyword>: passed to created map
post_plot()
- map_<keyword>: passed to
Other params are passed to
get_layer()
-
plot_localized_computed_values
(varname, xorymin, xorymax, xory, meridional=False, operation='min', pmap=True, select=None, **kwargs)¶ Produce 1D plot of min/max values.
Params: Plot params: - cur_<keyword>: are passed to the section plot function
curve2()
excepting those about post plotting described below - map_<keyword>: are passed to the map plot function
map2()
excepting those about post plotting described below - plot_[show|close|savefig|savefigs]: are passed to the post plotting function
post_plot()
at end of plotting operations
- cur_<keyword>: are passed to the section plot function
-
plot_mld
(select, **kwargs)¶ Produce mixed layer depth map.
Params: Plot params: map_<keyword>: are passed to the map plot function
map2()
exceptingthose about post plotting described below
plot_[show|close|savefig|savefigs]: are passed to the post plotting function
post_plot()
at end of plotting operations
-
plot_ped
(select, **kwargs)¶ Produce potential energy deficit map.
Params: Plot params: - map_<keyword>: are passed to the map plot function
map2()
excepting those about post plotting described below - plot_[show|close|savefig|savefigs]: are passed to the post plotting function
post_plot()
at end of plotting operations
- map_<keyword>: are passed to the map plot function
-
plot_section
(varname, xmin, ymin, xmax, ymax, select=None, pmap=True, **kwargs)¶ Produce a section plot.
Warning
This method is deprecated by
plot_transect()
.Params: see
get_section()
Plot params: - sec_<keyword>: are passed to the section plot function
section2()
excepting those about post plotting described below - map_<keyword>: are passed to the map plot function
map2()
excepting those about post plotting described below - plot_[show|close|savefig|savefigs]: are passed to the post plotting function
post_plot()
at end of plotting operations
Todo
- add lat/lon position lines indicator
- sec_<keyword>: are passed to the section plot function
-
plot_trajectory_map
(lon, lat, **kwargs)¶ Plot the “legend” map of a trajectory using
add_map_lines()
Params: - lon/lat: Coordinates (in degrees) as 1D arrays.
Todo
- replace this method usage by vacumm.misc.plot.add_map_lines
-
plot_transect
(varname, lons, lats, times=None, method='bilinear', timeavg=False, subsamp=3, outaxis=None, time=None, lon=None, lat=None, level=None, title='%(long_name)s along transect', minimap=None, **kwargs)¶ Plot a transect between two points
Params: - varname: Generic var name.
- lons/lats/times: Specification of transect (see
get_transect()
). - title, optional: Title of the figure.
- minimap, optional: If True, add a minimap showing the transect on a map; if False, display nothing; if None, display if no minimap already displayed.
- minimap_<param>, optional: Passed to
add_map_lines()
. - Some params are passed to
get_transect()
. - Other params are passed to the plot function
curve2()
for 1D plots and,hov2()
orsection2()
for 2D plots.
-
positive
= 'down'¶
-
save_config
(outfile=None, nested=None)¶
-
classmethod
set_class_logger
(logger)¶ Set the
Logger
instance bound to this class.
-
set_logger
= <bound class method Nemo.set_logger>¶
-
set_loglevel
= <bound class method Nemo.wrapper>¶
-
shape
¶ Generic shape of the dataset
-
classmethod
squeeze_variable
(var, spec=True)¶ Squeeze a variable, preserving remaining axis
See also: vacumm.misc.misc.squeeze_variable()
-
static
stack_trace
(iframe=0)¶
-
toloc
(var, loc, fromloc=None, copy=False, **kwargs)¶ Interpolate a variable to another location
It has no effect if the current
Dataset
instance has no validarakawa_grid_type
defined (None
).Params: - var: A CDAT array.
- loc: A physical location (see
vacumm.data.misc.arakawa.ARAKAWA_LOCATIONS
). - fromloc, optional: Originating location. If
None
it is guessed from its attributes (id, standard_name and long_name), and default toDEFAULT_LOCATION
). - Extra keywords are passed to
vacumm.data.misc.arakawa.ArakawaGrid.loc2loc()
.
-
torect
(var, curvsel=None)¶ Place a variable on rectangular grid if possible using
curv2rect()
Params: - var: CDAT variable or grid.
-
classmethod
trace
(iframe=0, iftty=True)¶ Start pdb debugger
Params: - iframe: frame index entry point of the debugger, relative to the caller
- iftty: if True, disable this call in a non interactive execution
Note
- For debugging purpose only: do not let trace calls in a production environment, even if an interactive test is done !
-
verbose
= <bound class method Nemo.wrapper>¶
-
warning
= <bound class method Nemo.wrapper>¶
-