Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

branch run examples

TCNasa

Tom Caldwell
Member
Does anyone know of any examples for CESM2.2 of how to setup and restart "branch" runs.
I need a simple direct example, if that is available. Thanks.
 

katec

CSEG and Liaisons
Staff member
Hi Tom,
I'm not sure exactly what you mean by example here, but the way to set up a branch run is:
./create_newcase [all of your case info here]
cd /directory/to/case
./case.setup
./xmlchange RUN_TYPE='branch'

You will probably need to set RUN_REFCASE and RUN_REFDATE to the case you are branching from and the date for the restart files. Then copy the restart files into the run directory for your branch run.

There's a lot of specific help in this year's tutorial materials here: Hybrid, Branch and Startup — CESM Tutorial
 

TCNasa

Tom Caldwell
Member
Thanks. I have a related question. When running preview_namelists to set up the branch run, I get an error when prestaging the start data. Any idea what I should do for this?:
ERROR: Command /CERES/sarb/caldwell/CESM2.2/components/clm/bld/build-namelist failed rc=2
out=
err=Can't locate XML/LibXML.pm in @INC (@INC contains: /CERES/sarb/caldwell/CESM2.2/components/clm/bld /CERES/sarb/caldwell/CESM2.2/components/clm/bld /CERES/sarb/caldwell/CESM2.2/cime/scripts/Tools/../../utils/perl5lib /CERES/sarb/caldwell/CESM2.2/components/clm/bld /CERES/lib/Perl_Lib /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /CERES/sarb/caldwell/CESM2.2/cime/scripts/Tools/../../utils/perl5lib/Config/SetupTools.pm line 5.


BEGIN failed--compilation aborted at /CERES/sarb/caldwell/CESM2.2/cime/scripts/Tools/../../utils/perl5lib/Config/SetupTools.pm line 5.
 

TCNasa

Tom Caldwell
Member
I'm reposting to include more lines:

Thanks. I have a related question. When running preview_namelists to set up the branch run, I get an error when prestaging the start data. Any idea what I should do for this?:

Creating component namelists

2023-07-13 14:06:41 atm

Calling /CERES/sarb/caldwell/CESM2.2/components/cam//cime_config/buildnml

...calling cam buildcpp to set build time options

CAM namelist copy: file1 /CERES/sarb/caldwell/CESM2.2/cime/scripts/July13-branch/Buildconf/camconf/atm_in file2 /CERES/sarb/caldwell/CESM2.2/cime/output/July13-branch/run/atm_in

2023-07-13 14:06:41 lnd

Calling /CERES/sarb/caldwell/CESM2.2/components/clm//cime_config/buildnml

WARNING: the start file being used for a multi-instance case is a single instance: July13-base.clm2.r.20100101-00000.nc

ERROR: Command /CERES/sarb/caldwell/CESM2.2/components/clm/bld/build-namelist failed rc=2
out=
err=Can't locate XML/LibXML.pm in @INC (@INC contains: /CERES/sarb/caldwell/CESM2.2/components/clm/bld /CERES/sarb/caldwell/CESM2.2/components/clm/bld /CERES/sarb/caldwell/CESM2.2/cime/scripts/Tools/../../utils/perl5lib /CERES/sarb/caldwell/CESM2.2/components/clm/bld /CERES/lib/Perl_Lib /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at /CERES/sarb/caldwell/CESM2.2/cime/scripts/Tools/../../utils/perl5lib/Config/SetupTools.pm line 5.


BEGIN failed--compilation aborted at /CERES/sarb/caldwell/CESM2.2/cime/scripts/Tools/../../utils/perl5lib/Config/SetupTools.pm line 5.
Compilation failed in require at /CERES/sarb/caldwell/CESM2.2/components/clm/bld/CLMBuildNamelist.pm line 410.
 

TCNasa

Tom Caldwell
Member
I think it was an issue with setting paths correctly so that CESM could find what it needed. I don't know what hardware or operating system you are using but I have to set a lot of paths manually (which I just put into a csh run script). My statements look like these:

source /SPG_ops/utils/CERES/TOOLKIT/scf_toolkit5.2.20v1-x86_64/environment.csh

setenv PATH "/homedir/tecaldwe/openmpi/bin:${PATH}"
setenv CFLAGS "-I/homedir/tecaldwe/openmpi/include ${CFLAGS}"
setenv LDFLAGS "-L/homedir/tecaldwe/openmpi/lib ${LDFLAGS}"
setenv LD_LIBRARY_PATH "/homedir/tecaldwe/openmpi/lib:${LD_LIBRARY_PATH}"

rehash

setenv NETCDF_PATH /SPG_ops/utils/CERES/TOOLKIT/scf_toolkit5.2.20v1-x86_64
setenv LDFLAGS "-L/SPG_ops/utils/CERES/TOOLKIT/scf_toolkit5.2.20v1-x86_64/lib -lhdf5_hl -lhdf5 -lhdf5hl_fortran -lhdf5_fortran -lz -lsz -ldl -L/homedir/tecaldwe/lapack/src/lapack-3.10.0 -llapack -lrefblas"
setenv TMPDIR /CERES/sarb/caldwell/CESM2.2/cime/scripts/tmp

I'm not sure exactly which paths are your problem but it seems like your CESM can't find what it needs for the build. Hence, the "Can't locate" errors. You might need to ask your sys admins for the correct paths to Perl libraries and such also to use for building your case.
 

Mingjun

Mingjun
New Member
I think it was an issue with setting paths correctly so that CESM could find what it needed. I don't know what hardware or operating system you are using but I have to set a lot of paths manually (which I just put into a csh run script). My statements look like these:

source /SPG_ops/utils/CERES/TOOLKIT/scf_toolkit5.2.20v1-x86_64/environment.csh

setenv PATH "/homedir/tecaldwe/openmpi/bin:${PATH}"
setenv CFLAGS "-I/homedir/tecaldwe/openmpi/include ${CFLAGS}"
setenv LDFLAGS "-L/homedir/tecaldwe/openmpi/lib ${LDFLAGS}"
setenv LD_LIBRARY_PATH "/homedir/tecaldwe/openmpi/lib:${LD_LIBRARY_PATH}"

rehash

setenv NETCDF_PATH /SPG_ops/utils/CERES/TOOLKIT/scf_toolkit5.2.20v1-x86_64
setenv LDFLAGS "-L/SPG_ops/utils/CERES/TOOLKIT/scf_toolkit5.2.20v1-x86_64/lib -lhdf5_hl -lhdf5 -lhdf5hl_fortran -lhdf5_fortran -lz -lsz -ldl -L/homedir/tecaldwe/lapack/src/lapack-3.10.0 -llapack -lrefblas"
setenv TMPDIR /CERES/sarb/caldwell/CESM2.2/cime/scripts/tmp

I'm not sure exactly which paths are your problem but it seems like your CESM can't find what it needs for the build. Hence, the "Can't locate" errors. You might need to ask your sys admins for the correct paths to Perl libraries and such also to use for building your case.

Thank you very much for your prompt response. I am attempting to modify the env. Best wishes.
 
Top