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

MOM_parameter_doc.all

ezaron

Ed Zaron
New Member
Hi MOM6 enthusiasts:

I have been trying to modify a MOM_input by comparing my MOM_input file with MOM6-examples/ocean_only/global_ALE/layers/MOM_input.

I am studying differences between MOM_parameter_doc.all produced by runs from the two setups. In order to make this feasible, I strip the comments from MOM_parameter_doc.all and then pass the result through sort -n.

By doing this, I had hoped to be able to diff the two versions of the MOM_parameter_doc.all file and see what parameters are set to different values. Instead, when I look through the two MOM_parameter_doc.all files, I see many parameters present in one file which are not present in the other file. The MOM_parameter_doc.all files are produced by fresh runs of the different setups using the same MOM6 executable. I am attaching both versions of the sorted MOM_parameter_doc.all files.

Based on the name of the file, I had expected to find a comprehensive list of all parameter values at runtime, but this doesn't appear to be the case. I wonder if someone here can explain what is in the MOM_parameter_doc.all file?

All the best,

Ed
 

Attachments

  • MOM_input_1.txt
    7.6 KB · Views: 1
  • MOM_input_2.txt
    37.6 KB · Views: 1

marshallward

Marshall Ward
New Member
For better or worse, the parameter file is a conditional product. For example, if you turn off a feature at a higher level, then all of the lower level parameters completely disappear. I think one example of this in your file is `DO_GEOTHERMAL`. It is also why the ordering is something we track in our regression testing, and your `sort` adds more confusion to the `diff` output.

Much of this is by design, but everything is open to discussion. We've devoted most of our last few GFDL meetings to the nuances of MOM_input, so this might be a good time to raise the topic.
 

ezaron

Ed Zaron
New Member
Aha. Thanks a lot. So if I don't sort the MOM_parameter_doc.all file, the functional groupings will be preserved?

Would you recommend I diff on the original MOM_parameter_doc.all files?

-Ed
 

marshallward

Marshall Ward
New Member
Yes, that's usually the best method, but let us know how you go. We try to minimize reordering as much as possible, but they can get shuffled around sometimes. (At least it is always intentional!)
 

ezaron

Ed Zaron
New Member
Thanks, Marshall.

There are major stanzas missing in my MOM_parameter_doc.all (from a case which does not completely initialize and run) compared to a reference case (which does run to completion). I assume MOM_parameter_doc.all is written during the initialization phase, as each code component reads its parameters. Is this correct? In other words, will sections of the MOM_parameter_doc.all file be missing if the code fails to init, or does the code do an initial sweep of parameters to write the file?
 

marshallward

Marshall Ward
New Member
I believe you are correct, parsing is handled during initialization, and will miss content if it fails to initialize. (This was actually what we were discussing yesterday, and whether this is how the parsing of `MOM_input` should be handled.)
 

aekiss

Andrew Kiss
New Member
sorry @ezaron, late to the discussion, but you may find nmltab useful for comparing MOM6 parameter lists (and Fortran namelists) in an order-insensitive way
 
Top