-
Notifications
You must be signed in to change notification settings - Fork 92
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
restarting issue in FATES - bug solved #165
Comments
Yi- Basically what appears to be happening is that when you restart from within a single case, it does what it should, but when you try to daisy-chain a new case starting from a prior case's restart file, the CLM side of things loads the data properly but the FATES side of things doesn't. I haven't sorted out the solution yet but am guessing that the FATES logic for when to read from restart just isn't working correctly. script below: SRCDIR=$HOME/clmed/ed-clm/ #SETUP_CASE=bareground #####################################
EOF ####################################
finidat='/global/home/users/cdkoven/scratch/bareground_5c5928f/run/bareground_5c5928f.clm2.r.0011-01-01-00000.nc' ` |
Hi Charlie, Yes, that is exactly the issue I met. It is great that you can reproduce the bug. Please let me know if anything I can do to bypass it or fix the bug. Thanks |
I am giving this a "bug" tag. Certainly we want this functionality, and I agree with Charlie's assessment, it seems a matter of making sure the fates restart sequence is activated under the right run specifications. |
it looks like what's happening is that the restart is being read correctly, but then is being overwritten subsequently by a call to force a cold start. the one line change in 8e8dece appears to solve the problem. |
Great ! Thank you Charlie to solve the problem quickly. I will use the new code to have some tests. |
no worries. i'm running the test suite on that commit right now and assuming it doesn't break the normal flow of things i'll issue a PR later. in the meantime probably best to merge that commit into your branch and go from there. |
Sure, I will. Anyway, it is a good news ! |
Thanks Charlie to solve the restarting problem in FATES. It is really helpful ! |
awesome, glad that solved it. |
Merge branch 'restart_bugfix' fix to properly restart when using finidat from a prior case Fixes: NGT-ED Github issue #165 User interface changes?: No Code review: ckoven, rgknox Testing: ckoven: Test suite: ED test suite on lawrencium-lr3 Test baseline: don't have any recent baselines, so didn't run; I can't imagine this would be an issue but please double-check when testing on Yellowstone Test namelist changes: none Test answer changes: ought to be b4b Test summary: all smoke, restart, etc tests pass andre: Test suite: ed - yellowstone gnu, intel, pgi hobart nag Test baseline: ed-clm-7f67d19 Test namelist changes: none Test answer changes: bit for bit Test summary: all tests pass Test suite: clm_short - yellowstone gnu, intel, pgi Test baseline: clm4_5_12_r195 Test namelist changes: none Test answer changes: bit for bit Test summary: all tests pass
closed via #171 |
Summary of Issue:
I am using the compset 'ICLM45ED' and want to spin-up FATES for initialization (e.g., 10 years) and then restart it with the initial files for another 10 years.
I tried two different methods to restart FATES:
I just create one new case. I set resubmit =1 in env_rum.xml , and the restarting results look good. However this approach does not allow me to set different frequencies of output in restarting process. E.g., I want to set yearly output for initialization and then set monthly output for restarting. May I turn on resubmit=1 and set two hist_nhtfrq values in the same user_nl_clm to control two frequencies? It does not seem to work.
I create two different cases and restart manually: one is for initialization and the other one is for restarting . I use 'finidat' variable to locate the restarting files for the restarting case. No matter I use the same or different output frequencies in these two cases, the restarting results do not look correct.
In sum, is there a way to restart FATES with different output frequency for initial and restarting processes?
Expected behavior and actual behavior:
The results from the 1st method: (I set 10 years simulation with yearly output and let resubmit=1 for restarting. It was successfully restarting, but I don't know how to change the output frequency for restarting in one simulation )
Here I am just listing TLAI for comparison, while GPP, ED_biomass etc. have the same issue.
TLAI=
0.06422824,
0.07443716,
0.08802477,
0.1114918,
0.138454,
0.1647888,
0.2127144,
0.2666956,
0.3208471,
0.4176061,
0.526724,
0.634316,
0.8275706,
1.031733,
1.161206,
1.501366,
1.824748,
1.769158,
1.990662,
1.968585,
1.533405,
1.393863,
1.314905,
1.081113,
1.032848,
1.026625,
0.9234439 ;
The results from the 2nd method: (obviously, the restarting results are not correct, although I set yearly output for both of initial and restarting cases)
initial case:
TLAI =
0.06422824,
0.07443716,
0.08802477,
0.1114918,
0.138454,
0.1647888,
0.2127144,
0.2666956,
0.3208471,
0.4176061,
0.526724 ;
restarting case:
TLAI =
0.06422824,
0.07675284,
0.09022225,
0.1129024,
0.137653,
0.1605633,
0.2040686,
0.2528495,
0.3001052,
0.3864403,
0.4834436 ;
Steps to reproduce the problem (should include create_newcase or create_test command along with any user_nl or xml changes):
The script for the first method:
COMPILER=intel
export CESM_inputdir="/global/project/projectdirs/m2422/xuyi/inputdata/km67"
export CESM_dir="/global/project/projectdirs/m2422/xuyi/git/ed-clm/cime/scripts/"
export CASENAME="1x1pt_km67"
export CASEDIR="clm4_5_12_r195_ED_spinup_resubmit"
export CASEROOT=/global/project/projectdirs/m2420/test/case/ed_clm/KM67/${CASEDIR}
rm -rf ${CASEROOT}
cd ${CESM_dir}
./create_newcase -case ${CASEROOT} -res CLM_USRDAT -compset ICLM45ED -mach edison -compiler ${COMPILER}
cd ${CASEROOT}
./xmlchange -file env_mach_pes.xml -id NTASKS_ATM -val 1
./xmlchange -file env_mach_pes.xml -id NTASKS_LND -val 1
./xmlchange -file env_mach_pes.xml -id NTASKS_ICE -val 1
./xmlchange -file env_mach_pes.xml -id NTASKS_OCN -val 1
./xmlchange -file env_mach_pes.xml -id NTASKS_CPL -val 1
./xmlchange -file env_mach_pes.xml -id NTASKS_GLC -val 1
./xmlchange -file env_mach_pes.xml -id NTASKS_ROF -val 1
./xmlchange -file env_mach_pes.xml -id NTASKS_WAV -val 1
./xmlchange -file env_mach_pes.xml -id MAX_TASKS_PER_NODE -val 1
./xmlchange -file env_mach_pes.xml -id TOTALPES -val 1
./xmlchange -file env_build.xml -id EXEROOT -val ${CASEROOT}/bld
./xmlchange -file env_build.xml -id CESMSCRATCHROOT -val ${CASEROOT}/SCRATCH
./xmlchange -file env_run.xml -id STOP_N -val 10
./xmlchange -file env_run.xml -id STOP_OPTION -val nyears
./xmlchange -file env_run.xml -id RUN_STARTDATE -val '2002-01-01'
./xmlchange -file env_run.xml -id DATM_CLMNCEP_YR_START -val 2002
./xmlchange -file env_run.xml -id DATM_CLMNCEP_YR_END -val 2004
./xmlchange -file env_run.xml -id DIN_LOC_ROOT -val ${CESM_inputdir}
./xmlchange -file env_run.xml -id RUNDIR -val ${CASEROOT}/run
./xmlchange -file env_run.xml -id RESUBMIT -val 1
./xmlchange -file env_run.xml -id DIN_LOC_ROOT_CLMFORC -val ${CESM_inputdir}/atm/datm7
./xmlchange -file env_run.xml -id CLM_USRDAT_NAME -val ${CASENAME}
./xmlchange -file env_run.xml -id ATM_NCPL -val 24
./xmlchange -file env_run.xml -id DOUT_S_SAVE_INTERIM_RESTART_FILES -val TRUE
./xmlchange -file env_run.xml -id DOUT_S -val TRUE
./xmlchange -file env_run.xml -id DOUT_S_ROOT -val ${CASEROOT}/restarts
./xmlchange -file env_run.xml -id RUNDIR -val ${CASEROOT}/run
./xmlchange -file env_run.xml -id PIO_DEBUG_LEVEL -val 0
./xmlchange -file env_run.xml -id PIO_TYPENAME -val 'netcdf'
./xmlchange -file env_run.xml -id DATM_CLMNCEP_YR_ALIGN -val 2002
cat >> user_nl_clm << EOF
fsurdat = '${CESM_inputdir}/lnd/clm2/surfdata_map/surfdata_${CASENAME}_simyr2000.nc'
hist_nhtfrq = -8760
paramfile = '/global/project/projectdirs/m2422/xuyi/inputdata/km67/lnd/clm2/paramdata/clm_params_ed.c160824.nc'
EOF
cat >> user_nl_datm << EOF
taxmode = 'cycle','cycle'
EOF
cd ${CASEROOT}
./case.setup
./case.clean_build
./case.build
The scripts for the second method:
Initial case:
COMPILER=intel
export CESM_inputdir="/global/project/projectdirs/m2422/xuyi/inputdata/km67"
export CESM_dir="/global/project/projectdirs/m2422/xuyi/git/ed-clm/cime/scripts/"
export CASENAME="1x1pt_km67"
export CASEDIR="clm4_5_12_r195_ED_spinup"
export CASEROOT=/global/project/projectdirs/m2420/test/case/ed_clm/KM67/${CASEDIR}
rm -rf ${CASEROOT}
cd ${CESM_dir}
./create_newcase -case ${CASEROOT} -res CLM_USRDAT -compset ICLM45ED -mach edison -compiler ${COMPILER}
cd ${CASEROOT}
./xmlchange -file env_mach_pes.xml -id NTASKS_ATM -val 1
./xmlchange -file env_mach_pes.xml -id NTASKS_LND -val 1
./xmlchange -file env_mach_pes.xml -id NTASKS_ICE -val 1
./xmlchange -file env_mach_pes.xml -id NTASKS_OCN -val 1
./xmlchange -file env_mach_pes.xml -id NTASKS_CPL -val 1
./xmlchange -file env_mach_pes.xml -id NTASKS_GLC -val 1
./xmlchange -file env_mach_pes.xml -id NTASKS_ROF -val 1
./xmlchange -file env_mach_pes.xml -id NTASKS_WAV -val 1
./xmlchange -file env_mach_pes.xml -id MAX_TASKS_PER_NODE -val 1
./xmlchange -file env_mach_pes.xml -id TOTALPES -val 1
./xmlchange -file env_build.xml -id EXEROOT -val ${CASEROOT}/bld
./xmlchange -file env_build.xml -id CESMSCRATCHROOT -val ${CASEROOT}/SCRATCH
./xmlchange -file env_run.xml -id STOP_N -val 10
./xmlchange -file env_run.xml -id STOP_OPTION -val nyears
./xmlchange -file env_run.xml -id RUN_STARTDATE -val '2002-01-01'
./xmlchange -file env_run.xml -id DATM_CLMNCEP_YR_START -val 2002
./xmlchange -file env_run.xml -id DATM_CLMNCEP_YR_END -val 2004
./xmlchange -file env_run.xml -id DIN_LOC_ROOT -val ${CESM_inputdir}
./xmlchange -file env_run.xml -id RUNDIR -val ${CASEROOT}/run
./xmlchange -file env_run.xml -id DIN_LOC_ROOT_CLMFORC -val ${CESM_inputdir}/atm/datm7
./xmlchange -file env_run.xml -id CLM_USRDAT_NAME -val ${CASENAME}
./xmlchange -file env_run.xml -id ATM_NCPL -val 24
./xmlchange -file env_run.xml -id DOUT_S_SAVE_INTERIM_RESTART_FILES -val TRUE
./xmlchange -file env_run.xml -id DOUT_S -val TRUE
./xmlchange -file env_run.xml -id DOUT_S_ROOT -val ${CASEROOT}/restarts
./xmlchange -file env_run.xml -id RUNDIR -val ${CASEROOT}/run
./xmlchange -file env_run.xml -id PIO_DEBUG_LEVEL -val 0
./xmlchange -file env_run.xml -id PIO_TYPENAME -val 'netcdf'
./xmlchange -file env_run.xml -id DATM_CLMNCEP_YR_ALIGN -val 2002
cat >> user_nl_clm << EOF
fsurdat = '${CESM_inputdir}/lnd/clm2/surfdata_map/surfdata_${CASENAME}_simyr2000.nc'
hist_nhtfrq = -8760
paramfile = '/global/project/projectdirs/m2422/xuyi/inputdata/km67/lnd/clm2/paramdata/clm_params_ed.c160824.nc'
EOF
cat >> user_nl_datm << EOF
taxmode = 'cycle','cycle'
EOF
cd ${CASEROOT}
./case.setup
./case.clean_build
./case.build
The scripts for the second method:
the restarting case:
It is the same script as initial case, but the only difference is that I add restarting path in user_nl_clm as follows:
finidat = '${CASEROOT}/CaseSpin/clm4_5_12_r195_ED_spinup.clm2.r.2012-01-01-00000.nc'
What is the changeset ID of the code, and the machine you are using:
Machine: Edison
have you modified the code? If so, it must be committed and available for testing:
Screen output or output files showing the error message and context:
The text was updated successfully, but these errors were encountered: