Back to home page

MITgcm

 
 

    


File indexing completed on 2024-05-25 05:10:38 UTC

view on githubraw file Latest commit 00f81e67 on 2024-05-24 21:00:12 UTC
7bfe6112e8 Jean*0001 #include "CTRL_OPTIONS.h"
94a8024bbe Jean*0002 #ifdef ALLOW_GMREDI
                0003 # include "GMREDI_OPTIONS.h"
                0004 #endif
c69ccc91fb antn*0005 #ifdef ALLOW_SEAICE
                0006 # include "SEAICE_OPTIONS.h"
                0007 #endif
7b8b86ab99 Timo*0008 #ifdef ALLOW_SHELFICE
                0009 # include "SHELFICE_OPTIONS.h"
                0010 #endif
00f81e6785 Ou W*0011 #ifdef ALLOW_STEEP_ICECAVITY
                0012 # include "STIC_OPTIONS.h"
                0013 #endif
16cc32c739 Mart*0014 #ifdef ALLOW_STREAMICE
                0015 # include "STREAMICE_OPTIONS.h"
                0016 #endif
11c3150c71 Mart*0017 #ifdef ALLOW_DIC
                0018 # include "DIC_OPTIONS.h"
                0019 #endif
698b6992ee Jean*0020 
ffe95b3b07 Patr*0021 CBOP
74e877655a Jean*0022 C     !ROUTINE: CTRL_MAP_INI_GENARR
ffe95b3b07 Patr*0023 C     !INTERFACE:
74e877655a Jean*0024       SUBROUTINE CTRL_MAP_INI_GENARR( myThid )
ffe95b3b07 Patr*0025 
                0026 C     !DESCRIPTION: \bv
74e877655a Jean*0027 C     *=================================================================
                0028 C     | SUBROUTINE CTRL_MAP_INI_GENARR
                0029 C     | Add the generic arrays of the
                0030 C     | control vector to the model state and update the tile halos.
4d72283393 Mart*0031 C     | The control vector is defined in the header file "CTRL.h".
74e877655a Jean*0032 C     *=================================================================
ffe95b3b07 Patr*0033 C     \ev
                0034 
                0035 C     !USES:
74e877655a Jean*0036       IMPLICIT NONE
ffe95b3b07 Patr*0037 
74e877655a Jean*0038 C     == global variables ==
ffe95b3b07 Patr*0039 #include "SIZE.h"
                0040 #include "EEPARAMS.h"
                0041 #include "PARAMS.h"
                0042 #include "GRID.h"
                0043 #include "DYNVARS.h"
                0044 #include "FFIELDS.h"
c04085ad02 Patr*0045 #include "CTRL_SIZE.h"
4d72283393 Mart*0046 #include "CTRL.h"
edcd27be69 Mart*0047 #include "CTRL_DUMMY.h"
a6350907f1 Jean*0048 #include "CTRL_FIELDS.h"
c04085ad02 Patr*0049 #include "CTRL_GENARR.h"
94a8024bbe Jean*0050 #ifdef ALLOW_GMREDI
                0051 # include "GMREDI.h"
                0052 #endif
ffe95b3b07 Patr*0053 #ifdef ALLOW_PTRACERS
                0054 # include "PTRACERS_SIZE.h"
698b6992ee Jean*0055 # include "PTRACERS_PARAMS.h"
ffe95b3b07 Patr*0056 # include "PTRACERS_FIELDS.h"
                0057 #endif
c69ccc91fb antn*0058 #ifdef ALLOW_SEAICE
                0059 # include "SEAICE_SIZE.h"
                0060 # include "SEAICE.h"
                0061 #endif
7b8b86ab99 Timo*0062 #ifdef ALLOW_SHELFICE
                0063 # include "SHELFICE.h"
                0064 #endif
00f81e6785 Ou W*0065 #ifdef ALLOW_STEEP_ICECAVITY
                0066 # include "STIC.h"
                0067 #endif
16cc32c739 Mart*0068 #ifdef ALLOW_STREAMICE
                0069 # include "STREAMICE.h"
                0070 #endif
