NEDAS.models.topaz.v5.topaz5model module
- class NEDAS.models.topaz.v5.topaz5model.Topaz5Model(**kwargs)[source]
Bases:
Model[RegularGrid]TOPAZ5 model class.
- io_mode: Literal['online', 'offline'] = 'offline'
- nhc_root: str
- basedir: str
- model_env: str | None
- reanalysis_code: str
- V: str
- X: str
- T: str
- R: str
- E: str
- idm: int
- jdm: int
- kdm: int
- nproc: int
- use_job_array: bool
- stagnant_log_timeout: int
- meanssh_file: str
- forcing_file: str
- restart_dt: int
- output_dt: int
- forcing_dt: int
- z_units: str
- thflag: int
- thref: float
- thbase: float
- kapref: int
- yrflag: int
- ONEM: float
- MIN_SEAICE_CONC: float
- MAX_OCEAN_TEMP: float
- MIN_OCEAN_SALN: float
- MAX_OCEAN_SALN: float
- ncat: int
- Nilayer: int
- saltmax: float
- min_salin: float
- depressT: float
- nsal: float
- msal: float
- aice_thresh: float
- fice_thresh: float
- hice_impact: float
- read_grid(**kwargs)[source]
Read the grid information from the model output.
- Parameters:
**kwargs – Keyword arguments for reading the grid.
- read_var(**kwargs)[source]
Read a variable from the model output.
- Parameters:
**kwargs – Keyword arguments for reading the variable.
- Returns:
The read variable.
- Return type:
np.ndarray
- write_var(var, **kwargs)[source]
Write a variable to the model output.
- Parameters:
var (np.ndarray) – The variable to write.
**kwargs – Keyword arguments for writing the variable.
- z_coords(**kwargs)[source]
Get the vertical coordinates of the model.
- Parameters:
**kwargs – Keyword arguments for getting the vertical coordinates.
- Returns:
The vertical coordinates.
- Return type:
np.ndarray
- get_ocean_surf_height(**kwargs)[source]
Get ocean surface height from restart variables Adapted from p_ssh_from_state.F90 in ReanalysisTP5/SSHFromState_HYCOMICE
- get_seaice_conc(**kwargs)[source]
Get total seaice concentration from multicategory ice concentration (aicen) adapted from ReanalysisTP5/SSHFromState_HYCOMICE/mod_read_icednc by J. Xie
- get_seaice_thick(**kwargs)[source]
Get total seaice thickness from the multicategory ice volume (vicen)
- get_snow_thick(**kwargs)[source]
Get total snow thickness from the multi-category snow volume (vsnon)
- preprocess(*args, **kwargs)[source]
Preprocess the model data.
- Parameters:
**kwargs – Keyword arguments for preprocessing.
- postprocess(*args, **kwargs)[source]
Postprocess the model data.
- Parameters:
**kwargs – Keyword arguments for postprocessing.
- postprocess_native(*args, **kwargs)[source]
Post processing the restart variables for next forecast
- run(*args, **kwargs)[source]
Run the model forward in time.
- Parameters:
*args – Arguments
**kwargs – Keyword arguments
- Keyword Arguments:
time (datetime) – current time when forecast starts
restart_dir (str) – directory where restart files are located
forecast_period (int) – forecast period in hours
If self.ens_run_strategy == ‘batch’, the method will run all ensemble members in one go, expect additional kwargs[‘nens’] to be the ensemble size. If self.ens_run_strategy == ‘scheduler’, the method runs a single member indexed by kwargs[‘member’], and kwargs[‘worker_id’] is the pid assigned by the scheduler to run this method.