Changeset 3294 for trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfbfr.F90
- Timestamp:
- 2012-01-28T17:44:18+01:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/NEMOGCM/NEMO/OPA_SRC/ZDF/zdfbfr.F90
r2715 r3294 22 22 USE lib_mpp ! distributed memory computing 23 23 USE prtctl ! Print control 24 USE timing ! Timing 24 25 25 26 IMPLICIT NONE … … 36 37 REAL(wp) :: rn_bfrien = 30._wp ! local factor to enhance coefficient bfri 37 38 LOGICAL :: ln_bfr2d = .false. ! logical switch for 2D enhancement 38 39 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: bfrcoef2d ! 2D bottom drag coefficient39 LOGICAL , PUBLIC :: ln_bfrimp = .false. ! logical switch for implicit bottom friction 40 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:) :: bfrcoef2d ! 2D bottom drag coefficient 40 41 41 42 !! * Substitutions … … 82 83 REAL(wp) :: zvu, zuv, zecu, zecv ! temporary scalars 83 84 !!---------------------------------------------------------------------- 84 85 ! 86 IF( nn_timing == 1 ) CALL timing_start('zdf_bfr') 87 ! 85 88 IF( nn_bfr == 2 ) THEN ! quadratic botton friction 86 89 ! Calculate and store the quadratic bottom friction coefficient bfrua and bfrva … … 120 123 & tab2d_2=bfrva, clinfo2= ' v: ', mask2=vmask,ovlap=1 ) 121 124 ENDIF 125 126 ! 127 IF( nn_timing == 1 ) CALL timing_stop('zdf_bfr') 122 128 ! 123 129 END SUBROUTINE zdf_bfr … … 142 148 REAL(wp) :: zfru, zfrv ! - - 143 149 !! 144 NAMELIST/nambfr/ nn_bfr, rn_bfri1, rn_bfri2, rn_bfeb2, ln_bfr2d, rn_bfrien 145 !!---------------------------------------------------------------------- 146 150 NAMELIST/nambfr/ nn_bfr, rn_bfri1, rn_bfri2, rn_bfeb2, ln_bfr2d, rn_bfrien, ln_bfrimp 151 !!---------------------------------------------------------------------- 152 ! 153 IF( nn_timing == 1 ) CALL timing_start('zdf_bfr_init') 154 ! 147 155 REWIND ( numnam ) !* Read Namelist nam_bfr : bottom momentum boundary condition 148 156 READ ( numnam, nambfr ) … … 156 164 ! ! allocate zdfbfr arrays 157 165 IF( zdf_bfr_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'zdf_bfr_init : unable to allocate arrays' ) 166 167 ! ! Make sure ln_zdfexp=.false. when use implicit bfr 168 IF( ln_bfrimp .AND. ln_zdfexp ) THEN 169 IF(lwp) THEN 170 WRITE(numout,*) 171 WRITE(numout,*) 'Implicit bottom friction can only be used when ln_zdfexp=.false.' 172 WRITE(numout,*) ' but you set: ln_bfrimp=.true. and ln_zdfexp=.true.!!!!' 173 WRITE(ctmp1,*) ' set either ln_zdfexp = .false or ln_bfrimp = .false.' 174 CALL ctl_stop( ctmp1 ) 175 END IF 176 END IF 158 177 159 178 SELECT CASE (nn_bfr) … … 207 226 ! 208 227 END SELECT 228 IF(lwp) WRITE(numout,*) ' implicit bottom friction switch ln_bfrimp = ', ln_bfrimp 209 229 ! 210 230 ! Basic stability check on bottom friction coefficient … … 253 273 CALL mpp_max( zmaxbfr ) 254 274 ENDIF 275 IF( .NOT.ln_bfrimp) THEN 255 276 IF( lwp .AND. ictu + ictv > 0 ) THEN 256 277 WRITE(numout,*) ' Bottom friction stability check failed at ', ictu, ' U-points ' … … 259 280 WRITE(numout,*) ' Bottom friction coefficient will be reduced where necessary' 260 281 ENDIF 282 ENDIF 283 ! 284 IF( nn_timing == 1 ) CALL timing_stop('zdf_bfr_init') 261 285 ! 262 286 END SUBROUTINE zdf_bfr_init
Note: See TracChangeset
for help on using the changeset viewer.