11c3150c71 Mart*0071 #if (defined ALLOW_DIC && defined DIC_BIOTIC)
                0072 # include "DIC_VARS.h"
                0073 #endif
ffe95b3b07 Patr*0074 
                0075 C     !INPUT/OUTPUT PARAMETERS:
a78204c019 Mart*0076 C     == routine arguments ==
74e877655a Jean*0077       INTEGER myThid
ffe95b3b07 Patr*0078 
698b6992ee Jean*0079 #if (defined (ALLOW_GENARR3D_CONTROL) && defined(ALLOW_PTRACERS))
                0080 C     !FUNCTIONS:
                0081       INTEGER  ILNBLNK
                0082       EXTERNAL ILNBLNK
                0083 #endif
                0084 
416fa3402d Gael*0085 C     !LOCAL VARIABLES:
a78204c019 Mart*0086 C     == local variables ==
bb18285007 Gael*0087 #if (defined (ALLOW_GENARR2D_CONTROL) || defined(ALLOW_GENARR3D_CONTROL))
698b6992ee Jean*0088       INTEGER iarr
96b006450c dngo*0089       CHARACTER*(MAX_LEN_FNAM) temp_genarr_fnam
bb18285007 Gael*0090 #endif
                0091 #ifdef ALLOW_GENARR2D_CONTROL
c69ccc91fb antn*0092       INTEGER igen_etan, igen_bdrag, igen_geoth
                0093 # ifdef ALLOW_SEAICE
                0094       INTEGER igen_siarea, igen_siheff
                0095 # endif
7b8b86ab99 Timo*0096 # ifdef ALLOW_SHELFICE
                0097       INTEGER igen_shiCoeffT, igen_shiCoeffS, igen_shiCDrag
9f5240b52a Jean*0098       INTEGER i, j, bi, bj
                0099 #  ifdef SHI_ALLOW_GAMMAFRICT
                0100       INTEGER k2
7b8b86ab99 Timo*0101       LOGICAL dragThermoEqualMom
9f5240b52a Jean*0102 #  endif
7b8b86ab99 Timo*0103 # endif
16cc32c739 Mart*0104 #ifdef ALLOW_STREAMICE
96b006450c dngo*0105       INTEGER igen_b_glen, igen_rlow_streamice
                0106       INTEGER igen_beta, igen_bdot_streamice
                0107       INTEGER igen_bdot_max_streamice
                0108       INTEGER igen_h_streamice
16cc32c739 Mart*0109 # endif
11c3150c71 Mart*0110 # if (defined ALLOW_DIC && defined DIC_BIOTIC)
                0111       INTEGER igen_alpha
                0112 # endif
bb18285007 Gael*0113 #endif /* ALLOW_GENARR2D_CONTROL */
                0114 #ifdef ALLOW_GENARR3D_CONTROL
698b6992ee Jean*0115       INTEGER igen_theta0, igen_salt0
                0116       INTEGER igen_kapgm, igen_kapredi, igen_diffkr
                0117 # if (defined (ALLOW_UVEL0_CONTROL) && defined (ALLOW_VVEL0_CONTROL))
                0118       INTEGER igen_uvel0, igen_vvel0
                0119 # endif
                0120 # ifdef ALLOW_PTRACERS
                0121       INTEGER iPtr, iLen
                0122       INTEGER igen_ptr(PTRACERS_num)
                0123 # endif
bb18285007 Gael*0124 #endif /* ALLOW_GENARR3D_CONTROL */
416fa3402d Gael*0125 CEOP
                0126 
b938a3c63b antn*0127 #ifdef ALLOW_DEBUG
                0128       IF (debugMode) CALL DEBUG_ENTER('CTRL_MAP_INI_GENARR', myThid )
                0129 #endif
416fa3402d Gael*0130 #ifdef ALLOW_GENARR2D_CONTROL
                0131 C--   generic 2D control variables
                0132 
