Back to home page

MITgcm

 
 

    


File indexing completed on 2024-10-29 05:10:24 UTC

view on githubraw file Latest commit c9bf1633 on 2024-10-29 03:40:17 UTC
c9bf163375 Ivan*0001 #include "CPP_EEOPTIONS.h"
                0002 
                0003 C--  File zero_adj.F:
                0004 C--   Contents
                0005 C--   o G_ZERO_ADJ_1D
                0006 C--   o G_ZERO_ADJ_LOC
                0007 C--   o G_ZERO_ADJ
                0008 
                0009 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0010 CBOP
                0011 C     !ROUTINE: G_ZERO_ADJ_1D
                0012 C     !INTERFACE:
                0013       SUBROUTINE G_ZERO_ADJ_1D(
                0014      I                  NrIn, g_FieldFwd, myThid )
                0015 C     !DESCRIPTION: \bv
                0016 C     *==========================================================*
                0017 C     | o zero out a 1D tangent linear field
                0018 C     *==========================================================*
                0019 C     \ev
                0020 
                0021 C     !USES:
                0022       IMPLICIT NONE
                0023 C     === Global variables ===
                0024 #include "SIZE.h"
                0025 #include "EEPARAMS.h"
                0026 
                0027 C     !INPUT/OUTPUT PARAMETERS:
                0028 C     myThid :: my Thread Id number
                0029       INTEGER NrIn, myThid
                0030       _RL g_FieldFwd(NrIn)
                0031 
                0032 C     !LOCAL VARIABLES:
                0033       INTEGER k
                0034 CEOP
                0035 
                0036       DO k=1,NrIn
                0037          g_FieldFwd(k) = 0. _d 0
                0038       ENDDO
                0039 
                0040       RETURN
                0041       END
                0042 
                0043 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0044 CBOP
                0045 C     !ROUTINE: G_ZERO_ADJ_LOC
                0046 C     !INTERFACE:
                0047       SUBROUTINE G_ZERO_ADJ_LOC(
                0048      I                  NrIn, g_FieldFwd, myThid )
                0049 C     !DESCRIPTION: \bv
                0050 C     *==========================================================*
                0051 C     | o zero out a local (no nsx,nsy dims.) tangent linear field
                0052 C     *==========================================================*
                0053 C     \ev
                0054 
                0055 C     !USES:
                0056       IMPLICIT NONE
                0057 C     === Global variables ===
                0058 #include "SIZE.h"
                0059 #include "EEPARAMS.h"
                0060 
                0061 C     !INPUT/OUTPUT PARAMETERS:
                0062 C     myThid :: my Thread Id number
                0063       INTEGER NrIn, myThid
                0064       _RL g_FieldFwd(1-OLx:sNx+OLx,1-OLy:sNy+OLy,NrIn)
                0065 
                0066 C     !LOCAL VARIABLES:
                0067       INTEGER i,j,k
                0068 CEOP
                0069 
                0070       DO k=1,NrIn
                0071        DO j=1-OLy,sNy+OLy
                0072         DO i=1-OLx,sNx+OLx
                0073          g_FieldFwd(i,j,k) = 0. _d 0
                0074         ENDDO
                0075        ENDDO
                0076       ENDDO
                0077 
                0078       RETURN
                0079       END
                0080 
                0081 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0082 CBOP
                0083 C     !ROUTINE: G_ZERO_ADJ
                0084 C     !INTERFACE:
                0085       SUBROUTINE G_ZERO_ADJ(
                0086      I                  NrIn, g_FieldFwd, myThid )
                0087 C     !DESCRIPTION: \bv
                0088 C     *==========================================================*
                0089 C     | o zero out a full (incl. nsx,nsy dims.) tangent linear field
                0090 C     *==========================================================*
                0091 C     \ev
                0092 
                0093 C     !USES:
                0094       IMPLICIT NONE
                0095 C     === Global variables ===
                0096 #include "SIZE.h"
                0097 #include "EEPARAMS.h"
                0098 
                0099 C     !INPUT/OUTPUT PARAMETERS:
                0100 C     myThid :: my Thread Id number
                0101       INTEGER NrIn, myThid
                0102       _RL g_FieldFwd(1-OLx:sNx+OLx,1-OLy:sNy+OLy,NrIn,nSx,nSy)
                0103 
                0104 C     !LOCAL VARIABLES:
                0105       INTEGER bi,bj
                0106       INTEGER i,j,k
                0107 CEOP
                0108 
                0109       DO bj=myByLo(myThid),myByHi(myThid)
                0110        DO bi=myBxLo(myThid),myBxHi(myThid)
                0111         DO k=1,NrIn
                0112          DO j=1-OLy,sNy+OLy
                0113           DO i=1-OLx,sNx+OLx
                0114            g_FieldFwd(i,j,k,bi,bj) = 0. _d 0
                0115           ENDDO
                0116          ENDDO
                0117         ENDDO
                0118        ENDDO
                0119       ENDDO
                0120 
                0121       RETURN
                0122       END