Back to home page

MITgcm

 
 

    


File indexing completed on 2022-11-23 06:09:31 UTC

view on githubraw file Latest commit 20dee616 on 2022-11-22 15:45:38 UTC
20dee61641 Mart*0001 CBOP
                0002 C     !ROUTINE: tamc.h
                0003 C     !INTERFACE:
                0004 C     #include "tamc.h"
                0005 
                0006 C     !DESCRIPTION:
                0007 C     *================================================================*
                0008 C     | tamc.h
                0009 C     | o Header file defining parameters and variables for the use of
                0010 C     |   the Tangent Linear and Adjoint Model Compiler (TAMC)
                0011 C     |   or the Transformations in Fortran tool (TAF).
                0012 C     |
                0013 C     | started: Christian Eckert eckert@mit.edu  04-Feb-1999
                0014 C     | changed: Patrick Heimbach heimbach@mit.edu 06-Jun-2000
                0015 C     | cleanup: Martin Losch Martin.Losch@awi.de Nov-2022
                0016 C     *================================================================*
                0017 CEOP
c6b6eaaf84 Jean*0018 #ifdef ALLOW_AUTODIFF_TAMC
                0019 
                0020   These lines are here to deliberately cause a compile-time error.
                0021   If you see these lines in your .f files or the compiler shows them
                0022   as an error then it means you have not placed your customized "tamc.h"
                0023   file in the appropriate place.
                0024   You need to place you own copy of tamc.h in the include path for the
                0025   model (e.g., where your SIZE.h is), and comment out these lines.
                0026   In particular the parameters nchklev_1/2/3 (and possibly also maxpass
20dee61641 Mart*0027   and maxcube in case you are using seaice passive tracers or cubed sphere
                0028   grid) need to be set correctly.
c6b6eaaf84 Jean*0029 
                0030 C     TAMC checkpointing parameters:
                0031 C     ==============================
                0032 C
                0033 C     The checkpointing parameters have to be consistent with other model
                0034 C     parameters and variables. This has to be checked before the model is
                0035 C     run.
                0036 C
2dcaa8b9a5 Patr*0037 
                0038 #ifdef ALLOW_TAMC_CHECKPOINTING
                0039 
20dee61641 Mart*0040 C     nchklev_1 :: length of inner loop (=size of storage in memory)
                0041 C     nchklev_2 :: length of second loop (stored on disk)
                0042 C     nchklev_3 :: length of outer loop of 3-level checkpointing
                0043       INTEGER    nchklev_1
                0044       PARAMETER( nchklev_1 =   5 )
                0045       INTEGER    nchklev_2
                0046       PARAMETER( nchklev_2 =   2 )
                0047       INTEGER    nchklev_3
                0048       PARAMETER( nchklev_3 =   3 )
                0049 #ifdef AUTODIFF_4_LEVEL_CHECKPOINT
                0050 C     nchklev_4 :: length of outer loop of 4-level checkpointing
                0051       INTEGER    nchklev_4
                0052       PARAMETER( nchklev_4 =   1 )
                0053 #endif
2dcaa8b9a5 Patr*0054 
c6b6eaaf84 Jean*0055 C--   Note always check for the correct sizes of the common blocks!
20dee61641 Mart*0056 C     The product of the nchklev_X needs to be at least equal to
                0057 C     nTimeSteps.
2dcaa8b9a5 Patr*0058 
                0059 #else /* ALLOW_TAMC_CHECKPOINTING undefined */
                0060 
20dee61641 Mart*0061 C     Without ALLOW_TAMC_CHECKPOINTING, nchklev_1 needs to be at least
                0062 C     equal to nTimeSteps. This (arbitrary) setting would accommodate a
                0063 C     short run (e.g., 10.d with deltaT=10.mn)
                0064       INTEGER    nchklev_1
                0065       PARAMETER( nchklev_1 = 1500 )
2dcaa8b9a5 Patr*0066 
                0067 #endif /* ALLOW_TAMC_CHECKPOINTING */
                0068 
c6b6eaaf84 Jean*0069 C     TAMC keys:
                0070 C     ==========
                0071 C
                0072 C     The keys are used for storing and reading data of the reference
20dee61641 Mart*0073 C     trajectory. Currently there is only one global key.
                0074 C     ikey_dynamics :: key for main time stepping loop
2dcaa8b9a5 Patr*0075 
20dee61641 Mart*0076       COMMON /TAMC_KEYS_I/ ikey_dynamics
                0077       INTEGER ikey_dynamics
2dcaa8b9a5 Patr*0078 
20dee61641 Mart*0079 C     isbyte :: precision of tapes (both memory and disk).
                0080 C               For smaller tapes replace 8 by 4.
2dcaa8b9a5 Patr*0081       INTEGER    isbyte
20dee61641 Mart*0082       PARAMETER( isbyte    = 8 )
                0083 
1574069d50 Mart*0084 C     maxpass :: maximum number of (active + passive) tracers
20dee61641 Mart*0085 C                Note: defined in PTRACERS_SIZE.h if compiling pkg/ptracers
529eea311c Gael*0086 #ifndef ALLOW_PTRACERS
67a1e439d8 Patr*0087       INTEGER    maxpass
20dee61641 Mart*0088       PARAMETER( maxpass   = 2 )
d1d6b963cf Patr*0089 #endif
1574069d50 Mart*0090 C     maxcube :: for Multi-Dim advection, max number of horizontal directions
10d4db6918 Patr*0091       INTEGER    maxcube
20dee61641 Mart*0092       PARAMETER( maxcube   = 2 )
2dcaa8b9a5 Patr*0093 
4e4cc59a1b Jean*0094 #ifdef ALLOW_CG2D_NSA
                0095 C     Parameter that is needed for the tape complev_cg2d_iter
                0096 C     cannot be smaller than the allowed number of iterations in cg2d
                0097 C     (numItersMax >= cg2dMaxIters in data-file)
                0098       INTEGER numItersMax
                0099       PARAMETER ( numItersMax = 100 )
                0100 #endif
                0101 
c6b6eaaf84 Jean*0102 #endif /* ALLOW_AUTODIFF_TAMC */
                0103 C     ================================================================
                0104 C     END OF HEADER TAMC
                0105 C     ================================================================