NEDAS.models.nextsim.dg.restart module
- NEDAS.models.nextsim.dg.restart.read_var(fname: str, varnames: list[str]) MaskedArray[source]
reading a variable from a netcdf file
- Parameters:
fname (str) – forcing file name
varnames (list[str]) – list of variable names
itime (int) – time index in the forcing file
- NEDAS.models.nextsim.dg.restart.write_var(fname: str, varnames: list[str], data: ndarray) None[source]
Write the perturbed variable back to the forcing file
- Parameters:
fname (str) – forcing file name
varnames (list[str]) – list of variable names
itime (int) – time index in the forcing file
- NEDAS.models.nextsim.dg.restart.get_restart_filename(file_options: dict, i_ens: int, time: datetime) str[source]
- NEDAS.models.nextsim.dg.restart.perturb_restart(restart_options: dict, file_options: dict, debug=False) None[source]
perturb the initial conditions in restart files
- Parameters:
restart_options (dict) – perturbation options under the section of perturb from the yaml file
file_options (dict) – This dictionary is constructed before the function is called. Keys: fname (str, path to the file to perturb), lon_name (str, longitude variable name from the restart section of the model config), lat_name (str, latitude variable name from the restart section of the model config).