/[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.10 by jmc, Thu Jan 21 23:59:17 2010 UTC
# Line 22  Line 22 
22            Initial version.            Initial version.
23          </revremark>          </revremark>
24        </revision>        </revision>
25          <revision>
26            <revnumber>0.02</revnumber>
27            <date>2010-01-21</date>
28            <authorinitials>jmc</authorinitials>
29            <revremark>
30              update links.
31            </revremark>
32          </revision>
33      </revhistory>      </revhistory>
34    
35      <abstract>      <abstract>
# Line 37  Line 45 
45      <sect2>      <sect2>
46        <title>New Versions of This Document</title> <para>You can        <title>New Versions of This Document</title> <para>You can
47        obtain the latest version of this document <ulink        obtain the latest version of this document <ulink
48        url="http://mitgcm.org/dev_docs/devel_HOWTO/">online</ulink> in        url="http://mitgcm.org/public/docs.html">online</ulink> in
49        various formats.</para>        various formats.</para>
50      </sect2>      </sect2>
51      <sect2>      <sect2>
# Line 56  Line 64 
64        <title>User Manual</title>        <title>User Manual</title>
65    
66        <para>Before jumping into development, please familiarize yourself with        <para>Before jumping into development, please familiarize yourself with
67          the <ulink url="http://mitgcm.org/docs.html"> MITgcm user manual          the <ulink url="http://mitgcm.org/public/docs.html"> MITgcm user manual
68          </ulink>.  This document contains volumes of useful information and is          </ulink>.  This document contains volumes of useful information and is
69          included here by reference.</para>          included here by reference.</para>
70    
# Line 130  Line 138 
138     e|- tools     e|- tools
139     ?|  tutorial_examples        documented tests     ?|  tutorial_examples        documented tests
140      |                             only populated on release1 branch      |                             only populated on release1 branch
141      |                             and not validated during "testscript"      |                             and not validated during "testreport"
142      '- utils      '- utils
143         verification             std tests         verification             std tests
144    
# Line 182  Line 190 
190        <title>Branches</title>        <title>Branches</title>
191    
192        <para>As shown in the online <ulink        <para>As shown in the online <ulink
193        url="http://dev.mitgcm.org/cgi-bin/viewcvs.cgi/MITgcm/doc/tag-index?graph=1.174">        url="http://mitgcm.org/viewvc/MITgcm/MITgcm/doc/tag-index?view=graph">
194        ViewCVS-generated tree</ulink>, the MITgcm codebase is split into to two        ViewCVS-generated tree</ulink>, the MITgcm codebase is split into to two
195        branches or "lines" under which development proceeds.  These two lines are        branches or "lines" under which development proceeds.  These two lines are
196        referred to as the "MAIN" and "ecco" versions of the code.  While not        referred to as the "MAIN" and "ecco" versions of the code.  While not
# Line 216  Line 224 
224    
225          <listitem>          <listitem>
226            <para>The developer then runs the <ulink            <para>The developer then runs the <ulink
227            url="http://dev.mitgcm.org/cgi-bin/viewcvs.cgi/MITgcm/verification/testscript">            url="http://mitgcm.org/viewvc/MITgcm/MITgcm/verification/testreport">
228            testscript</ulink> shell script to see if any problems are introduced.            testreport</ulink> shell script to see if any problems are introduced.
229            While not intended to be exhaustive, the test cases within the            While not intended to be exhaustive, the test cases within the
230            verification directory do provide some indication whether gross errors            verification directory do provide some indication whether gross errors
231            have been introduced.            have been introduced.
# Line 232  Line 240 
240              <listitem>              <listitem>
241                <para>adds a "checkpointXY_pre" comment (where X is a checkpoint                <para>adds a "checkpointXY_pre" comment (where X is a checkpoint
242                number and Y is a letter) to the <ulink                number and Y is a letter) to the <ulink
243                url="http://dev.mitgcm.org/cgi-bin/viewcvs.cgi/MITgcm/doc/tag-index">                url="http://mitgcm.org/viewvc/MITgcm/MITgcm/doc/tag-index">
244                tag-index</ulink> file and checks it into the CVS                tag-index</ulink> file and checks it into the CVS
245                repository</para>                repository</para>
246              </listitem>              </listitem>
# Line 290  checkpoint50d_pre Line 298  checkpoint50d_pre
298    $ export CVS_RSH=ssh    $ export CVS_RSH=ssh
299    $ export CVSROOT=':ext:NAME@mitgcm.org:/u/gcmpack'    $ export CVSROOT=':ext:NAME@mitgcm.org:/u/gcmpack'
300    $ mkdir scratch    $ mkdir scratch
301    $ cvs co MITgcm manual mitgcm.org    $ cvs co -P MITgcm manual mitgcm.org
302  </screen>  </screen>
303    
304        <para>These commands extract the necessary information from the CVS server        <para>These commands extract the necessary information from the CVS server
# Line 787  checkpoint50d_pre Line 795  checkpoint50d_pre
795                special command option (see "-command" below) to invoke the MPI                special command option (see "-command" below) to invoke the MPI
796                executable.  Examples of PBS scripts using MPI with testreport can be                executable.  Examples of PBS scripts using MPI with testreport can be
797                found in the <ulink                found in the <ulink
798                url="http://dev.mitgcm.org/cgi-bin/viewcvs.cgi/MITgcm_contrib/test_scripts/">                url="http://mitgcm.org/viewvc/MITgcm/MITgcm_contrib/test_scripts/">
799                MITgcm-contrib area</ulink></para>                MITgcm-contrib area</ulink></para>
800              </listitem>              </listitem>
801            </varlistentry>            </varlistentry>
# Line 799  checkpoint50d_pre Line 807  checkpoint50d_pre
807                output.txt" is not sufficient.  This option allows a more general                output.txt" is not sufficient.  This option allows a more general
808                command (or shell script) to be invoked.  Examples of PBS scripts                command (or shell script) to be invoked.  Examples of PBS scripts
809                using MPI with testreport can be found in the <ulink                using MPI with testreport can be found in the <ulink
810                url="http://dev.mitgcm.org/cgi-bin/viewcvs.cgi/MITgcm_contrib/test_scripts/">                url="http://mitgcm.org/viewvc/MITgcm/MITgcm_contrib/test_scripts/">
811                MITgcm-contrib area</ulink></para>                MITgcm-contrib area</ulink></para>
812              </listitem>              </listitem>
813            </varlistentry>            </varlistentry>
# Line 886  o  Each package gets its runtime configu Line 894  o  Each package gets its runtime configu
894     Package runtime config. options are imported     Package runtime config. options are imported
895     into a common block held in a header file     into a common block held in a header file
896     called "${PKG}.h".     called "${PKG}.h".
897       Note: In some packages, the header file "${PKG}.h" is splitted
898       into "${PKG}_PARAMS.h" that contains the package parameters and
899       ${PKG}_VARS.h" for the field arrays.
900    
901  o  The core driver part of the model can check  o  The core driver part of the model can check
902     for runtime enabling or disabling of individual packages     for runtime enabling or disabling of individual packages
# Line 908  CPP Flags Line 919  CPP Flags
919      1. Within the core driver code flags of the form      1. Within the core driver code flags of the form
920         ALLOW_${PKG} are used to include or exclude         ALLOW_${PKG} are used to include or exclude
921         whole packages. The ALLOW_${PKG} flags are included         whole packages. The ALLOW_${PKG} flags are included
922         from a PKG_CPP_OPTIONS block which is currently         from a PACKAGES_CONFIG.h file that is automatically
923           generated by genmake2 (see genmake2 section).
924         held in-line in the CPP_OPTIONS.h header file.         held in-line in the CPP_OPTIONS.h header file.
925         e.g.         e.g.
926    
927         Core model code .....         Core model code .....
928    
929           #include "PACKAGES_CONFIG.h"
930         #include "CPP_OPTIONS.h"         #include "CPP_OPTIONS.h"
931           :           :
932           :           :
# Line 925  CPP Flags Line 938  CPP Flags
938    
939      2. Within an individual package a header file,      2. Within an individual package a header file,
940         "${PKG}_OPTIONS.h", is used to set CPP flags         "${PKG}_OPTIONS.h", is used to set CPP flags
941         specific to that package. It is not recommended         specific to that package. It also includes
942         to include this file in "CPP_OPTIONS.h".         "PACKAGES_CONFIG.h" and "CPP_OPTIONS.h".
943    
944    
945  Package Boot Sequence  Package Boot Sequence
# Line 978  Package Output Line 991  Package Output
991    
992          #ifdef ALLOW_${PKG}          #ifdef ALLOW_${PKG}
993            if ( use${Pkg} )            if ( use${Pkg} )
994       &       CALL ${PKG}_DIAGS( )       &       CALL ${PKG}_OUTPUT( )
995          #endif          #endif
996    
997       7. S/R PACKAGES_WRITE_PICKUP()       7. S/R PACKAGES_WRITE_PICKUP()
# Line 994  Description Line 1007  Description
1007        - ${PKG}_READPARMS()        - ${PKG}_READPARMS()
1008      is responsible for reading      is responsible for reading
1009      in the package parameters file data.${pkg}, and storing      in the package parameters file data.${pkg}, and storing
1010      the package parameters in "${PKG}.h".      the package parameters in "${PKG}.h" (or in "${PKG}_PARAMS.h").
1011      -> called from INITIALISE_FIXED in PACKAGES_READPARMS      -> called from INITIALISE_FIXED in PACKAGES_READPARMS
1012    
1013       - ${PKG}_INIT_FIXED()       - ${PKG}_INIT_FIXED()
# Line 1024  Description Line 1037  Description
1037       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
1038       form ${PKG}_INIT       form ${PKG}_INIT
1039    
1040       - ${PKG}_DIAGS()       - ${PKG}_OUTPUT( )
1041       is responsible for writing time-average diagnostics to output       is responsible for writing time-average fields to output files
1042       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).
1043       Can also contain other diagnostics (.e.g. CALL ${PKG}_MONITOR)       Can also contain other diagnostics (.e.g. CALL ${PKG}_MONITOR)
1044       and write snap-shot fields that are hold in common blocks. Other       and write snap-shot fields that are hold in common blocks. Other
1045       temporary fields are directly dump to file where they are available.       temporary fields are directly dump to file where they are available.
1046       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
1047         from a package dedicated S/R such as PACKAGE_WRITE_DIAGS                but is beeing replaced by ${PKG}_OUTPUT
1048                  to avoid confusion with pkg/diagnostics functionality.
1049               2) the output part is not yet in a standard form and might still
1050                  evolve a lot.
1051      -> called within DO_THE_MODEL_IO      -> called within DO_THE_MODEL_IO
1052    
1053       - ${PKG}_WRITE_PICKUP()       - ${PKG}_WRITE_PICKUP()
# Line 1058  Summary Line 1074  Summary
1074    -----------------------    -----------------------
1075    * ${PKG}_OPTIONS.h     has further package-specific CPP options    * ${PKG}_OPTIONS.h     has further package-specific CPP options
1076    * ${PKG}.h             package-specific common block variables, fields    * ${PKG}.h             package-specific common block variables, fields
1077       or  ${PKG}_PARAMS.h   package-specific common block parameters
1078       and ${PKG}_VARS.h     package-specific common block fields
1079    
1080  - FORTRAN source files  - FORTRAN source files
1081    -----------------------    -----------------------
# Line 1066  Summary Line 1084  Summary
1084    * ${pkg}_check.F        checks package dependencies and consistencies    * ${pkg}_check.F        checks package dependencies and consistencies
1085    * ${pkg}_init_varia.F   initialises package-related fields    * ${pkg}_init_varia.F   initialises package-related fields
1086    * ${pkg}_... .F         package source code    * ${pkg}_... .F         package source code
1087    * ${pkg}_diags.F        write diagnostics to file.    * ${pkg}_output.F       write output to file.
1088    * ${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
1089    
1090      New: Subroutine in one package (pkgA) that only contains code which
1091           is connected to a 2nd package (pkgB) (e.g.: gmredi_diagnostics_init.F)
1092           will be named: pkgA_pkgB_something.F
1093    
1094  - parameter file  - parameter file
1095    -----------------------    -----------------------
1096    * data.${pkg}          parameter file    * data.${pkg}          parameter file

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

  ViewVC Help
Powered by ViewVC 1.1.22