File indexing completed on 2021-11-06 05:18:36 UTC
view on githubraw file Latest commit 016b84c4 on 2021-11-02 20:24:44 UTC
08be60903a Mart*0001 #include "PP81_OPTIONS.h"
0002
0003
0004
0005
0006
0007 SUBROUTINE PP81_READPARMS( myThid )
0008
0009
0010
0011
0012
0013 IMPLICIT NONE
0014 #include "SIZE.h"
0015 #include "EEPARAMS.h"
0016 #include "PP81.h"
0017 #include "PARAMS.h"
0018
0019
0020
0021 INTEGER myThid
0022
0023
0024
0025
0026 #ifdef ALLOW_PP81
0027
0028
98bf704dd5 Jean*0029
0030
08be60903a Mart*0031 INTEGER iUnit
0032 CHARACTER*(MAX_LEN_MBUF) msgBuf
0033
0034
0035 NAMELIST /PP81_PARM01/
0036 & PPnRi,
5e48dccc42 Jean*0037 & PPviscMin,
0038 & PPdiffMin,
0039 & PPviscMax,
0040 & PPnu0,
08be60903a Mart*0041 & PPalpha,
0042 & PPdumpFreq,
0043 & PPMixingMaps,
016b84c482 Mart*0044 & PPwriteState
08be60903a Mart*0045
ae4c29e0db Jean*0046
0047
0048 IF ( .NOT.usePP81 ) THEN
0049
0050 _BEGIN_MASTER(myThid)
0051
0052 PP81isON = .FALSE.
0053
0054 CALL PACKAGES_UNUSED_MSG( 'usePP81', ' ', ' ' )
0055 _END_MASTER(myThid)
0056 RETURN
0057 ENDIF
0058
08be60903a Mart*0059
0060
ae4c29e0db Jean*0061 PP81isON = .TRUE.
08be60903a Mart*0062
0063
0064 PPnRi = 2
0065 PPviscMin = 0. _d 0
0066 PPdiffMin = 0. _d 0
0067 PPviscMax = 1. _d 0
0068 PPnu0 = 1. _d -02
0069 PPalpha = 5. _d 0
0070 RiLimit = UNSET_RL
0071 PPdumpFreq = dumpFreq
0072 PPMixingMaps = .FALSE.
0073 PPwriteState = .FALSE.
0074
0075
0076 _BEGIN_MASTER(myThid)
0077 WRITE(msgBuf,'(A)') ' PP81_READPARMS: opening data.pp81'
0078 CALL PRINT_MESSAGE(msgBuf, standardMessageUnit,
0079 & SQUEEZE_RIGHT , 1)
0080 CALL OPEN_COPY_DATA_FILE(
0081 I 'data.pp81', 'PP81_READPARMS',
0082 O iUnit,
0083 I myThid )
0084 READ(UNIT=iUnit,NML=PP81_PARM01)
0085 WRITE(msgBuf,'(A)')
0086 & ' PP81_READPARMS: finished reading data.pp81'
0087 CALL PRINT_MESSAGE(msgBuf, standardMessageUnit,
0088 & SQUEEZE_RIGHT , 1)
0089
0090
7a77863887 Mart*0091 #ifdef SINGLE_DISK_IO
08be60903a Mart*0092 CLOSE(iUnit)
7a77863887 Mart*0093 #else
0094 CLOSE(iUnit,STATUS='DELETE')
0095 #endif /* SINGLE_DISK_IO */
08be60903a Mart*0096 _END_MASTER(myThid)
0097
0098
0099 _BARRIER
0100
5e48dccc42 Jean*0101
08be60903a Mart*0102 IF ( PPviscMax .LE. 0. ) THEN
0103 WRITE(msgBuf,'(A)') 'PPviscMax must be greater than zero'
0104 CALL PRINT_ERROR( msgBuf , 1)
0105 STOP 'ABNORMAL END: S/R PP81_READPARMS'
0106 ENDIF
0107 IF ( PPalpha .EQ. 0. ) THEN
0108 WRITE(msgBuf,'(A)') 'PPalpha must not be zero'
0109 CALL PRINT_ERROR( msgBuf , 1)
0110 STOP 'ABNORMAL END: S/R PP81_READPARMS'
0111 ENDIF
0112 IF ( PPnRi .EQ. 0 ) THEN
0113 WRITE(msgBuf,'(A)') 'PPnRi must not be zero'
0114 CALL PRINT_ERROR( msgBuf , 1)
0115 STOP 'ABNORMAL END: S/R PP81_READPARMS'
0116 ENDIF
0117 IF ( RiLimit .EQ. UNSET_RL ) THEN
5e48dccc42 Jean*0118 RiLimit = PPnRi
0119 RiLimit = (
0120 & ((PPnu0+viscArNr(1))/PPviscMax)**(1. _d 0/RiLimit)
0121 & -1. _d 0
0122 & )/PPalpha
08be60903a Mart*0123 ENDIF
0124 #endif /* ALLOW_PP81 */
0125
0126 RETURN
0127 END