Skip to content

CLM bldnml python script insufficiently checks/sets the clm_start_type #2670

Open

Description

@adrifoster

Brief summary of bug

CLM bldnml assumes default for clm_start_type if your RUN_TYPE is 'startup'

General bug information

CTSM version you are using: ctsm5.2.015

Does this bug cause significantly incorrect results in the model's science? No

Configurations affected: When you use a RUN_TYPE startup and try to use a finidat, but your clm_start_type isn't set from the compset (?)

Details of bug

In running the TRENDY simulations (see here), I was unable to create a clone of my AD spinup to continue the spinup via SASU. I kept getting the error:

ERROR: Command /glade/work/afoster/TRENDY_2024/CTSM_TRENDY/bld/build-namelist failed rc=255
out=
err=Warning : CLM build-namelist::CLMBuildNamelist::setup_logic_initial_conditions() : setting finidat (either explicitly in your user_nl_clm or by doing a hybrid or branch RUN_TYPE)
 is incomptable with using a cold start (by setting CLM_FORCE_COLDSTART=on).
 -- Add -ignore_warnings option to CLM_BLDNML_OPTS to ignore this warning

even though I had actually set CLM_FORCE_COLDSTART to off. This was solved by setting clm_start_type explicitly in the namelist.

This issue seems to arise from a couple things:

  1. in the python bldnml file: the start_type is set here, I suppose assuming that your default value has been previously set? Because I was using a TRENDY 1700 case, this wasn't set seemingly.

The error message was very confusing because I did set my CLM_FORCE_COLDSTART correctly. Something needs to get updated with this logic to avoid this issue.

  1. We should probably set the default for our TRENDY 1700 cases if we want this to be an option/compset

Important details of your setup / configuration so we can reproduce the bug

[Specify anything relevant: the compset, resolution, machine, compiler, any xml or namelist changes, etc. You don't have to repeat anything that you have already noted above.]

compset: I1850Clm50BgcCropCru
machine: derecho
xml changes

./xmlchange DATM_YR_ALIGN=1
./xmlchange DATM_YR_START=1901
./xmlchange DATM_YR_END=1920
./xmlchange CLM_ACCELERATED_SPINUP="sasu"
./xmlchange JOB_WALLCLOCK_TIME="6:00:00"
./xmlchange STOP_OPTION="nyears"
./xmlchange RUN_STARTDATE="0001-01-01"
./xmlchange STOP_N=30
./xmlchange RESUBMIT=9
./xmlchange DOUT_S=TRUE
./xmlchange MOSART_MODE=NULL
./xmlchange CLM_BLDNML_OPTS="-bgc bgc -crop -co2_ppmv 277.75"
./xmlchange CLM_FORCE_COLDSTART=off

user_nl_clm:

do_grossunrep = .false.

! do this for spinup
reseed_dead_plants = .true.

! NDEP - cycle year 1850 for spinup
stream_fldfilename_ndep = '/glade/derecho/scratch/afoster/TRENDY_2024/inputs/ndep/TRENDY2024_Ndep_Monthly_c240725.nc'
model_year_align_ndep = 1850
ndep_taxmode = 'cycle'

! cloning case and using restart file from AD spinup
use_init_interp = .true.
finidat='/glade/derecho/scratch/afoster/TRENDY2024_f09_clm60_ADspinup_20240726-144515/run/TRENDY2024_f09_clm60_ADspinup_20240726-144515.clm2.r.0301-01-01-00000.nc'

use_matrixcn = .true.
use_soil_matrixcn = .true.
``

Activity

  1. added
    nextthis should get some attention in the next week or two. Normally each Thursday SE meeting.
    bugsomething is working incorrectly
    on Jul 29, 2024
  2. slevis-lmwg commented on Jul 30, 2024

    @slevis-lmwg
    Contributor

    I tried two things...
    FAIL: added -ignore_warnings to get past the error, but the case insisted on keeping finidat = ' '
    PASS: changed RUN_TYPE to hybrid; this is a viable workaround for now.

  3. ekluzek commented on Aug 1, 2024

    @ekluzek
    Contributor

    This has three different levels to this from simple to more complex:

    1. Add 1700 year to clm_start_date in the namelist_defaults_overall.xml file
    2. Improve the logic so this won't happen
    3. Redesign the code around this so that's tied more directly to the XML variables rather than this intermediary step
  4. added
    priority: lowBackground task that doesn't need to be done right away.
    and removed
    nextthis should get some attention in the next week or two. Normally each Thursday SE meeting.
    on Aug 1, 2024
  5. adrifoster commented on Sep 6, 2024

    @adrifoster
    ContributorAuthor

    note that @linniahawkins is also having this issue, and she's not running TRENDY 1700 cases...

  6. ekluzek commented on Sep 6, 2024

    @ekluzek
    Contributor

    @adrifoster and @linniahawkins can you point to a case where you see this problem that isn't for 1700? Thanks for pointing this out @adrifoster

  7. added theissue type on Mar 28, 2025
  8. henrique-f commented on Apr 21, 2025

    @henrique-f

    I was having exactly the same issue with compset 1850_DATM%1PT_CLM60%BGC_SICE_SOCN_SROF_SGLC_SWAV.
    It seems that when you are in spin-up mode (CLM_ACCELERATED_SPINUP=on|sasu) clm_start_type defaults to 'cold', which is incompatible with an explicit namelist finidat. This happens despite having explicitly set ./xmlchange RUN_TYPE=startup and ./xmlchange CLM_FORCE_COLDSTART=off.
    Setting up clm_start_type = 'startup' explicitly in user_nl_clm as indicated by @adrifoster resolved the problem over here.

    BTW, I am using ctsm.5.3.033.

  9. ekluzek commented on Jun 29, 2026

    @ekluzek
    Contributor

    Noting that @swensosc ran into this again on the wetlands branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugsomething is working incorrectlypriority: lowBackground task that doesn't need to be done right away.

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions