- Timestamp:
- Feb 22, 2021, 12:44:07 PM (4 years ago)
- Location:
- LMDZ6/branches/LMDZ-tracers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/LMDZ-tracers
- Property svn:mergeinfo changed
-
LMDZ6/branches/LMDZ-tracers/libf/phylmd/surf_landice_mod.F90
r3102 r3851 25 25 26 26 USE dimphy 27 USE surface_data, ONLY : type_ocean, calice, calsno, ok_snow27 USE surface_data, ONLY : type_ocean, calice, calsno, landice_opt, n_dtis 28 28 USE fonte_neige_mod, ONLY : fonte_neige, run_off_lic 29 29 USE cpl_mod, ONLY : cpl_send_landice_fields … … 36 36 USE surf_sisvat_mod, ONLY : surf_sisvat 37 37 #endif 38 39 #ifdef CPP_INLANDSIS 40 USE surf_inlandsis_mod, ONLY : surf_inlandsis 41 #endif 42 38 43 USE indice_sol_mod 39 44 … … 86 91 ! REAL, DIMENSION(klon), INTENT(OUT) :: alb1 ! new albedo in visible SW interval 87 92 ! REAL, DIMENSION(klon), INTENT(OUT) :: alb2 ! new albedo in near IR interval 88 REAL, DIMENSION(6), INTENT(IN) ::SFRWL89 REAL, DIMENSION(klon,nsw), INTENT(OUT) :: alb_dir,alb_dif93 REAL, DIMENSION(6), INTENT(IN) :: SFRWL 94 REAL, DIMENSION(klon,nsw), INTENT(OUT) :: alb_dir,alb_dif 90 95 !albedo SB <<< 91 96 REAL, DIMENSION(klon), INTENT(OUT) :: evap, fluxsens, fluxlat … … 108 113 REAL, DIMENSION(klon) :: zfra, alb_neig 109 114 REAL, DIMENSION(klon) :: radsol 110 REAL, DIMENSION(klon) :: u0, v0, u1_lay, v1_lay 111 INTEGER :: i,j 115 REAL, DIMENSION(klon) :: u0, v0, u1_lay, v1_lay, ustar 116 INTEGER :: i,j,nt 112 117 113 118 REAL, DIMENSION(klon) :: emis_new !Emissivity 114 119 REAL, DIMENSION(klon) :: swdown,lwdown 115 120 REAL, DIMENSION(klon) :: precip_snow_adv, snow_adv !Snow Drift precip./advection 116 REAL, DIMENSION(klon) :: bl_height, wind_velo !height boundary layer, wind spd121 REAL, DIMENSION(klon) :: zsl_height, wind_velo !surface layer height, wind spd 117 122 REAL, DIMENSION(klon) :: dens_air, snow_cont_air !air density; snow content air 118 123 REAL, DIMENSION(klon) :: alb_soil !albedo of underlying ice 119 124 REAL, DIMENSION(klon) :: pexner !Exner potential 120 125 REAL :: pref 121 REAL, DIMENSION(klon,nsoilmx) :: tsoil0 !modfi 126 REAL, DIMENSION(klon,nsoilmx) :: tsoil0 !modif 127 REAL :: dtis ! subtimestep 128 LOGICAL :: debut_is, lafin_is ! debut and lafin for inlandsis 122 129 123 130 CHARACTER (len = 20) :: modname = 'surf_landice' … … 139 146 LOGICAL, SAVE :: firstcall = .TRUE. 140 147 !$OMP THREADPRIVATE(firstcall) 141 !FC 142 143 148 149 150 !FC firtscall initializations 151 !****************************************************************************************** 144 152 IF (firstcall) THEN 145 153 alb_vis_sno_lic=0.77 … … 149 157 CALL getin_p('alb_nir_sno_lic',alb_nir_sno_lic) 150 158 PRINT*, 'alb_nir_sno_lic',alb_nir_sno_lic 159 160 ! z0m=1.e-3 161 ! z0h = z0m 151 162 firstcall=.false. 152 163 ENDIF 153 ! 164 !****************************************************************************************** 165 154 166 ! Initialize output variables 155 167 alb3(:) = 999999. … … 166 178 167 179 !**************************************************************************************** 168 ! ok_snow = TRUE : prepare and call SISVAT snow model 169 ! ok_snow = FALSE : soil_model, calcul_flux, fonte_neige, ... 170 ! 171 !**************************************************************************************** 172 IF (ok_snow) THEN 180 ! landice_opt = 0 : soil_model, calcul_flux, fonte_neige, ... 181 ! landice_opt = 1 : prepare and call SISVAT snow model 182 ! landice_opt = 2 : prepare and call INLANDSIS snow model 183 !**************************************************************************************** 184 185 186 IF (landice_opt .EQ. 1) THEN 187 188 !**************************************************************************************** 189 ! CALL to SISVAT interface 190 !**************************************************************************************** 191 173 192 #ifdef CPP_SISVAT 174 193 ! Prepare for calling SISVAT … … 192 211 pexner(i) = (p1lay(i)/pref)**(RD/RCPD) 193 212 dens_air(i) = p1lay(i)/RD/temp_air(i) ! dry air density 194 bl_height(i) = pphi1(i)/RG213 zsl_height(i) = pphi1(i)/RG 195 214 END DO 196 215 197 !**************************************************************************************** 198 ! CALL to SISVAT interface 199 ! 200 !**************************************************************************************** 216 201 217 ! config: compute everything with SV but temperatures afterwards with soil/calculfluxs 202 218 DO i = 1, knon … … 209 225 rmu0, swdown, lwdown, pexner, ps, p1lay, & 210 226 precip_rain, precip_snow, precip_snow_adv, snow_adv, & 211 bl_height, wind_velo, temp_air, dens_air, spechum, tsurf, &227 zsl_height, wind_velo, temp_air, dens_air, spechum, tsurf, & 212 228 rugoro, snow_cont_air, alb_soil, slope, cloudf, & 213 229 radsol, qsol, tsoil0, snow, snowhgt, qsnow, to_ice,sissnow, agesno, & … … 232 248 flux_u1, flux_v1) 233 249 #else 234 abort_message='Pb de coherence: ok_snow = .true.mais CPP_SISVAT = .false.'250 abort_message='Pb de coherence: landice_opt = 1 mais CPP_SISVAT = .false.' 235 251 CALL abort_physic(modname,abort_message,1) 236 252 #endif 237 ELSE ! ok_snow=FALSE 253 254 !**************************************************************************************** 255 ! CALL to INLANDSIS interface 256 !**************************************************************************************** 257 258 ELSE IF (landice_opt .EQ. 2) THEN 259 #ifdef CPP_INLANDSIS 260 261 debut_is=debut 262 lafin_is=.false. 263 ! Suppose zero surface speed 264 u0(:) = 0.0 265 v0(:) = 0.0 266 267 268 CALL calcul_flux_wind(knon, dtime, & 269 u0, v0, u1, v1, gustiness, cdragm, & 270 AcoefU, AcoefV, BcoefU, BcoefV, & 271 p1lay, temp_air, & 272 flux_u1, flux_v1) 273 274 275 ! Set constants and compute some input for SISVAT 276 ! = 1000 hPa 277 ! and calculate incoming flux for SW and LW interval: swdown, lwdown 278 swdown(:) = 0.0 279 lwdown(:) = 0.0 280 snow_adv(:) = 0. ! no snow blown in for now 281 snow_cont_air(:) = 0. 282 alb_soil(:) = 0.4 ! before albedo(:) but here it is the ice albedo that we have to set 283 ustar(:) = 0. 284 pref = 100000. 285 DO i = 1, knon 286 swdown(i) = swnet(i)/(1-albedo(i)) 287 lwdown(i) = lwdownm(i) 288 wind_velo(i) = u1(i)**2 + v1(i)**2 289 wind_velo(i) = wind_velo(i)**0.5 290 pexner(i) = (p1lay(i)/pref)**(RD/RCPD) 291 dens_air(i) = p1lay(i)/RD/temp_air(i) ! dry air density 292 zsl_height(i) = pphi1(i)/RG 293 tsoil0(i,:) = tsoil(i,:) 294 ustar(i)= (cdragm(i)*(wind_velo(i)**2))**0.5 295 END DO 296 297 298 ! Subtimestepping 299 300 dtis=dtime/n_dtis 301 302 DO nt=1,n_dtis 303 304 IF (lafin .and. nt.eq.n_dtis) THEN 305 lafin_is=.true. 306 END IF 307 308 !PRINT*,'RENTRE DANS INLANDSIS','itime',itime,'dtime',dtime,'dtis',dtis 309 CALL surf_inlandsis(knon, rlon, rlat, knindex, itime, dtis, debut_is, lafin_is, & 310 rmu0, swdown, lwdown, albedo, pexner, ps, p1lay, & 311 precip_rain, precip_snow, precip_snow_adv, snow_adv, & 312 zsl_height, wind_velo, ustar, temp_air, dens_air, spechum, tsurf, & 313 rugoro, snow_cont_air, alb_soil, slope, cloudf, & 314 radsol, qsol, tsoil0, snow, zfra, snowhgt, qsnow, to_ice,sissnow, agesno, & 315 AcoefH, AcoefQ, BcoefH, BcoefQ, cdragm, cdragh, & 316 run_off_lic, evap, fluxsens, fluxlat, dflux_s, dflux_l, & 317 tsurf_new, alb1, alb2, alb3, & 318 emis_new, z0m, z0h, qsurf) 319 320 debut_is=.false. 321 322 END DO 323 324 325 #else 326 abort_message='Pb de coherence: landice_opt = 2 mais CPP_INLANDSIS = .false.' 327 CALL abort_physic(modname,abort_message,1) 328 #endif 329 330 331 332 ELSE 238 333 239 334 !**************************************************************************************** … … 241 336 ! 242 337 !**************************************************************************************** 338 339 ! EV: use calbeta 340 CALL calbeta(dtime, is_lic, knon, snow, qsol, beta, cal, dif_grnd) 341 342 343 ! use soil model and recalculate properly cal 243 344 IF (soil_model) THEN 244 345 CALL soil(dtime, is_lic, knon, snow, tsurf, tsoil, soilcap, soilflux) … … 255 356 ! 256 357 !**************************************************************************************** 257 beta(:) = 1.0258 dif_grnd(:) = 0.0358 ! beta(:) = 1.0 359 ! dif_grnd(:) = 0.0 259 360 260 361 ! Suppose zero surface speed … … 281 382 ! 282 383 !**************************************************************************************** 283 CALL fonte_neige( 384 CALL fonte_neige(knon, is_lic, knindex, dtime, & 284 385 tsurf, precip_rain, precip_snow, & 285 386 snow, qsol, tsurf_new, evap) … … 291 392 !**************************************************************************************** 292 393 CALL albsno(klon,knon,dtime,agesno(:),alb_neig(:), precip_snow(:)) 394 293 395 WHERE (snow(1 : knon) .LT. 0.0001) agesno(1 : knon) = 0. 294 396 zfra(1:knon) = MAX(0.0,MIN(1.0,snow(1:knon)/(snow(1:knon)+10.0))) … … 303 405 !IM: KstaTER0.77 & LMD_ARMIP6 304 406 305 ! Attantion: alb1 and alb2 are the same!407 ! Attantion: alb1 and alb2 are not the same! 306 408 alb1(1:knon) = alb_vis_sno_lic 307 409 alb2(1:knon) = alb_nir_sno_lic … … 316 418 z0m = SQRT(z0m**2+rugoro**2) 317 419 318 END IF ! ok_snow 420 421 422 423 424 425 END IF ! landice_opt 319 426 320 427 … … 333 440 334 441 !**************************************************************************************** 335 snow_o=0. 336 zfra_o = 0. 337 DO j = 1, knon 338 i = knindex(j) 339 snow_o(i) = snow(j) 340 zfra_o(i) = zfra(j) 341 ENDDO 342 442 ! Etienne: comment these lines because of duplication just below 443 ! snow_o=0. 444 ! zfra_o = 0. 445 ! DO j = 1, knon 446 ! i = knindex(j) 447 ! snow_o(i) = snow(j) 448 ! zfra_o(i) = zfra(j) 449 ! ENDDO 450 ! 343 451 !**************************************************************************************** 344 452 snow_o=0.
Note: See TracChangeset
for help on using the changeset viewer.