Changeset 11672 for NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/src/OCE/SBC/sbcblk_algo_coare3p6.F90
- Timestamp:
- 2019-10-10T12:32:53+02:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2019/dev_r11085_ASINTER-05_Brodeau_Advanced_Bulk/src/OCE/SBC/sbcblk_algo_coare3p6.F90
r11666 r11672 87 87 88 88 89 SUBROUTINE turb_coare3p6( kt, zt, zu, T_s, t_zt, q_s, q_zt, U_zu, l_use_cs, l_use_wl, 90 & Cd, Ch, Ce, t_zu, q_zu, U_blk, 91 & Cdn, Chn, Cen, &92 & Qsw, rad_lw, slp, pdT_cs, 93 & isecday_utc, plong, pdT_wl, Hwl )! optionals for warm-layer only89 SUBROUTINE turb_coare3p6( kt, zt, zu, T_s, t_zt, q_s, q_zt, U_zu, l_use_cs, l_use_wl, & 90 & Cd, Ch, Ce, t_zu, q_zu, U_blk, & 91 & Cdn, Chn, Cen, & 92 & Qsw, rad_lw, slp, pdT_cs, & ! optionals for cool-skin (and warm-layer) 93 & pdT_wl, Hwl ) ! optionals for warm-layer only 94 94 !!---------------------------------------------------------------------- 95 95 !! *** ROUTINE turb_coare3p6 *** … … 123 123 !! 124 124 !! * q_s : SSQ aka saturation specific humidity at temp. T_s [kg/kg] 125 !! -> doesn't need to be given a value if skin temp computed (in case l_use_ skin=True)126 !! -> MUST be given the correct value if not computing skint temp. (in case l_use_ skin=False)125 !! -> doesn't need to be given a value if skin temp computed (in case l_use_cs=True or l_use_wl=True) 126 !! -> MUST be given the correct value if not computing skint temp. (in case l_use_cs=False or l_use_wl=False) 127 127 !! 128 128 !! OPTIONAL INPUT: … … 132 132 !! * slp : sea-level pressure [Pa] 133 133 !! * pdT_cs : SST increment "dT" for cool-skin correction [K] 134 !! * isecday_utc:135 !! * plong : longitude array [deg.E]136 134 !! * pdT_wl : SST increment "dT" for warm-layer correction [K] 137 135 !! * Hwl : depth of warm layer [m] … … 172 170 REAL(wp), INTENT( out), OPTIONAL, DIMENSION(jpi,jpj) :: pdT_cs 173 171 ! 174 INTEGER, INTENT(in ), OPTIONAL :: isecday_utc ! current UTC time, counted in second since 00h of the current day175 REAL(wp), INTENT(in ), OPTIONAL, DIMENSION(jpi,jpj) :: plong ! [deg.E]176 172 REAL(wp), INTENT( out), OPTIONAL, DIMENSION(jpi,jpj) :: pdT_wl ! [K] 177 173 REAL(wp), INTENT( out), OPTIONAL, DIMENSION(jpi,jpj) :: Hwl ! [m] … … 194 190 & pdTw, & ! SST increment "dT" for warm layer correction [K] 195 191 & zHwl ! depth of warm-layer [m] 196 197 !198 LOGICAL :: lreturn_z0=.FALSE., lreturn_ustar=.FALSE., lreturn_L=.FALSE., lreturn_UN10=.FALSE.199 CHARACTER(len=40), PARAMETER :: crtnm = 'turb_coare3p6@sbcblk_algo_coare3p6.F90'200 CHARACTER(len=128) :: cf_tmp201 192 !!---------------------------------------------------------------------------------- 202 193 203 194 IF ( kt == 1 ) CALL COARE3P6_INIT(l_use_cs, l_use_wl) ! allocation of accumulation arrays 204 205 195 206 196 l_zt_equal_zu = .FALSE. … … 209 199 210 200 !! Initializations for cool skin and warm layer: 211 IF ( l_use_cs ) THEN212 IF( .NOT.(PRESENT(Qsw) .AND. PRESENT(rad_lw) .AND. PRESENT(slp)) ) THEN213 PRINT *, ' * PROBLEM ('//trim(crtnm)//'): you need to provide Qsw, rad_lw & slp to use cool-skin param!'214 STOP215 END IF216 ALLOCATE ( pdTc(jpi,jpj) )217 pdTc(:,:) = -0.25_wp ! First guess of skin correction218 END IF219 220 IF ( l_use_wl ) THEN221 IF(.NOT.(PRESENT(Qsw) .AND. PRESENT(rad_lw) .AND. PRESENT(slp) .AND. PRESENT(isecday_utc) .AND. PRESENT(plong))) THEN222 PRINT *, ' * PROBLEM ('//TRIM(crtnm)//'): you need to provide Qsw, rad_lw, slp, isecday_utc & plong to use warm-layer param!'223 STOP224 END IF225 ALLOCATE ( pdTw(jpi,jpj) )226 IF (PRESENT(Hwl)) ALLOCATE ( zHwl(jpi,jpj) )227 END IF228 229 201 IF ( l_use_cs .OR. l_use_wl ) THEN 202 IF( .NOT.(PRESENT(Qsw) .AND. PRESENT(rad_lw) .AND. PRESENT(slp)) ) & 203 & CALL ctl_stop( 'turb_coare3p6 => provide Qsw, rad_lw & slp to ', 'use cool-skin and/or warm-layer param' ) 230 204 ALLOCATE ( zsst(jpi,jpj) ) 231 205 zsst = T_s ! backing up the bulk SST 232 206 IF( l_use_cs ) T_s = T_s - 0.25 ! First guess of correction 233 207 q_s = rdct_qsat_salt*q_sat(MAX(T_s, 200._wp), slp) ! First guess of q_s !LOLO WL too!!! 208 END IF 209 IF ( l_use_cs ) THEN 210 ALLOCATE ( pdTc(jpi,jpj) ) 211 pdTc(:,:) = -0.25_wp ! First guess of skin correction 212 END IF 213 IF ( l_use_wl ) THEN 214 ALLOCATE ( pdTw(jpi,jpj) ) 215 IF (PRESENT(Hwl)) ALLOCATE ( zHwl(jpi,jpj) ) 234 216 END IF 235 217 … … 358 340 !! In WL_COARE or , Tau_ac and Qnt_ac must be updated at the final itteration step => add a flag to do this! 359 341 IF (PRESENT(Hwl)) THEN 360 CALL WL_COARE( kt, Qsw, ztmp1, zeta_u, zsst, plong, isecday_utc, MOD(nb_itt,j_itt), pdTw, Hwl=zHwl )342 CALL WL_COARE( Qsw, ztmp1, zeta_u, zsst, MOD(nb_itt,j_itt), pdTw, Hwl=zHwl ) 361 343 ELSE 362 CALL WL_COARE( kt, Qsw, ztmp1, zeta_u, zsst, plong, isecday_utc, MOD(nb_itt,j_itt), pdTw )344 CALL WL_COARE( Qsw, ztmp1, zeta_u, zsst, MOD(nb_itt,j_itt), pdTw ) 363 345 END IF 364 346 !! Updating T_s and q_s !!!
Note: See TracChangeset
for help on using the changeset viewer.