File indexing completed on 2021-08-21 05:11:24 UTC
view on githubraw file Latest commit 31f96e93 on 2021-08-20 15:23:40 UTC
89474f9a5c Mart*0001 #include "GGL90_OPTIONS.h"
0002
31a3206180 Mart*0003
0004
0005
d7017b4e4b Davi*0006 SUBROUTINE GGL90_INIT_VARIA( myThid )
89474f9a5c Mart*0007
31a3206180 Mart*0008
0009
0010
0011
0012
0013
0014
0015
89474f9a5c Mart*0016 IMPLICIT NONE
0017
0018 #include "SIZE.h"
0019 #include "EEPARAMS.h"
0020 #include "PARAMS.h"
0021 #include "GRID.h"
0022 #include "GGL90.h"
0023
31a3206180 Mart*0024
89474f9a5c Mart*0025
0026
0027 INTEGER myThid
0028
31a3206180 Mart*0029 #ifdef ALLOW_GGL90
89474f9a5c Mart*0030
0031
0320e25227 Mart*0032
89474f9a5c Mart*0033 INTEGER bi, bj
0320e25227 Mart*0034 INTEGER i, j, k
89474f9a5c Mart*0035
0036
0037
0038 DO bj = myByLo(myThid), myByHi(myThid)
0039 DO bi = myBxLo(myThid), myBxHi(myThid)
0040
0041
0320e25227 Mart*0042 DO k=1,Nr
0043 DO j=1-OLy,sNy+OLy
0044 DO i=1-OLx,sNx+OLx
0045 GGL90viscArU(i,j,k,bi,bj) = 0. _d 0
0046 GGL90viscArV(i,j,k,bi,bj) = 0. _d 0
0047 GGL90diffKr(i,j,k,bi,bj) = 0. _d 0
31a3206180 Mart*0048 IF ( useIDEMIX) THEN
0320e25227 Mart*0049 GGL90TKE(i,j,k,bi,bj)=GGL90eps*maskC(i,j,k,bi,bj)
31a3206180 Mart*0050 ELSE
89474f9a5c Mart*0051
0320e25227 Mart*0052 GGL90TKE(i,j,k,bi,bj)=GGL90TKEmin*maskC(i,j,k,bi,bj)
31a3206180 Mart*0053 ENDIF
89474f9a5c Mart*0054 ENDDO
0055 ENDDO
0056 ENDDO
0057
0058
0059
0060 ENDDO
0061 ENDDO
0062
31a3206180 Mart*0063 #ifdef ALLOW_GGL90_IDEMIX
0064
0065
0066
0067
0068 DO bj = myByLo(myThid), myByHi(myThid)
0069 DO bi = myBxLo(myThid), myBxHi(myThid)
0070
0320e25227 Mart*0071 DO k=1,Nr
0072 DO j=1-OLy,sNy+OLy
0073 DO i=1-OLx,sNx+OLx
31f96e9372 Jean*0074 IDEMIX_E(i,j,k,bi,bj) = 0. _d 0
31a3206180 Mart*0075 ENDDO
0076 ENDDO
0077 ENDDO
0078
0320e25227 Mart*0079 DO j=1-OLy,sNy+OLy
0080 DO i=1-OLx,sNx+OLx
0081 IDEMIX_F_B(i,j,bi,bj) = 0. _d 0
0082 IDEMIX_F_S(i,j,bi,bj) = 0. _d 0
31a3206180 Mart*0083 ENDDO
0084 ENDDO
0085
0086 ENDDO
0087 ENDDO
0088
0089
0090
0091 IF ( useIDEMIX .AND. IDEMIX_tidal_file .NE. ' ' ) THEN
0092 CALL READ_REC_XY_RL( IDEMIX_tidal_file,IDEMIX_F_b,1,0,myThid )
0093 _EXCH_XY_RL(IDEMIX_F_b,myThid)
0094
0095 DO bj = myByLo(myThid), myByHi(myThid)
0096 DO bi = myBxLo(myThid), myBxHi(myThid)
0320e25227 Mart*0097 DO j=1-OLy,sNy+OLy
0098 DO i=1-OLx,sNx+OLx
38cd2e647d Jean*0099 IDEMIX_F_b(i,j,bi,bj) = -MAX(0. _d 0,
31a3206180 Mart*0100 & MIN(1. _d 0,IDEMIX_F_b(i,j,bi,bj)))
0101
0102 IDEMIX_F_b(i,j,bi,bj) = IDEMIX_frac_F_b*
0103
38cd2e647d Jean*0104 & IDEMIX_F_b(i,j,bi,bj)/1024. _d 0
31a3206180 Mart*0105 ENDDO
0106 ENDDO
0107 ENDDO
0108 ENDDO
0109 ENDIF
38cd2e647d Jean*0110
31a3206180 Mart*0111 IF ( useIDEMIX .AND. IDEMIX_wind_file .NE. ' ' ) THEN
0112 CALL READ_REC_XY_RL( IDEMIX_wind_file ,IDEMIX_F_s,1,0,myThid )
0113 _EXCH_XY_RL(IDEMIX_F_s,myThid)
0114 DO bj = myByLo(myThid), myByHi(myThid)
0115 DO bi = myBxLo(myThid), myBxHi(myThid)
0320e25227 Mart*0116 DO j=1-OLy,sNy+OLy
0117 DO i=1-OLx,sNx+OLx
38cd2e647d Jean*0118 IDEMIX_F_s(i,j,bi,bj) = MAX(0. _d 0,
31a3206180 Mart*0119 & MIN(1. _d 0,IDEMIX_F_s(i,j,bi,bj)))
0120
0121 IDEMIX_F_s(i,j,bi,bj) = IDEMIX_frac_F_s*
0122
0123 & IDEMIX_F_s(i,j,bi,bj)/1024.
0124 ENDDO
0125 ENDDO
0126 ENDDO
0127 ENDDO
0128 ENDIF
0129 #endif /* ALLOW_GGL90_IDEMIX */
0130
5b187c067b Jean*0131 IF ( nIter0.NE.0 .OR. pickupSuff.NE.' ' ) THEN
4ae2976890 Jean*0132 CALL GGL90_READ_PICKUP( nIter0, myThid )
89474f9a5c Mart*0133 ELSE
0134
0135 IF ( GGL90TKEFile .NE. ' ' ) THEN
0136 CALL READ_FLD_XYZ_RL( GGL90TKEFile, ' ', GGL90TKE, 0, myThid )
6637358eea Jean*0137 _EXCH_XYZ_RL(GGL90TKE,myThid)
89474f9a5c Mart*0138 DO bj=myByLo(myThid),myByHi(myThid)
0139 DO bi=myBxLo(myThid),myBxHi(myThid)
0320e25227 Mart*0140 DO k=1,Nr
0141 DO j=1-OLy,sNy+OLy
0142 DO i=1-OLx,sNx+OLx
0143 GGL90TKE(i,j,k,bi,bj) = MAX(GGL90TKE(i,j,k,bi,bj),
0144 & GGL90TKEmin)*maskC(i,j,k,bi,bj)
89474f9a5c Mart*0145 ENDDO
0146 ENDDO
0147 ENDDO
0148 ENDDO
0149 ENDDO
0150 ENDIF
4ae2976890 Jean*0151 ENDIF
89474f9a5c Mart*0152
0153 #endif /* ALLOW_GGL90 */
0154
0155 RETURN
0156 END