Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:41:01 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
d7ce0d34f8 Jean*0001 #include "GAD_OPTIONS.h"
                0002 
                0003 CBOP
                0004 C     !ROUTINE: GAD_INIT_VARIA
                0005 C     !INTERFACE:
                0006       SUBROUTINE GAD_INIT_VARIA( myThid )
                0007 
                0008 C     !DESCRIPTION: \bv
                0009 C     *==========================================================*
                0010 C     | SUBROUTINE GAD_INIT_VARIA
                0011 C     | o Routine to initialize GAD variables
                0012 C     *==========================================================*
                0013 C     \ev
                0014 C     !USES:
                0015       IMPLICIT NONE
                0016 
                0017 C     === Global variables ===
                0018 #include "SIZE.h"
                0019 #include "EEPARAMS.h"
                0020 #include "PARAMS.h"
                0021 c #include "GRID.h"
                0022 #include "GAD.h"
                0023 #include "GAD_SOM_VARS.h"
                0024 
                0025 C     !INPUT/OUTPUT PARAMETERS:
                0026 C     === Routine arguments ===
                0027 C     myThid ::  my Thread Id number
                0028       INTEGER myThid
                0029 CEOP
                0030 
6e23417f74 Jean*0031 #ifdef GAD_ALLOW_TS_SOM_ADV
d7ce0d34f8 Jean*0032 C     !LOCAL VARIABLES:
                0033 C     === Local variables ===
                0034       INTEGER i,j,k,bi,bj
                0035       INTEGER n
                0036 
                0037       DO bj = myByLo(myThid), myByHi(myThid)
                0038        DO bi = myBxLo(myThid), myBxHi(myThid)
                0039 
                0040 C--   Initialize 1rst Order (3:x,y,z) and 2nd Order (6:xx,yy,zz,xy,xz,yz) moments
                0041         DO n=1,nSOM
                0042          DO k=1,Nr
                0043           DO j=1-Oly,sNy+OLy
                0044            DO i=1-Olx,sNx+Olx
                0045 C       pot.temp field:
                0046             som_T(i,j,k,bi,bj,n) = 0. _d 0
                0047 C       salinity field:
                0048             som_S(i,j,k,bi,bj,n) = 0. _d 0
                0049            ENDDO
                0050           ENDDO
                0051          ENDDO
                0052         ENDDO
                0053 
                0054 C- end bi,bj loops
                0055        ENDDO
                0056       ENDDO
                0057 
                0058       IF ( tempSOM_Advection .OR. saltSOM_Advection ) THEN
5b187c067b Jean*0059        IF ( startTime.EQ.baseTime .AND. nIter0.EQ.0
                0060      &                      .AND. pickupSuff.EQ.' ' ) THEN
d7ce0d34f8 Jean*0061 C-     Need to synchronize here before doing master-thread IO
                0062 c        _BARRIER
                0063 C-     Read-in initial conditions:
                0064 C        --- not yet coded ---
                0065 c        CALL GAD_SOM_EXCHANGES( myThid )
                0066        ELSE
                0067 C-     Read 2nd-O moments state from pickup files
                0068          CALL GAD_READ_PICKUP( nIter0, myThid )
                0069          CALL GAD_SOM_EXCHANGES( myThid )
                0070        ENDIF
                0071       ENDIF
                0072 
6e23417f74 Jean*0073 #endif /* GAD_ALLOW_TS_SOM_ADV */
d7ce0d34f8 Jean*0074 
                0075       RETURN
                0076       END