164786015a Gael*0133       igen_etan=0
416fa3402d Gael*0134       igen_bdrag=0
                0135       igen_geoth=0
c69ccc91fb antn*0136 #ifdef ALLOW_SEAICE
                0137       igen_siarea=0
                0138       igen_siheff=0
                0139 #endif
7b8b86ab99 Timo*0140 #ifdef ALLOW_SHELFICE
                0141       igen_shiCoeffT=0
                0142       igen_shiCoeffS=0
                0143       igen_shiCDrag=0
                0144 #endif
16cc32c739 Mart*0145 #ifdef ALLOW_STREAMICE
                0146       igen_b_glen=0
96b006450c dngo*0147       igen_rlow_streamice=0
                0148       igen_beta=0
                0149       igen_bdot_streamice=0
                0150       igen_bdot_max_streamice=0
16cc32c739 Mart*0151       igen_h_streamice=0
                0152 #endif
416fa3402d Gael*0153       DO iarr = 1, maxCtrlArr2D
698b6992ee Jean*0154        IF (xx_genarr2d_weight(iarr).NE.' ') THEN
96b006450c dngo*0155         temp_genarr_fnam = xx_genarr2d_file(iarr)
                0156         IF (temp_genarr_fnam(1:7).EQ.'xx_etan')
164786015a Gael*0157      &     igen_etan=iarr
96b006450c dngo*0158         IF (temp_genarr_fnam(1:13).EQ.'xx_bottomdrag')
164786015a Gael*0159      &     igen_bdrag=iarr
96b006450c dngo*0160         IF (temp_genarr_fnam(1:13).EQ.'xx_geothermal')
164786015a Gael*0161      &     igen_geoth=iarr
c69ccc91fb antn*0162 #ifdef ALLOW_SEAICE
96b006450c dngo*0163         IF (temp_genarr_fnam(1:9).EQ.'xx_siarea')
c69ccc91fb antn*0164      &     igen_siarea=iarr
96b006450c dngo*0165         IF (temp_genarr_fnam(1:9).EQ.'xx_siheff')
c69ccc91fb antn*0166      &     igen_siheff=iarr
                0167 #endif
7b8b86ab99 Timo*0168 #ifdef ALLOW_SHELFICE
                0169 # ifndef SHI_ALLOW_GAMMAFRICT
96b006450c dngo*0170         IF (temp_genarr_fnam(1:12).EQ.'xx_shicoefft')
7b8b86ab99 Timo*0171      &     igen_shiCoeffT=iarr
96b006450c dngo*0172         IF (temp_genarr_fnam(1:12).EQ.'xx_shicoeffs')
7b8b86ab99 Timo*0173      &     igen_shiCoeffS=iarr
                0174 # else
96b006450c dngo*0175         IF (temp_genarr_fnam(1:11).EQ.'xx_shicdrag')
7b8b86ab99 Timo*0176      &     igen_shiCDrag=iarr
                0177 # endif
                0178 #endif
16cc32c739 Mart*0179 #ifdef ALLOW_STREAMICE
96b006450c dngo*0180         IF (temp_genarr_fnam(1:8).EQ.'xx_bglen')
16cc32c739 Mart*0181      &     igen_b_glen=iarr
96b006450c dngo*0182         IF (temp_genarr_fnam(1:17).EQ.'xx_rlow_streamice')
                0183      &     igen_h_streamice=iarr
                0184         IF (temp_genarr_fnam(1:7).EQ.'xx_beta')
                0185      &     igen_beta=iarr
                0186         IF (temp_genarr_fnam(1:7).EQ.'xx_bdot')
                0187      &     igen_bdot_streamice=iarr
                0188         IF (temp_genarr_fnam(1:11).EQ.'xx_bdot_max')
                0189      &     igen_bdot_max_streamice=iarr
                0190         IF (temp_genarr_fnam(1:11).EQ.'xx_h_streamice')
16cc32c739 Mart*0191      &     igen_h_streamice=iarr
                0192 #endif
