Changeset 236 for LMDZ.3.3


Ignore:
Timestamp:
Jun 21, 2001, 9:47:51 AM (23 years ago)
Author:
lmdzadmin
Message:

Inclus nouveau soil dans interface_surf
LF

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ.3.3/branches/rel-LF/libf/phylmd/interface_surf.F90

    r235 r236  
    184184  logical, save        :: first_call = .true.
    185185  integer, save        :: error
    186   integer              :: ii
     186  integer              :: ii, index
    187187  logical,save              :: check = .true.
    188188  real, dimension(klon):: cal, beta, dif_grnd, capsol
     
    303303     & klon, nisurf, knon, knindex, debut,  &
    304304     & alb_new, z0_new)
    305 !
    306 !
    307        DO ii = 1, knon
    308          alb_neig(ii) = alb_neig_grid(knindex(ii))
    309        enddo
    310        zfra = MAX(0.0,MIN(1.0,snow/(snow+10.0)))
    311        alb_new = alb_neig*zfra + alb_new*(1.0-zfra)
    312        z0_new = SQRT(z0_new**2+rugoro**2)
    313 !
    314        CALL albsno(klon,agesno,alb_neig_grid) 
    315  
     305
    316306! calcul snow et qsol, hydrol adapté
    317307!
     308       CALL calbeta(dtime, nisurf, knon, snow, qsol, beta, capsol, dif_grnd)
     309
    318310       IF (soil_model) THEN
    319            CALL soil(dtime, nisurf, snow, tsurf, tsoil,soilcap, soilflux)
    320            cal = RCPD / soilcap
    321            radsol = radsol + soilflux
     311           CALL soil(dtime, nisurf, knon,snow, tsurf, tsoil,soilcap, soilflux)
     312           cal(1:knon) = RCPD / soilcap(1:knon)
     313           radsol(1:knon) = radsol(1:knon)  + soilflux(1:knon)
     314!!$           WRITE(*,*) 'radsol'
     315!!$           WRITE(*,*) radsol(1 : knon)
     316!!$           WRITE(*,*) 'soilflux'
     317!!$           WRITE(*,*) soilflux(1 : knon)
    322318       ELSE
    323            CALL calbeta(dtime, nisurf, knon, snow, qsol, beta, capsol, dif_grnd)
    324319!      if (check) write(*,*)'Sortie calbeta'
    325320!      if (check) write(*,*)'RCPD = ',RCPD,' capsol = '
     
    341336     &   petAcoef, peqAcoef, petBcoef, peqBcoef, &
    342337     &   tsurf_new, evap, fluxlat, fluxsens, dflux_s, dflux_l)
     338
     339       DO ii = 1, knon
     340         index = knindex(ii)
     341         alb_neig(ii) = alb_neig_grid(index)
     342         agesno(index)  = (agesno(index) + (1.-agesno(index)/50.)*dtime/86400.)&
     343            &             * EXP(-1.*MAX(0.0,precip_snow(ii))*dtime/0.3)
     344         agesno(index) = MAX(agesno(index),0.0)
     345         IF(snow(ii) .LT. 0.0001) agesno(index) = 0.
     346       ENDDO
     347       zfra = MAX(0.0,MIN(1.0,snow/(snow+10.0)))
     348       alb_new = alb_neig*zfra + alb_new*(1.0-zfra)
     349       z0_new = SQRT(z0_new**2+rugoro**2)
    343350
    344351    else
     
    544551! calcul albedo
    545552!
    546     zfra = MAX(0.0,MIN(1.0,snow/(snow+10.0)))
    547     DO ii = 1, knon
    548       alb_neig(ii) = alb_neig_grid(knindex(ii))
    549     enddo
    550     alb_new = alb_neig*zfra + 0.6 * (1.0-zfra)
    551 
    552     z0_new = 0.001
     553!
     554      zfra = MAX(0.0,MIN(1.0,snow/(snow+10.0)))
     555      DO ii = 1, knon
     556        index = knindex(ii)
     557        alb_neig(ii) = alb_neig_grid(index)
     558      ENDDO
     559      alb_new = alb_neig*zfra + 0.6 * (1.0-zfra)
     560     
     561      z0_new = 0.001
    553562
    554563  else if (nisurf == is_lic) then
     
    594603    zfra = MAX(0.0,MIN(1.0,snow/(snow+10.0)))
    595604    DO ii = 1, knon
    596       alb_neig(ii) = alb_neig_grid(knindex(ii))
    597     enddo
     605      index = knindex(ii)
     606      alb_neig(ii) = alb_neig_grid(index)
     607      agesno(index)  = (agesno(index) + (1.-agesno(index)/50.)*dtime/86400.)&
     608         &             * EXP(-1.*MAX(0.0,precip_snow(ii))*dtime/0.3)
     609      agesno(index) = MAX(agesno(index),0.0)
     610        IF(snow(ii) .LT. 0.0001) agesno(index) = 0.
     611    ENDDO
    598612    alb_new = alb_neig*zfra + 0.6 * (1.0-zfra)
    599613!
Note: See TracChangeset for help on using the changeset viewer.