Implment generic generators for MITgcm
MITgcm has a package structure. Each package is configured and parametrized with multiple files. See also: https://mitgcm.readthedocs.io/en/latest/getting_started/getting_started.html#customizing-the-model-configuration-code-parameters-and-compilation-options
There is a global configuration files and package specific ones. See for details:
- https://mitgcm.readthedocs.io/en/latest/getting_started/getting_started.html#c-preprocessor-options
- https://mitgcm.readthedocs.io/en/latest/contributing/contributing.html#creating-mitgcm-packages
Tasks to do at this point: (10-20 hours)
-
Carefully read the documentation of MITgcm on architecture and the links mentioned in this ticket. -
Collect from each example in the documentation the list of files necessary for the example. This will show that there is a set of reoccurring files, that can be categorized as global configuration. Most likely, they are code/SIZE.h input/data and input/data.pkg Also some packages will have their own data.${pkg} file and ${PKG}_SIZE.g -
Identify where these files must be put (code, input, etc) -
Write a summary wiki page on the setup, which files must be adapted (that means they must be generated). Extend https://git.se.informatik.uni-kiel.de/oceandsl/configuration-dsl/-/wikis/MITgcm%20Configuration%20Model for this purpose. Also note whether a file is a namelist file, like data and eedata, or a CPP style file, or something different. Distinguish between global settings and package settings. If a certain file type is not used by all packages, add a specific note. Do NOT list every single file. That is if a package A has a A_File.h and package B has a B_File.h document this as ${PKG}_File.h -
Report on progress on Thursday
For each file type there must be ONE generator. We already have one for namelists. We will need one for SIZE.h and ${PKG}_OPTIONS.h. Before we can build them we have to agree on a model. Thus, we need to know what is actually in these files and how this is structured. (approx 20 hours)
-
Collect information on what is stored in these files, e.g., variable declaration, documentation, parametrization etc. -
Do these files follow a common format which we could read?
-
-
Find out how files in the code directory of an example is integrated into the build process -
Have a talk with Reiner on your findings and come up with a general architecture.
Implementation: (15 hours)
-
Create ECore Metamodels for ${PKG}_SIZE.h and ${PKG}_OPTIONS.h files. -
Create generators for these metamodels.
Parameter Declaration: (X hours)
-
Extend declaration model or read ${PKG}_SIZE.h and ${PKG}_OPTIONS.h file for configuration data. (depends on general architecture) -
Replace declaration model with a DSL.