11c3150c71 Mart*0193 #if (defined ALLOW_DIC && defined DIC_BIOTIC)
96b006450c dngo*0194         IF (temp_genarr_fnam(1:11).EQ.'xx_alpha')
11c3150c71 Mart*0195      &     igen_alpha=iarr
                0196 #endif
698b6992ee Jean*0197        ENDIF
416fa3402d Gael*0198       ENDDO
                0199 
698b6992ee Jean*0200       IF (igen_etan.GT.0) THEN
                0201         CALL CTRL_MAP_GENARR2D( etaN, igen_etan, myThid )
                0202       ENDIF
416fa3402d Gael*0203 #ifdef ALLOW_BOTTOMDRAG_CONTROL
698b6992ee Jean*0204       IF (igen_bdrag.GT.0)
                0205      &  CALL CTRL_MAP_GENARR2D( bottomDragFld, igen_bdrag, myThid )
416fa3402d Gael*0206 #endif
                0207 #ifdef ALLOW_GEOTHERMAL_FLUX
698b6992ee Jean*0208       IF (igen_geoth.GT.0)
                0209      &  CALL CTRL_MAP_GENARR2D( geothermalFlux, igen_geoth, myThid )
416fa3402d Gael*0210 #endif
c69ccc91fb antn*0211 
                0212 #ifdef ALLOW_SEAICE
                0213       IF (igen_siarea.GT.0)
                0214      &  CALL CTRL_MAP_GENARR2D(AREA,igen_siarea,myThid)
                0215       IF (igen_siheff.GT.0)
                0216      &  CALL CTRL_MAP_GENARR2D(HEFF,igen_siheff,myThid)
                0217 #endif
7b8b86ab99 Timo*0218 #ifdef ALLOW_SHELFICE
                0219 # ifndef SHI_ALLOW_GAMMAFRICT
                0220       IF (igen_shiCoeffT.GT.0)
a78204c019 Mart*0221      &  CALL CTRL_MAP_GENARR2D(shiTransCoeffT,igen_shiCoeffT,myThid)
7b8b86ab99 Timo*0222 
                0223       IF (igen_shiCoeffS.GT.0)
a78204c019 Mart*0224      &  CALL CTRL_MAP_GENARR2D(shiTransCoeffS,igen_shiCoeffS,myThid)
7b8b86ab99 Timo*0225 
                0226 C--   xx_shiCoeffS not used, but shiCoeffT is adjusted by xx_shicoefft
                0227       IF ((igen_shiCoeffS.EQ.0).AND.(igen_shiCoeffT.GT.0)) THEN
                0228        DO bj = myByLo(myThid), myByHi(myThid)
                0229         DO bi = myBxLo(myThid), myBxHi(myThid)
                0230          DO j = 1-OLy,sNy+OLy
                0231           DO i = 1-OLx,sNx+OLx
                0232            shiTransCoeffS(i,j,bi,bj) =
                0233      &       SHELFICEsaltToHeatRatio*shiTransCoeffT(i,j,bi,bj)
                0234           ENDDO
                0235          ENDDO
                0236         ENDDO
                0237        ENDDO
                0238 C--   xx_shiCoeffT not used, but shiCoeffS is adjusted by xx_shicoeffs
                0239       ELSEIF ((igen_shiCoeffT.EQ.0).AND.(igen_shiCoeffS.GT.0)) THEN
                0240        DO bj = myByLo(myThid), myByHi(myThid)
                0241         DO bi = myBxLo(myThid), myBxHi(myThid)
                0242          DO j = 1-OLy,sNy+OLy
                0243           DO i = 1-OLx,sNx+OLx
                0244            shiTransCoeffT(i,j,bi,bj) =
                0245      &       shiTransCoeffS(i,j,bi,bj)/SHELFICEsaltToHeatRatio
                0246           ENDDO
                0247          ENDDO
                0248         ENDDO
                0249        ENDDO
                0250       ENDIF
