Copying Pre-Built Code to New Cases?

jskenigson

Jessica S Kenigson
New Member
I'm running many different cases and each time I change the model code, I am currently re-building (with case.build) for each case. I believe this is probably inefficient and unnecessary. If I re-build one case, can I just copy the "bld" directory to the other case directories, or do I need to modify something else as well? Thanks!
 

sacks

Bill Sacks
CSEG and Liaisons
Staff member
Good question! I haven't done this myself, but I'm pretty sure the way to do this – as long as you're using a relatively recent version (CESM2.x) – is the following:
- Choose one case to be the one where you do the builds
- From that case, run ./xmlquery EXEROOT
- In all of your other cases, run ./xmlchange EXEROOT=/path/to/exeroot/from/your/original/case
- Then, whenever you want to do the build, just do it from the original case

As with anything where I'm not 100% sure of the procedure, I'd recommend making some obvious change first to make sure the process works - for example, adding a write statement that writes some message to a log file that you can check in one of the additional cases, to make sure it is truly picking up the executable from the first case.

Feel free to post a reply if this doesn't work for you and I'll help figure out what's wrong.
 
Back
Top