[781] | 1 | ! |
---|
| 2 | MODULE surf_ocean_mod |
---|
| 3 | |
---|
| 4 | IMPLICIT NONE |
---|
| 5 | |
---|
| 6 | CONTAINS |
---|
| 7 | ! |
---|
[2254] | 8 | !****************************************************************************** |
---|
[781] | 9 | ! |
---|
[888] | 10 | SUBROUTINE surf_ocean(rlon, rlat, swnet, lwnet, alb1, & |
---|
[2243] | 11 | windsp, rmu0, fder, tsurf_in, & |
---|
[781] | 12 | itime, dtime, jour, knon, knindex, & |
---|
[2254] | 13 | p1lay, z1lay, cdragh, cdragm, precip_rain, precip_snow, temp_air, spechum, & |
---|
[1067] | 14 | AcoefH, AcoefQ, BcoefH, BcoefQ, & |
---|
| 15 | AcoefU, AcoefV, BcoefU, BcoefV, & |
---|
[2240] | 16 | ps, u1, v1, gustiness, rugoro, pctsrf, & |
---|
[888] | 17 | snow, qsurf, agesno, & |
---|
[2243] | 18 | z0m, z0h, SFRWL, alb_dir_new, alb_dif_new, evap, fluxsens, fluxlat, & |
---|
[1067] | 19 | tsurf_new, dflux_s, dflux_l, lmt_bils, & |
---|
| 20 | flux_u1, flux_v1) |
---|
| 21 | |
---|
[2322] | 22 | use albedo, only: alboc, alboc_cd |
---|
[2391] | 23 | USE dimphy, ONLY: klon, zmasq |
---|
[1067] | 24 | USE surface_data, ONLY : type_ocean |
---|
| 25 | USE ocean_forced_mod, ONLY : ocean_forced_noice |
---|
| 26 | USE ocean_slab_mod, ONLY : ocean_slab_noice |
---|
| 27 | USE ocean_cpl_mod, ONLY : ocean_cpl_noice |
---|
[2391] | 28 | USE indice_sol_mod, ONLY : nbsrf, is_oce |
---|
[781] | 29 | ! |
---|
| 30 | ! This subroutine will make a call to ocean_XXX_noice according to the ocean mode (force, |
---|
| 31 | ! slab or couple). The calculations of albedo and rugosity for the ocean surface are |
---|
| 32 | ! done in here because they are identical for the different modes of ocean. |
---|
[1785] | 33 | |
---|
| 34 | |
---|
[793] | 35 | INCLUDE "YOMCST.h" |
---|
[781] | 36 | |
---|
[2178] | 37 | include "clesphys.h" |
---|
| 38 | ! for cycle_diurne |
---|
| 39 | |
---|
[781] | 40 | ! Input variables |
---|
[2254] | 41 | !****************************************************************************** |
---|
[781] | 42 | INTEGER, INTENT(IN) :: itime, jour, knon |
---|
| 43 | INTEGER, DIMENSION(klon), INTENT(IN) :: knindex |
---|
| 44 | REAL, INTENT(IN) :: dtime |
---|
| 45 | REAL, DIMENSION(klon), INTENT(IN) :: rlon, rlat |
---|
[888] | 46 | REAL, DIMENSION(klon), INTENT(IN) :: swnet ! net shortwave radiation at surface |
---|
| 47 | REAL, DIMENSION(klon), INTENT(IN) :: lwnet ! net longwave radiation at surface |
---|
| 48 | REAL, DIMENSION(klon), INTENT(IN) :: alb1 ! albedo in visible SW interval |
---|
[781] | 49 | REAL, DIMENSION(klon), INTENT(IN) :: windsp |
---|
| 50 | REAL, DIMENSION(klon), INTENT(IN) :: rmu0 |
---|
| 51 | REAL, DIMENSION(klon), INTENT(IN) :: fder |
---|
[996] | 52 | REAL, DIMENSION(klon), INTENT(IN) :: tsurf_in |
---|
[2254] | 53 | REAL, DIMENSION(klon), INTENT(IN) :: p1lay,z1lay ! pression (Pa) et altitude (m) du premier niveau |
---|
[1067] | 54 | REAL, DIMENSION(klon), INTENT(IN) :: cdragh |
---|
| 55 | REAL, DIMENSION(klon), INTENT(IN) :: cdragm |
---|
[781] | 56 | REAL, DIMENSION(klon), INTENT(IN) :: precip_rain, precip_snow |
---|
| 57 | REAL, DIMENSION(klon), INTENT(IN) :: temp_air, spechum |
---|
[1067] | 58 | REAL, DIMENSION(klon), INTENT(IN) :: AcoefH, AcoefQ, BcoefH, BcoefQ |
---|
| 59 | REAL, DIMENSION(klon), INTENT(IN) :: AcoefU, AcoefV, BcoefU, BcoefV |
---|
[781] | 60 | REAL, DIMENSION(klon), INTENT(IN) :: ps |
---|
[2240] | 61 | REAL, DIMENSION(klon), INTENT(IN) :: u1, v1, gustiness |
---|
[781] | 62 | REAL, DIMENSION(klon), INTENT(IN) :: rugoro |
---|
| 63 | REAL, DIMENSION(klon,nbsrf), INTENT(IN) :: pctsrf |
---|
| 64 | |
---|
| 65 | ! In/Output variables |
---|
[2254] | 66 | !****************************************************************************** |
---|
[888] | 67 | REAL, DIMENSION(klon), INTENT(INOUT) :: snow |
---|
| 68 | REAL, DIMENSION(klon), INTENT(INOUT) :: qsurf |
---|
[781] | 69 | REAL, DIMENSION(klon), INTENT(INOUT) :: agesno |
---|
| 70 | |
---|
| 71 | ! Output variables |
---|
[2254] | 72 | !****************************************************************************** |
---|
[2243] | 73 | REAL, DIMENSION(klon), INTENT(OUT) :: z0m, z0h |
---|
[2227] | 74 | !albedo SB >>> |
---|
| 75 | ! REAL, DIMENSION(klon), INTENT(OUT) :: alb1_new ! new albedo in visible SW interval |
---|
| 76 | ! REAL, DIMENSION(klon), INTENT(OUT) :: alb2_new ! new albedo in near IR interval |
---|
| 77 | REAL, DIMENSION(6), INTENT(IN) :: SFRWL |
---|
| 78 | REAL, DIMENSION(klon,nsw), INTENT(OUT) :: alb_dir_new,alb_dif_new |
---|
| 79 | !albedo SB <<< |
---|
[781] | 80 | REAL, DIMENSION(klon), INTENT(OUT) :: evap, fluxsens, fluxlat |
---|
[888] | 81 | REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new |
---|
[781] | 82 | REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l |
---|
[996] | 83 | REAL, DIMENSION(klon), INTENT(OUT) :: lmt_bils |
---|
[1067] | 84 | REAL, DIMENSION(klon), INTENT(OUT) :: flux_u1, flux_v1 |
---|
[781] | 85 | |
---|
| 86 | ! Local variables |
---|
[2254] | 87 | !****************************************************************************** |
---|
[2227] | 88 | INTEGER :: i, k |
---|
[1146] | 89 | REAL :: tmp |
---|
| 90 | REAL, PARAMETER :: cepdu2=(0.1)**2 |
---|
[781] | 91 | REAL, DIMENSION(klon) :: alb_eau |
---|
[888] | 92 | REAL, DIMENSION(klon) :: radsol |
---|
[2254] | 93 | REAL, DIMENSION(klon) :: cdragq ! Cdrag pour l'evaporation |
---|
[2391] | 94 | CHARACTER(len=20),PARAMETER :: modname="surf_ocean" |
---|
[781] | 95 | |
---|
| 96 | ! End definition |
---|
[2254] | 97 | !****************************************************************************** |
---|
[888] | 98 | |
---|
| 99 | |
---|
[2254] | 100 | !****************************************************************************** |
---|
[888] | 101 | ! Calculate total net radiance at surface |
---|
| 102 | ! |
---|
[2254] | 103 | !****************************************************************************** |
---|
[888] | 104 | radsol(:) = 0.0 |
---|
| 105 | radsol(1:knon) = swnet(1:knon) + lwnet(1:knon) |
---|
| 106 | |
---|
[2254] | 107 | !****************************************************************************** |
---|
| 108 | ! Cdragq computed from cdrag |
---|
| 109 | ! The difference comes only from a factor (f_z0qh_oce) on z0, so that |
---|
| 110 | ! it can be computed inside surf_ocean |
---|
| 111 | ! More complicated appraches may require the propagation through |
---|
| 112 | ! pbl_surface of an independant cdragq variable. |
---|
| 113 | !****************************************************************************** |
---|
| 114 | |
---|
| 115 | IF ( f_z0qh_oce .ne. 1.) THEN |
---|
[2261] | 116 | ! Si on suit les formulations par exemple de Tessel, on |
---|
| 117 | ! a z0h=0.4*nu/u*, z0q=0.62*nu/u*, d'ou f_z0qh_oce=0.62/0.4=1.55 |
---|
[2254] | 118 | cdragq(:)=cdragh(:)* & |
---|
| 119 | log(z1lay(:)/z0h(:))/log(z1lay(:)/(f_z0qh_oce*z0h(:))) |
---|
| 120 | ELSE |
---|
| 121 | cdragq(:)=cdragh(:) |
---|
| 122 | ENDIF |
---|
| 123 | |
---|
| 124 | !****************************************************************************** |
---|
[781] | 125 | ! Switch according to type of ocean (couple, slab or forced) |
---|
[2254] | 126 | !****************************************************************************** |
---|
[996] | 127 | SELECT CASE(type_ocean) |
---|
[781] | 128 | CASE('couple') |
---|
[888] | 129 | CALL ocean_cpl_noice( & |
---|
| 130 | swnet, lwnet, alb1, & |
---|
[1067] | 131 | windsp, fder, & |
---|
[781] | 132 | itime, dtime, knon, knindex, & |
---|
[2254] | 133 | p1lay, cdragh, cdragq, cdragm, precip_rain, precip_snow,temp_air,spechum,& |
---|
[1067] | 134 | AcoefH, AcoefQ, BcoefH, BcoefQ, & |
---|
| 135 | AcoefU, AcoefV, BcoefU, BcoefV, & |
---|
[2240] | 136 | ps, u1, v1, gustiness, & |
---|
[888] | 137 | radsol, snow, agesno, & |
---|
[1067] | 138 | qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, & |
---|
[996] | 139 | tsurf_new, dflux_s, dflux_l) |
---|
[781] | 140 | |
---|
| 141 | CASE('slab') |
---|
[888] | 142 | CALL ocean_slab_noice( & |
---|
[996] | 143 | itime, dtime, jour, knon, knindex, & |
---|
[2254] | 144 | p1lay, cdragh, cdragq, cdragm, precip_rain, precip_snow, temp_air, spechum,& |
---|
[1067] | 145 | AcoefH, AcoefQ, BcoefH, BcoefQ, & |
---|
| 146 | AcoefU, AcoefV, BcoefU, BcoefV, & |
---|
[2240] | 147 | ps, u1, v1, gustiness, tsurf_in, & |
---|
[2209] | 148 | radsol, snow, & |
---|
[1067] | 149 | qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, & |
---|
[996] | 150 | tsurf_new, dflux_s, dflux_l, lmt_bils) |
---|
[781] | 151 | |
---|
| 152 | CASE('force') |
---|
[888] | 153 | CALL ocean_forced_noice( & |
---|
| 154 | itime, dtime, jour, knon, knindex, & |
---|
[2254] | 155 | p1lay, cdragh, cdragq, cdragm, precip_rain, precip_snow, & |
---|
[781] | 156 | temp_air, spechum, & |
---|
[1067] | 157 | AcoefH, AcoefQ, BcoefH, BcoefQ, & |
---|
| 158 | AcoefU, AcoefV, BcoefU, BcoefV, & |
---|
[2240] | 159 | ps, u1, v1, gustiness, & |
---|
[888] | 160 | radsol, snow, agesno, & |
---|
[1067] | 161 | qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, & |
---|
[996] | 162 | tsurf_new, dflux_s, dflux_l) |
---|
[781] | 163 | END SELECT |
---|
| 164 | |
---|
[2254] | 165 | !****************************************************************************** |
---|
[2057] | 166 | ! fcodron: compute lmt_bils forced case (same as wfbils_oce / 1.-contfracatm) |
---|
[2254] | 167 | !****************************************************************************** |
---|
[2057] | 168 | IF (type_ocean.NE.'slab') THEN |
---|
| 169 | lmt_bils(:)=0. |
---|
| 170 | DO i=1,knon |
---|
| 171 | lmt_bils(knindex(i))=(swnet(i)+lwnet(i)+fluxsens(i)+fluxlat(i)) & |
---|
| 172 | *pctsrf(knindex(i),is_oce)/(1.-zmasq(knindex(i))) |
---|
| 173 | END DO |
---|
| 174 | END IF |
---|
| 175 | |
---|
[2254] | 176 | !****************************************************************************** |
---|
[2413] | 177 | ! Calculate ocean surface albedo |
---|
[2254] | 178 | !****************************************************************************** |
---|
[2227] | 179 | !albedo SB >>> |
---|
[2413] | 180 | IF (iflag_albedo==0) THEN |
---|
| 181 | !--old parametrizations of ocean surface albedo |
---|
| 182 | ! |
---|
[2178] | 183 | IF (cycle_diurne) THEN |
---|
[2413] | 184 | ! |
---|
[2178] | 185 | CALL alboc_cd(rmu0,alb_eau) |
---|
[2413] | 186 | ! |
---|
| 187 | !--ad-hoc correction for model radiative balance tuning |
---|
| 188 | !--now outside alboc_cd routine |
---|
| 189 | alb_eau(:) = fmagic*alb_eau(:) + pmagic |
---|
| 190 | alb_eau=MIN(MAX(alb_eau,0.0),1.0) |
---|
| 191 | ! |
---|
[2178] | 192 | ELSE |
---|
[2413] | 193 | ! |
---|
[1403] | 194 | CALL alboc(REAL(jour),rlat,alb_eau) |
---|
[2413] | 195 | !--ad-hoc correction for model radiative balance tuning |
---|
| 196 | !--now outside alboc routine |
---|
| 197 | alb_eau(:) = fmagic*alb_eau(:) + pmagic |
---|
| 198 | alb_eau=MIN(MAX(alb_eau(i),0.04),0.60) |
---|
| 199 | ! |
---|
[781] | 200 | ENDIF |
---|
[2413] | 201 | ! |
---|
[781] | 202 | DO i =1, knon |
---|
[2413] | 203 | DO k=1,nsw |
---|
[2227] | 204 | alb_dir_new(i,k) = alb_eau(knindex(i)) |
---|
[2413] | 205 | ENDDO |
---|
[781] | 206 | ENDDO |
---|
[2413] | 207 | !IM 09122015 next line corresponds to the old way of doing in LMDZ5A/IPSLCM5A versions |
---|
| 208 | !albedo for diffuse radiation is taken the same as for direct radiation |
---|
[2405] | 209 | alb_dif_new=alb_dir_new |
---|
| 210 | !IM 09122015 end |
---|
[2413] | 211 | ! |
---|
| 212 | ELSE IF (iflag_albedo==1) THEN |
---|
| 213 | !--new parametrization of ocean surface albedo by Sunghye Baek |
---|
| 214 | !--albedo for direct and diffuse radiation are different |
---|
| 215 | ! |
---|
| 216 | CALL ocean_albedo(knon,rmu0,knindex,windsp,SFRWL,alb_dir_new,alb_dif_new) |
---|
| 217 | ! |
---|
| 218 | !--ad-hoc correction for model radiative balance tuning |
---|
| 219 | alb_dir_new(:,:) = fmagic*alb_dir_new(:,:) + pmagic |
---|
| 220 | alb_dir_new=MIN(MAX(alb_dir_new,0.0),1.0) |
---|
| 221 | alb_dif_new=MIN(MAX(alb_dif_new,0.0),1.0) |
---|
| 222 | ! |
---|
| 223 | ENDIF |
---|
[2227] | 224 | !albedo SB <<< |
---|
| 225 | |
---|
[2254] | 226 | !****************************************************************************** |
---|
[781] | 227 | ! Calculate the rugosity |
---|
[2254] | 228 | !****************************************************************************** |
---|
[2243] | 229 | IF (iflag_z0_oce==0) THEN |
---|
[781] | 230 | DO i = 1, knon |
---|
[2278] | 231 | tmp = MAX(cepdu2,gustiness(i)+u1(i)**2+v1(i)**2) |
---|
| 232 | z0m(i) = 0.018*cdragm(i) * (gustiness(i)+u1(i)**2+v1(i)**2)/RG & |
---|
[1146] | 233 | + 0.11*14e-6 / SQRT(cdragm(i) * tmp) |
---|
[2243] | 234 | z0m(i) = MAX(1.5e-05,z0m(i)) |
---|
[1146] | 235 | ENDDO |
---|
[2243] | 236 | z0h(1:knon)=z0m(1:knon) ! En attendant mieux |
---|
| 237 | |
---|
[2261] | 238 | ELSE IF (iflag_z0_oce==1) THEN |
---|
[2264] | 239 | DO i = 1, knon |
---|
[2278] | 240 | tmp = MAX(cepdu2,gustiness(i)+u1(i)**2+v1(i)**2) |
---|
| 241 | z0m(i) = 0.018*cdragm(i) * (gustiness(i)+u1(i)**2+v1(i)**2)/RG & |
---|
[2264] | 242 | + 0.11*14e-6 / SQRT(cdragm(i) * tmp) |
---|
| 243 | z0m(i) = MAX(1.5e-05,z0m(i)) |
---|
[2278] | 244 | z0h(i)=0.4*14e-6 / SQRT(cdragm(i) * tmp) |
---|
[2264] | 245 | ENDDO |
---|
[2243] | 246 | ELSE |
---|
[2391] | 247 | CALL abort_physic(modname,'version non prevue',1) |
---|
[2243] | 248 | ENDIF |
---|
[781] | 249 | ! |
---|
[2254] | 250 | !****************************************************************************** |
---|
[781] | 251 | END SUBROUTINE surf_ocean |
---|
[2254] | 252 | !****************************************************************************** |
---|
[781] | 253 | ! |
---|
| 254 | END MODULE surf_ocean_mod |
---|