Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integration of nextsim.dg module in NEDAS workflow #7

Open
wants to merge 29 commits into
base: develop
Choose a base branch
from

Conversation

myying
Copy link
Collaborator

@myying myying commented Dec 4, 2024

  • added a JobSubmitter class to handle different ways to run jobs; replacing the job_submit_cmd approach (@yumengch could you help test this?)
  • moved nextsimdg restart and forcing file logic from top-level config file to its own default.yml config file. Adding a namelist() function.
  • moved perturb.py under models/nextsim/dg, keeping it as a nextsimdg specific perturbation scheme, along with the standalone scheme in scripts/perturb.py
  • added the missing bits in nextsim/dg/model.py methods, to integrate with core assimilate algorithm

aydogduali and others added 21 commits July 3, 2024 16:34
…ing yml file. The perturbation follows the original HYCOM approach.
… time units instead of giving it explicitly.
Adding random perturbation to forcing - an initial implementation
…ll perturbation variance for cycled testing;updating model configuration files for each cycle; put generated restart file to next cycle;
saved the old copy of config.py

moved perturb/randoim_perturb.py to ./perturb.py temporarily, will try to merge with utils/random_perturb.py later

output_dir is no longer needed, makedir function using os.makedirs but
catching FileExistsError from race conditions, adding nens to the
job_opts for batch mode

generate_init_ensemble.py is removed and the function is merged into
preprocess.py as time==time_start the restart_dir is where the initial
ensemble will be obtained

run_exp.py renamed into run_expt.py and made more clean
replacing the job_submit_cmd approach in the config file

 # Changes not staged for commit:
@myying myying requested review from yumengch and aydogduali December 4, 2024 11:16
implemented OAR/SLURM submitters

updated nextsim.dg.model.run to use the submitter
previously I have the perturb settings under the model_def section,
defined for each model; but now the perturb section is made stand alone.
The reason doing so is that I can now run perturbation scheme involving
multiple model components. I'm keeping the model-specific perturb
settings so that the code is still compatible. Note that
model.preprocess method will run the model-specific perturb settings
while the scripts/perturb.py will run the standalone perturb settings.

Moving the perturb.py inside nextsim.dg module as well

prepare_forcing and prepare_restart are included in the preprocess step
combined prepare_restart and prepare_forcing into preprocess

since nextsim.dg config_file is holding the files and perturb options,
they are initialized directly in model class, instead of passing through
kwargs everytime.
-initialize grid inside __init__, can we define model grid parameters in
default.yml?

-include restart forcing modules read_var and write_var in model class

-in preprocess, there is a bit issue with copying previous cycle restart
files to the current cycle. In config file files:restart:format, there
seems to be no ensemble member index?
since only ensemble forecast gets to use this job array functionality,
moving it out of job_submit section, so that other scripts like
assimilate.py and perturb.py will not get accidently assigned
use_job_array=True. Note; if not specified, use_job_array is defaulted
to False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants