Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add namelist and streams filename parameters to mpas_init #10

Merged
merged 3 commits into from
Jan 29, 2021

Conversation

svahl991
Copy link
Collaborator

This alters the signature of the mpas_init subroutine in mpas_subdriver.F, adding two optional parameters that allow the caller to pass in filenames for the namelist and streams file. This allows the caller to specify different files to be used, other than namelist.atmosphere and streams.atmosphere in the working directory. This functionality is critical for several use-cases in MPAS-JEDI, including the ConvertState application, which interpolates data between two MPAS meshes of different resolutions.

@svahl991
Copy link
Collaborator Author

This change is required for JCSDA-internal/mpas-jedi#360.

@junmeiban
Copy link

Already tested. It works with my case https://github.com/JCSDA-internal/mpas-jedi/pull/495. Thanks @svahl991 .

Copy link

@jjguerrette jjguerrette left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Please add this PR to MPAS-Dev#789.

@svahl991 svahl991 merged commit d33a772 into release-stable Jan 29, 2021
@svahl991
Copy link
Collaborator Author

Please add this PR to MPAS-Dev#789.

Done.

@svahl991 svahl991 deleted the feature/convertstate branch January 29, 2021 17:26
@liujake
Copy link
Collaborator

liujake commented Jan 29, 2021

This looks good. But should we just use stream/namelistFileName instead of stream/namelistFileParam? That is more readable to me.

@svahl991
Copy link
Collaborator Author

But should we just use stream/namelistFileName instead of stream/namelistFileParam? That is more readable to me.

Well, I just merged this, although we can still change the variable name. But my thinking in putting Param at the end, which I agree is a little ugly, was to make a clear distinction between the filename variables passed in as parameters, and the already existing variables namelistFile and streamsFile in the subroutine. If we used your suggestion, we would have two variables, one named namelistFile and one named namelistFileName, and to me it is then unclear what the difference is between them. That was my thinking anyway.

@liujake
Copy link
Collaborator

liujake commented Jan 29, 2021

Fine with me.

climbfuji pushed a commit that referenced this pull request Aug 26, 2022
This alters the signature of the mpas_init subroutine in mpas_subdriver.F, adding two optional parameters that allow the caller to pass in filenames for the namelist and streams file. This allows the caller to specify different files to be used, other than namelist.atmosphere and streams.atmosphere in the working directory. This functionality is critical for several use-cases in MPAS-JEDI, including the ConvertState application, which interpolates data between two MPAS meshes of different resolutions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants