Skip to content

Add static data set index file parser#459

Merged
mgduda merged 1 commit intoMPAS-Dev:developfrom
MiCurry:init_atmosphere/parse_geoindex
Apr 8, 2020
Merged

Add static data set index file parser#459
mgduda merged 1 commit intoMPAS-Dev:developfrom
MiCurry:init_atmosphere/parse_geoindex

Conversation

@MiCurry
Copy link
Contributor

@MiCurry MiCurry commented Feb 28, 2020

This commit creates a new module, mpas_parse_geoindex, which can parse index
files that describe static data sets. The index files and data sets are also used by WRF and the WPS.

For more information on valid fields for an index file please see section 3-53 "Description of Index Options" of the WRF Users Guide.

Currently, mpas_parse_geoindex is not used anywhere in the model; it is only compiled.

@MiCurry
Copy link
Contributor Author

MiCurry commented Feb 28, 2020

Like the mpas_kd_tree and mpas_stack, this gist, https://gist.github.com/MiCurry/d32539c1bfaff58b34410d0a4a1d4cba, contains an alternative mpas_init_atm_core.F which contains tests for mpas_parse_geoindex. It also contains a test index file.

To use the index file and the alternative mpas_init_atm_core.F, create a directory at the same level as the init_atmosphere executable named geog_test and place the index file above inside it.

@MiCurry MiCurry force-pushed the init_atmosphere/parse_geoindex branch from 60cf86e to b262a9c Compare February 28, 2020 17:46
@mgduda mgduda self-requested a review February 28, 2020 18:50
Copy link
Contributor

@mgduda mgduda left a comment

Choose a reason for hiding this comment

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

I've left some comments on specific parts of the code. Additionally, as a general design issue, it might be worth considering to have mpas_parse_index return a status code rather than terminate execution with a call to mpas_log_write(..., messageType=MPAS_LOG_CRIT). This would give the calling code a chance to provide some additional context to the error, or perhaps to try to recover from the error in some way.

@MiCurry MiCurry force-pushed the init_atmosphere/parse_geoindex branch from b262a9c to 23e4b1a Compare March 16, 2020 15:44
@MiCurry
Copy link
Contributor Author

MiCurry commented Mar 16, 2020

Okay, @mgduda I have just pushed all of those changes that you requested and I think this PR is ready to go.

@mgduda mgduda self-requested a review March 16, 2020 22:56
Copy link
Contributor

@mgduda mgduda left a comment

Choose a reason for hiding this comment

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

After trying out the new module and going through the code again, there were just a few minor points that I noted. The most critical of these is the (len=*) comment, though I think the others are worth considering, too.

@MiCurry MiCurry force-pushed the init_atmosphere/parse_geoindex branch from 23e4b1a to b962466 Compare April 6, 2020 20:47
@MiCurry
Copy link
Contributor Author

MiCurry commented Apr 6, 2020

Okay, @mgduda. I just pushed an updated that addresses the last changes you requested.

This commit creates a new module, mpas_parse_geoindex, which can parse index
files that describe static data sets. The index files and data sets are the
same data sets that are used by WRF and the WPS. For more information on valid
fields for an index file please see section 3-53 "Description of Index Options"
of the WRF Users Guide.

The mpas_parse_geoindex is currently not used by any portion of the
init_atmosphere core; it is only compiled.
@MiCurry MiCurry force-pushed the init_atmosphere/parse_geoindex branch from b962466 to 9b85b4a Compare April 8, 2020 16:00
@MiCurry
Copy link
Contributor Author

MiCurry commented Apr 8, 2020

@mgduda I have just pushed an update which replaces path usages with trim(path).

@mgduda mgduda self-requested a review April 8, 2020 16:49
@mgduda mgduda merged commit 1518b36 into MPAS-Dev:develop Apr 8, 2020
@MiCurry MiCurry deleted the init_atmosphere/parse_geoindex branch July 27, 2020 16:56
jonbob added a commit to E3SM-Project/E3SM that referenced this pull request Jul 27, 2020
#3737)

Update MPAS framework

