Back to home page

MITgcm

 
 

    


File indexing completed on 2023-09-16 05:10:04 UTC

view on githubraw file Latest commit 910e5c3e on 2023-09-15 15:45:07 UTC
2f58e54336 Gael*0001 #include "AUTODIFF_OPTIONS.h"
ab63ca39fb Gael*0002 #include "MDSIO_OPTIONS.h"
2f58e54336 Gael*0003 
910e5c3e29 Mart*0004 CBOP
                0005 C !ROUTINE: ADAUTODIFF_WHTAPEIO_SYNC
                0006 
                0007 C !INTERFACE: ==========================================================
                0008       SUBROUTINE ADAUTODIFF_WHTAPEIO_SYNC(
                0009      I     myLev, myStep, myThid )
                0010 C !DESCRIPTION:
                0011 C     Handwritten AD-routine of S/R AUTODIFF_WHTAPEIO_SYNC.  Used to set
                0012 C     and reseet the common block variable tapeFileUnit,
                0013 C     tapeFileCounter, and tapeBufferIO, etc. Only requried for tapes of
                0014 C     the initialisation phase
                0015 
                0016 C !USES: ===============================================================
2f58e54336 Gael*0017       IMPLICIT NONE
                0018 C     == Global variables ===
                0019 #include "SIZE.h"
                0020 #include "AUTODIFF.h"
ab63ca39fb Gael*0021 #ifdef ALLOW_WHIO_3D
                0022 # include "MDSIO_BUFF_WH.h"
                0023 #endif
2f58e54336 Gael*0024 
910e5c3e29 Mart*0025 C !INPUT PARAMETERS: ===================================================
                0026 C     myLev     :: tape level identifier
                0027 C     myStep    :: identifies from where this routine is called
                0028 C                  (1,0 = before after ad-routines)
                0029 C     myThid    :: my Thread Id number
                0030       INTEGER myThid
                0031       INTEGER myLev
                0032       INTEGER myStep
                0033 CEOP
2f58e54336 Gael*0034 
                0035 #ifdef ALLOW_AUTODIFF_WHTAPEIO
910e5c3e29 Mart*0036 C     reset
2f58e54336 Gael*0037       tapeFileUnit=0
                0038       tapeFileCounter=0
ab63ca39fb Gael*0039       tapeBufferIO=.FALSE.
910e5c3e29 Mart*0040 # ifdef ALLOW_WHIO_3D
ab63ca39fb Gael*0041       writeWh=.FALSE.
                0042       iWh=0
                0043       jWh=0
910e5c3e29 Mart*0044 # endif
                0045 C     This subroutine is always called first with myStep = 1 and then
                0046 C     with myStep = 0, so it is probably safe to always set the
                0047 C     tapeFileUnit here.
                0048       IF ( myStep .EQ. 1 ) THEN
                0049        tapeFileUnit = tapeFileUnitS(myLev)
                0050        tapeBufferIO = .TRUE.
                0051       ENDIF
2f58e54336 Gael*0052 #endif
                0053 
910e5c3e29 Mart*0054       RETURN
                0055       END