9f5240b52a Jean*0251 # else /* SHI_ALLOW_GAMMAFRICT */
7b8b86ab99 Timo*0252       dragThermoEqualMom = .FALSE.
c69ccc91fb antn*0253       IF (igen_shiCDrag.GT.0) THEN
                0254         CALL CTRL_MAP_GENARR2D(shiCDragFld,igen_shiCDrag,myThid)
7b8b86ab99 Timo*0255 C--     Set drag coefficient used in momentum equal to thermodynamic,
                0256 C--      u* drag coefficient
c69ccc91fb antn*0257         DO k2 = 1, maxCtrlProc
                0258          IF (xx_genarr2d_preproc_c(k2,igen_shiCDrag)(1:3).EQ.'mom')
                0259      &      dragThermoEqualMom = .TRUE.
                0260         ENDDO
                0261       ENDIF
7b8b86ab99 Timo*0262       IF (dragThermoEqualMom) THEN
                0263        DO bj = myByLo(myThid), myByHi(myThid)
                0264         DO bi = myBxLo(myThid), myBxHi(myThid)
                0265          DO j = 1-OLy,sNy+OLy
                0266           DO i = 1-OLx,sNx+OLx
                0267            shiDragQuadFld(i,j,bi,bj) = shiCDragFld(i,j,bi,bj)
                0268           ENDDO
                0269          ENDDO
                0270         ENDDO
                0271        ENDDO
                0272       ENDIF
                0273 # endif /* SHI_ALLOW_GAMMAFRICT */
                0274 #endif /* ALLOW_SHELFICE */
96b006450c dngo*0275 
16cc32c739 Mart*0276 #ifdef ALLOW_STREAMICE
96b006450c dngo*0277       IF (igen_bdot_max_streamice.GT.0) THEN
                0278 #ifdef ALLOW_OPENAD
                0279        streamice_bdot_maxmelt_v(1,1,1,1) =
                0280      &  streamice_bdot_maxmelt_v(1,1,1,1) +
                0281      &  0.0 * xx_genarr2d_dummy(igen_bdot_max_streamice)
                0282 #endif
                0283        CALL CTRL_MAP_GENARR2D( streamice_bdot_maxmelt_v,
                0284      &  igen_bdot_max_streamice, myThid )
                0285       ENDIF
                0286       IF (igen_bdot_streamice.GT.0) THEN
                0287 #ifdef ALLOW_OPENAD
                0288        bdot_streamice(1,1,1,1) = bdot_streamice(1,1,1,1) +
                0289      &  0.0 * xx_genarr2d_dummy(igen_bdot_streamice)
                0290 #endif
                0291        CALL CTRL_MAP_GENARR2D( bdot_streamice, igen_bdot_streamice,
                0292      &  myThid )
                0293       ENDIF
                0294       IF (igen_beta.GT.0) THEN
                0295 #ifdef ALLOW_OPENAD
                0296        C_basal_friction(1,1,1,1) = C_basal_friction(1,1,1,1) +
                0297      &  0.0 * xx_genarr2d_dummy(igen_beta)
                0298 #endif
                0299        CALL CTRL_MAP_GENARR2D( C_basal_friction, igen_beta, myThid )
                0300       ENDIF
                0301       IF (igen_rlow_streamice.GT.0) THEN
                0302 #ifdef ALLOW_OPENAD
                0303        r_low_si(1,1,1,1) = r_low_si(1,1,1,1) +
                0304      &  0.0 * xx_genarr2d_dummy(igen_rlow_streamice)
                0305 #endif
                0306        CALL CTRL_MAP_GENARR2D( r_low_si, igen_rlow_streamice, myThid )
                0307       ENDIF
                0308       IF (igen_b_glen.GT.0) THEN
                0309 #ifdef ALLOW_OPENAD
                0310        B_glen(1,1,1,1) = B_glen(1,1,1,1) +
                0311      &  0.0 * xx_genarr2d_dummy(igen_b_glen)
                0312 #endif
                0313        CALL CTRL_MAP_GENARR2D( B_glen, igen_b_glen, myThid )
                0314       ENDIF
                0315       IF (igen_h_streamice.GT.0) THEN
                0316 #ifdef ALLOW_OPENAD
                0317        h_streamice(1,1,1,1) = h_streamice(1,1,1,1) +
                0318      &  0.0 * xx_genarr2d_dummy(igen_h_streamice)
                0319 #endif
                0320        CALL CTRL_MAP_GENARR2D( h_streamice, igen_h_streamice, myThid )
                0321       ENDIF
