Back to home page

MITgcm

 
 

    


File indexing completed on 2022-11-23 06:10:43 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"
01a4b8e46d 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
01a4b8e46d 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
01a4b8e46d 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 =   1 )
                0035       INTEGER    nchklev_2
01a4b8e46d Patr*0036 #ifdef AUTODIFF_2_LEVEL_CHECKPOINT
20dee61641 Mart*0037 C     use two-level checkpointing with the same storage
                0038       PARAMETER( nchklev_2 = 500 )
01a4b8e46d Patr*0039 #else
20dee61641 Mart*0040       PARAMETER( nchklev_2 =  10 )
                0041       INTEGER    nchklev_3
                0042       PARAMETER( nchklev_3 =  50 )
                0043 #endif
                0044 #ifdef AUTODIFF_4_LEVEL_CHECKPOINT
                0045 C     nchklev_4 :: length of outer loop of 4-level checkpointing
                0046       INTEGER    nchklev_4
                0047       PARAMETER( nchklev_4 =   1 )
01a4b8e46d Patr*0048 #endif
                0049 
20dee61641 Mart*0050 C--   Note always check for the correct sizes of the common blocks!
                0051 C     The product of the nchklev_X needs to be at least equal to
                0052 C     nTimeSteps.
01a4b8e46d Patr*0053 
                0054 #else /* ALLOW_TAMC_CHECKPOINTING undefined */
                0055 
20dee61641 Mart*0056 C     Without ALLOW_TAMC_CHECKPOINTING, nchklev_1 needs to be at least
                0057 C     equal to nTimeSteps. This (arbitrary) setting would accommodate a
                0058 C     short run (e.g., 10.d with deltaT=10.mn)
                0059       INTEGER    nchklev_1
                0060       PARAMETER( nchklev_1 = 1500 )
01a4b8e46d Patr*0061 
                0062 #endif /* ALLOW_TAMC_CHECKPOINTING */
                0063 
20dee61641 Mart*0064 C     TAMC keys:
                0065 C     ==========
                0066 C
                0067 C     The keys are used for storing and reading data of the reference
                0068 C     trajectory. Currently there is only one global key.
                0069 C     ikey_dynamics :: key for main time stepping loop
01a4b8e46d Patr*0070 
20dee61641 Mart*0071       COMMON /TAMC_KEYS_I/ ikey_dynamics
                0072       INTEGER ikey_dynamics
01a4b8e46d Patr*0073 
20dee61641 Mart*0074 C     isbyte :: precision of tapes (both memory and disk).
                0075 C               For smaller tapes replace 8 by 4.
01a4b8e46d Patr*0076       INTEGER    isbyte
20dee61641 Mart*0077       PARAMETER( isbyte    = 8 )
                0078 
                0079 C     maxpass :: maximum number of (active + passive) tracers
                0080 C                Note: defined in PTRACERS_SIZE.h if compiling pkg/ptracers
                0081 #ifndef ALLOW_PTRACERS
01a4b8e46d Patr*0082       INTEGER    maxpass
20dee61641 Mart*0083       PARAMETER( maxpass   = 2 )
01a4b8e46d Patr*0084 #endif
20dee61641 Mart*0085 C     maxcube :: for Multi-Dim advection, max number of horizontal directions
01a4b8e46d Patr*0086       INTEGER    maxcube
20dee61641 Mart*0087       PARAMETER( maxcube   = 2 )
                0088 
                0089 #ifdef ALLOW_CG2D_NSA
                0090 C     Parameter that is needed for the tape complev_cg2d_iter
                0091 C     cannot be smaller than the allowed number of iterations in cg2d
                0092 C     (numItersMax >= cg2dMaxIters in data-file)
                0093       INTEGER numItersMax
                0094       PARAMETER ( numItersMax = 100 )
                0095 #endif
01a4b8e46d Patr*0096 
20dee61641 Mart*0097 #endif /* ALLOW_AUTODIFF_TAMC */
                0098 C     ================================================================
                0099 C     END OF HEADER TAMC
                0100 C     ================================================================