/[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.9 by jmc, Tue May 9 21:10:19 2006 UTC
# Line 290  checkpoint50d_pre Line 290  checkpoint50d_pre
290    $ export CVS_RSH=ssh    $ export CVS_RSH=ssh
291    $ export CVSROOT=':ext:NAME@mitgcm.org:/u/gcmpack'    $ export CVSROOT=':ext:NAME@mitgcm.org:/u/gcmpack'
292    $ mkdir scratch    $ mkdir scratch
293    $ cvs co MITgcm manual mitgcm.org    $ cvs co -P MITgcm manual mitgcm.org
294  </screen>  </screen>
295    
296        <para>These commands extract the necessary information from the CVS server        <para>These commands extract the necessary information from the CVS server
# 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}_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}_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) the S/R old name ${PKG}_DIAGS is used in some packages
1039         from a package dedicated S/R such as PACKAGE_WRITE_DIAGS                but is beeing replaced by ${PKG}_OUTPUT
1040                  to avoid confusion with pkg/diagnostics functionality.
1041               2) the output part is not yet in a standard form and might still
1042                  evolve a lot.
1043      -> called within DO_THE_MODEL_IO      -> called within DO_THE_MODEL_IO
1044    
1045       - ${PKG}_WRITE_PICKUP()       - ${PKG}_WRITE_PICKUP()
# Line 1058  Summary Line 1066  Summary
1066    -----------------------    -----------------------
1067    * ${PKG}_OPTIONS.h     has further package-specific CPP options    * ${PKG}_OPTIONS.h     has further package-specific CPP options
1068    * ${PKG}.h             package-specific common block variables, fields    * ${PKG}.h             package-specific common block variables, fields
1069       or  ${PKG}_PARAMS.h   package-specific common block parameters
1070       and ${PKG}_VARS.h     package-specific common block fields
1071    
1072  - FORTRAN source files  - FORTRAN source files
1073    -----------------------    -----------------------
# Line 1066  Summary Line 1076  Summary
1076    * ${pkg}_check.F        checks package dependencies and consistencies    * ${pkg}_check.F        checks package dependencies and consistencies
1077    * ${pkg}_init_varia.F   initialises package-related fields    * ${pkg}_init_varia.F   initialises package-related fields
1078    * ${pkg}_... .F         package source code    * ${pkg}_... .F         package source code
1079    * ${pkg}_diags.F        write diagnostics to file.    * ${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.9

  ViewVC Help
Powered by ViewVC 1.1.22