This PR brings in a new mpas-source submodule with updates to the mpas framework
itself, plus changes to the cores supporting the framework update. Some changes
are made to the atmosphere core, even though it is not used by E3SM, in order to
maintain consistency with the framework. This update includes the following
individual branches and PRs, many of which are additions to the makefiles for
summit, or optional libraries:
* az/azamat/mpas-cmake/mpas-tool-dir  (MPAS-Dev/MPAS-Model#629)
* init_atmosphere/kd_tree_ties  (MPAS-Dev/MPAS-Model#630)
* mark-petersen/framework/add_FillValue  (MPAS-Dev/MPAS-Model#616)
* mark-petersen/framework/add_lapack_option  (MPAS-Dev/MPAS-Model#613)
* amametjanov/framework/nullify-field-pointers  (MPAS-Dev/MPAS-Model#578)
* framework/makefile_e3sm  (MPAS-Dev/MPAS-Model#603)
* xylar/framework/make_shell_bash  (MPAS-Dev/MPAS-Model#594)
* registry/missing_value  (MPAS-Dev/MPAS-Model#562)
* pwolfram/updates_make_intel_stack  (MPAS-Dev/MPAS-Model#592)
* azamat/framework/pgi-cpr-omp-workaround  (MPAS-Dev/MPAS-Model#449)
* az/framework/e3sm-cmake-qnosmp-typo  (MPAS-Dev/MPAS-Model#579)
* xylar/compass/add_prerequisite_tag
* atmosphere/fix_timekeeping_imports (MPAS-Dev/MPAS-Model#582)
* xylar/fix_docs_ci  (MPAS-Dev/MPAS-Model#575)
* xylar/add_compass_docs  (MPAS-Dev/MPAS-Model#472)
* philipwjones/framework/summitmake  (MPAS-Dev/MPAS-Model#536)
* atmosphere/atm_core_cleanup  (MPAS-Dev/MPAS-Model#548)
* init_atmosphere/parse_geoindex  (MPAS-Dev/MPAS-Model#459)
* xylar/compass/add_copy_file  (MPAS-Dev/MPAS-Model#467)
* init_atmosphere/kd_tree  (MPAS-Dev/MPAS-Model#438)
* init_atmosphere/mpas_stack  (MPAS-Dev/MPAS-Model#426)
* operators/add_mpas_in_cell  (MPAS-Dev/MPAS-Model#400)

Fixes #3396
Fixes #3236

[BFB]
jonbob added a commit to E3SM-Project/E3SM that referenced this pull request Jul 29, 2020
Update MPAS framework

This PR brings in a new mpas-source submodule with updates to the mpas framework
itself, plus changes to the cores supporting the framework update. Some changes
are made to the atmosphere core, even though it is not used by E3SM, in order to
maintain consistency with the framework. This update includes the following
individual branches and PRs, many of which are additions to the makefiles for
summit, or optional libraries:
* az/azamat/mpas-cmake/mpas-tool-dir  (MPAS-Dev/MPAS-Model#629)
* init_atmosphere/kd_tree_ties  (MPAS-Dev/MPAS-Model#630)
* mark-petersen/framework/add_FillValue  (MPAS-Dev/MPAS-Model#616)
* mark-petersen/framework/add_lapack_option  (MPAS-Dev/MPAS-Model#613)
* amametjanov/framework/nullify-field-pointers  (MPAS-Dev/MPAS-Model#578)
* framework/makefile_e3sm  (MPAS-Dev/MPAS-Model#603)
* xylar/framework/make_shell_bash  (MPAS-Dev/MPAS-Model#594)
* registry/missing_value  (MPAS-Dev/MPAS-Model#562)
* pwolfram/updates_make_intel_stack  (MPAS-Dev/MPAS-Model#592)
* azamat/framework/pgi-cpr-omp-workaround  (MPAS-Dev/MPAS-Model#449)
* az/framework/e3sm-cmake-qnosmp-typo  (MPAS-Dev/MPAS-Model#579)
* xylar/compass/add_prerequisite_tag
* atmosphere/fix_timekeeping_imports (MPAS-Dev/MPAS-Model#582)
* xylar/fix_docs_ci  (MPAS-Dev/MPAS-Model#575)
* xylar/add_compass_docs  (MPAS-Dev/MPAS-Model#472)
* philipwjones/framework/summitmake  (MPAS-Dev/MPAS-Model#536)
* atmosphere/atm_core_cleanup  (MPAS-Dev/MPAS-Model#548)
* init_atmosphere/parse_geoindex  (MPAS-Dev/MPAS-Model#459)
* xylar/compass/add_copy_file  (MPAS-Dev/MPAS-Model#467)
* init_atmosphere/kd_tree  (MPAS-Dev/MPAS-Model#438)
* init_atmosphere/mpas_stack  (MPAS-Dev/MPAS-Model#426)
* operators/add_mpas_in_cell  (MPAS-Dev/MPAS-Model#400)

Fixes #3396
Fixes #3236

[BFB]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants