Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Pointing to a custom namelist file for a given run

jhollowed

New Member
I have created a CIME case, which has been setup and built. As I understand, the namelist files user_nl_xxxx can be edited post-build. If I want to vary a namelist setting X across several runs, I can do that by

1) Running CESM
2) editing X=... in user_nl_xxxx
3) Run again

Two problems...

1) this will overwrite the output of the first run unless I manually intervene
2) I cannot do this in the event that jobs 1) and 3) are being submitted to a queueing system, unless I awkwardly wait to edit user_nl_xxxx until after job 1) has begun running

It would make sense if a particular case build were *not* uniquely associated with a particular namelist file and output directory, so that runs with new namelist choices can be executed without needing to either (a) duplicate the entire case or (b) manually supervise the jobs and move files around

Is there a way to specify at execution custom namelist file locations and desired output location of a run? As far as I can tell, the expectation that the namelist files take precisely the form user_nl_xxxx, where xxxx is a known component, is hard-coded, as well as the location of the output directory. Though the ability to "plug and play" with different user_nl_xxxx files seems like a common use-case. Specifically, I am trying to do this with user_nl_cam.
 

dbailey

CSEG and Liaisons
Staff member
This is an interesting suggestion. For those who do production runs, the convention is to make copies of the user_nl files with run years attached to them. So, for a long PI run could be copying user_nl_cam as user_nl_cam_1000_1200 or something. I guess we generally try to limit namelist changes within a particular case to history frequency changes or potentially changing pertlim. Ideally you would have a pair of runs where one is the control and the other is the sensitivity run. What sort of things are you trying to change in user_nl_cam on the fly?
 

jhollowed

New Member
This is an interesting suggestion. For those who do production runs, the convention is to make copies of the user_nl files with run years attached to them. So, for a long PI run could be copying user_nl_cam as user_nl_cam_1000_1200 or something. I guess we generally try to limit namelist changes within a particular case to history frequency changes or potentially changing pertlim. Ideally you would have a pair of runs where one is the control and the other is the sensitivity run. What sort of things are you trying to change in user_nl_cam on the fly?
Hmm, what do you mean by "copying"? Are you saying there is a way to tell CESM to read CAM namelist settings from user_nl_cam_1000_1200, rather than user_nl_cam? Or are you saying that namelist settings could be stored in that file before being manually renamed to user_nl_cam for the run?

I am trying to compare output of a particular model under varying diffusion settings, varying number of vertical levels, things like that. I can do those varying runs manually in sequence, editing user_nl_cam for each one. Or, I can submit a bunch of jobs all at once, all pointing to the same executable, if each of those jobs can somehow know to look at its "own" namelist file. Certainly the latter is highly preferable.

Is something like that possible?
 

jhollowed

New Member
Hmm, what do you mean by "copying"? Are you saying there is a way to tell CESM to read CAM namelist settings from user_nl_cam_1000_1200, rather than user_nl_cam? Or are you saying that namelist settings could be stored in that file before being manually renamed to user_nl_cam for the run?

I am trying to compare output of a particular model under varying diffusion settings, varying number of vertical levels, things like that. I can do those varying runs manually in sequence, editing user_nl_cam for each one. Or, I can submit a bunch of jobs all at once, all pointing to the same executable, if each of those jobs can somehow know to look at its "own" namelist file. Certainly the latter is highly preferable.

Is something like that possible?
To clarify, I'm not trying to change anything on the fly. If that's not clear. I only want to be able to tell CESM, at runtime, to look for namelist settings in a particular user-defined file.
 

jhollowed

New Member
I just discovered the clone_case utility. This is likely good enough to do what I'm talking about. It is a bit clunky though, since every file in every one of my cloned cases will be identical, except for the user_nl_xxxx. I suppose this isn't such a big deal since the case directories are only ~8MB.
 

dbailey

CSEG and Liaisons
Staff member
Ok. I misunderstood earlier. The clone_case utility is meant for exactly that purpose. For example we create a number of ensemble members and the only change between each case would be initial files and/or the pertlim parameter.
 

jhollowed

New Member
Ok. I misunderstood earlier. The clone_case utility is meant for exactly that purpose. For example we create a number of ensemble members and the only change between each case would be initial files and/or the pertlim parameter.
Great, I'm using it now and it's working well, thanks!
 
Top