16cc32c739 Mart*0322 #endif /* ALLOW_STREAMICE */
96b006450c dngo*0323 
11c3150c71 Mart*0324 #if (defined ALLOW_DIC && defined DIC_BIOTIC)
                0325       IF (igen_alpha.GT.0)
                0326      &  CALL CTRL_MAP_GENARR2D( alpha, igen_alpha, myThid )
                0327 #endif
416fa3402d Gael*0328 
                0329 #endif /* ALLOW_GENARR2D_CONTROL */
                0330 
                0331 #ifdef ALLOW_GENARR3D_CONTROL
                0332 C--   generic 3D control variables
                0333 
                0334       igen_theta0=0
                0335       igen_salt0=0
                0336       igen_kapgm=0
                0337       igen_kapredi=0
                0338       igen_diffkr=0
698b6992ee Jean*0339 # if (defined (ALLOW_UVEL0_CONTROL) && defined (ALLOW_VVEL0_CONTROL))
77f894c517 Timo*0340       igen_uvel0=0
                0341       igen_vvel0=0
698b6992ee Jean*0342 # endif
                0343 # ifdef ALLOW_PTRACERS
                0344       DO iPtr = 1, PTRACERS_num
                0345         igen_ptr(iPtr) = 0
                0346       ENDDO
                0347 # endif /* ALLOW_PTRACERS */
416fa3402d Gael*0348       DO iarr = 1, maxCtrlArr3D
698b6992ee Jean*0349        IF (xx_genarr3d_weight(iarr).NE.' ') THEN
                0350         IF (xx_genarr3d_file(iarr)(1:8).EQ.'xx_theta')
164786015a Gael*0351      &     igen_theta0=iarr
698b6992ee Jean*0352         IF (xx_genarr3d_file(iarr)(1:7).EQ.'xx_salt')
164786015a Gael*0353      &     igen_salt0=iarr
698b6992ee Jean*0354         IF (xx_genarr3d_file(iarr)(1:8).EQ.'xx_kapgm')
164786015a Gael*0355      &     igen_kapgm=iarr
698b6992ee Jean*0356         IF (xx_genarr3d_file(iarr)(1:10).EQ.'xx_kapredi')
164786015a Gael*0357      &     igen_kapredi=iarr
698b6992ee Jean*0358         IF (xx_genarr3d_file(iarr)(1:9).EQ.'xx_diffkr')
164786015a Gael*0359      &     igen_diffkr=iarr
00f81e6785 Ou W*0360 #if ( defined ALLOW_SHELFICE && defined ALLOW_SHITRANSCOEFF_3D )
                0361 # ifndef SHI_ALLOW_GAMMAFRICT
                0362         IF (xx_genarr3d_file(iarr)(1:17).EQ.'xx_shiTransCoeffT')
                0363      &     igen_shiCoeffT=iarr
                0364 # endif
                0365 #endif
                0366 
698b6992ee Jean*0367 # if (defined (ALLOW_UVEL0_CONTROL) && defined (ALLOW_VVEL0_CONTROL))
                0368         IF (xx_genarr3d_file(iarr)(1:7).EQ.'xx_uvel')
