CESM icon indicating copy to clipboard operation
CESM copied to clipboard

Changing RUN_REFCASE after build leaves old refdir in Buildconf/refcase.input_data_list

Open drmikemills opened this issue 3 years ago • 2 comments

I am using release-cesm2.1.3, and created a case this way:

/glade/u/home/cmip6/cesm_tags/release-cesm2.1.3/cime/scripts/create_newcase --compset FWmaHIST --res f19_f19_mg17 --case /glade/work/mmills/case/f.e21.FWmaHIST.f19_f19_mg17.ISAMIP-HErSEA-Pin-Spinup-WACCM-MA-2deg.001 --run-unsupported

I then changed the starting date:

xmlchange RUN_STARTDATE=1980-01-01,RUN_REFDATE=1980-01-01

I tried building, but it failed because there is no 1980 refdir in the input data for the default reference case (b.e21.BWmaHIST.f19_g17.CMIP6-historical-WACCM-MA-2deg.001). Then I realized that I needed a different reference case anyway:

xmlchange RUN_REFCASE=f.e21.FWmaHIST_BGC.f19_f19_mg17.CMIP6-AMIP-WACCM-MA-2deg.001

This case does have a 1980 refdir in the input data. I tried building again, and got an error related to the original reference case:

OSError: [Errno 13] Permission denied: '/glade/p/cesmdata/cseg/inputdata/cesm2_init/b.e21.BWmaHIST.f19_g17.CMIP6-historical-WACCM-MA-2deg.001/1980-01-01.tmp’

A recursive grep reveals that the original reference case is still referenced in Buildconf/refcase.input_data_list:

refdir = /glade/p/cesmdata/cseg/inputdata/cesm2_init/b.e21.BWmaHIST.f19_g17.CMIP6-historical-WACCM-MA-2deg.001/1980-01-01/

I manually edited this file to update the reference case to f.e21.FWmaHIST_BGC.f19_f19_mg17.CMIP6-AMIP-WACCM-MA-2deg.001, and now it builds.

This seems like a bug, if using xmlchange to change the RUN_REFCASE leaves remnants of the old reference case that prevent building. The error message does not give the user many clues for remedying this. Is the user intended to do a clean build to fix this, or is this a bug?

drmikemills avatar Mar 21 '22 17:03 drmikemills

@drmikemills I think that the only issue is that after you change RUN_REFCASE you need to run ./preview_namelists to update the refcase information in Buildconf

jedwards4b avatar Mar 21 '22 19:03 jedwards4b

Thanks, Jim. I have not tested this. I believe that case.build runs preview_namelists, but perhaps not until after it tries to load the restart directory. Could it be changed to run preview_namelists first?

drmikemills avatar Mar 22 '22 21:03 drmikemills

Closing this as it's old. Also the change in order if done would need to go into cime rather than here. Also in current development we aren't using REFCASES right now...

ekluzek avatar May 03 '24 16:05 ekluzek

I think that this may still be an issue when we start using refcases again.

On Fri, May 3, 2024, 10:57 AM Erik Kluzek @.***> wrote:

Closing this as it's old. Also the change in order if done would need to go into cime rather than here. Also in current development we aren't using REFCASES right now...

— Reply to this email directly, view it on GitHub https://github.com/ESCOMP/CESM/issues/206#issuecomment-2093398235, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABOXUGBSQZRDBVMWPNXAW3LZAO6WXAVCNFSM5RINLKEKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMBZGMZTSOBSGM2Q . You are receiving this because you commented.Message ID: @.***>

jedwards4b avatar May 04 '24 13:05 jedwards4b