-
Notifications
You must be signed in to change notification settings - Fork 207
Multi instance component functionality
The CIME coupling infrastructure has the capability to run multiple component instances under one model executable. The only caveat to this usage is that if N multiple instances of any one active component is used, then N multiple instances of ALL active components are required. More details are discussed below. The primary motivation for this development was to be able to run an ensemble Kalman-Filter for data assimilation and parameter estimation (e.g. UQ). However, it also provides you with the ability to run a set of experiments within a single model executable where each instance can have a different namelist, and have all the output go to one directory.
In the following an F compset will be used as an illustration. Utilizing the multiple instance code involves the following steps:
1. create the case
> create_newcase -case Fmulti -compset F -res ne30_g16
> cd Fmulti
2. Lets assume the following out of the box pe-layout
NTASKS(ATM)=128, NTHRDS(ATM)=1, ROOTPE(ATM)=0, NINST(ATM)=1
NTASKS(LND)=128, NTHRDS(LND)=1, ROOTPE(LND)=0, NINST(LND)=1
NTASKS(ICE)=128, NTHRDS(ICE)=1, ROOTPE(ICE)=0, NINST(ICE)=1
NTASKS(OCN)=128, NTHRDS(OCN)=1, ROOTPE(OCN)=0, NINST(OCN)=1
NTASKS(GLC)=128, NTHRDS(GLC)=1, ROOTPE(GLC)=0, NINST(GLC)=1
NTASKS(WAV)=128, NTHRDS(WAV)=1, ROOTPE(WAV)=0, NINST(WAV)=1
NTASKS(CPL)=128, NTHRDS(CPL)=1, ROOTPE(CPL)=0
$CASEROOT
:
./xmlchange NINST_ATM=2
./xmlchange NINST_LND=2
./xmlchange NINST_ICE=2
./xmlchange NINST_ROF=2
./xmlchange NINST_OCN=2
3. Setup the case
> ./case.setup
env_mach_pes.xml
file will result in the following user_nl_*
files in $CASEROOT
user_nl_cam_0001, user_nl_cam_0002
user_nl_cice_0001, user_nl_cice_0002
user_nl_clm_0001, user_nl_clm_0002
user_nl_rtm_0001, user_nl_rtm_0002
user_nl_docn_0001, user_nl_docn_0002
user_nl_cpl
*_in_*
files and *txt*
files in $CASEROOT/CaseDocs:
atm_in_0001, atm_in_0002
docn.streams.txt.prescribed_0001, docn.streams.txt.prescribed_0002
docn_in_0001, docn_in_0002
docn_ocn_in_0001, docn_ocn_in_0002
drv_flds_in, drv_in
ice_in_0001, ice_in_0002
lnd_in_0001, lnd_in_0002
rof_in_0001, rof_in_0002
The namelist for each component instance can be modified by changing the corresponding user_nl_xxx_NNNN file for that component instance. Modifying the user_nl_cam_0002 will result in the namelist changes you put in to be active ONLY for instance 2 of CAM. To change the DOCN stream txt file instance 0002, you should place a copy of docn.streams.txt.prescribed_0002
in $CASEROOT
with the name user_docn.streams.txt.prescribed_0002
and modify it accordlingly.
It is also important to stress the following points:
- Different component instances can ONLY differ by differences in namelist settings - they are ALL using the same model executable.
- Only 1 coupler component is supported currently in multiple instance implementation.
-
user_nl_*
files once they are created by case.setup ARE NOT removed by calling caes.setup -clean. - In general, you should run multiple instances concurrently (the default setting in
env_mach_pes.xml
). The serial setting is only for EXPERT USERS in upcoming development code implementations.