Introduce an optional namelist to ModEM#64
Open
MiCurry wants to merge 1 commit into
Open
Conversation
This commit adds an optional namelist to ModEM. The namelist should be a file in the current working directory with the name of: `namelist.modem.nl`. The namelist is only read if the `namelist.modem.nl` file is found in the CWD otherwise no attempt is made to read it. The goal for the namelist is to provide an extra location to provide ModEM options that neither fit into the forward control file, or the inversion control file. So far the namelist only really has one option that alters the execution of ModEM, verbose setting. If set in the namelist, the verbose setting will override the default verbose setting or the verbose level passed in through the command line. There are three other options that can be set in the namelist. These are all under the '&grid' section. These options are: SFF, primary_field, and primary_field_file. At the moment, these options do nothing except set corresponding variables in userCtrl file. These variables are added here to assist Anna with her spherical/secondary field formulation work. The two sections are both optional in the namelist. They can either be completely omitted or written in any order in the namelist file. This provides some great flexibility for the user. It also should be pretty easy for other developers to see how to add a new section. An example namelist can be generated by using a hidden command line option: `./Mod3DMT -N`. That routine wont create the file if there is a namelist already present. As we use the namelist more, we can consider adding in a help message about `-N`.
Member
Author
|
@akelbert here is the namelist change we talked about on Wednesday. Let me know what you think! I wasn't sure what to name the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This merge adds an optional namelist to ModEM. The namelist should be a file in the current working directory with the name of:
namelist.modem.nl.The namelist is only read if the
namelist.modem.nlfile is found in the CWD otherwise no attempt is made to read it.The goal for the namelist is to provide an extra location to provide ModEM options that neither fit into the forward control file, or the inversion control file.
So far, the namelist only has one option that alters the execution of ModEM: the
output_levelsetting (normally set by -V on the CL). Ifoutput_levelis set in the namelist, the verbose setting will override the default verbose setting or the verbose level passed in through the command line.There are three other options that can be set in the namelist. These are all under the '&grid' section. These options are:
SFF,primary_field, andprimary_field_file. At the moment, these options do nothing except set corresponding variables inuserCtrldata structure. These variables are added here to assist Anna with some of her on-going spherical/secondary field formulation work.The two namelist sections (
&settingsand&grid) are both optional. They can either be completely omitted or written in any order in the file. This provides some great flexibility for the user. It also should be pretty easy for other developers to see how to add a new section.An example namelist can be generated by using a hidden command line option:
./Mod3DMT -N. That routine wont create the file if there is a namelist already present. As we use the namelist more, we can consider adding in a help message about-N.