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

[WIP]: NEON Wrapper for batch running neon single point runs #1426

Closed
wants to merge 3 commits into from

Conversation

negin513
Copy link
Contributor

@negin513 negin513 commented Jul 13, 2021

Description of changes

This python script is a wrapper for running CTSM simulations for one or more neon sites.

This script first makes sure:

Please note that this is still a work in progress and will be updated frequently.

Specific notes

Contributors other than yourself, if any:

CTSM Issues Fixed (include github issue #): #1354

Are answers expected to change (and if so in what way)?

Any User Interface Changes (namelist or namelist defaults changes)?
./run_neon.py has the following interface:

|------------------------------------------------------------------|
|---------------------  Instructions  -----------------------------|
|------------------------------------------------------------------|
This is a wrapper script for running CTSM simulation for one or more
neon sites. 

This script will do the following:
    1) Make sure CIME and other dependencies is checked out.
    2) Make the case for the specific neon site(s).
    3) Make changes to the case, for:
        a. AD spinup
        b. SASU spinup
    4) Build and submit the case.

-------------------------------------------------------------------
Instructions for running on Cheyenne/Casper:

load the following into your local environment
    module load python
    ncar_pylib

To remove NPL from your environment on Cheyenne/Casper:
    deactivate

-------------------------------------------------------------------
To see the available options:
    ./run_neon.py --help
-------------------------------------------------------------------

optional arguments:
  -h, --help            show this help message and exit
  --neon_site {ABBY,BARR,BART,BLAN,BONA,CLBJ,CPER,DCFS,DEJU,DELA,DSNY,GRSM,GUAN,HARV,HEAL,JERC,JORN,KONA,KONZ,LAJA,LENO,MLBS,MOAB,NIWO,NOGP,OAES,ONAQ,ORNL,OSBS,PUUM,RMNP,SCBI,SERC,SJER,SOAP,SRER,STEI,STER,TALL,TEAK,TOOL,TREE,UKFS,UNDE,WOOD,WREF,YELL} [{ABBY,BARR,BART,BLAN,BONA,CLBJ,CPER,DCFS,DEJU,DELA,DSNY,GRSM,GUAN,HARV,HEAL,JERC,JORN,KONA,KONZ,LAJA,LENO,MLBS,MOAB,NIWO,NOGP,OAES,ONAQ,ORNL,OSBS,PUUM,RMNP,SCBI,SERC,SJER,SOAP,SRER,STEI,STER,TALL,TEAK,TOOL,TREE,UKFS,UNDE,WOOD,WREF,YELL} ...]
                        4-letter neon site code.
  --surf_dir SURF_DIR   Directory of single point surface dataset. [default:
                        /glade/scratch/negins/single_point/]
  --out_dir OUT_DIR     Directory to write updated single point surface
                        dataset. [default: /glade/scratch/negins/neon_sims/]
  -a, --all             Flag for running all neon sites, instead of selected
                        few sites. [default: False]
  --start_date START_DATE
                        Start date for running CTSM simulation. [default:
                        2018]
  --end_year END_YEAR   End year for running CTSM simulation. [default: 2020]
  --spinup              AD spin-up [default: True]
  --sasu, --matrix      Matrix (SASU) spin-up [default: False]
  -d, --debug           Debug mode will print more information.

Copy link
Contributor

@jedwards4b jedwards4b left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • A case object should be used
  • This should optionally invoke tests instead of cases
  • All of the cases can (and should) use a single executable (case clone and keepexe)
  • I think that if RUN_STARTDATE and RUN_REFDATE were 2018 not 0018 it would be less confusing to users.
  • DATM_YR_END should be based on the available data.

os.chdir('cime/scripts/')
print("Current working directory: {0}".format(os.getcwd()))

execute(['./create_newcase','--case', case_dir,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than calling execute you should use a case object and the cime api here to call the case create directly. There should also be an option to submit tests instead of cases.

@negin513
Copy link
Contributor Author

Based on the feedback received, I rewrote this code using CIME case object and the PR is in #1444.
So I am closing this issue.

@negin513 negin513 closed this Jul 29, 2021
@jedwards4b jedwards4b changed the title [WIP]: NEON Wrapper for bath running neon single point runs [WIP]: NEON Wrapper for batch running neon single point runs Aug 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

2 participants