Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
adrifoster opened this issue Jul 29, 2024 · 4 comments
Open
Labels
bug something is working incorrectly priority: low Background task that doesn't need to be done right away.

Comments

@adrifoster
Copy link
Collaborator

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.
``
@ekluzek ekluzek added next this should get some attention in the next week or two. Normally each Thursday SE meeting. bug something is working incorrectly labels Jul 29, 2024
@ekluzek ekluzek added this to the ctsm6.0.0 (code freeze) milestone Jul 29, 2024
@slevis-lmwg
Copy link
Contributor

slevis-lmwg commented Jul 30, 2024

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.

@ekluzek
Copy link
Collaborator

ekluzek commented Aug 1, 2024

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

@ekluzek ekluzek added priority: low Background task that doesn't need to be done right away. and removed next this should get some attention in the next week or two. Normally each Thursday SE meeting. labels Aug 1, 2024
@adrifoster
Copy link
Collaborator Author

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

@ekluzek
Copy link
Collaborator

ekluzek commented Sep 6, 2024

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something is working incorrectly priority: low Background task that doesn't need to be done right away.
Projects
None yet
Development

No branches or pull requests

3 participants