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

Setting use_init_interp in a branch case

AndrewY

New Member
Hello everyone,

I've been trying to launch a branch run using CESM2.1.3 and FHIST compset with modified surface dataset (fsurdat) and land use timseries (flanduse_timeseries). I tried this before using CESM2.1.0 but failed due to the error mentioned in this following thread:


It said that the error checking on use_init_interp had been fixed in release-clm5.0.28. The CESM2.1.3 I'm using now includes a CLM version of release-clm5.0.30 so I think that should resolve the problem. However, it turned out that the setting of use_init_interp didn't work this time. I have tried setting use_init_interp= .true. by either claiming that in user_nl_clm or by the command line "./xmlchange CLM_NAMELIST_OPTS=use_init_interp=.true.". But the running process still crushed and the cesm.log reads like this:

check_dim ERROR: mismatch of input dimension 62100 with expected value
62040 for variable landunit
Did you mean to set use_init_interp = .true. in user_nl_clm?
(Setting use_init_interp = .true. is needed when doing a
transient run using an initial conditions file from a non-transient run,
or a non-transient run using an initial conditions file from a transient run,
or when running a resolution or configuration that differs from the initial conditions.)

I wonder why the model didn't recognize the updated setting for use_init_interp. Has anyone encountered this problem before?


Thank you!
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
If I understand how your case is setup, you can't do a branch run using a surface dataset/landuse file that is different from the reference case you are branching from. You would need to do a hybrid run.
 

AndrewY

New Member
Hi Keith,

Thanks for your reply! The thing is I did manage to do a branch run before using a modified surface dataset (I changed the fraction of crop land unit in several grids). This time I would like to change the fraction of some other land unit types but failed.

Do you mean that CESM doesn't support a branch run with modified surface datasets and the modified ones might interfere with the model climate?
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
You can't do a branch run using a surface dataset that is different from the run you branched from. There is some information in the env_run.xml in your case directory that explains the types of things you can change in a branch run:

-- In a branch run, all components are initialized using a consistent
set of restart files from a previous run (determined by the
RUN_REFCASE and RUN_REFDATE variables in env_run.xml). The case name
is generally changed for a branch run, although it does not have to
be. In a branch run, setting RUN_STARTDATE is ignored because the
model components obtain the start date from their restart datasets.
Therefore, the start date cannot be changed for a branch run. This is
the same mechanism that is used for performing a restart run (where
CONTINUE_RUN is set to TRUE in the env_run.xml) Branch runs are
typically used when sensitivity or parameter studies are required, or
when settings for history file output streams need to be modified
while still maintaining bit-for-bit reproducibility. Under this
scenario, the new case is able to produce an exact bit-for-bit restart
in the same manner as a continuation run IF no source code or
component namelist inputs are modified. All models use restart files
to perform this type of run. RUN_REFCASE and RUN_REFDATE are required
for branch runs.
To set up a branch run, locate the restart tar file or restart
directory for RUN_REFCASE and RUN_REFDATE from a previous run, then
place those files in the RUNDIR directory.

The branch run is designed to be bit for bit.
Hope this clarifies things.
 

leelay

leelay
New Member
You can't do a branch run using a surface dataset that is different from the run you branched from. There is some information in the env_run.xml in your case directory that explains the types of things you can change in a branch run:

-- In a branch run, all components are initialized using a consistent
set of restart files from a previous run (determined by the
RUN_REFCASE and RUN_REFDATE variables in env_run.xml). The case name
is generally changed for a branch run, although it does not have to
be. In a branch run, setting RUN_STARTDATE is ignored because the
model components obtain the start date from their restart datasets.
Therefore, the start date cannot be changed for a branch run. This is
the same mechanism that is used for performing a restart run (where
CONTINUE_RUN is set to TRUE in the env_run.xml) Branch runs are
typically used when sensitivity or parameter studies are required, or
when settings for history file output streams need to be modified
while still maintaining bit-for-bit reproducibility. Under this
scenario, the new case is able to produce an exact bit-for-bit restart
in the same manner as a continuation run IF no source code or
component namelist inputs are modified. All models use restart files
to perform this type of run. RUN_REFCASE and RUN_REFDATE are required
for branch runs.
To set up a branch run, locate the restart tar file or restart
directory for RUN_REFCASE and RUN_REFDATE from a previous run, then
place those files in the RUNDIR directory.

The branch run is designed to be bit for bit.
Hope this clarifies things.
Hi Keith,
I've encountered the similar problem. So the question is:
What should I do if I want to do a simulation in which the landuse is the only difference?

For example, I have run B1850 for several years and get restart files. These restart files are rfiles.
Then I want to compare what would happen if I only change the landuse, for example erase forest in the map(by set PCT_NAT_PFT(0,:,:) = 100, all bareland, and nothing else is changed).
So the method I use is to do two sims.
The first one is changing nothing and simulate for 50 years as branch A.
The second one is ONLY changing the landuse file('fsurdat') and keep everything else the same. Running the second one as branch B.
A and B use the same rfiles.

And I got similar ERROR with only the difference is ERROR is about pft value:
" check_dim ERROR: mismatch of input dimension 58386 with expected value
58281 for variable pft
Did you mean to set use_init_interp = .true. in user_nl_clm?
(Setting use_init_interp = .true. is needed when doing a
transient run using an initial conditions file from a non-transient run,
or a non-transient run using an initial conditions file from a transient run,
or when running a resolution or configuration that differs from the initial conditions.)"

I use the same way as Andrew and the result is the same too - nothing changes even the ERROR.
So back to the origin.
What should I do if I want to see what happened when the ONLY difference is landuse?

Sincerely thanks!
 

leelay

leelay
New Member
You can't do a branch run using a surface dataset that is different from the run you branched from. There is some information in the env_run.xml in your case directory that explains the types of things you can change in a branch run:

-- In a branch run, all components are initialized using a consistent
set of restart files from a previous run (determined by the
RUN_REFCASE and RUN_REFDATE variables in env_run.xml). The case name
is generally changed for a branch run, although it does not have to
be. In a branch run, setting RUN_STARTDATE is ignored because the
model components obtain the start date from their restart datasets.
Therefore, the start date cannot be changed for a branch run. This is
the same mechanism that is used for performing a restart run (where
CONTINUE_RUN is set to TRUE in the env_run.xml) Branch runs are
typically used when sensitivity or parameter studies are required, or
when settings for history file output streams need to be modified
while still maintaining bit-for-bit reproducibility. Under this
scenario, the new case is able to produce an exact bit-for-bit restart
in the same manner as a continuation run IF no source code or
component namelist inputs are modified. All models use restart files
to perform this type of run. RUN_REFCASE and RUN_REFDATE are required
for branch runs.
To set up a branch run, locate the restart tar file or restart
directory for RUN_REFCASE and RUN_REFDATE from a previous run, then
place those files in the RUNDIR directory.

The branch run is designed to be bit for bit.
Hope this clarifies things.
By using:
./xmlchange RUN_TYPE=hybrid

Same ERROR still shows.

This really makes me confused.

Tahnk you very much!
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
If the number of subgrid types (e.g., pfts) doesn't agree between the surface dataset and the initial (restart) file you are using, then you would need to set use_init_interp=.true. so that the initial file is interpolated to the subgrid configuration of the surface dataset. And you would need to do a startup run or a hybrid run. I haven't tested a hybrid run in this case but I think that would work.
 

leelay

leelay
New Member
If the number of subgrid types (e.g., pfts) doesn't agree between the surface dataset and the initial (restart) file you are using, then you would need to set use_init_interp=.true. so that the initial file is interpolated to the subgrid configuration of the surface dataset. And you would need to do a startup run or a hybrid run. I haven't tested a hybrid run in this case but I think that would work.
Hi, Keith. Thank you for the kind reminding.

I understand the interpolation needed to harmonize the restart file and the cahnged input. So the question is:
In a parameter control experiment, is it OK to use HYBRID run?
As the tutorial shows, the BRANCH run assures the bit-by-bit precision while the hybrid does not.
So if the hybrid run changes something, can such a run still be treated as a parameter control experiment?

Thanks a lot !
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
You don't really have a choice other than a hybrid or startup run. The model can't start with an initial file that has a subgrid configuration that is different from the new surface dataset without interpolation of the initial file. You can make the hybrid similar to a branch by only changing the land initial file and leaving the restarts for the other components as is. There will be a period of disequilibrium while the land and atmosphere and other components adjust to the changed land surface. Then you can compare the perturbed and control experiments to see what the effects are.
 
Top