NEDAS.models.nextsim.v1.nextsim_model module
- class NEDAS.models.nextsim.v1.nextsim_model.NextsimModel(**kwargs)[source]
Bases:
ModelClass for configuring and running the nextsim v1 model (lagrangian version)
- nextsim_dir: str
- model_env: str
- nextsim_mesh_dir: str
- msh_filename: str
- nextsim_data_dir: str
- ocean_forcing_path: str
- restart_input_path: str
- restart_dt: float
- atmos_forcing_path: str
- forcing_dt: float
- write_grid(**kwargs)[source]
write updated mesh back to mesh file
Note: now we assume that number of mesh elements and their indices doesn’t change! only updating the mesh node position x,y
- displace(u, v, **kwargs)[source]
Nextsim has a Lagrangian mesh, so it’s possible to displace the mesh coordinates directly Inputs: - u, v: displacement vectors defined on self.grid.x,y
- 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
- postprocess(task_id=0, **kwargs)[source]
Postprocess the model data.
- Parameters:
**kwargs – Keyword arguments for postprocessing.
- run(task_id=0, **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.