Ignore:
Timestamp:
May 3, 2023, 6:21:08 PM (18 months ago)
Author:
evignon
Message:

merge de la branche blowing snow vers la trunk
premiere tentative
Etienne

Location:
LMDZ6/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk

  • LMDZ6/trunk/libf/phylmdiso/surf_landice_mod.F90

    r4285 r4523  
    1212       rmu0, lwdownm, albedo, pphi1, &
    1313       swnet, lwnet, tsurf, p1lay, &
    14        cdragh, cdragm, precip_rain, precip_snow, temp_air, spechum, &
     14       cdragh, cdragm, precip_rain, precip_snow, precip_bs, temp_air, spechum, &
    1515       AcoefH, AcoefQ, BcoefH, BcoefQ, &
    1616       AcoefU, AcoefV, BcoefU, BcoefV, &
    1717       ps, u1, v1, gustiness, rugoro, pctsrf, &
    18        snow, qsurf, qsol, agesno, &
    19        tsoil, z0m, z0h, SFRWL, alb_dir, alb_dif, evap, fluxsens, fluxlat, &
     18       snow, qsurf, qsol, qbs1, agesno, &
     19       tsoil, z0m, z0h, SFRWL, alb_dir, alb_dif, evap, fluxsens, fluxlat, fluxbs, &
    2020       tsurf_new, dflux_s, dflux_l, &
    2121       alt, slope, cloudf, &
     
    3434    USE cpl_mod,          ONLY : cpl_send_landice_fields
    3535    USE calcul_fluxs_mod
    36     USE phys_output_var_mod
     36    USE phys_local_var_mod, ONLY : zxrhoslic, zxustartlic
     37    USE phys_output_var_mod, ONLY : snow_o,zfra_o
    3738#ifdef ISO   
    3839    USE fonte_neige_mod,  ONLY : xtrun_off_lic
     
    4849!FC
    4950    USE ioipsl_getin_p_mod, ONLY : getin_p
    50 
     51    USE blowing_snow_ini_mod, ONLY : zeta_bs, pbst_bs, prt_bs
    5152
    5253#ifdef CPP_INLANDSIS
     
    7273    REAL, DIMENSION(klon), INTENT(IN)             :: p1lay
    7374    REAL, DIMENSION(klon), INTENT(IN)             :: cdragh, cdragm
    74     REAL, DIMENSION(klon), INTENT(IN)             :: precip_rain, precip_snow
     75    REAL, DIMENSION(klon), INTENT(IN)             :: precip_rain, precip_snow, precip_bs
    7576    REAL, DIMENSION(klon), INTENT(IN)             :: temp_air, spechum
    7677    REAL, DIMENSION(klon), INTENT(IN)             :: AcoefH, AcoefQ
     
    7879    REAL, DIMENSION(klon), INTENT(IN)             :: AcoefU, AcoefV, BcoefU, BcoefV
    7980    REAL, DIMENSION(klon), INTENT(IN)             :: ps
    80     REAL, DIMENSION(klon), INTENT(IN)             :: u1, v1, gustiness
     81    REAL, DIMENSION(klon), INTENT(IN)             :: u1, v1, gustiness, qbs1
    8182    REAL, DIMENSION(klon), INTENT(IN)             :: rugoro
    8283    REAL, DIMENSION(klon,nbsrf), INTENT(IN)       :: pctsrf
     
    118119!albedo SB <<<
    119120    REAL, DIMENSION(klon), INTENT(OUT)            :: evap, fluxsens, fluxlat
     121    REAL, DIMENSION(klon), INTENT(OUT)            :: fluxbs
    120122    REAL, DIMENSION(klon), INTENT(OUT)            :: tsurf_new
    121123    REAL, DIMENSION(klon), INTENT(OUT)            :: dflux_s, dflux_l     
     
    179181
    180182    REAL,DIMENSION(klon) :: alb1,alb2
     183    REAL,DIMENSION(klon) :: precip_totsnow, evap_totsnow
    181184    REAL, DIMENSION (klon,6) :: alb6
     185    REAL                   :: rho0, rhoice, ustart0, hsalt, esalt, qsalt
     186    REAL                   :: tau_dens, tau_dens0, tau_densmin, rhomax, rhohard
     187    REAL, DIMENSION(klon)  :: ws1, rhos, ustart
    182188! End definition
    183189!****************************************************************************************
     
    214220           PRINT*, 'alb_nir_sno_lic',alb_nir_sno_lic
    215221 
    216 !  z0m=1.e-3
    217 !  z0h = z0m
    218222  firstcall=.false.
    219223  ENDIF
    220224!******************************************************************************************
    221 !
     225
    222226! Initialize output variables
    223227    alb3(:) = 999999.
    224228    alb2(:) = 999999.
    225229    alb1(:) = 999999.
    226    
     230    fluxbs(:)=0. 
    227231    runoff(:) = 0.
    228232!****************************************************************************************
     
    232236    radsol(:) = 0.0
    233237    radsol(1:knon) = swnet(1:knon) + lwnet(1:knon)
     238
     239!****************************************************************************************
    234240
    235241!****************************************************************************************
     
    327333
    328334
    329 
    330335    ELSE
    331336
     
    342347    IF (soil_model) THEN
    343348       CALL soil(dtime, is_lic, knon, snow, tsurf, qsol, &
    344     & longitude(knindex(1:knon)), latitude(knindex(1:knon)), tsoil, soilcap, soilflux)
    345 
     349        & longitude(knindex(1:knon)), latitude(knindex(1:knon)), tsoil, soilcap, soilflux)
    346350       cal(1:knon) = RCPD / soilcap(1:knon)
    347351       radsol(1:knon)  = radsol(1:knon) + soilflux(1:knon)
     
    406410         flux_u1, flux_v1)
    407411
    408 !****************************************************************************************
    409 ! Calculate snow height, age, run-off,..
     412
     413!****************************************************************************************
     414! Calculate albedo
     415!
     416!****************************************************************************************
     417 
     418    CALL albsno(klon,knon,dtime,agesno(:),alb_neig(:), precip_snow(:)) 
     419
     420
     421! EV: following lines are obsolete since we set alb1 and alb2 to constant values
     422! I therefore comment them
     423!    alb1(1:knon) = alb_neig(1:knon)*zfra(1:knon) + &
     424!         0.6 * (1.0-zfra(1:knon))
     425!
     426!IM: plusieurs choix/tests sur l'albedo des "glaciers continentaux"
     427!       alb1(1 : knon)  = 0.6 !IM cf FH/GK
     428!       alb1(1 : knon)  = 0.82
     429!       alb1(1 : knon)  = 0.77 !211003 Ksta0.77
     430!       alb1(1 : knon)  = 0.8 !KstaTER0.8 & LMD_ARMIP5
     431!IM: KstaTER0.77 & LMD_ARMIP6   
     432
     433! Attantion: alb1 and alb2 are not the same!
     434    alb1(1:knon)  = alb_vis_sno_lic
     435    alb2(1:knon)  = alb_nir_sno_lic
     436
     437
     438!****************************************************************************************
     439! Rugosity
     440!
     441!****************************************************************************************
     442    z0m = z0m_landice
     443    z0h = z0h_landice
     444    !z0m = SQRT(z0m**2+rugoro**2)
     445
     446
     447
     448  ! Simple blowing snow param
     449  if (ok_bs) then
     450       ustart0 = 0.211
     451       rhoice = 920.0
     452       rho0 = 200.0
     453       rhomax=450.0
     454       rhohard=400.0
     455       tau_dens0=86400.0*10.  ! 10 days by default, in s
     456       tau_densmin=86400.0 ! 1 days according to in situ obs by C. Amory
     457       do i = 1, knon
     458           ! estimation of snow density
     459           ! snow density increases with snow age and
     460           ! increases even faster in case of sedimentation of blowing snow
     461           tau_dens=max(tau_densmin, tau_dens0*exp(-abs(precip_bs(i))/pbst_bs-abs(precip_rain(i))/prt_bs))
     462           rhos(i)=rho0+(rhohard-rho0)*(1.-exp(-agesno(i)*86400.0/tau_dens))
     463           ! blowing snow flux formula used in MAR
     464           ws1(i)=(u1(i)**2+v1(i)**2)**0.5
     465           ustar(i)=(cdragm(i)*(u1(i)**2+v1(i)**2))**0.5
     466           ustart(i)=ustart0*exp(max(rhoice/rho0-rhoice/rhos(i),0.))*exp(max(0.,rhos(i)-rhomax))
     467           ! we have multiplied by exp to prevent erosion when rhos>rhomax (usefull till
     468           ! rhohard<450)
     469           esalt=1./(3.25*max(ustar(i),0.001))
     470           hsalt=0.08436*ustar(i)**1.27
     471           qsalt=(max(ustar(i)**2-ustart(i)**2,0.))/(RG*hsalt)*esalt
     472           !ep=qsalt*cdragm(i)*sqrt(u1(i)**2+v1(i)**2)
     473           fluxbs(i)= zeta_bs*p1lay(i)/RD/temp_air(i)*ws1(i)*cdragm(i)*(qbs1(i)-qsalt)
     474       enddo
     475
     476       ! for outputs
     477       do j = 1, knon
     478          i = knindex(j)
     479          zxustartlic(i) = ustart(j)
     480          zxrhoslic(i) = rhos(j)
     481       enddo
     482
     483  endif
     484
     485
     486
     487!****************************************************************************************
     488! Calculate surface snow amount
    410489!   
    411490!****************************************************************************************
     491    IF (ok_bs) THEN
     492      precip_totsnow=precip_snow+precip_bs
     493      evap_totsnow=evap-fluxbs ! flux bs is positive towards the surface (snow erosion)
     494    ELSE
     495      precip_totsnow=precip_snow
     496      evap_totsnow=evap
     497    ENDIF
     498
    412499    CALL fonte_neige(knon, is_lic, knindex, dtime, &
    413          tsurf, precip_rain, precip_snow, &
    414          snow, qsol, tsurf_new, evap &
     500         tsurf, precip_rain, precip_totsnow, &
     501         snow, qsol, tsurf_new, evap_totsnow &
    415502#ifdef ISO   
    416503     & ,fq_fonte_diag,fqfonte_diag,snow_evap_diag,fqcalving_diag   &
     
    446533
    447534
    448 !****************************************************************************************
    449 ! Calculate albedo
    450 !
    451 !****************************************************************************************
    452     CALL albsno(klon,knon,dtime,agesno(:),alb_neig(:), precip_snow(:)) 
    453 
    454     WHERE (snow(1 : knon) .LT. 0.0001) agesno(1 : knon) = 0.
    455     zfra(1:knon) = MAX(0.0,MIN(1.0,snow(1:knon)/(snow(1:knon)+10.0)))
    456     alb1(1:knon) = alb_neig(1:knon)*zfra(1:knon) + &
    457          0.6 * (1.0-zfra(1:knon))
    458 !
    459 !IM: plusieurs choix/tests sur l'albedo des "glaciers continentaux"
    460 !       alb1(1 : knon)  = 0.6 !IM cf FH/GK
    461 !       alb1(1 : knon)  = 0.82
    462 !       alb1(1 : knon)  = 0.77 !211003 Ksta0.77
    463 !       alb1(1 : knon)  = 0.8 !KstaTER0.8 & LMD_ARMIP5
    464 !IM: KstaTER0.77 & LMD_ARMIP6   
    465 
    466 ! Attantion: alb1 and alb2 are not the same!
    467     alb1(1:knon)  = alb_vis_sno_lic
    468     alb2(1:knon)  = alb_nir_sno_lic
    469 
    470 
    471 !****************************************************************************************
    472 ! Rugosity
    473 !
    474 !****************************************************************************************
    475     z0m=1.e-3
    476     z0h = z0m
    477     z0m = SQRT(z0m**2+rugoro**2)
    478 
     535    WHERE (snow(1 : knon) .LT. 0.0001) agesno(1 : knon) = 0.                                         
     536    zfra(1:knon) = MAX(0.0,MIN(1.0,snow(1:knon)/(snow(1:knon)+10.0))) 
    479537
    480538
     
    494552          run_off_lic_frac(j) = pctsrf(i,is_lic)
    495553       ENDDO
    496        
     554
    497555       CALL cpl_send_landice_fields(itime, knon, knindex, run_off_lic, run_off_lic_frac)
    498556    ENDIF
     
    501559    runoff(1:knon)=run_off_lic(1:knon)/dtime
    502560
    503  
    504 !****************************************************************************************
    505 ! Etienne: comment these lines because of duplication just below
    506 !       snow_o=0.
    507 !       zfra_o = 0.
    508 !       DO j = 1, knon
    509 !           i = knindex(j)
    510 !           snow_o(i) = snow(j)
    511 !           zfra_o(i) = zfra(j)
    512 !       ENDDO
    513 !
    514 !****************************************************************************************
    515561       snow_o=0.
    516562       zfra_o = 0.
     
    553599!albedo SB <<<
    554600
    555  
    556  
    557601
    558602  END SUBROUTINE surf_landice
Note: See TracChangeset for help on using the changeset viewer.