Project MUDDLE: Modularisation and Updating of Design,
Diagnostics and Literature Effort
This is just a brief list of the main changes that we are planning to
make. All suggestions are open to argument and any other suggestions
will also be entertained. There are a couple of guiding ideas that
should be kept in mind: we want to make the model more flexible,
clearer, easier to modify and especially to make the model structure
independent of the model physics and vice versa. To a large extent
these aims should not be contradictory, however, there are also some
limitations on what can be done due to a) the limited personnel and
time available, and b) the need for some continuity for existing model
users.
The areas that will be tackled fall into four main categories: the
model, the diagnostics, the documentation and the runtime environment,
and to a large extent they are independent of each other and can
proceed in parallel. The model track will have to deal with the
modularisation of the physics routines, removal of resolution
dependent coding, etc. The diagnostics track will have to deal with
the format, frequency and content of both the on-line output and the
more efficient post-processing. The documentation aspect will have to
deal with the cataloguing of all the variables, what they do, what
units they are in, and the structure of the physics routines. This is
best done by the people that wrote the code and so can be shared
out. The standards for the documentation and the tools used to read
and analyse are also being developed. The runtime environment
aspect will deal with any changes to the methods of compilation, the
setting of options and the execution of the model.
For each track, I have listed each of the suggested changes as either
Level 1: absolutely necessary and uncontroversial, Level
2: optional but probably beneficial changes, and Level 3:
changes that would either require a lot of work, or a big change in
practice, and have benefits that may or may not make this
worthwhile.
As parts of this list are achieved, they will be marked as DONE.
- Level 1:
-
- Everything compilable with FORTRAN 90 (DONE)
- IMPLICIT NONE (no dimension statements) (DONE)
- No -static requirements (DONE except radiation)
- No explicit dependence on vertical/horizontal resolution
- no magic numbers (DONE except radiation)
- parameter statements for constants (DONE)
- calculations should only be done once
- include stratospheric model(DONE)/coupled model(DONE)/tracer
model/parallelised code as standard add-on options.
- Replacement of O/BL/G/GH/F-DATA arrays with meaningful
names. (DONE)
- atmospheric mass, P**kapa and P*T**kapa, should
be standard model variables (DONE)
- add JMONTH variable (DONE)
- Lakes should be completely divorced from ocean variables (DONE)
- Equivalence statements should be removed (DONE (except for
radiation) )
- saturation vapor pressure should be a standard centralized
function (DONE)
- a standard tri-diagonal solver included in the utilities (DONE)
- standardization of looping variables and practice
- Level 2:
-
- Use of modules instead of includes (DONE)
- No references to all-model variables in local physics
subroutines (DONE)
- Force physics routines (incl. seaice) to only output fluxes (DONE)
- Every physics routine should have an interface (no physics) +
physics module (implies rewriting of SURFCE/GROUND (DONE)/PRECIP (DONE))
- Separation of time-stepping features in MAIN from model overhead.
- Common blocks should not be used to pass variables to physics
routines, only to be used for common model variables.
- standardize naming conventions(DONE)
- removal of all ENTRY points (DONE except radiation)
- no hard coding of array sizes or loop limits(DONE)
- consistent initialization of radiation/ground/pbl etc. Possibly
set as options in rundeck (DONE)
- Paleo-year should be input variable (+automatic calculation/input of
insolation parameters?)
- Array indexing (for QUS moments, and large I,J,N arrays) should
be optimized (DONE)
- consistent use of QUS moments in pbl/diffus/radiation
- advection of cloud liquid water mass, sub-gridscale pbl profiles
- Level 3:
-
- Radiation code could be split to allow incremental addition of
options (ghg/volcanic/aerosol/solar trends etc)
- Use pre-processor options ( #ifdef - #endif directives)(DONE)
- Use a specific file-manager system (a al GFDL) (DONE)
- Re-institute partial land/ocean boxes for atmospheric model (DONE)
- Include a flux-coupler for communication between different grids
- Level 1:
-
- netCDF/HDF output options (DONE)
- self-contained diagnostic output files (i.e. boot-strapable acc files)
- Option to change 'line printer' format for PRT files to standard text
- include a surface pressure diagnostic
- automatic averaging/collating of strings of acc files (DONE)
- Level 2:
-
- No more unreferenced diagnostic array numbers (i.e. the
accumulated sea level pressure diagnostic would be referenced
as AIJ(I,J,IDIJSLP) or something similar. Requires a
diagnostics module which sets all IDxxx numbers, readable by the
post-processing routine.) Alternatively this could be replaced
with a derived type for each group of diagnostics and direct
references to fields witin them. (DONE for AJ/AIJ/AJL/AJK/ADIURN)
- Easy definition and output of regional model diagnostics
- Options for daily/6 hourly etc. diagnostics output
- Options for control of diagnostic variables (DONE)
- Extendable diagnostic routines to allow easy expansion for
increases in ITYPEs (i.e. the budget pages) (DONE)
- Direct inclusion of satellite diagnostics (i.e. MSU brightness,
ICCP clouds, TOPEX SSH variability etc)
- Level 3:
-
- Point and click interface for choosing/outputing and viewing
standard model output
- Level 1:
-
- Self-documentation of every routine in a consistent format,
including units (see appendix for details).(DONE)
- An up-to-date manual on running the model (possibly derivable
from the written specifications of this renovation project)
- A comprehensive description of how the model works
- Email listservers for model development issues
(standards/functionality etc.), and for bug discoveries and
fixes(DONE)
- Level 2:
-
- A gcmdoc utility that reads all self-documentation and
produces html reports (DONE)
- a GISS-wide database that collects all pertinent info about
simulations (with a short description).
- Level 3:
-
- Level 1:
-
- use of makefiles to ensure up-to-date code (either in setup or
as a separate make gcm step) (DONE)
- Include declarations of compilation options in rundecks (DONE)
- Month/day/year input should be used instead of Tau for model
start/finish (DONE)
- RANDSGI should be moved out of setup (DONE)
- Level 2:
-
- Allow configuration files for diagnostic output and
parameter changes (ie. make the NAMELISTs bigger and more
sophisticated, and put them in separate files).(DONE)
- Input all model code/rundecks into a real database
(e.g. PostgreSQL) that is also web-accessible
- Level 3:
-
- Implement standard revision control systems (CVS)(DONE)
- Force files to only contain single routines, and abandon the
'priority' system currently used.
- point and click interface for running standard model