463 |
|
|
464 |
<orderedlist> |
<orderedlist> |
465 |
<listitem> |
<listitem> |
466 |
<para>a <filename>gm_local</filename> file in the current |
<para>a <filename>gemake_local</filename> file in the current |
467 |
directory</para> |
directory</para> |
468 |
</listitem> |
</listitem> |
469 |
<listitem> |
<listitem> |
960 |
& CALL ${PKG}_READPARMS( retCode ) |
& CALL ${PKG}_READPARMS( retCode ) |
961 |
#endif |
#endif |
962 |
|
|
963 |
2. S/R PACKAGES_CHECK() |
3. S/R PACKAGES_INIT_FIXED() |
964 |
|
: |
965 |
|
#ifdef ALLOW_${PKG} |
966 |
|
if ( use${Pkg} ) |
967 |
|
& CALL ${PKG}_INIT_FIXED( retCode ) |
968 |
|
#endif |
969 |
|
|
970 |
|
4. S/R PACKAGES_CHECK() |
971 |
: |
: |
972 |
#ifdef ALLOW_${PKG} |
#ifdef ALLOW_${PKG} |
973 |
if ( use${Pkg} ) |
if ( use${Pkg} ) |
977 |
& CALL PACKAGES_CHECK_ERROR('${PKG}') |
& CALL PACKAGES_CHECK_ERROR('${PKG}') |
978 |
#endif |
#endif |
979 |
|
|
980 |
3. S/R PACKAGES_INIT() |
5. S/R PACKAGES_INIT_VARIABLES() |
981 |
: |
: |
982 |
#ifdef ALLOW_${PKG} |
#ifdef ALLOW_${PKG} |
983 |
if ( use${Pkg} ) |
if ( use${Pkg} ) |
984 |
& CALL ${PKG}_INIT( retCode ) |
& CALL ${PKG}_INIT_VARIA( ) |
985 |
|
#endif |
986 |
|
|
987 |
|
Package Output |
988 |
|
============== |
989 |
|
6. S/R DO_THE_MODEL_IO |
990 |
|
|
991 |
|
#ifdef ALLOW_${PKG} |
992 |
|
if ( use${Pkg} ) |
993 |
|
& CALL ${PKG}_DIAGS( ) |
994 |
#endif |
#endif |
995 |
|
|
996 |
|
7. S/R PACKAGES_WRITE_PICKUP() |
997 |
|
|
998 |
|
#ifdef ALLOW_${PKG} |
999 |
|
if ( use${Pkg} ) |
1000 |
|
& CALL ${PKG}_WRITE_PICKUP( ) |
1001 |
|
#endif |
1002 |
|
|
1003 |
Description |
Description |
1004 |
=========== |
=========== |
1007 |
is responsible for reading |
is responsible for reading |
1008 |
in the package parameters file data.${pkg}, and storing |
in the package parameters file data.${pkg}, and storing |
1009 |
the package parameters in "${PKG}.h". |
the package parameters in "${PKG}.h". |
1010 |
-> called in INITIALISE_FIXED |
-> called from INITIALISE_FIXED in PACKAGES_READPARMS |
1011 |
|
|
1012 |
|
- ${PKG}_INIT_FIXED() |
1013 |
|
is responsible for completing the internal setup of a package. |
1014 |
|
-> called from INITIALISE_FIXED in PACKAGES_INIT_FIXED |
1015 |
|
note: 1) some pkg use instead: |
1016 |
|
CALL ${PKG}_INITIALISE ( or the old form CALL ${PKG}_INIT ) |
1017 |
|
2) for simple pkg setup, this part is done inside ${PKG}_READPARMS |
1018 |
|
|
1019 |
- ${PKG}_CHECK() |
- ${PKG}_CHECK() |
1020 |
is responsible for validating |
is responsible for validating |
1023 |
need to check. This is done through header files "${PKG}.h". |
need to check. This is done through header files "${PKG}.h". |
1024 |
It is assumed that parameters owned by other packages |
It is assumed that parameters owned by other packages |
1025 |
will not be reset during ${PKG}_CHECK(). |
will not be reset during ${PKG}_CHECK(). |
1026 |
-> called in INITIALISE_FIXED |
-> called from INITIALISE_FIXED in PACKAGES_CHECK |
1027 |
|
|
1028 |
- ${PKG}_INIT() |
- ${PKG}_INIT_VARIA() |
1029 |
is responsible for completing the |
is responsible for fill-in all package variables with an initial value. |
1030 |
internal setup of a package. This routine is called after |
Contains eventually a call to ${PKG}_READ_PICKUP that will read |
1031 |
the core model state has been completely initialised |
from a pickup file the package variables required to restart the model. |
1032 |
but before the core model timestepping starts. |
This routine is called after the core model state has been completely |
1033 |
-> called in INITIALISE_VARIA |
initialised but before the core model timestepping starts. |
1034 |
|
-> called from INITIALISE_VARIA in PACKAGES_INIT_VARIABLES |
1035 |
|
note: the name ${PKG}_INIT_VARIA is not yet standard and some pkg |
1036 |
|
use for e.g. ${PKG}_INI_VARS, ${PKG}_INIT_VARIABLES, or the old |
1037 |
|
form ${PKG}_INIT |
1038 |
|
|
1039 |
|
- ${PKG}_DIAGS() |
1040 |
|
is responsible for writing time-average diagnostics to output |
1041 |
|
files (but the cumulating step is done within the package main S/R). |
1042 |
|
Can also contain other diagnostics (.e.g. CALL ${PKG}_MONITOR) |
1043 |
|
and write snap-shot fields that are hold in common blocks. Other |
1044 |
|
temporary fields are directly dump to file where they are available. |
1045 |
|
NOTE: this part does not yet have a standard form and should be called |
1046 |
|
from a package dedicated S/R such as PACKAGE_WRITE_DIAGS |
1047 |
|
-> called within DO_THE_MODEL_IO |
1048 |
|
|
1049 |
|
- ${PKG}_WRITE_PICKUP() |
1050 |
|
is responsible for writing a package pickup file when necessary for |
1051 |
|
a restart. (found also the old name: ${PKG}_WRITE_CHECKPOINT ) |
1052 |
|
-> called from FORWARD_STEP and THE_MODEL_MAIN in PACKAGES_WRITE_PICKUP |
1053 |
|
|
1054 |
Summary |
Summary |
1055 |
======= |
======= |
1073 |
|
|
1074 |
- FORTRAN source files |
- FORTRAN source files |
1075 |
----------------------- |
----------------------- |
1076 |
* ${pkg}_readparms.F reads parameters from file data.${pkg} |
* ${pkg}_readparms.F reads parameters from file data.${pkg} |
1077 |
* ${pkg}_check.F checks package dependencies and consistencies |
* ${pkg}_init_fixed.F complete the package setup |
1078 |
* ${pkg}_init.F initialises package-related fields |
* ${pkg}_check.F checks package dependencies and consistencies |
1079 |
* ${pkg}_... .F package source code |
* ${pkg}_init_varia.F initialises package-related fields |
1080 |
|
* ${pkg}_... .F package source code |
1081 |
|
* ${pkg}_diags.F write diagnostics to file. |
1082 |
|
* ${pkg}_write_pickup.F write a package pickup file to restart the model |
1083 |
|
|
1084 |
- parameter file |
- parameter file |
1085 |
----------------------- |
----------------------- |