File indexing completed on 2024-02-29 06:10:25 UTC
view on githubraw file Latest commit a4576c7c on 2024-02-28 22:55:11 UTC
d29d98918f Jean*0001 #include "GMREDI_OPTIONS.h"
0002
0003
0004
0005
0006 SUBROUTINE GMREDI_INIT_FIXED( myThid )
0007
0008
0009
0010
f6de204bec Jean*0011
d29d98918f Jean*0012
0013
0014
f6de204bec Jean*0015
d29d98918f Jean*0016
0017 IMPLICIT NONE
0018
0019
0020 #include "EEPARAMS.h"
0021 #include "SIZE.h"
0022 #include "PARAMS.h"
a4576c7cde Juli*0023 #include "GRID.h"
f6de204bec Jean*0024 #include "GMREDI.h"
d29d98918f Jean*0025
0026
0027
0028
0029 INTEGER myThid
0030
0031
f6de204bec Jean*0032
0033 INTEGER ILNBLNK
0034 INTEGER MDS_RECLEN
0035 EXTERNAL ILNBLNK
0036 EXTERNAL MDS_RECLEN
0037
d29d98918f Jean*0038
0039
f6de204bec Jean*0040 INTEGER i,j,k
0041 INTEGER bi,bj
0042
0043
0044 DO bj = myByLo(myThid), myByHi(myThid)
0045 DO bi = myBxLo(myThid), myBxHi(myThid)
94a8024bbe Jean*0046 DO j=1-OLy,sNy+OLy
0047 DO i=1-OLx,sNx+OLx
f6de204bec Jean*0048 GM_isoFac2d(i,j,bi,bj) = 1. _d 0
0049 GM_bolFac2d(i,j,bi,bj) = 1. _d 0
a4576c7cde Juli*0050 #ifdef GM_GEOM_VARIABLE_K
0051
0052 GEOM_taper(i,j,bi,bj) = ( ( oneRL
0053 & - TANH( ( R_low(i,j,bi,bj) - rF(1) + 800. _d 0 )/ 300. _d 0 )
0054 & )*halfRL )**2
0055 #endif /* GM_GEOM_VARIABLE_K */
f6de204bec Jean*0056 ENDDO
0057 ENDDO
0058 ENDDO
0059 ENDDO
0060
0061
0062 IF ( GM_iso2dFile .NE. ' ' ) THEN
0063 CALL READ_FLD_XY_RS( GM_iso2dFile, ' ', GM_isoFac2d, 0, myThid )
0064 CALL EXCH_XY_RS( GM_isoFac2d, myThid )
0065 ENDIF
0066 IF ( GM_bol2dFile .NE. ' ' ) THEN
0067 CALL READ_FLD_XY_RS( GM_bol2dFile, ' ', GM_bolFac2d, 0, myThid )
0068 CALL EXCH_XY_RS( GM_bolFac2d, myThid )
0069 ENDIF
0070
0071
0072 _BEGIN_MASTER( myThid )
0073
0074 DO k=1,Nr
0075 GM_isoFac1d(k) = 1. _d 0
0076 GM_bolFac1d(k) = 1. _d 0
0077 ENDDO
0078
0079
0080 IF ( GM_iso1dFile .NE. ' ' ) THEN
0081 CALL READ_GLVEC_RS( GM_iso1dFile, ' ',
0082 & GM_isoFac1d, Nr, 1, myThid )
0083 ENDIF
0084 IF ( GM_bol1dFile .NE. ' ' ) THEN
0085 CALL READ_GLVEC_RS( GM_bol1dFile, ' ',
0086 & GM_bolFac1d, Nr, 1, myThid )
0087 ENDIF
0088 _END_MASTER( myThid )
0089
0090
0091 _BARRIER
0092
94a8024bbe Jean*0093 #ifdef GM_READ_K3D_REDI
0094
0095 DO bj = myByLo(myThid), myByHi(myThid)
0096 DO bi = myBxLo(myThid), myBxHi(myThid)
0097 DO k=1,Nr
0098 DO j=1-OLy,sNy+OLy
0099 DO i=1-OLx,sNx+OLx
0100 GM_inpK3dRedi(i,j,k,bi,bj) = GM_isopycK
0101 & *GM_isoFac1d(k)*GM_isoFac2d(i,j,bi,bj)
0102 ENDDO
0103 ENDDO
0104 ENDDO
0105 ENDDO
0106 ENDDO
0107
0108 IF ( GM_K3dRediFile .NE. ' ' ) THEN
0109 CALL READ_FLD_XYZ_RL( GM_K3dRediFile, ' ',
0110 & GM_inpK3dRedi, 0, myThid )
0111 CALL EXCH_XYZ_RL( GM_inpK3dRedi, myThid )
0112 CALL WRITE_FLD_XYZ_RL( 'KapRedi', ' ', GM_inpK3dRedi, 0, myThid )
0113 ENDIF
0114 #endif
0115 #ifdef GM_READ_K3D_GM
0116
0117 DO bj = myByLo(myThid), myByHi(myThid)
0118 DO bi = myBxLo(myThid), myBxHi(myThid)
0119 DO k=1,Nr
0120 DO j=1-OLy,sNy+OLy
0121 DO i=1-OLx,sNx+OLx
0122 GM_inpK3dGM(i,j,k,bi,bj) = GM_background_K
0123 & *GM_bolFac1d(k)*GM_bolFac2d(i,j,bi,bj)
0124 ENDDO
0125 ENDDO
0126 ENDDO
0127 ENDDO
0128 ENDDO
0129
0130 IF ( GM_K3dGMFile .NE. ' ' ) THEN
0131 CALL READ_FLD_XYZ_RL( GM_K3dGMFile, ' ',
0132 & GM_inpK3dGM, 0, myThid )
0133 CALL EXCH_XYZ_RL( GM_inpK3dGM, myThid )
0134 CALL WRITE_FLD_XYZ_RL( 'KapGM', ' ', GM_inpK3dGM, 0, myThid )
0135 ENDIF
0136 #endif
0137
f6de204bec Jean*0138
d29d98918f Jean*0139
971f463862 Jean*0140 #ifdef ALLOW_MNC
0141 IF (useMNC) THEN
0142 CALL GMREDI_MNC_INIT( myThid )
0143 ENDIF
0144 #endif /* ALLOW_MNC */
0145
d29d98918f Jean*0146 #ifdef ALLOW_DIAGNOSTICS
0147 IF ( useDiagnostics ) THEN
0148 CALL GMREDI_DIAGNOSTICS_INIT( myThid )
0149 ENDIF
0150 #endif
0151
0152 RETURN
0153 END