Back to home page

MITgcm

 
 

    


File indexing completed on 2022-11-23 06:10:39 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"
83fe077e76 Patr*0005 
20dee61641 Mart*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
                0018 #ifdef ALLOW_AUTODIFF_TAMC
83fe077e76 Patr*0019 
20dee61641 Mart*0020 C     TAMC checkpointing parameters:
                0021 C     ==============================
                0022 C
                0023 C     The checkpointing parameters have to be consistent with other model
                0024 C     parameters and variables. This has to be checked before the model is
                0025 C     run.
                0026 C
83fe077e76 Patr*0027 
                0028 #ifdef ALLOW_TAMC_CHECKPOINTING
                0029 
20dee61641 Mart*0030 C     nchklev_1 :: length of inner loop (=size of storage in memory)
                0031 C     nchklev_2 :: length of second loop (stored on disk)
                0032 C     nchklev_3 :: length of outer loop of 3-level checkpointing
                0033       INTEGER    nchklev_1
                0034       PARAMETER( nchklev_1 =   2 )
                0035       INTEGER    nchklev_2
                0036       PARAMETER( nchklev_2 =   2 )
                0037       INTEGER    nchklev_3
                0038       PARAMETER( nchklev_3 =   4 )
                0039 #ifdef AUTODIFF_4_LEVEL_CHECKPOINT
                0040 C     nchklev_4 :: length of outer loop of 4-level checkpointing
                0041 C                  use a value of 4 in case we want to test it here
                0042       INTEGER    nchklev_4
                0043       PARAMETER( nchklev_4 =   4 )
                0044 #endif
83fe077e76 Patr*0045 
20dee61641 Mart*0046 C--   Note always check for the correct sizes of the common blocks!
                0047 C     The product of the nchklev_X needs to be at least equal to
                0048 C     nTimeSteps.
83fe077e76 Patr*0049 
                0050 #else /* ALLOW_TAMC_CHECKPOINTING undefined */
                0051 
20dee61641 Mart*0052 C     Without ALLOW_TAMC_CHECKPOINTING, nchklev_1 needs to be at least
                0053 C     equal to nTimeSteps. This (arbitrary) setting would accommodate a
                0054 C     short run (e.g., 10.d with deltaT=10.mn)
                0055       INTEGER    nchklev_1
                0056       PARAMETER( nchklev_1 = 1500 )
83fe077e76 Patr*0057 
                0058 #endif /* ALLOW_TAMC_CHECKPOINTING */
                0059 
20dee61641 Mart*0060 C     TAMC keys:
                0061 C     ==========
                0062 C
                0063 C     The keys are used for storing and reading data of the reference
                0064 C     trajectory. Currently there is only one global key.
                0065 C     ikey_dynamics :: key for main time stepping loop
83fe077e76 Patr*0066 
20dee61641 Mart*0067       COMMON /TAMC_KEYS_I/ ikey_dynamics
                0068       INTEGER ikey_dynamics
83fe077e76 Patr*0069 
20dee61641 Mart*0070 C     isbyte :: precision of tapes (both memory and disk).
                0071 C               For smaller tapes replace 8 by 4.
83fe077e76 Patr*0072       INTEGER    isbyte
7c50f07931 Mart*0073       PARAMETER( isbyte    = 8 )
5e80f2359c Patr*0074 
20dee61641 Mart*0075 C     maxpass :: maximum number of (active + passive) tracers
                0076 C                Note: defined in PTRACERS_SIZE.h if compiling pkg/ptracers
                0077 #ifndef ALLOW_PTRACERS
83fe077e76 Patr*0078       INTEGER    maxpass
7c50f07931 Mart*0079       PARAMETER( maxpass   = 2 )
83fe077e76 Patr*0080 #endif
20dee61641 Mart*0081 C     maxcube :: for Multi-Dim advection, max number of horizontal directions
83fe077e76 Patr*0082       INTEGER    maxcube
1574069d50 Mart*0083       PARAMETER( maxcube   = 2 )
83fe077e76 Patr*0084 
20dee61641 Mart*0085 #ifdef ALLOW_CG2D_NSA
                0086 C     Parameter that is needed for the tape complev_cg2d_iter
                0087 C     cannot be smaller than the allowed number of iterations in cg2d
                0088 C     (numItersMax >= cg2dMaxIters in data-file)
                0089       INTEGER numItersMax
                0090       PARAMETER ( numItersMax = 100 )
                0091 #endif
                0092 
                0093 #endif /* ALLOW_AUTODIFF_TAMC */
                0094 C     ================================================================
                0095 C     END OF HEADER TAMC
                0096 C     ================================================================