File indexing completed on 2018-03-02 18:41:36 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
1d478690dc Patr*0001 #include "KPP_OPTIONS.h"
0002
c9c3d7103f Ed H*0003
0004
0005
0006
0007
1d478690dc Patr*0008 SUBROUTINE KPP_READPARMS( myThid )
0009
c9c3d7103f Ed H*0010
0011
0012
0013
0014 IMPLICIT NONE
1d478690dc Patr*0015 #include "SIZE.h"
0016 #include "EEPARAMS.h"
0017 #include "PARAMS.h"
0018 #include "KPP_PARAMS.h"
0019
c9c3d7103f Ed H*0020
1d478690dc Patr*0021 INTEGER myThid
c9c3d7103f Ed H*0022
1d478690dc Patr*0023
c9c3d7103f Ed H*0024
1d478690dc Patr*0025 #ifdef ALLOW_KPP
8ce97507dd Jean*0026
0027
0028
1d478690dc Patr*0029 CHARACTER*(MAX_LEN_MBUF) msgBuf
cee16b76ae Dimi*0030 INTEGER errIO, iUnit
8ce97507dd Jean*0031
0032
0033 INTEGER nRetired
0034 LOGICAL KPPmixingMaps
0035 INTEGER num_v_smooth_BV, num_z_smooth_sh, num_m_smooth_sh
1d478690dc Patr*0036
0037
0038 NAMELIST /KPP_PARM01/
0039 & kpp_freq, kpp_dumpFreq, kpp_taveFreq,
8ce97507dd Jean*0040 & KPPwriteState, KPP_ghatUseTotalDiffus,
e750a5e49e Mart*0041 & KPPuseDoubleDiff, LimitHblStable,
1d478690dc Patr*0042 & minKPPhbl,
0043 & epsln, phepsi, epsilon, vonk, dB_dz,
0044 & conc1, conam, concm, conc2, zetam,
0045 & conas, concs, conc3, zetas,
0046 & Ricr, cekman, cmonob, concv, hbf,
d6f292d8c0 Jean*0047 & zmin, zmax, umin, umax,
8ce97507dd Jean*0048 & num_v_smooth_Ri,
1d478690dc Patr*0049 & Riinfty, BVSQcon, difm0, difs0, dift0,
0050 & difmcon, difscon, diftcon,
ae4c29e0db Jean*0051 & Rrho0, dsfmax,
8ce97507dd Jean*0052 & cstar,
0053 & KPPmixingMaps,
0054 & num_v_smooth_BV, num_z_smooth_sh, num_m_smooth_sh
1d478690dc Patr*0055
ae4c29e0db Jean*0056
0057
0058 IF ( .NOT.useKPP ) THEN
0059
0060 _BEGIN_MASTER(myThid)
0061
0062
0063 CALL PACKAGES_UNUSED_MSG( 'useKPP', ' ', ' ' )
0064 _END_MASTER(myThid)
0065 RETURN
0066 ENDIF
0067
1d478690dc Patr*0068 _BEGIN_MASTER(myThid)
0069
8ce97507dd Jean*0070 WRITE(msgBuf,'(A)') ' KPP_READPARMS: opening data.kpp'
1d478690dc Patr*0071 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
8ce97507dd Jean*0072 & SQUEEZE_RIGHT, myThid )
93abbf4908 Jean*0073 errIO = 0
1d478690dc Patr*0074 CALL OPEN_COPY_DATA_FILE(
8ce97507dd Jean*0075 I 'data.kpp', 'KPP_READPARMS',
1d478690dc Patr*0076 O iUnit,
0077 I myThid )
0078
0079
e750a5e49e Mart*0080 kpp_freq = deltaTClock
0081 kpp_dumpFreq = dumpFreq
0082 kpp_taveFreq = taveFreq
0083 KPPwriteState = .FALSE.
0084 KPPuseDoubleDiff = .FALSE.
0085 LimitHblStable = .TRUE.
08300bd1e7 Jean*0086 KPP_ghatUseTotalDiffus = .FALSE.
ee7edf0613 Davi*0087 minKPPhbl = UNSET_RL
1d478690dc Patr*0088
0089
0090
0091
0092
d6f292d8c0 Jean*0093
0094 epsln = 1. _d -20
0095 phepsi = 1. _d -10
0096 epsilon = 1. _d -1
0097 vonk = 0.4 _d 0
0098 dB_dz = 5.2 _d -5
0099 conc1 = 5. _d 0
0100 conam = 1.257 _d 0
0101 concm = 8.380 _d 0
0102 conc2 = 16. _d 0
0103 zetam = -0.2 _d 0
0104 conas = -28.86 _d 0
0105 concs = 98.96 _d 0
0106 conc3 = 16. _d 0
0107 zetas = -1. _d 0
0108
0109
0110
0111 Ricr = 0.3 _d 0
0112 cekman = 0.7 _d 0
0113 cmonob = 1. _d 0
0114 concv = 1.8 _d 0
0115 hbf = 1. _d 0
0116
0117
0118
0119
0120 zmin = -4. _d -7
0121 zmax = 0. _d 0
0122 umin = 0. _d 0
0123 umax = 4. _d -2
0124
0125
1d478690dc Patr*0126
0127 num_v_smooth_Ri = 0
d6f292d8c0 Jean*0128 Riinfty = 0.7 _d 0
0129 BVSQcon = -0.2 _d -4
1d478690dc Patr*0130
d6f292d8c0 Jean*0131 difm0 = 5. _d -3
0132 difs0 = 5. _d -3
0133 dift0 = 5. _d -3
1d478690dc Patr*0134
d6f292d8c0 Jean*0135 difmcon = 0.1 _d 0
0136 difscon = 0.1 _d 0
0137 diftcon = 0.1 _d 0
1d478690dc Patr*0138
e750a5e49e Mart*0139
0140
0141 Rrho0 = 1.9 _d 0
0142 dsfmax = 10. _d -3
0143
1d478690dc Patr*0144
0145
0146 cstar = 10.
0147
8ce97507dd Jean*0148
0149 nRetired = 0
0150 KPPmixingMaps = .FALSE.
0151 num_v_smooth_BV = UNSET_I
0152 num_z_smooth_sh = UNSET_I
0153 num_m_smooth_sh = UNSET_I
0154
1d478690dc Patr*0155
0156
0157
8ce97507dd Jean*0158 WRITE(msgBuf,'(A)') ' KPP_READPARMS ; starts to read KPP_PARM01'
0159 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0160 & SQUEEZE_RIGHT, myThid )
0161 READ( UNIT=iUnit, NML=KPP_PARM01 )
0162
0163
0164
0165
0166
1d478690dc Patr*0167 IF ( errIO .LT. 0 ) THEN
0168 WRITE(msgBuf,'(A)')
8ce97507dd Jean*0169 & 'S/R KPP_READPARMS: Error reading parameter file "data.kpp"'
0170 CALL PRINT_ERROR( msgBuf, myThid )
1d478690dc Patr*0171 WRITE(msgBuf,'(A)')
8ce97507dd Jean*0172 & 'S/R KPP_READPARMS: Problem in namelist KPP_PARM01'
0173 CALL PRINT_ERROR( msgBuf, myThid )
0174 STOP 'ABNORMAL END: S/R KPP_READPARMS'
0175 ELSE
0176 WRITE(msgBuf,'(A)') ' KPP_READPARMS ; read KPP_PARM01 : OK'
0177 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
0178 & SQUEEZE_RIGHT, myThid )
1d478690dc Patr*0179 ENDIF
0180
7a77863887 Mart*0181 #ifdef SINGLE_DISK_IO
1d478690dc Patr*0182 CLOSE(iUnit)
7a77863887 Mart*0183 #else
0184 CLOSE(iUnit,STATUS='DELETE')
0185 #endif /* SINGLE_DISK_IO */
1d478690dc Patr*0186
8ce97507dd Jean*0187 WRITE(msgBuf,'(A)') ' KPP_READPARMS: finished reading data.kpp'
1d478690dc Patr*0188 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
8ce97507dd Jean*0189 & SQUEEZE_RIGHT, myThid )
0190
0191
0192 IF ( KPPmixingMaps ) THEN
0193 nRetired = nRetired + 1
0194 WRITE(msgBuf,'(2A)') 'S/R KPP_READPARMS: "KPPmixingMaps"',
0195 & ' no longer allowed in file "data.kpp"'
0196 CALL PRINT_ERROR( msgBuf, myThid )
0197 ENDIF
0198 IF ( num_v_smooth_BV .NE. UNSET_I ) THEN
0199 nRetired = nRetired + 1
0200 WRITE(msgBuf,'(2A)') 'S/R KPP_READPARMS: "num_v_smooth_BV"',
0201 & ' no longer allowed in file "data.kpp"'
0202 CALL PRINT_ERROR( msgBuf, myThid )
0203 ENDIF
0204 IF ( num_z_smooth_sh .NE. UNSET_I ) THEN
0205 nRetired = nRetired + 1
0206 WRITE(msgBuf,'(2A)') 'S/R KPP_READPARMS: "num_z_smooth_sh"',
0207 & ' no longer allowed in file "data.kpp"'
0208 CALL PRINT_ERROR( msgBuf, myThid )
0209 ENDIF
0210 IF ( num_m_smooth_sh .NE. UNSET_I ) THEN
0211 nRetired = nRetired + 1
0212 WRITE(msgBuf,'(2A)') 'S/R KPP_READPARMS: "num_m_smooth_sh"',
0213 & ' no longer allowed in file "data.kpp"'
0214 CALL PRINT_ERROR( msgBuf, myThid )
0215 ENDIF
0216
0217 IF ( nRetired .GT. 0 ) THEN
0218 WRITE(msgBuf,'(2A)') 'S/R KPP_READPARMS: ',
0219 & 'Error reading file "data.kpp":'
0220 CALL PRINT_ERROR( msgBuf, myThid )
0221 WRITE(msgBuf,'(I4,A)') nRetired,
0222 & ' out-of-date parameters were found in the namelist(s)'
0223 CALL PRINT_ERROR( msgBuf, myThid )
0224
0225 CALL ALL_PROC_DIE( 0 )
0226 STOP 'ABNORMAL END: S/R KPP_READPARMS'
0227 ENDIF
1d478690dc Patr*0228
0229 _END_MASTER(myThid)
0230
0231
0232 _BARRIER
0233
0234 #endif /* ALLOW_KPP */
0235
d6f292d8c0 Jean*0236 RETURN
0237 END