The gen_surfdata_namelist script should have the --namelist option changed to be more general so that it sets more of the filenames in order to make sure they are all consistent, and that you can specify them for testing rather than getting a hardcoded one that includes a creation date.
This came up in the following comment to #3453
It looks like the problem is that you can specify the namelist filename -- but NOT the surface dataset or log file name.
gen_mksurfdata_namelist.py: has this code:
prefix = f"surfdata_{res}_{ssp_rcp_name}_{start_year}_{num_pft}pfts_c{time_stamp}."
if args.namelist_fname is None:
nlfname = f"{prefix}namelist"
else:
nlfname = args.namelist_fname
fsurdat = f"{prefix}nc"
fsurlog = f"{prefix}log"
One way to handle it would be to have "prefix" be the thing that's entered in the command line. And then you'd have something like this:
if args.namelist_prefix is None:
prefix = args.namelist_prefix
else:
prefix = f"surfdata_{res}_{ssp_rcp_name}_{start_year}_{num_pft}pfts_c{time_stamp}."
nlfname = f"{prefix}namelist"
fsurdat = f"{prefix}nc"
fsurlog = f"{prefix}log"
And then the same prefix would be used for all three files. It does mean that the namelist file will have an assumed ".namelist" ending on it -- but I think that would be OK.
I think this approach for the prefix would be the best, but I can image other options as well....
Originally posted by @ekluzek in #3453
The gen_surfdata_namelist script should have the --namelist option changed to be more general so that it sets more of the filenames in order to make sure they are all consistent, and that you can specify them for testing rather than getting a hardcoded one that includes a creation date.
This came up in the following comment to #3453
Originally posted by @ekluzek in #3453