/[MITgcm]/MITgcm/doc/devel_HOWTO.sgml
ViewVC logotype

Diff of /MITgcm/doc/devel_HOWTO.sgml

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.7 by edhill, Tue Apr 6 04:12:00 2004 UTC revision 1.8 by jmc, Wed Jan 5 03:45:24 2005 UTC
# Line 886  o  Each package gets its runtime configu Line 886  o  Each package gets its runtime configu
886     Package runtime config. options are imported     Package runtime config. options are imported
887     into a common block held in a header file     into a common block held in a header file
888     called "${PKG}.h".     called "${PKG}.h".
889       Note: In some packages, the header file "${PKG}.h" is splitted
890       into "${PKG}_PARAMS.h" that contains the package parameters and
891       ${PKG}_VARS.h" for the field arrays.
892    
893  o  The core driver part of the model can check  o  The core driver part of the model can check
894     for runtime enabling or disabling of individual packages     for runtime enabling or disabling of individual packages
# Line 908  CPP Flags Line 911  CPP Flags
911      1. Within the core driver code flags of the form      1. Within the core driver code flags of the form
912         ALLOW_${PKG} are used to include or exclude         ALLOW_${PKG} are used to include or exclude
913         whole packages. The ALLOW_${PKG} flags are included         whole packages. The ALLOW_${PKG} flags are included
914         from a PKG_CPP_OPTIONS block which is currently         from a PACKAGES_CONFIG.h file that is automatically
915           generated by genmake2 (see genmake2 section).
916         held in-line in the CPP_OPTIONS.h header file.         held in-line in the CPP_OPTIONS.h header file.
917         e.g.         e.g.
918    
919         Core model code .....         Core model code .....
920    
921           #include "PACKAGES_CONFIG.h"
922         #include "CPP_OPTIONS.h"         #include "CPP_OPTIONS.h"
923           :           :
924           :           :
# Line 925  CPP Flags Line 930  CPP Flags
930    
931      2. Within an individual package a header file,      2. Within an individual package a header file,
932         "${PKG}_OPTIONS.h", is used to set CPP flags         "${PKG}_OPTIONS.h", is used to set CPP flags
933         specific to that package. It is not recommended         specific to that package. It also includes
934         to include this file in "CPP_OPTIONS.h".         "PACKAGES_CONFIG.h" and "CPP_OPTIONS.h".
935    
936    
937  Package Boot Sequence  Package Boot Sequence
# Line 978  Package Output Line 983  Package Output
983    
984          #ifdef ALLOW_${PKG}          #ifdef ALLOW_${PKG}
985            if ( use${Pkg} )            if ( use${Pkg} )
986       &       CALL ${PKG}_DIAGS( )       &       CALL ${PKG}_DIAGS( )     [ or CALL ${PKG}_OUTPUT( ) ]
987          #endif          #endif
988    
989       7. S/R PACKAGES_WRITE_PICKUP()       7. S/R PACKAGES_WRITE_PICKUP()
# Line 994  Description Line 999  Description
999        - ${PKG}_READPARMS()        - ${PKG}_READPARMS()
1000      is responsible for reading      is responsible for reading
1001      in the package parameters file data.${pkg}, and storing      in the package parameters file data.${pkg}, and storing
1002      the package parameters in "${PKG}.h".      the package parameters in "${PKG}.h" (or in "${PKG}_PARAMS.h").
1003      -> called from INITIALISE_FIXED in PACKAGES_READPARMS      -> called from INITIALISE_FIXED in PACKAGES_READPARMS
1004    
1005       - ${PKG}_INIT_FIXED()       - ${PKG}_INIT_FIXED()
# Line 1024  Description Line 1029  Description
1029       use for e.g. ${PKG}_INI_VARS, ${PKG}_INIT_VARIABLES, or the old       use for e.g. ${PKG}_INI_VARS, ${PKG}_INIT_VARIABLES, or the old
1030       form ${PKG}_INIT       form ${PKG}_INIT
1031    
1032       - ${PKG}_DIAGS()       - ${PKG}_DIAGS()      [or ${PKG}_OUTPUT( ) ]
1033       is responsible for writing time-average diagnostics to output       is responsible for writing time-average fields to output files
1034       files (but the cumulating step is done within the package main S/R).       (but the cumulating step is done within the package main S/R).
1035       Can also contain other diagnostics (.e.g. CALL ${PKG}_MONITOR)       Can also contain other diagnostics (.e.g. CALL ${PKG}_MONITOR)
1036       and write snap-shot fields that are hold in common blocks. Other       and write snap-shot fields that are hold in common blocks. Other
1037       temporary fields are directly dump to file where they are available.       temporary fields are directly dump to file where they are available.
1038       NOTE: this part does not yet have a standard form and should be called       NOTE: 1) ${PKG}_OUTPUT is progressively replacing ${PKG}_DIAGS()
1039         from a package dedicated S/R such as PACKAGE_WRITE_DIAGS                to avoid confusion with pkg/diagnostics functionality.
1040               2) the output part is not yet in a standard form and might still
1041                  evolve a lot.
1042      -> called within DO_THE_MODEL_IO      -> called within DO_THE_MODEL_IO
1043    
1044       - ${PKG}_WRITE_PICKUP()       - ${PKG}_WRITE_PICKUP()
# Line 1058  Summary Line 1065  Summary
1065    -----------------------    -----------------------
1066    * ${PKG}_OPTIONS.h     has further package-specific CPP options    * ${PKG}_OPTIONS.h     has further package-specific CPP options
1067    * ${PKG}.h             package-specific common block variables, fields    * ${PKG}.h             package-specific common block variables, fields
1068       or  ${PKG}_PARAMS.h   package-specific common block parameters
1069       and ${PKG}_VARS.h     package-specific common block fields
1070    
1071  - FORTRAN source files  - FORTRAN source files
1072    -----------------------    -----------------------
# Line 1066  Summary Line 1075  Summary
1075    * ${pkg}_check.F        checks package dependencies and consistencies    * ${pkg}_check.F        checks package dependencies and consistencies
1076    * ${pkg}_init_varia.F   initialises package-related fields    * ${pkg}_init_varia.F   initialises package-related fields
1077    * ${pkg}_... .F         package source code    * ${pkg}_... .F         package source code
1078    * ${pkg}_diags.F        write diagnostics to file.    * ${pkg}_diags.F        write output to file.
1079       or ${pkg}_output.F     write output to file.
1080    * ${pkg}_write_pickup.F write a package pickup file to restart the model    * ${pkg}_write_pickup.F write a package pickup file to restart the model
1081    
1082      New: Subroutine in one package (pkgA) that only contains code which
1083           is connected to a 2nd package (pkgB) (e.g.: gmredi_diagnostics_init.F)
1084           will be named: pkgA_pkgB_something.F
1085    
1086  - parameter file  - parameter file
1087    -----------------------    -----------------------
1088    * data.${pkg}          parameter file    * data.${pkg}          parameter file

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.22