[781] | 1 | ! |
---|
[2538] | 2 | ! $Id: ocean_forced_mod.F90 3102 2017-12-03 20:27:42Z fairhead $ |
---|
| 3 | ! |
---|
[781] | 4 | MODULE ocean_forced_mod |
---|
| 5 | ! |
---|
| 6 | ! This module is used for both the sub-surfaces ocean and sea-ice for the case of a |
---|
| 7 | ! forced ocean, "ocean=force". |
---|
| 8 | ! |
---|
| 9 | IMPLICIT NONE |
---|
| 10 | |
---|
| 11 | CONTAINS |
---|
| 12 | ! |
---|
| 13 | !**************************************************************************************** |
---|
| 14 | ! |
---|
[1067] | 15 | SUBROUTINE ocean_forced_noice( & |
---|
| 16 | itime, dtime, jour, knon, knindex, & |
---|
[2254] | 17 | p1lay, cdragh, cdragq, cdragm, precip_rain, precip_snow, & |
---|
[781] | 18 | temp_air, spechum, & |
---|
[1067] | 19 | AcoefH, AcoefQ, BcoefH, BcoefQ, & |
---|
| 20 | AcoefU, AcoefV, BcoefU, BcoefV, & |
---|
[2240] | 21 | ps, u1, v1, gustiness, & |
---|
[888] | 22 | radsol, snow, agesno, & |
---|
[1067] | 23 | qsurf, evap, fluxsens, fluxlat, flux_u1, flux_v1, & |
---|
[996] | 24 | tsurf_new, dflux_s, dflux_l) |
---|
[781] | 25 | ! |
---|
| 26 | ! This subroutine treats the "open ocean", all grid points that are not entierly covered |
---|
| 27 | ! by ice. |
---|
[996] | 28 | ! The routine receives data from climatologie file limit.nc and does some calculations at the |
---|
[781] | 29 | ! surface. |
---|
| 30 | ! |
---|
[1067] | 31 | USE dimphy |
---|
| 32 | USE calcul_fluxs_mod |
---|
[996] | 33 | USE limit_read_mod |
---|
[1961] | 34 | USE mod_grid_phy_lmdz |
---|
[1785] | 35 | USE indice_sol_mod |
---|
[2538] | 36 | USE phys_output_var_mod, ONLY : sens_prec_liq_o, sens_prec_sol_o, lat_prec_liq_o, lat_prec_sol_o |
---|
| 37 | |
---|
[793] | 38 | INCLUDE "YOMCST.h" |
---|
[2254] | 39 | INCLUDE "clesphys.h" |
---|
[781] | 40 | |
---|
[2254] | 41 | |
---|
[781] | 42 | ! Input arguments |
---|
| 43 | !**************************************************************************************** |
---|
| 44 | INTEGER, INTENT(IN) :: itime, jour, knon |
---|
| 45 | INTEGER, DIMENSION(klon), INTENT(IN) :: knindex |
---|
| 46 | REAL, INTENT(IN) :: dtime |
---|
| 47 | REAL, DIMENSION(klon), INTENT(IN) :: p1lay |
---|
[2254] | 48 | REAL, DIMENSION(klon), INTENT(IN) :: cdragh, cdragq, cdragm |
---|
[781] | 49 | REAL, DIMENSION(klon), INTENT(IN) :: precip_rain, precip_snow |
---|
| 50 | REAL, DIMENSION(klon), INTENT(IN) :: temp_air, spechum |
---|
[1067] | 51 | REAL, DIMENSION(klon), INTENT(IN) :: AcoefH, AcoefQ, BcoefH, BcoefQ |
---|
| 52 | REAL, DIMENSION(klon), INTENT(IN) :: AcoefU, AcoefV, BcoefU, BcoefV |
---|
[781] | 53 | REAL, DIMENSION(klon), INTENT(IN) :: ps |
---|
[2240] | 54 | REAL, DIMENSION(klon), INTENT(IN) :: u1, v1, gustiness |
---|
[781] | 55 | |
---|
| 56 | ! In/Output arguments |
---|
| 57 | !**************************************************************************************** |
---|
| 58 | REAL, DIMENSION(klon), INTENT(INOUT) :: radsol |
---|
| 59 | REAL, DIMENSION(klon), INTENT(INOUT) :: snow |
---|
| 60 | REAL, DIMENSION(klon), INTENT(INOUT) :: agesno !? put to 0 in ocean |
---|
| 61 | |
---|
| 62 | ! Output arguments |
---|
| 63 | !**************************************************************************************** |
---|
| 64 | REAL, DIMENSION(klon), INTENT(OUT) :: qsurf |
---|
| 65 | REAL, DIMENSION(klon), INTENT(OUT) :: evap, fluxsens, fluxlat |
---|
[1067] | 66 | REAL, DIMENSION(klon), INTENT(OUT) :: flux_u1, flux_v1 |
---|
[781] | 67 | REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new |
---|
| 68 | REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l |
---|
| 69 | |
---|
| 70 | ! Local variables |
---|
| 71 | !**************************************************************************************** |
---|
[2538] | 72 | INTEGER :: i, j |
---|
[781] | 73 | REAL, DIMENSION(klon) :: cal, beta, dif_grnd |
---|
| 74 | REAL, DIMENSION(klon) :: alb_neig, tsurf_lim, zx_sl |
---|
[1067] | 75 | REAL, DIMENSION(klon) :: u0, v0 |
---|
| 76 | REAL, DIMENSION(klon) :: u1_lay, v1_lay |
---|
[781] | 77 | LOGICAL :: check=.FALSE. |
---|
[2538] | 78 | REAL, DIMENSION(klon) :: sens_prec_liq, sens_prec_sol |
---|
| 79 | REAL, DIMENSION(klon) :: lat_prec_liq, lat_prec_sol |
---|
[781] | 80 | |
---|
| 81 | !**************************************************************************************** |
---|
| 82 | ! Start calculation |
---|
| 83 | !**************************************************************************************** |
---|
| 84 | IF (check) WRITE(*,*)' Entering ocean_forced_noice' |
---|
[1067] | 85 | |
---|
[781] | 86 | !**************************************************************************************** |
---|
| 87 | ! 1) |
---|
[996] | 88 | ! Read sea-surface temperature from file limit.nc |
---|
[781] | 89 | ! |
---|
| 90 | !**************************************************************************************** |
---|
[1961] | 91 | !--sb: |
---|
| 92 | !!jyg if (knon.eq.1) then ! single-column model |
---|
| 93 | if (klon_glo.eq.1) then ! single-column model |
---|
| 94 | CALL read_tsurf1d(knon,tsurf_lim) ! new |
---|
| 95 | else ! GCM |
---|
| 96 | CALL limit_read_sst(knon,knindex,tsurf_lim) |
---|
| 97 | endif ! knon |
---|
| 98 | !sb-- |
---|
[996] | 99 | |
---|
[781] | 100 | !**************************************************************************************** |
---|
| 101 | ! 2) |
---|
| 102 | ! Flux calculation |
---|
| 103 | ! |
---|
| 104 | !**************************************************************************************** |
---|
| 105 | ! Set some variables for calcul_fluxs |
---|
| 106 | cal = 0. |
---|
| 107 | beta = 1. |
---|
| 108 | dif_grnd = 0. |
---|
| 109 | alb_neig(:) = 0. |
---|
| 110 | agesno(:) = 0. |
---|
[2538] | 111 | sens_prec_liq = 0.; sens_prec_sol = 0.; lat_prec_liq = 0.; lat_prec_sol = 0. |
---|
| 112 | |
---|
[1067] | 113 | ! Suppose zero surface speed |
---|
| 114 | u0(:)=0.0 |
---|
| 115 | v0(:)=0.0 |
---|
| 116 | u1_lay(:) = u1(:) - u0(:) |
---|
| 117 | v1_lay(:) = v1(:) - v0(:) |
---|
| 118 | |
---|
[781] | 119 | ! Calcul de tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l and qsurf |
---|
| 120 | CALL calcul_fluxs(knon, is_oce, dtime, & |
---|
[2254] | 121 | tsurf_lim, p1lay, cal, beta, cdragh, cdragq, ps, & |
---|
[781] | 122 | precip_rain, precip_snow, snow, qsurf, & |
---|
[2240] | 123 | radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, gustiness, & |
---|
[2254] | 124 | f_qsat_oce,AcoefH, AcoefQ, BcoefH, BcoefQ, & |
---|
[2538] | 125 | tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l, & |
---|
| 126 | sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol) |
---|
[781] | 127 | |
---|
[2538] | 128 | do j = 1, knon |
---|
| 129 | i = knindex(j) |
---|
| 130 | sens_prec_liq_o(i,1) = sens_prec_liq(j) |
---|
| 131 | sens_prec_sol_o(i,1) = sens_prec_sol(j) |
---|
| 132 | lat_prec_liq_o(i,1) = lat_prec_liq(j) |
---|
| 133 | lat_prec_sol_o(i,1) = lat_prec_sol(j) |
---|
| 134 | enddo |
---|
| 135 | |
---|
| 136 | |
---|
[1067] | 137 | ! - Flux calculation at first modele level for U and V |
---|
| 138 | CALL calcul_flux_wind(knon, dtime, & |
---|
[2240] | 139 | u0, v0, u1, v1, gustiness, cdragm, & |
---|
[1067] | 140 | AcoefU, AcoefV, BcoefU, BcoefV, & |
---|
| 141 | p1lay, temp_air, & |
---|
| 142 | flux_u1, flux_v1) |
---|
[781] | 143 | |
---|
| 144 | END SUBROUTINE ocean_forced_noice |
---|
| 145 | ! |
---|
[1067] | 146 | !*************************************************************************************** |
---|
[781] | 147 | ! |
---|
[1067] | 148 | SUBROUTINE ocean_forced_ice( & |
---|
| 149 | itime, dtime, jour, knon, knindex, & |
---|
| 150 | tsurf_in, p1lay, cdragh, cdragm, precip_rain, precip_snow, temp_air, spechum, & |
---|
| 151 | AcoefH, AcoefQ, BcoefH, BcoefQ, & |
---|
| 152 | AcoefU, AcoefV, BcoefU, BcoefV, & |
---|
[2240] | 153 | ps, u1, v1, gustiness, & |
---|
[888] | 154 | radsol, snow, qsol, agesno, tsoil, & |
---|
[1067] | 155 | qsurf, alb1_new, alb2_new, evap, fluxsens, fluxlat, flux_u1, flux_v1, & |
---|
[996] | 156 | tsurf_new, dflux_s, dflux_l) |
---|
[781] | 157 | ! |
---|
| 158 | ! This subroutine treats the ocean where there is ice. |
---|
| 159 | ! The routine reads data from climatologie file and does flux calculations at the |
---|
| 160 | ! surface. |
---|
[996] | 161 | ! |
---|
[1067] | 162 | USE dimphy |
---|
| 163 | USE calcul_fluxs_mod |
---|
| 164 | USE surface_data, ONLY : calice, calsno, tau_gl |
---|
[996] | 165 | USE limit_read_mod |
---|
[1067] | 166 | USE fonte_neige_mod, ONLY : fonte_neige |
---|
[1785] | 167 | USE indice_sol_mod |
---|
[2538] | 168 | USE phys_output_var_mod, ONLY : sens_prec_liq_o, sens_prec_sol_o, lat_prec_liq_o, lat_prec_sol_o |
---|
[996] | 169 | |
---|
[1961] | 170 | ! INCLUDE "indicesol.h" |
---|
[781] | 171 | INCLUDE "dimsoil.h" |
---|
[793] | 172 | INCLUDE "YOMCST.h" |
---|
| 173 | INCLUDE "clesphys.h" |
---|
[781] | 174 | |
---|
| 175 | ! Input arguments |
---|
| 176 | !**************************************************************************************** |
---|
| 177 | INTEGER, INTENT(IN) :: itime, jour, knon |
---|
| 178 | INTEGER, DIMENSION(klon), INTENT(IN) :: knindex |
---|
| 179 | REAL, INTENT(IN) :: dtime |
---|
| 180 | REAL, DIMENSION(klon), INTENT(IN) :: tsurf_in |
---|
| 181 | REAL, DIMENSION(klon), INTENT(IN) :: p1lay |
---|
[1067] | 182 | REAL, DIMENSION(klon), INTENT(IN) :: cdragh, cdragm |
---|
[781] | 183 | REAL, DIMENSION(klon), INTENT(IN) :: precip_rain, precip_snow |
---|
| 184 | REAL, DIMENSION(klon), INTENT(IN) :: temp_air, spechum |
---|
[1067] | 185 | REAL, DIMENSION(klon), INTENT(IN) :: AcoefH, AcoefQ, BcoefH, BcoefQ |
---|
| 186 | REAL, DIMENSION(klon), INTENT(IN) :: AcoefU, AcoefV, BcoefU, BcoefV |
---|
[781] | 187 | REAL, DIMENSION(klon), INTENT(IN) :: ps |
---|
[2240] | 188 | REAL, DIMENSION(klon), INTENT(IN) :: u1, v1, gustiness |
---|
[781] | 189 | |
---|
| 190 | ! In/Output arguments |
---|
| 191 | !**************************************************************************************** |
---|
| 192 | REAL, DIMENSION(klon), INTENT(INOUT) :: radsol |
---|
| 193 | REAL, DIMENSION(klon), INTENT(INOUT) :: snow, qsol |
---|
| 194 | REAL, DIMENSION(klon), INTENT(INOUT) :: agesno |
---|
| 195 | REAL, DIMENSION(klon, nsoilmx), INTENT(INOUT) :: tsoil |
---|
| 196 | |
---|
| 197 | ! Output arguments |
---|
| 198 | !**************************************************************************************** |
---|
| 199 | REAL, DIMENSION(klon), INTENT(OUT) :: qsurf |
---|
[888] | 200 | REAL, DIMENSION(klon), INTENT(OUT) :: alb1_new ! new albedo in visible SW interval |
---|
| 201 | REAL, DIMENSION(klon), INTENT(OUT) :: alb2_new ! new albedo in near IR interval |
---|
[781] | 202 | REAL, DIMENSION(klon), INTENT(OUT) :: evap, fluxsens, fluxlat |
---|
[1067] | 203 | REAL, DIMENSION(klon), INTENT(OUT) :: flux_u1, flux_v1 |
---|
[888] | 204 | REAL, DIMENSION(klon), INTENT(OUT) :: tsurf_new |
---|
[781] | 205 | REAL, DIMENSION(klon), INTENT(OUT) :: dflux_s, dflux_l |
---|
| 206 | |
---|
| 207 | ! Local variables |
---|
| 208 | !**************************************************************************************** |
---|
| 209 | LOGICAL :: check=.FALSE. |
---|
[2538] | 210 | INTEGER :: i, j |
---|
[781] | 211 | REAL :: zfra |
---|
| 212 | REAL, PARAMETER :: t_grnd=271.35 |
---|
| 213 | REAL, DIMENSION(klon) :: cal, beta, dif_grnd, capsol |
---|
| 214 | REAL, DIMENSION(klon) :: alb_neig, tsurf_tmp |
---|
| 215 | REAL, DIMENSION(klon) :: soilcap, soilflux |
---|
[1067] | 216 | REAL, DIMENSION(klon) :: u0, v0 |
---|
| 217 | REAL, DIMENSION(klon) :: u1_lay, v1_lay |
---|
[2538] | 218 | REAL, DIMENSION(klon) :: sens_prec_liq, sens_prec_sol |
---|
| 219 | REAL, DIMENSION(klon) :: lat_prec_liq, lat_prec_sol |
---|
[781] | 220 | |
---|
[2538] | 221 | |
---|
[781] | 222 | !**************************************************************************************** |
---|
| 223 | ! Start calculation |
---|
| 224 | !**************************************************************************************** |
---|
| 225 | IF (check) WRITE(*,*)'Entering surface_seaice, knon=',knon |
---|
| 226 | |
---|
| 227 | !**************************************************************************************** |
---|
[996] | 228 | ! 1) |
---|
[1067] | 229 | ! Flux calculation : tsurf_new, evap, fluxlat, fluxsens, flux_u1, flux_v1 |
---|
[781] | 230 | ! dflux_s, dflux_l and qsurf |
---|
| 231 | !**************************************************************************************** |
---|
[2538] | 232 | |
---|
[996] | 233 | tsurf_tmp(:) = tsurf_in(:) |
---|
[781] | 234 | |
---|
| 235 | ! calculate the parameters cal, beta, capsol and dif_grnd |
---|
[996] | 236 | CALL calbeta(dtime, is_sic, knon, snow, qsol, beta, capsol, dif_grnd) |
---|
[781] | 237 | |
---|
| 238 | |
---|
| 239 | IF (soil_model) THEN |
---|
| 240 | ! update tsoil and calculate soilcap and soilflux |
---|
[996] | 241 | CALL soil(dtime, is_sic, knon, snow, tsurf_tmp, tsoil,soilcap, soilflux) |
---|
[781] | 242 | cal(1:knon) = RCPD / soilcap(1:knon) |
---|
| 243 | radsol(1:knon) = radsol(1:knon) + soilflux(1:knon) |
---|
| 244 | dif_grnd = 1.0 / tau_gl |
---|
| 245 | ELSE |
---|
| 246 | dif_grnd = 1.0 / tau_gl |
---|
| 247 | cal = RCPD * calice |
---|
| 248 | WHERE (snow > 0.0) cal = RCPD * calsno |
---|
| 249 | ENDIF |
---|
| 250 | |
---|
| 251 | beta = 1.0 |
---|
[2538] | 252 | sens_prec_liq = 0.; sens_prec_sol = 0.; lat_prec_liq = 0.; lat_prec_sol = 0. |
---|
| 253 | |
---|
[1067] | 254 | ! Suppose zero surface speed |
---|
| 255 | u0(:)=0.0 |
---|
| 256 | v0(:)=0.0 |
---|
| 257 | u1_lay(:) = u1(:) - u0(:) |
---|
| 258 | v1_lay(:) = v1(:) - v0(:) |
---|
[781] | 259 | CALL calcul_fluxs(knon, is_sic, dtime, & |
---|
[2254] | 260 | tsurf_tmp, p1lay, cal, beta, cdragh, cdragh, ps, & |
---|
[781] | 261 | precip_rain, precip_snow, snow, qsurf, & |
---|
[2240] | 262 | radsol, dif_grnd, temp_air, spechum, u1_lay, v1_lay, gustiness, & |
---|
[2254] | 263 | f_qsat_oce,AcoefH, AcoefQ, BcoefH, BcoefQ, & |
---|
[2538] | 264 | tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l, & |
---|
| 265 | sens_prec_liq, sens_prec_sol, lat_prec_liq, lat_prec_sol) |
---|
| 266 | do j = 1, knon |
---|
| 267 | i = knindex(j) |
---|
| 268 | sens_prec_liq_o(i,2) = sens_prec_liq(j) |
---|
| 269 | sens_prec_sol_o(i,2) = sens_prec_sol(j) |
---|
| 270 | lat_prec_liq_o(i,2) = lat_prec_liq(j) |
---|
| 271 | lat_prec_sol_o(i,2) = lat_prec_sol(j) |
---|
| 272 | enddo |
---|
[781] | 273 | |
---|
[1067] | 274 | ! - Flux calculation at first modele level for U and V |
---|
| 275 | CALL calcul_flux_wind(knon, dtime, & |
---|
[2240] | 276 | u0, v0, u1, v1, gustiness, cdragm, & |
---|
[1067] | 277 | AcoefU, AcoefV, BcoefU, BcoefV, & |
---|
| 278 | p1lay, temp_air, & |
---|
| 279 | flux_u1, flux_v1) |
---|
| 280 | |
---|
[781] | 281 | !**************************************************************************************** |
---|
[996] | 282 | ! 2) |
---|
[781] | 283 | ! Calculations due to snow and runoff |
---|
| 284 | ! |
---|
| 285 | !**************************************************************************************** |
---|
| 286 | CALL fonte_neige( knon, is_sic, knindex, dtime, & |
---|
| 287 | tsurf_tmp, precip_rain, precip_snow, & |
---|
| 288 | snow, qsol, tsurf_new, evap) |
---|
| 289 | |
---|
| 290 | ! Calculation of albedo at snow (alb_neig) and update the age of snow (agesno) |
---|
| 291 | ! |
---|
| 292 | CALL albsno(klon, knon, dtime, agesno(:), alb_neig(:), precip_snow(:)) |
---|
| 293 | |
---|
| 294 | WHERE (snow(1:knon) .LT. 0.0001) agesno(1:knon) = 0. |
---|
| 295 | |
---|
[888] | 296 | alb1_new(:) = 0.0 |
---|
[781] | 297 | DO i=1, knon |
---|
| 298 | zfra = MAX(0.0,MIN(1.0,snow(i)/(snow(i)+10.0))) |
---|
[888] | 299 | alb1_new(i) = alb_neig(i) * zfra + 0.6 * (1.0-zfra) |
---|
[781] | 300 | ENDDO |
---|
| 301 | |
---|
[888] | 302 | alb2_new(:) = alb1_new(:) |
---|
| 303 | |
---|
[781] | 304 | END SUBROUTINE ocean_forced_ice |
---|
[1961] | 305 | |
---|
| 306 | !************************************************************************ |
---|
| 307 | ! 1D case |
---|
| 308 | !************************************************************************ |
---|
| 309 | SUBROUTINE read_tsurf1d(knon,sst_out) |
---|
| 310 | |
---|
| 311 | ! This subroutine specifies the surface temperature to be used in 1D simulations |
---|
| 312 | |
---|
| 313 | USE dimphy, ONLY : klon |
---|
| 314 | |
---|
| 315 | INTEGER, INTENT(IN) :: knon ! nomber of points on compressed grid |
---|
| 316 | REAL, DIMENSION(klon), INTENT(OUT) :: sst_out ! tsurf used to force the single-column model |
---|
| 317 | |
---|
| 318 | INTEGER :: i |
---|
| 319 | ! COMMON defined in lmdz1d.F: |
---|
| 320 | real ts_cur |
---|
| 321 | common /sst_forcing/ts_cur |
---|
| 322 | |
---|
| 323 | DO i = 1, knon |
---|
| 324 | sst_out(i) = ts_cur |
---|
| 325 | ENDDO |
---|
| 326 | |
---|
| 327 | END SUBROUTINE read_tsurf1d |
---|
| 328 | |
---|
[781] | 329 | ! |
---|
[1961] | 330 | !************************************************************************ |
---|
[781] | 331 | ! |
---|
| 332 | END MODULE ocean_forced_mod |
---|
| 333 | |
---|
| 334 | |
---|
| 335 | |
---|
| 336 | |
---|
| 337 | |
---|
| 338 | |
---|