Changeset 3940 for LMDZ6/trunk/libf/phylmdiso/surf_landice_mod.F90
- Timestamp:
- Jun 15, 2021, 1:18:14 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmdiso/surf_landice_mod.F90
r3927 r3940 19 19 tsoil, z0m, z0h, SFRWL, alb_dir, alb_dif, evap, fluxsens, fluxlat, & 20 20 tsurf_new, dflux_s, dflux_l, & 21 slope, cloudf, &21 alt, slope, cloudf, & 22 22 snowhgt, qsnow, to_ice, sissnow, & 23 23 alb3, runoff, & … … 30 30 31 31 USE dimphy 32 USE surface_data, ONLY : type_ocean, calice, calsno, ok_snow33 USE fonte_neige_mod, ONLY : fonte_neige, run_off_lic32 USE surface_data, ONLY : type_ocean, calice, calsno, landice_opt, iflag_albcalc 33 USE fonte_neige_mod, ONLY : fonte_neige,run_off_lic,fqcalving_global,ffonte_global,fqfonte_global,runofflic_global 34 34 USE cpl_mod, ONLY : cpl_send_landice_fields 35 35 USE calcul_fluxs_mod … … 47 47 USE ioipsl_getin_p_mod, ONLY : getin_p 48 48 49 #ifdef CPP_SISVAT 50 USE surf_sisvat_mod, ONLY : surf_sisvat 51 #endif 49 50 #ifdef CPP_INLANDSIS 51 USE surf_inlandsis_mod, ONLY : surf_inlandsis 52 #endif 53 52 54 USE indice_sol_mod 53 55 … … 88 90 REAL, DIMENSION(klon), INTENT(IN) :: albedo !mean albedo 89 91 REAL, DIMENSION(klon), INTENT(IN) :: pphi1 92 REAL, DIMENSION(klon), INTENT(IN) :: alt !mean altitude of the grid box 90 93 REAL, DIMENSION(klon), INTENT(IN) :: slope !mean slope in grid box 91 94 REAL, DIMENSION(klon), INTENT(IN) :: cloudf !total cloud fraction … … 108 111 ! REAL, DIMENSION(klon), INTENT(OUT) :: alb1 ! new albedo in visible SW interval 109 112 ! REAL, DIMENSION(klon), INTENT(OUT) :: alb2 ! new albedo in near IR interval 110 REAL, DIMENSION(6), INTENT(IN) ::SFRWL111 REAL, DIMENSION(klon,nsw), INTENT(OUT) :: alb_dir,alb_dif113 REAL, DIMENSION(6), INTENT(IN) :: SFRWL 114 REAL, DIMENSION(klon,nsw), INTENT(OUT) :: alb_dir,alb_dif 112 115 !albedo SB <<< 113 116 REAL, DIMENSION(klon), INTENT(OUT) :: evap, fluxsens, fluxlat … … 135 138 REAL, DIMENSION(klon) :: zfra, alb_neig 136 139 REAL, DIMENSION(klon) :: radsol 137 REAL, DIMENSION(klon) :: u0, v0, u1_lay, v1_lay 138 INTEGER :: i,j 140 REAL, DIMENSION(klon) :: u0, v0, u1_lay, v1_lay, ustar 141 INTEGER :: i,j,nt 142 REAL, DIMENSION(klon) :: fqfonte,ffonte 139 143 #ifdef ISO 140 144 real, parameter :: t_coup = 273.15 … … 155 159 REAL, DIMENSION(klon) :: emis_new !Emissivity 156 160 REAL, DIMENSION(klon) :: swdown,lwdown 157 REAL, DIMENSION(klon) :: precip_snow_adv, snow_adv !Snow Drift precip./advection 158 REAL, DIMENSION(klon) :: bl_height, wind_velo !height boundary layer, wind spd 161 REAL, DIMENSION(klon) :: precip_snow_adv, snow_adv !Snow Drift precip./advection (not used in inlandsis) 162 REAL, DIMENSION(klon) :: erod !erosion of surface snow (flux, kg/m2/s like evap) 163 REAL, DIMENSION(klon) :: zsl_height, wind_velo !surface layer height, wind spd 159 164 REAL, DIMENSION(klon) :: dens_air, snow_cont_air !air density; snow content air 160 165 REAL, DIMENSION(klon) :: alb_soil !albedo of underlying ice 161 166 REAL, DIMENSION(klon) :: pexner !Exner potential 162 167 REAL :: pref 163 REAL, DIMENSION(klon,nsoilmx) :: tsoil0 !modfi 168 REAL, DIMENSION(klon,nsoilmx) :: tsoil0 !modif 169 REAL :: dtis ! subtimestep 170 LOGICAL :: debut_is, lafin_is ! debut and lafin for inlandsis 164 171 165 172 CHARACTER (len = 20) :: modname = 'surf_landice' … … 167 174 168 175 169 !albedo SB >>> 170 real,dimension(klon) :: alb1,alb2 171 !albedo SB <<< 172 176 REAL,DIMENSION(klon) :: alb1,alb2 177 REAL, DIMENSION (klon,6) :: alb6 173 178 ! End definition 174 179 !**************************************************************************************** … … 181 186 LOGICAL, SAVE :: firstcall = .TRUE. 182 187 !$OMP THREADPRIVATE(firstcall) 183 !FC 184 185 188 189 190 !FC firtscall initializations 191 !****************************************************************************************** 186 192 #ifdef ISO 187 193 #ifdef ISOVERIF … … 203 209 CALL getin_p('alb_nir_sno_lic',alb_nir_sno_lic) 204 210 PRINT*, 'alb_nir_sno_lic',alb_nir_sno_lic 211 212 ! z0m=1.e-3 213 ! z0h = z0m 205 214 firstcall=.false. 206 215 ENDIF 216 !****************************************************************************************** 207 217 ! 208 218 ! Initialize output variables … … 220 230 221 231 !**************************************************************************************** 222 ! ok_snow = TRUE : prepare and call SISVAT snow model 223 ! ok_snow = FALSE : soil_model, calcul_flux, fonte_neige, ... 224 ! 225 !**************************************************************************************** 226 IF (ok_snow) THEN 227 #ifdef CPP_SISVAT 228 ! Prepare for calling SISVAT 232 ! landice_opt = 0 : soil_model, calcul_flux, fonte_neige, ... 233 ! landice_opt = 1 : prepare and call INterace Lmdz SISvat (INLANDSIS) 234 !**************************************************************************************** 235 236 237 IF (landice_opt .EQ. 1) THEN 238 239 !**************************************************************************************** 240 ! CALL to INLANDSIS interface 241 !**************************************************************************************** 242 #ifdef CPP_INLANDSIS 243 244 #ifdef ISO 245 CALL abort_gcm('surf_landice 235','isotopes pas dans INLANDSIS',1) 246 #endif 247 248 debut_is=debut 249 lafin_is=.false. 250 ! Suppose zero surface speed 251 u0(:) = 0.0 252 v0(:) = 0.0 253 254 255 CALL calcul_flux_wind(knon, dtime, & 256 u0, v0, u1, v1, gustiness, cdragm, & 257 AcoefU, AcoefV, BcoefU, BcoefV, & 258 p1lay, temp_air, & 259 flux_u1, flux_v1) 260 229 261 230 ! Calculate incoming flux for SW and LW interval: swdown, lwdown 262 ! Set constants and compute some input for SISVAT 263 ! = 1000 hPa 264 ! and calculate incoming flux for SW and LW interval: swdown, lwdown 231 265 swdown(:) = 0.0 232 266 lwdown(:) = 0.0 267 snow_cont_air(:) = 0. ! the snow content in air is not a prognostic variable of the model 268 alb_soil(:) = 0.4 ! before albedo(:) but here it is the ice albedo that we have to set 269 ustar(:) = 0. 270 pref = 100000. 233 271 DO i = 1, knon 234 272 swdown(i) = swnet(i)/(1-albedo(i)) 235 273 lwdown(i) = lwdownm(i) 236 END DO237 238 ! Set constants and compute some input for SISVAT239 snow_adv(:) = 0. ! no snow blown in for now240 snow_cont_air(:) = 0.241 alb_soil(:) = albedo(:)242 pref = 100000. ! = 1000 hPa243 DO i = 1, knon244 274 wind_velo(i) = u1(i)**2 + v1(i)**2 245 275 wind_velo(i) = wind_velo(i)**0.5 246 276 pexner(i) = (p1lay(i)/pref)**(RD/RCPD) 247 277 dens_air(i) = p1lay(i)/RD/temp_air(i) ! dry air density 248 bl_height(i) = pphi1(i)/RG 278 zsl_height(i) = pphi1(i)/RG 279 tsoil0(i,:) = tsoil(i,:) 280 ustar(i)= (cdragm(i)*(wind_velo(i)**2))**0.5 249 281 END DO 250 251 !****************************************************************************************252 ! CALL to SISVAT interface253 !254 !****************************************************************************************255 ! config: compute everything with SV but temperatures afterwards with soil/calculfluxs256 DO i = 1, knon257 tsoil0(i,:)=tsoil(i,:)258 END DO259 ! Martin260 PRINT*, 'on appelle surf_sisvat'261 ! Martin262 CALL surf_sisvat(knon, rlon, rlat, knindex, itime, dtime, debut, lafin, &263 rmu0, swdown, lwdown, pexner, ps, p1lay, &264 precip_rain, precip_snow, precip_snow_adv, snow_adv, &265 bl_height, wind_velo, temp_air, dens_air, spechum, tsurf, &266 rugoro, snow_cont_air, alb_soil, slope, cloudf, &267 radsol, qsol, tsoil0, snow, snowhgt, qsnow, to_ice,sissnow, agesno, &268 AcoefH, AcoefQ, BcoefH, BcoefQ, cdragh, &269 run_off_lic, evap, fluxsens, fluxlat, dflux_s, dflux_l, &270 tsurf_new, alb1, alb2, alb3, &271 emis_new, z0m, qsurf)272 z0h(1:knon)=z0m(1:knon) ! en attendant mieux273 282 274 ! Suppose zero surface speed 275 u0(:) = 0.0 276 v0(:) = 0.0 277 ! The calculation of heat/water fluxes, otherwise done by "CALL calcul_fluxs" is 278 ! integrated in SISVAT, using the same method. It can be found in "sisvat.f", in the 279 ! subroutine "SISVAT_TS2". 280 ! u0, v0=0., dif_grnd=0. and beta=1 are assumed there! 281 282 CALL calcul_flux_wind(knon, dtime, & 283 u0, v0, u1, v1, gustiness, cdragm, & 284 AcoefU, AcoefV, BcoefU, BcoefV, & 285 p1lay, temp_air, & 286 flux_u1, flux_v1) 283 284 285 dtis=dtime 286 287 IF (lafin) THEN 288 lafin_is=.true. 289 END IF 290 291 CALL surf_inlandsis(knon, rlon, rlat, knindex, itime, dtis, debut_is, lafin_is,& 292 rmu0, swdown, lwdown, albedo, pexner, ps, p1lay, precip_rain, precip_snow, & 293 zsl_height, wind_velo, ustar, temp_air, dens_air, spechum, tsurf,& 294 rugoro, snow_cont_air, alb_soil, alt, slope, cloudf, & 295 radsol, qsol, tsoil0, snow, zfra, snowhgt, qsnow, to_ice, sissnow,agesno, & 296 AcoefH, AcoefQ, BcoefH, BcoefQ, cdragm, cdragh, & 297 run_off_lic, fqfonte, ffonte, evap, erod, fluxsens, fluxlat,dflux_s, dflux_l, & 298 tsurf_new, alb1, alb2, alb3, alb6, & 299 emis_new, z0m, z0h, qsurf) 300 301 debut_is=.false. 302 303 304 ! Treatment of snow melting and calving 305 306 ! for consistency with standard LMDZ, add calving to run_off_lic 307 run_off_lic(:)=run_off_lic(:) + to_ice(:) 308 309 DO i = 1, knon 310 ffonte_global(knindex(i),is_lic) = ffonte(i) 311 fqfonte_global(knindex(i),is_lic) = fqfonte(i)! net melting= melting - refreezing 312 fqcalving_global(knindex(i),is_lic) = to_ice(i) ! flux 313 runofflic_global(knindex(i)) = run_off_lic(i) 314 ENDDO 315 ! Here, we assume that the calving term is equal to the to_ice term 316 ! (no ice accumulation) 317 318 287 319 #else 288 abort_message='Pb de coherence: ok_snow = .true. mais CPP_SISVAT= .false.'320 abort_message='Pb de coherence: landice_opt = 1 mais CPP_INLANDSIS = .false.' 289 321 CALL abort_physic(modname,abort_message,1) 290 322 #endif 291 #ifdef ISO 292 abort_message='surf_landice 267: isotopes pas prevus ici' 293 CALL abort_physic(modname,abort_message,1) 294 #endif 295 ELSE ! ok_snow=FALSE 323 324 325 326 ELSE 296 327 297 328 !**************************************************************************************** … … 299 330 ! 300 331 !**************************************************************************************** 332 333 ! EV: use calbeta 334 CALL calbeta(dtime, is_lic, knon, snow, qsol, beta, cal, dif_grnd) 335 336 337 ! use soil model and recalculate properly cal 301 338 IF (soil_model) THEN 302 339 CALL soil(dtime, is_lic, knon, snow, tsurf, tsoil, soilcap, soilflux) … … 313 350 ! 314 351 !**************************************************************************************** 315 beta(:) = 1.0316 dif_grnd(:) = 0.0352 ! beta(:) = 1.0 353 ! dif_grnd(:) = 0.0 317 354 318 355 ! Suppose zero surface speed … … 367 404 ! 368 405 !**************************************************************************************** 369 CALL fonte_neige( 406 CALL fonte_neige(knon, is_lic, knindex, dtime, & 370 407 tsurf, precip_rain, precip_snow, & 371 408 snow, qsol, tsurf_new, evap & … … 408 445 !**************************************************************************************** 409 446 CALL albsno(klon,knon,dtime,agesno(:),alb_neig(:), precip_snow(:)) 447 410 448 WHERE (snow(1 : knon) .LT. 0.0001) agesno(1 : knon) = 0. 411 449 zfra(1:knon) = MAX(0.0,MIN(1.0,snow(1:knon)/(snow(1:knon)+10.0))) … … 420 458 !IM: KstaTER0.77 & LMD_ARMIP6 421 459 422 ! Attantion: alb1 and alb2 are the same!460 ! Attantion: alb1 and alb2 are not the same! 423 461 alb1(1:knon) = alb_vis_sno_lic 424 462 alb2(1:knon) = alb_nir_sno_lic … … 433 471 z0m = SQRT(z0m**2+rugoro**2) 434 472 435 END IF ! ok_snow 473 474 475 END IF ! landice_opt 436 476 437 477 438 478 !**************************************************************************************** 439 479 ! Send run-off on land-ice to coupler if coupled ocean. 440 ! run_off_lic has been calculated in fonte_neige or surf_ sisvat480 ! run_off_lic has been calculated in fonte_neige or surf_inlandsis 441 481 ! 442 482 !**************************************************************************************** … … 450 490 451 491 !**************************************************************************************** 452 snow_o=0. 453 zfra_o = 0. 454 DO j = 1, knon 455 i = knindex(j) 456 snow_o(i) = snow(j) 457 zfra_o(i) = zfra(j) 458 ENDDO 459 492 ! Etienne: comment these lines because of duplication just below 493 ! snow_o=0. 494 ! zfra_o = 0. 495 ! DO j = 1, knon 496 ! i = knindex(j) 497 ! snow_o(i) = snow(j) 498 ! zfra_o(i) = zfra(j) 499 ! ENDDO 500 ! 460 501 !**************************************************************************************** 461 502 snow_o=0. … … 485 526 alb_dir(1:knon,5)=alb2(1:knon) 486 527 alb_dir(1:knon,6)=alb2(1:knon) 528 529 IF ((landice_opt .EQ. 1) .AND. (iflag_albcalc .EQ. 2)) THEN 530 alb_dir(1:knon,1)=alb6(1:knon,1) 531 alb_dir(1:knon,2)=alb6(1:knon,2) 532 alb_dir(1:knon,3)=alb6(1:knon,3) 533 alb_dir(1:knon,4)=alb6(1:knon,4) 534 alb_dir(1:knon,5)=alb6(1:knon,5) 535 alb_dir(1:knon,6)=alb6(1:knon,6) 536 ENDIF 537 487 538 end select 488 539 alb_dif=alb_dir 489 540 !albedo SB <<< 490 541 491 492 542 543 493 544 494 545 END SUBROUTINE surf_landice
Note: See TracChangeset
for help on using the changeset viewer.