NEDAS.models.topaz.v5 package
- class NEDAS.models.topaz.v5.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.
Submodules
- NEDAS.models.topaz.v5.cice_utils module
- NEDAS.models.topaz.v5.namelist module
- NEDAS.models.topaz.v5.postproc module
- NEDAS.models.topaz.v5.topaz5model module
Topaz5ModelTopaz5Model.io_modeTopaz5Model.nhc_rootTopaz5Model.basedirTopaz5Model.model_envTopaz5Model.reanalysis_codeTopaz5Model.VTopaz5Model.XTopaz5Model.TTopaz5Model.RTopaz5Model.ETopaz5Model.idmTopaz5Model.jdmTopaz5Model.kdmTopaz5Model.nprocTopaz5Model.use_job_arrayTopaz5Model.stagnant_log_timeoutTopaz5Model.meanssh_fileTopaz5Model.forcing_fileTopaz5Model.restart_dtTopaz5Model.output_dtTopaz5Model.forcing_dtTopaz5Model.z_unitsTopaz5Model.thflagTopaz5Model.threfTopaz5Model.thbaseTopaz5Model.kaprefTopaz5Model.yrflagTopaz5Model.ONEMTopaz5Model.MIN_SEAICE_CONCTopaz5Model.MAX_OCEAN_TEMPTopaz5Model.MIN_OCEAN_SALNTopaz5Model.MAX_OCEAN_SALNTopaz5Model.ncatTopaz5Model.NilayerTopaz5Model.saltmaxTopaz5Model.min_salinTopaz5Model.depressTTopaz5Model.nsalTopaz5Model.msalTopaz5Model.aice_threshTopaz5Model.fice_threshTopaz5Model.hice_impactTopaz5Model.is_ncat()Topaz5Model.get_cat_id()Topaz5Model.filename()Topaz5Model.read_grid()Topaz5Model.read_mask()Topaz5Model.read_var()Topaz5Model.write_var()Topaz5Model.z_coords()Topaz5Model.get_ocean_surf_height()Topaz5Model.get_ocean_surf_height_anomaly()Topaz5Model.get_ocean_surf_temp()Topaz5Model.get_seaice_conc()Topaz5Model.get_seaice_thick()Topaz5Model.get_snow_thick()Topaz5Model.preprocess()Topaz5Model.postprocess()Topaz5Model.postprocess_native()Topaz5Model.run()Topaz5Model.generate_truth()Topaz5Model.generate_init_ensemble()