[781] | 1 | ! |
---|
[2538] | 2 | ! $Id: surf_ocean_mod.F90 3601 2019-11-18 15:48:48Z lguez $ |
---|
| 3 | ! |
---|
[781] | 4 | MODULE surf_ocean_mod |
---|
| 5 | |
---|
| 6 | IMPLICIT NONE |
---|
| 7 | |
---|
| 8 | CONTAINS |
---|
[3395] | 9 | ! |
---|
| 10 | !****************************************************************************** |
---|
| 11 | ! |
---|
[888] | 12 | SUBROUTINE surf_ocean(rlon, rlat, swnet, lwnet, alb1, & |
---|
[2243] | 13 | windsp, rmu0, fder, tsurf_in, & |
---|
[781] | 14 | itime, dtime, jour, knon, knindex, & |
---|
[2254] | 15 | p1lay, z1lay, cdragh, cdragm, precip_rain, precip_snow, temp_air, spechum, & |
---|
[1067] | 16 | AcoefH, AcoefQ, BcoefH, BcoefQ, & |
---|
| 17 | AcoefU, AcoefV, BcoefU, BcoefV, & |
---|
[2240] | 18 | ps, u1, v1, gustiness, rugoro, pctsrf, & |
---|
[888] | 19 | snow, qsurf, agesno, & |
---|
[2243] | 20 | z0m, z0h, SFRWL, alb_dir_new, alb_dif_new, evap, fluxsens, fluxlat, & |
---|
[1067] | 21 | tsurf_new, dflux_s, dflux_l, lmt_bils, & |
---|
[3429] | 22 | flux_u1, flux_v1, t_int, s_int, ds_ns, dt_ns, dter, dser, tkt, tks, rf, & |
---|
| 23 | taur) |
---|
[1067] | 24 | |
---|
[3395] | 25 | use albedo, only: alboc, alboc_cd |
---|
[3429] | 26 | use bulk_flux_m, only: bulk_flux |
---|
[3395] | 27 | USE dimphy, ONLY: klon, zmasq |
---|
| 28 | USE surface_data, ONLY : type_ocean |
---|
| 29 | USE ocean_forced_mod, ONLY : ocean_forced_noice |
---|
| 30 | USE ocean_slab_mod, ONLY : ocean_slab_noice |
---|
| 31 | USE ocean_cpl_mod, ONLY : ocean_cpl_noice |
---|
| 32 | USE indice_sol_mod, ONLY : nbsrf, is_oce |
---|
| 33 | USE limit_read_mod |
---|
[3429] | 34 | use sens_heat_rain_m, only: sens_heat_rain |
---|
[3458] | 35 | use config_ocean_skin_m, only: activate_ocean_skin |
---|
[3395] | 36 | ! |
---|
| 37 | ! This subroutine will make a call to ocean_XXX_noice according to the ocean mode (force, |
---|
| 38 | ! slab or couple). The calculations of albedo and rugosity for the ocean surface are |
---|
| 39 | ! done in here because they are identical for the different modes of ocean. |
---|
[1785] | 40 | |
---|
| 41 | |
---|
[793] | 42 | INCLUDE "YOMCST.h" |
---|
[781] | 43 | |
---|
[2178] | 44 | include "clesphys.h" |
---|
[2455] | 45 | ! for cycle_diurne and for iflag_z0_oce==-1 (prescribed z0) |
---|
[2178] | 46 | |
---|
[3395] | 47 | ! Input variables |
---|
| 48 | !****************************************************************************** |
---|
[781] | 49 | INTEGER, INTENT(IN) :: itime, jour, knon |
---|
| 50 | INTEGER, DIMENSION(klon), INTENT(IN) :: knindex |
---|
| 51 | REAL, INTENT(IN) :: dtime |
---|
| 52 | REAL, DIMENSION(klon), INTENT(IN) :: rlon, rlat |
---|
[888] | 53 | REAL, DIMENSION(klon), INTENT(IN) :: swnet ! net shortwave radiation at surface |
---|
| 54 | REAL, DIMENSION(klon), INTENT(IN) :: lwnet ! net longwave radiation at surface |
---|
| 55 | REAL, DIMENSION(klon), INTENT(IN) :: alb1 ! albedo in visible SW interval |
---|
[3429] | 56 | REAL, DIMENSION(klon), INTENT(IN) :: windsp ! wind at 10 m, in m s-1 |
---|
[781] | 57 | REAL, DIMENSION(klon), INTENT(IN) :: rmu0 |
---|
| 58 | REAL, DIMENSION(klon), INTENT(IN) :: fder |
---|
[996] | 59 | REAL, DIMENSION(klon), INTENT(IN) :: tsurf_in |
---|
[2254] | 60 | REAL, DIMENSION(klon), INTENT(IN) :: p1lay,z1lay ! pression (Pa) et altitude (m) du premier niveau |
---|
[1067] | 61 | REAL, DIMENSION(klon), INTENT(IN) :: cdragh |
---|
| 62 | REAL, DIMENSION(klon), INTENT(IN) :: cdragm |
---|
[781] | 63 | REAL, DIMENSION(klon), INTENT(IN) :: precip_rain, precip_snow |
---|
| 64 | REAL, DIMENSION(klon), INTENT(IN) :: temp_air, spechum |
---|
[1067] | 65 | REAL, DIMENSION(klon), INTENT(IN) :: AcoefH, AcoefQ, BcoefH, BcoefQ |
---|
| 66 | REAL, DIMENSION(klon), INTENT(IN) :: AcoefU, AcoefV, BcoefU, BcoefV |
---|
[781] | 67 | REAL, DIMENSION(klon), INTENT(IN) :: ps |
---|
[2240] | 68 | REAL, DIMENSION(klon), INTENT(IN) :: u1, v1, gustiness |
---|
[781] | 69 | REAL, DIMENSION(klon), INTENT(IN) :: rugoro |
---|
| 70 | REAL, DIMENSION(klon,nbsrf), INTENT(IN) :: pctsrf |
---|
| 71 | |
---|
[3395] | 72 | ! In/Output variables |
---|
| 73 | !****************************************************************************** |
---|
[888] | 74 | REAL, DIMENSION(klon), INTENT(INOUT) :: snow |
---|
| 75 | REAL, DIMENSION(klon), INTENT(INOUT) :: qsurf |
---|
[781] | 76 | REAL, DIMENSION(klon), INTENT(INOUT) :: agesno |
---|
[3389] | 77 | REAL, DIMENSION(klon), INTENT(inOUT):: z0h |
---|
[781] | 78 | |
---|
[3429] | 79 | REAL, intent(inout):: ds_ns(:) ! (knon) |
---|
| 80 | ! "delta salinity near surface". Salinity variation in the |
---|
| 81 | ! near-surface turbulent layer. That is subskin salinity minus |
---|
| 82 | ! foundation salinity. In ppt. |
---|
| 83 | |
---|
| 84 | REAL, intent(inout):: dt_ns(:) ! (knon) |
---|
| 85 | ! "delta temperature near surface". Temperature variation in the |
---|
| 86 | ! near-surface turbulent layer. That is subskin temperature |
---|
| 87 | ! minus foundation temperature. (Can be negative.) In K. |
---|
| 88 | |
---|
[3395] | 89 | ! Output variables |
---|
| 90 | !****************************************************************************** |
---|
[3389] | 91 | REAL, DIMENSION(klon), INTENT(OUT) :: z0m |
---|
[3395] | 92 | !albedo SB >>> |
---|
| 93 | ! REAL, DIMENSION(klon), INTENT(OUT) :: alb1_new ! new albedo in visible SW interval |
---|
| 94 | ! REAL, DIMENSION(klon), INTENT(OUT) :: alb2_new ! new albedo in near IR interval |
---|
[2227] | 95 | REAL, DIMENSION(6), INTENT(IN) :: SFRWL |
---|
| 96 | REAL, DIMENSION(klon,nsw), INTENT(OUT) :: alb_dir_new,alb_dif_new |
---|
[3395] | 97 | !albedo SB <<< |
---|
[781] | 98 | REAL, DIMENSION(klon), INTENT(OUT) :: evap, fluxsens, fluxlat |
---|
[3429] | 99 | REAL, INTENT(OUT):: tsurf_new(klon) ! sea surface temperature, in K |
---|
[781] | 100 | REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l |
---|
[996] | 101 | REAL, DIMENSION(klon), INTENT(OUT) :: lmt_bils |
---|
[1067] | 102 | REAL, DIMENSION(klon), INTENT(OUT) :: flux_u1, flux_v1 |
---|
[781] | 103 | |
---|
[3429] | 104 | REAL, intent(out):: t_int(:) ! (knon) interface temperature, in K |
---|
| 105 | real, intent(out):: s_int(:) ! (knon) interface salinity, in ppt |
---|
[3458] | 106 | |
---|
[3429] | 107 | REAL, intent(out):: dter(:) ! (knon) |
---|
| 108 | ! Temperature variation in the diffusive microlayer, that is |
---|
[3601] | 109 | ! ocean-air interface temperature minus subskin temperature. In |
---|
[3429] | 110 | ! K. |
---|
| 111 | |
---|
| 112 | REAL, intent(out):: dser(:) ! (knon) |
---|
| 113 | ! Temperature variation in the diffusive microlayer, that is |
---|
| 114 | ! subskin temperature minus ocean-air interface temperature. In K. |
---|
| 115 | |
---|
| 116 | REAL, intent(out):: tkt(:) ! (knon) |
---|
| 117 | ! épaisseur (m) de la couche de diffusion thermique (microlayer) |
---|
| 118 | ! cool skin thickness |
---|
| 119 | |
---|
| 120 | REAL, intent(out):: tks(:) ! (knon) |
---|
| 121 | ! épaisseur (m) de la couche de diffusion de masse (microlayer) |
---|
| 122 | |
---|
| 123 | REAL, intent(out):: rf(:) ! (knon) |
---|
| 124 | ! sensible heat flux at the surface due to rainfall, in W m-2 |
---|
[3556] | 125 | ! positive upward |
---|
[3429] | 126 | |
---|
| 127 | REAL, intent(out):: taur(:) ! (knon) |
---|
| 128 | ! momentum flux due to rain, in Pa |
---|
| 129 | |
---|
[3395] | 130 | ! Local variables |
---|
| 131 | !****************************************************************************** |
---|
[2227] | 132 | INTEGER :: i, k |
---|
[1146] | 133 | REAL :: tmp |
---|
| 134 | REAL, PARAMETER :: cepdu2=(0.1)**2 |
---|
[3002] | 135 | REAL, DIMENSION(klon) :: alb_eau, z0_lim |
---|
[888] | 136 | REAL, DIMENSION(klon) :: radsol |
---|
[2254] | 137 | REAL, DIMENSION(klon) :: cdragq ! Cdrag pour l'evaporation |
---|
[2391] | 138 | CHARACTER(len=20),PARAMETER :: modname="surf_ocean" |
---|
[3429] | 139 | real rhoa(knon) ! density of moist air (kg / m3) |
---|
| 140 | real xlv(knon) ! chaleur latente d'évaporation (J / kg) |
---|
| 141 | real precip_tot(knon) ! rain + snow |
---|
| 142 | real S1(knon) ! salinity at depth_1, in ppt |
---|
[781] | 143 | |
---|
[3395] | 144 | ! End definition |
---|
| 145 | !****************************************************************************** |
---|
[888] | 146 | |
---|
| 147 | |
---|
[3395] | 148 | !****************************************************************************** |
---|
| 149 | ! Calculate total net radiance at surface |
---|
| 150 | ! |
---|
| 151 | !****************************************************************************** |
---|
[2719] | 152 | radsol(1:klon) = 0.0 ! initialisation a priori inutile |
---|
[888] | 153 | radsol(1:knon) = swnet(1:knon) + lwnet(1:knon) |
---|
| 154 | |
---|
[3395] | 155 | !****************************************************************************** |
---|
| 156 | ! Cdragq computed from cdrag |
---|
| 157 | ! The difference comes only from a factor (f_z0qh_oce) on z0, so that |
---|
| 158 | ! it can be computed inside surf_ocean |
---|
| 159 | ! More complicated appraches may require the propagation through |
---|
| 160 | ! pbl_surface of an independant cdragq variable. |
---|
| 161 | !****************************************************************************** |
---|
[2254] | 162 | |
---|
| 163 | IF ( f_z0qh_oce .ne. 1.) THEN |
---|
[3395] | 164 | ! Si on suit les formulations par exemple de Tessel, on |
---|
| 165 | ! a z0h=0.4*nu/u*, z0q=0.62*nu/u*, d'ou f_z0qh_oce=0.62/0.4=1.55 |
---|
[2718] | 166 | cdragq(1:knon)=cdragh(1:knon)* & |
---|
[3395] | 167 | log(z1lay(1:knon)/z0h(1:knon))/log(z1lay(1:knon)/(f_z0qh_oce*z0h(1:knon))) |
---|
[2254] | 168 | ELSE |
---|
[2718] | 169 | cdragq(1:knon)=cdragh(1:knon) |
---|
[2254] | 170 | ENDIF |
---|
| 171 | |
---|
[3002] | 172 | |
---|
[3395] | 173 | !****************************************************************************** |
---|
| 174 | ! Switch according to type of ocean (couple, slab or forced) |
---|
| 175 | !****************************************************************************** |
---|
[996] | 176 | SELECT CASE(type_ocean) |
---|
[781] | 177 | CASE('couple') |
---|
[888] | 178 | CALL ocean_cpl_noice( & |
---|
| 179 | swnet, lwnet, alb1, & |
---|
[1067] | 180 | windsp, fder, & |
---|
[781] | 181 | itime, dtime, knon, knindex, & |
---|
[2254] | 182 | p1lay, cdragh, cdragq, cdragm, precip_rain, precip_snow,temp_air,spechum,& |
---|
[1067] | 183 | AcoefH, AcoefQ, BcoefH, BcoefQ, & |
---|
| 184 | AcoefU, AcoefV, BcoefU, BcoefV, & |
---|
[3463] | 185 | ps, u1, v1, gustiness, tsurf_in, & |
---|
[888] | 186 | radsol, snow, agesno, & |
---|
[1067] | 187 | qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, & |
---|
[996] | 188 | tsurf_new, dflux_s, dflux_l) |
---|
[781] | 189 | |
---|
| 190 | CASE('slab') |
---|
[888] | 191 | CALL ocean_slab_noice( & |
---|
[996] | 192 | itime, dtime, jour, knon, knindex, & |
---|
[2254] | 193 | p1lay, cdragh, cdragq, cdragm, precip_rain, precip_snow, temp_air, spechum,& |
---|
[1067] | 194 | AcoefH, AcoefQ, BcoefH, BcoefQ, & |
---|
| 195 | AcoefU, AcoefV, BcoefU, BcoefV, & |
---|
[2240] | 196 | ps, u1, v1, gustiness, tsurf_in, & |
---|
[2209] | 197 | radsol, snow, & |
---|
[1067] | 198 | qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, & |
---|
[996] | 199 | tsurf_new, dflux_s, dflux_l, lmt_bils) |
---|
[3395] | 200 | |
---|
[781] | 201 | CASE('force') |
---|
[888] | 202 | CALL ocean_forced_noice( & |
---|
| 203 | itime, dtime, jour, knon, knindex, & |
---|
[2254] | 204 | p1lay, cdragh, cdragq, cdragm, precip_rain, precip_snow, & |
---|
[781] | 205 | temp_air, spechum, & |
---|
[1067] | 206 | AcoefH, AcoefQ, BcoefH, BcoefQ, & |
---|
| 207 | AcoefU, AcoefV, BcoefU, BcoefV, & |
---|
[3463] | 208 | ps, u1, v1, gustiness, tsurf_in, & |
---|
[888] | 209 | radsol, snow, agesno, & |
---|
[1067] | 210 | qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, & |
---|
[996] | 211 | tsurf_new, dflux_s, dflux_l) |
---|
[781] | 212 | END SELECT |
---|
| 213 | |
---|
[3395] | 214 | !****************************************************************************** |
---|
| 215 | ! fcodron: compute lmt_bils forced case (same as wfbils_oce / 1.-contfracatm) |
---|
| 216 | !****************************************************************************** |
---|
[2057] | 217 | IF (type_ocean.NE.'slab') THEN |
---|
[3395] | 218 | lmt_bils(1:klon)=0. |
---|
| 219 | DO i=1,knon |
---|
| 220 | lmt_bils(knindex(i))=(swnet(i)+lwnet(i)+fluxsens(i)+fluxlat(i)) & |
---|
| 221 | *pctsrf(knindex(i),is_oce)/(1.-zmasq(knindex(i))) |
---|
| 222 | END DO |
---|
[2057] | 223 | END IF |
---|
| 224 | |
---|
[3395] | 225 | !****************************************************************************** |
---|
| 226 | ! Calculate ocean surface albedo |
---|
| 227 | !****************************************************************************** |
---|
| 228 | !albedo SB >>> |
---|
| 229 | IF (iflag_albedo==0) THEN |
---|
| 230 | !--old parametrizations of ocean surface albedo |
---|
| 231 | ! |
---|
| 232 | IF (iflag_cycle_diurne.GE.1) THEN |
---|
| 233 | ! |
---|
| 234 | CALL alboc_cd(rmu0,alb_eau) |
---|
| 235 | ! |
---|
| 236 | !--ad-hoc correction for model radiative balance tuning |
---|
| 237 | !--now outside alboc_cd routine |
---|
| 238 | alb_eau(1:klon) = fmagic*alb_eau(1:klon) + pmagic |
---|
| 239 | alb_eau(1:klon)=MIN(MAX(alb_eau(1:klon),0.0),1.0) |
---|
| 240 | ! |
---|
| 241 | ELSE |
---|
| 242 | ! |
---|
| 243 | CALL alboc(REAL(jour),rlat,alb_eau) |
---|
| 244 | !--ad-hoc correction for model radiative balance tuning |
---|
| 245 | !--now outside alboc routine |
---|
| 246 | alb_eau(1:klon) = fmagic*alb_eau(1:klon) + pmagic |
---|
| 247 | alb_eau(1:klon)=MIN(MAX(alb_eau(1:klon),0.04),0.60) |
---|
| 248 | ! |
---|
| 249 | ENDIF |
---|
| 250 | ! |
---|
| 251 | DO i =1, knon |
---|
| 252 | DO k=1,nsw |
---|
| 253 | alb_dir_new(i,k) = alb_eau(knindex(i)) |
---|
| 254 | ENDDO |
---|
| 255 | ENDDO |
---|
| 256 | !IM 09122015 next line corresponds to the old way of doing in LMDZ5A/IPSLCM5A versions |
---|
| 257 | !albedo for diffuse radiation is taken the same as for direct radiation |
---|
| 258 | alb_dif_new(1:knon,:)=alb_dir_new(1:knon,:) |
---|
| 259 | !IM 09122015 end |
---|
| 260 | ! |
---|
| 261 | ELSE IF (iflag_albedo==1) THEN |
---|
| 262 | !--new parametrization of ocean surface albedo by Sunghye Baek |
---|
| 263 | !--albedo for direct and diffuse radiation are different |
---|
| 264 | ! |
---|
| 265 | CALL ocean_albedo(knon,rmu0,knindex,windsp,SFRWL,alb_dir_new,alb_dif_new) |
---|
| 266 | ! |
---|
| 267 | !--ad-hoc correction for model radiative balance tuning |
---|
| 268 | alb_dir_new(1:knon,:) = fmagic*alb_dir_new(1:knon,:) + pmagic |
---|
| 269 | alb_dif_new(1:knon,:) = fmagic*alb_dif_new(1:knon,:) + pmagic |
---|
| 270 | alb_dir_new(1:knon,:)=MIN(MAX(alb_dir_new(1:knon,:),0.0),1.0) |
---|
| 271 | alb_dif_new(1:knon,:)=MIN(MAX(alb_dif_new(1:knon,:),0.0),1.0) |
---|
| 272 | ! |
---|
| 273 | ELSE IF (iflag_albedo==2) THEN |
---|
| 274 | ! F. Codron albedo read from limit.nc |
---|
| 275 | CALL limit_read_rug_alb(itime, dtime, jour,& |
---|
| 276 | knon, knindex, z0_lim, alb_eau) |
---|
| 277 | DO i =1, knon |
---|
| 278 | DO k=1,nsw |
---|
| 279 | alb_dir_new(i,k) = alb_eau(i) |
---|
| 280 | ENDDO |
---|
| 281 | ENDDO |
---|
| 282 | alb_dif_new=alb_dir_new |
---|
[781] | 283 | ENDIF |
---|
[3395] | 284 | !albedo SB <<< |
---|
[2227] | 285 | |
---|
[3395] | 286 | !****************************************************************************** |
---|
| 287 | ! Calculate the rugosity |
---|
| 288 | !****************************************************************************** |
---|
| 289 | IF (iflag_z0_oce==0) THEN |
---|
| 290 | DO i = 1, knon |
---|
| 291 | tmp = MAX(cepdu2,gustiness(i)+u1(i)**2+v1(i)**2) |
---|
| 292 | z0m(i) = 0.018*cdragm(i) * (gustiness(i)+u1(i)**2+v1(i)**2)/RG & |
---|
| 293 | + 0.11*14e-6 / SQRT(cdragm(i) * tmp) |
---|
| 294 | z0m(i) = MAX(1.5e-05,z0m(i)) |
---|
| 295 | ENDDO |
---|
| 296 | z0h(1:knon)=z0m(1:knon) ! En attendant mieux |
---|
[2243] | 297 | |
---|
[3395] | 298 | ELSE IF (iflag_z0_oce==1) THEN |
---|
| 299 | DO i = 1, knon |
---|
| 300 | tmp = MAX(cepdu2,gustiness(i)+u1(i)**2+v1(i)**2) |
---|
| 301 | z0m(i) = 0.018*cdragm(i) * (gustiness(i)+u1(i)**2+v1(i)**2)/RG & |
---|
| 302 | + 0.11*14e-6 / SQRT(cdragm(i) * tmp) |
---|
| 303 | z0m(i) = MAX(1.5e-05,z0m(i)) |
---|
| 304 | z0h(i)=0.4*14e-6 / SQRT(cdragm(i) * tmp) |
---|
| 305 | ENDDO |
---|
| 306 | ELSE IF (iflag_z0_oce==-1) THEN |
---|
| 307 | DO i = 1, knon |
---|
| 308 | z0m(i) = z0min |
---|
| 309 | z0h(i) = z0min |
---|
| 310 | ENDDO |
---|
| 311 | ELSE |
---|
[2391] | 312 | CALL abort_physic(modname,'version non prevue',1) |
---|
[3395] | 313 | ENDIF |
---|
[3429] | 314 | |
---|
[3458] | 315 | if (activate_ocean_skin >= 1) then |
---|
| 316 | rhoa = PS(:KNON) / (Rd * temp_air(:knon) * (1. + retv * spechum(:knon))) |
---|
| 317 | xlv = rlvtt |
---|
| 318 | precip_tot = precip_rain(:knon) + precip_snow(:knon) |
---|
| 319 | rf = sens_heat_rain(precip_tot, temp_air(:knon), spechum(:knon), rhoa, & |
---|
[3463] | 320 | xlv, tsurf_in(:knon), ps(:knon)) |
---|
[3458] | 321 | s1 = 35. |
---|
| 322 | call bulk_flux(tkt, tks, taur, dter, dser, t_int, s_int, ds_ns, dt_ns, & |
---|
| 323 | u = windsp(:knon), t_ocean_1 = tsurf_new(:knon), s1 = s1, & |
---|
| 324 | rain = precip_tot, hf = - fluxsens(:knon), hlb = - fluxlat(:knon), & |
---|
| 325 | rnl = - lwnet(:knon), & |
---|
| 326 | tau = sqrt(flux_u1(:knon)**2 + flux_v1(:knon)**2), rhoa = rhoa, & |
---|
| 327 | xlv = xlv, rf = rf, dtime = dtime, rns = swnet(:knon)) |
---|
[3478] | 328 | if (activate_ocean_skin == 2) tsurf_new(:knon) = t_int |
---|
[3458] | 329 | end if |
---|
| 330 | |
---|
[781] | 331 | END SUBROUTINE surf_ocean |
---|
[3458] | 332 | !**************************************************************************** |
---|
[3395] | 333 | ! |
---|
[781] | 334 | END MODULE surf_ocean_mod |
---|