6b2230d510 Ou W*0369      &     igen_uvel0=iarr
698b6992ee Jean*0370         IF (xx_genarr3d_file(iarr)(1:7).EQ.'xx_vvel')
6b2230d510 Ou W*0371      &     igen_vvel0=iarr
698b6992ee Jean*0372 # endif
                0373 # ifdef ALLOW_PTRACERS
                0374         IF ( usePTRACERS ) THEN
                0375           iLen = ILNBLNK(xx_genarr3d_file(iarr))
                0376           IF ( iLen.EQ.7 .AND.
                0377      &         xx_genarr3d_file(iarr)(1:6).EQ.'xx_ptr' ) THEN
                0378             READ(xx_genarr3d_file(iarr)(7:7),*) iPtr
                0379             IF ( iPtr.GE.1 .AND. iPtr.LE.PTRACERS_numInUse )
                0380      &                  igen_ptr(iPtr) = iarr
                0381           ENDIF
                0382         ENDIF
                0383 # endif /* ALLOW_PTRACERS */
                0384        ENDIF
416fa3402d Gael*0385       ENDDO
                0386 
698b6992ee Jean*0387       IF (igen_theta0.GT.0)
                0388      &  CALL CTRL_MAP_GENARR3D( theta, igen_theta0, myThid )
                0389       IF (igen_salt0.GT.0)
                0390      &  CALL CTRL_MAP_GENARR3D( salt, igen_salt0, myThid )
94a8024bbe Jean*0391 # if ( defined ALLOW_KAPGM_CONTROL && defined GM_READ_K3D_GM )
698b6992ee Jean*0392       IF (igen_kapgm.GT.0)
94a8024bbe Jean*0393      &  CALL CTRL_MAP_GENARR3D( GM_inpK3dGM, igen_kapgm, myThid )
698b6992ee Jean*0394 # endif
94a8024bbe Jean*0395 # if ( defined ALLOW_KAPREDI_CONTROL && defined GM_READ_K3D_REDI )
698b6992ee Jean*0396       IF (igen_kapredi.GT.0)
94a8024bbe Jean*0397      &  CALL CTRL_MAP_GENARR3D( GM_inpK3dRedi, igen_kapredi, myThid )
698b6992ee Jean*0398 # endif
                0399 # if ( defined ALLOW_DIFFKR_CONTROL && defined ALLOW_3D_DIFFKR )
                0400       IF (igen_diffkr.GT.0)
                0401      &  CALL CTRL_MAP_GENARR3D( diffKr, igen_diffkr, myThid )
                0402 # endif
00f81e6785 Ou W*0403 #if ( defined ALLOW_SHELFICE && defined ALLOW_SHITRANSCOEFF_3D )
                0404       IF (igen_shiCoeffT.GT.0)
                0405      &  CALL CTRL_MAP_GENARR3D(shiTransCoeffT3d, igen_shiCoeffT, myThid)
                0406 #endif
698b6992ee Jean*0407 
                0408 # ifdef ALLOW_PTRACERS
                0409 CADJ loop = parallel
                0410       DO iPtr = 1, PTRACERS_num
                0411         IF ( igen_ptr(iPtr).GT.0 ) THEN
                0412           CALL CTRL_MAP_GENARR3D( pTracer(1-OLx,1-OLy,1,1,1,iPtr),
                0413      &                            igen_ptr(iPtr), myThid )
                0414         ENDIF
                0415       ENDDO
                0416 # endif /* ALLOW_PTRACERS */
                0417 
                0418 # if (defined (ALLOW_UVEL0_CONTROL) && defined (ALLOW_VVEL0_CONTROL))
                0419       IF (igen_uvel0.GT.0 .AND. igen_vvel0.GT.0) THEN
                0420         CALL CTRL_MAP_GENARR3D( uVel, igen_uvel0, myThid )
                0421         CALL CTRL_MAP_GENARR3D( vVel, igen_vvel0, myThid )
                0422         CALL EXCH_UV_XYZ_RL( uVel, vVel, .TRUE., myThid )
                0423       ENDIF
                0424 # endif
416fa3402d Gael*0425 
                0426 #endif /* ALLOW_GENARR3D_CONTROL */
                0427 
b938a3c63b antn*0428 #ifdef ALLOW_DEBUG
                0429       IF (debugMode) CALL DEBUG_LEAVE('CTRL_MAP_INI_GENARR', myThid )
                0430 #endif
                0431 
416fa3402d Gael*0432       RETURN
                0433       END