Back to home page

MITgcm

 
 

    


File indexing completed on 2025-11-07 06:08:13 UTC

view on githubraw file Latest commit b7411f1a on 2025-11-06 19:05:26 UTC
34f80e9da1 Jean*0001 #include "PACKAGES_CONFIG.h"
                0002 #include "CPP_OPTIONS.h"
                0003 
                0004 CBOP
                0005 C     !ROUTINE: TURNOFF_MODEL_IO
                0006 C     !INTERFACE:
                0007       SUBROUTINE TURNOFF_MODEL_IO( seqFlag, myThid )
                0008 
                0009 C     !DESCRIPTION: \bv
                0010 C     *==========================================================*
                0011 C     | SUBROUTINE TURNOFF_MODEL_IO
                0012 C     | o Turn off some of the model output flags
                0013 C     *==========================================================*
                0014 C     | Used in adjoint simulation (and called after the first
4870dd98f1 Jean*0015 C     |  forward sweep) to avoid writing output multiple times (if
34f80e9da1 Jean*0016 C     |  recomputations and/or grdchk) with the same iter number.
                0017 C     *==========================================================*
                0018 C     \ev
                0019 
                0020 C     !USES:
                0021       IMPLICIT NONE
                0022 C     === Global variables ===
                0023 #include "SIZE.h"
                0024 #include "EEPARAMS.h"
                0025 #include "PARAMS.h"
4870dd98f1 Jean*0026 c#ifdef ALLOW_MNC
                0027 c# include "MNC_PARAMS.h"
34f80e9da1 Jean*0028 c#endif
4870dd98f1 Jean*0029 #ifdef ALLOW_EXF
                0030 # include "EXF_PARAM.h"
                0031 #endif
6a7c361f54 Jean*0032 #ifdef ALLOW_OBCS
a9eb030de2 Jean*0033 # include "OBCS_PARAMS.h"
6a7c361f54 Jean*0034 #endif
906a61c194 Ou W*0035 #ifdef ALLOW_ECCO
13d362b8c1 Ou W*0036 # include "ECCO_SIZE.h"
                0037 # include "ECCO.h"
906a61c194 Ou W*0038 #endif
34f80e9da1 Jean*0039 
                0040 C     !INPUT/OUTPUT PARAMETERS:
                0041 C     seqFlag :: flag that indicates where this S/R is called from:
                0042 C             :: =0 called at the end of S/R COST_FINAL
                0043 C             :: =1 called at initialisation when using DIVA
                0044 C     myThid  :: My Thread Id number
                0045       INTEGER seqFlag
                0046       INTEGER myThid
                0047 
                0048 C     !LOCAL VARIABLES:
4870dd98f1 Jean*0049 c     CHARACTER*(MAX_LEN_MBUF) msgBuf
34f80e9da1 Jean*0050 CEOP
                0051 
                0052       _BARRIER
                0053 
4870dd98f1 Jean*0054 C--   only master-thread resets shared flags (in common block)
34f80e9da1 Jean*0055       _BEGIN_MASTER( myThid )
4870dd98f1 Jean*0056 
34f80e9da1 Jean*0057 C--   Set output freq. to zero to avoid re-write of
                0058 C     averaged fields in reverse checkpointing loops
                0059       monitorFreq  = 0.
                0060       dumpFreq     = 0.
6a7c361f54 Jean*0061       diagFreq     = 0.
4870dd98f1 Jean*0062       chkPtFreq    = 0.
34f80e9da1 Jean*0063       pChkPtFreq   = 0.
4870dd98f1 Jean*0064       dumpInitAndLast = .FALSE.
                0065       writePickupAtEnd= .FALSE.
337b46d524 Jean*0066       plotLevel    = 0
34f80e9da1 Jean*0067 
                0068 #ifdef ALLOW_MNC
4870dd98f1 Jean*0069 C--   Not the best solution to fix some MNC output, since it is likely
                0070 C     that the same problem exists when we do not use MNC. A better fix
                0071 C     is to switch off the specific output freq; leave this commented out.
                0072 c     monitor_mnc  = .FALSE.
                0073 c     snapshot_mnc = .FALSE.
34f80e9da1 Jean*0074 #endif
                0075 
4870dd98f1 Jean*0076 #ifdef ALLOW_EXF
                0077 C-    should call a S/R EXF_TURNOFF_IO (like SEAICE) to reset this flag
                0078       IF ( useEXF ) exf_monFreq = 0.
                0079 #endif
34f80e9da1 Jean*0080 
6a7c361f54 Jean*0081 #ifdef ALLOW_OBCS
                0082 C-    should call a S/R OBCS_TURNOFF_IO (like SEAICE) to reset this flag
                0083       IF ( useOBCS ) OBCS_monitorFreq = 0.
                0084 #endif
                0085 
906a61c194 Ou W*0086 #ifdef ALLOW_ECCO
                0087 C-    should call a S/R ECCO_TURNOFF_IO (like SEAICE) to reset this flag
                0088       IF ( useECCO ) ecco_output_sterGloH = .FALSE.
                0089 #endif
                0090 
34f80e9da1 Jean*0091 C--   Disable SBO output
                0092       useSBO       = .FALSE.
                0093 
6645f319a7 Patr*0094 C--   Disable layers package
                0095       useLayers    = .FALSE.
                0096 
34f80e9da1 Jean*0097 C--   For now, also disable diagnostics output (might need to change
                0098 C     this if we want to use diagnostics to output adjoint-variables)
                0099       useDiagnostics = .FALSE.
                0100 
                0101       _END_MASTER( myThid )
                0102 
4870dd98f1 Jean*0103 C--   Package specific S/R to turn-off IO flags (all threads do call S/R)
                0104 
                0105 #ifdef ALLOW_SEAICE
                0106       IF ( useSEAICE ) THEN
                0107         CALL SEAICE_TURNOFF_IO( seqFlag, myThid )
                0108       ENDIF
                0109 #endif
                0110 
8257bc3b3f Jean*0111 #ifdef ALLOW_THSICE
                0112       IF ( useThSIce ) THEN
                0113         CALL THSICE_TURNOFF_IO( seqFlag, myThid )
                0114       ENDIF
                0115 #endif
                0116 
4870dd98f1 Jean*0117 #ifdef ALLOW_PTRACERS
                0118       IF ( usePTRACERS ) THEN
                0119         CALL PTRACERS_TURNOFF_IO( seqFlag, myThid )
                0120       ENDIF
                0121 #endif
                0122 
                0123 C--   each thread waits for flags to be reset.
34f80e9da1 Jean*0124       _BARRIER
                0125 
                0126       RETURN
                0127       END