Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Continuing a run without using the "branch" utility:

NOTE: this method only works if the run name you're copying from is identical to the name of the run you're trying to branch to because the restart netcdf files have variables (like nhfil for cam.r and locfnh, locfnhr for clm.r) which contain the names of the files to use for restarting. I started modifying cp_continue_run.sh (described below) to fix these issues, but the result seems too brittle (i.e. dependent on strings having certain hardcoded lengths) to be worth the effort.

  1. Create a new case/build a new executable. I recommend using the "run_acme.csh" style script that Peter Caldwell and Philip Cameron-Smith (Unlicensed) created for this:
    1. git clone https://github.com/ACME-Climate/SimulationScripts.git,
    2. cd SimulationScripts/serving_as_a_template/recommended,
    3. modify run_acme.template.csh as needed
      1. replace "template" in name with better descriptor,
      2. copy file to non-git directory (if desired)
      3. change stuff in file as needed. I can't say what you will want to change since each simulation is different, but at least think about:
        1. change run_name
        2. in particular, change "submit_run" to false so you can set the code up for a restart before submitting it
        3. Change run length/restart freq/output freq. By default the code you just downloaded runs 5 days with daily atm output, then stops without writing any restart files.
    4. execute run_acme...csh and make sure it completes without errors
  2. Copy restart files from previous run to ${run_root_dir}/run where ${run_root_dir} is the root directory where your run will occur (which will have subdirectories called run, case_scripts, build, etc)
    1. I wrote a script called cp_continue_run.sh to do this (based on input by Chris Golaz). It is also in the git repo from step 1b under subdirectory SimulationScripts/serving_as_a_template/recommended/. In cp_continue_run.sh:
      1. change TIME1 to the day you want to restart from
      2. change TIME2 to the month before the day you want to restart on
      3. set the CASE to the name of the case you are trying to copy data from
      4. set CASE_OUT to the name you want to use for the run you're trying to submit (NOTE: switching run names is complicated because the old name is embedded inside the netcdf files used for the restart. cp_continue_run.sh can handle this, but its behavior may be somewhat brittle... If possible, set CASE_OUT=CASE. If problems occur, naming conflicts should be one of your first thoughts).
      5. INDIR is the absolute path to the restart files you want to copy
      6. OUTDIR is the absolute path to ${run_root_dir}/run.
    2. Execute cp_continue_run.sh and make sure the copied files exist in ${run_root_dir}/run as expected.
  3. Change each of the rpointer files in ${run_root_dir}/run to reflect a consistent desired start date (if they don't already)
  4. Change CONTINUE_RUN to TRUE in ${run_root_dir}/case_scripts/env_run.xml
  5. Submit the run by typing "./$CASE.submit" (where $CASE is the name of your case) in subdirectory ${run_root_dir}/case_scripts/