/[lmdze]/trunk/phylmd/physiq.f
ViewVC logotype

Diff of /trunk/phylmd/physiq.f

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 207 by guez, Thu Sep 1 10:30:53 2016 UTC revision 209 by guez, Wed Dec 7 17:37:21 2016 UTC
# Line 20  contains Line 20  contains
20      use calltherm_m, only: calltherm      use calltherm_m, only: calltherm
21      USE clesphys, ONLY: cdhmax, cdmmax, ecrit_ins, ksta, ksta_ter, ok_kzmin, &      USE clesphys, ONLY: cdhmax, cdmmax, ecrit_ins, ksta, ksta_ter, ok_kzmin, &
22           ok_instan           ok_instan
23      USE clesphys2, ONLY: cycle_diurne, conv_emanuel, nbapp_rad, new_oliq, &      USE clesphys2, ONLY: conv_emanuel, nbapp_rad, new_oliq, ok_orodr, ok_orolf
          ok_orodr, ok_orolf  
24      USE clmain_m, ONLY: clmain      USE clmain_m, ONLY: clmain
25      use clouds_gno_m, only: clouds_gno      use clouds_gno_m, only: clouds_gno
26      use comconst, only: dtphys      use comconst, only: dtphys
# Line 146  contains Line 145  contains
145      ! "physiq".      ! "physiq".
146    
147      REAL, save:: radsol(klon) ! bilan radiatif au sol calcule par code radiatif      REAL, save:: radsol(klon) ! bilan radiatif au sol calcule par code radiatif
   
148      REAL, save:: ftsol(klon, nbsrf) ! skin temperature of surface fraction      REAL, save:: ftsol(klon, nbsrf) ! skin temperature of surface fraction
149    
150      REAL, save:: ftsoil(klon, nsoilmx, nbsrf)      REAL, save:: ftsoil(klon, nsoilmx, nbsrf)
# Line 590  contains Line 588  contains
588      ! la surface.      ! la surface.
589    
590      CALL orbite(REAL(julien), longi, dist)      CALL orbite(REAL(julien), longi, dist)
591      IF (cycle_diurne) THEN      CALL zenang(longi, time, dtphys * radpas, mu0, fract)
        CALL zenang(longi, time, dtphys * radpas, mu0, fract)  
     ELSE  
        mu0 = - 999.999  
     ENDIF  
592    
593      ! Calcul de l'abedo moyen par maille      ! Calcul de l'abedo moyen par maille
594      albsol = sum(falbe * pctsrf, dim = 2)      albsol = sum(falbe * pctsrf, dim = 2)
# Line 613  contains Line 607  contains
607      CALL clmain(dtphys, pctsrf, t_seri, q_seri, u_seri, v_seri, julien, mu0, &      CALL clmain(dtphys, pctsrf, t_seri, q_seri, u_seri, v_seri, julien, mu0, &
608           ftsol, cdmmax, cdhmax, ksta, ksta_ter, ok_kzmin, ftsoil, qsol, &           ftsol, cdmmax, cdhmax, ksta, ksta_ter, ok_kzmin, ftsoil, qsol, &
609           paprs, play, fsnow, fqsurf, fevap, falbe, fluxlat, rain_fall, &           paprs, play, fsnow, fqsurf, fevap, falbe, fluxlat, rain_fall, &
610           snow_fall, fsolsw, fsollw, fder, rlat, frugs, agesno, rugoro, &           snow_fall, fsolsw, fsollw, fder, frugs, agesno, rugoro, d_t_vdf, &
611           d_t_vdf, d_q_vdf, d_u_vdf, d_v_vdf, d_ts, flux_t, flux_q, flux_u, &           d_q_vdf, d_u_vdf, d_v_vdf, d_ts, flux_t, flux_q, flux_u, flux_v, &
612           flux_v, cdragh, cdragm, q2, dsens, devap, ycoefh, yu1, yv1, t2m, q2m, &           cdragh, cdragm, q2, dsens, devap, ycoefh, yu1, yv1, t2m, q2m, u10m, &
613           u10m, v10m, pblh, capCL, oliqCL, cteiCL, pblT, therm, trmb1, trmb2, &           v10m, pblh, capCL, oliqCL, cteiCL, pblT, therm, trmb1, trmb2, trmb3, &
614           trmb3, plcl, fqcalving, ffonte, run_off_lic_0)           plcl, fqcalving, ffonte, run_off_lic_0)
615    
616      ! Incr\'ementation des flux      ! Incr\'ementation des flux
617    
# Line 636  contains Line 630  contains
630    
631      ! Update surface temperature:      ! Update surface temperature:
632    
     DO i = 1, klon  
        zxfluxlat(i) = 0.  
   
        zt2m(i) = 0.  
        zq2m(i) = 0.  
        zu10m(i) = 0.  
        zv10m(i) = 0.  
        zxffonte(i) = 0.  
        zxfqcalving(i) = 0.  
   
        s_pblh(i) = 0.  
        s_lcl(i) = 0.  
        s_capCL(i) = 0.  
        s_oliqCL(i) = 0.  
        s_cteiCL(i) = 0.  
        s_pblT(i) = 0.  
        s_therm(i) = 0.  
        s_trmb1(i) = 0.  
        s_trmb2(i) = 0.  
        s_trmb3(i) = 0.  
     ENDDO  
   
633      call assert(abs(sum(pctsrf, dim = 2) - 1.) <= EPSFRA, 'physiq: pctsrf')      call assert(abs(sum(pctsrf, dim = 2) - 1.) <= EPSFRA, 'physiq: pctsrf')
   
634      ftsol = ftsol + d_ts      ftsol = ftsol + d_ts
635      ztsol = sum(ftsol * pctsrf, dim = 2)      ztsol = sum(ftsol * pctsrf, dim = 2)
636      DO nsrf = 1, nbsrf      zxfluxlat = sum(fluxlat * pctsrf, dim = 2)
637         DO i = 1, klon      zt2m = sum(t2m * pctsrf, dim = 2)
638            zxfluxlat(i) = zxfluxlat(i) + fluxlat(i, nsrf) * pctsrf(i, nsrf)      zq2m = sum(q2m * pctsrf, dim = 2)
639        zu10m = sum(u10m * pctsrf, dim = 2)
640            zt2m(i) = zt2m(i) + t2m(i, nsrf) * pctsrf(i, nsrf)      zv10m = sum(v10m * pctsrf, dim = 2)
641            zq2m(i) = zq2m(i) + q2m(i, nsrf) * pctsrf(i, nsrf)      zxffonte = sum(ffonte * pctsrf, dim = 2)
642            zu10m(i) = zu10m(i) + u10m(i, nsrf) * pctsrf(i, nsrf)      zxfqcalving = sum(fqcalving * pctsrf, dim = 2)
643            zv10m(i) = zv10m(i) + v10m(i, nsrf) * pctsrf(i, nsrf)      s_pblh = sum(pblh * pctsrf, dim = 2)
644            zxffonte(i) = zxffonte(i) + ffonte(i, nsrf) * pctsrf(i, nsrf)      s_lcl = sum(plcl * pctsrf, dim = 2)
645            zxfqcalving(i) = zxfqcalving(i) + &      s_capCL = sum(capCL * pctsrf, dim = 2)
646                 fqcalving(i, nsrf) * pctsrf(i, nsrf)      s_oliqCL = sum(oliqCL * pctsrf, dim = 2)
647            s_pblh(i) = s_pblh(i) + pblh(i, nsrf) * pctsrf(i, nsrf)      s_cteiCL = sum(cteiCL * pctsrf, dim = 2)
648            s_lcl(i) = s_lcl(i) + plcl(i, nsrf) * pctsrf(i, nsrf)      s_pblT = sum(pblT * pctsrf, dim = 2)
649            s_capCL(i) = s_capCL(i) + capCL(i, nsrf) * pctsrf(i, nsrf)      s_therm = sum(therm * pctsrf, dim = 2)
650            s_oliqCL(i) = s_oliqCL(i) + oliqCL(i, nsrf) * pctsrf(i, nsrf)      s_trmb1 = sum(trmb1 * pctsrf, dim = 2)
651            s_cteiCL(i) = s_cteiCL(i) + cteiCL(i, nsrf) * pctsrf(i, nsrf)      s_trmb2 = sum(trmb2 * pctsrf, dim = 2)
652            s_pblT(i) = s_pblT(i) + pblT(i, nsrf) * pctsrf(i, nsrf)      s_trmb3 = sum(trmb3 * pctsrf, dim = 2)
           s_therm(i) = s_therm(i) + therm(i, nsrf) * pctsrf(i, nsrf)  
           s_trmb1(i) = s_trmb1(i) + trmb1(i, nsrf) * pctsrf(i, nsrf)  
           s_trmb2(i) = s_trmb2(i) + trmb2(i, nsrf) * pctsrf(i, nsrf)  
           s_trmb3(i) = s_trmb3(i) + trmb3(i, nsrf) * pctsrf(i, nsrf)  
        ENDDO  
     ENDDO  
653    
654      ! Si une sous-fraction n'existe pas, elle prend la valeur moyenne :      ! Si une sous-fraction n'existe pas, elle prend la valeur moyenne :
655      DO nsrf = 1, nbsrf      DO nsrf = 1, nbsrf
# Line 969  contains Line 934  contains
934      ENDIF      ENDIF
935    
936      ! Ajouter la tendance des rayonnements (tous les pas)      ! Ajouter la tendance des rayonnements (tous les pas)
   
937      DO k = 1, llm      DO k = 1, llm
938         DO i = 1, klon         DO i = 1, klon
939            t_seri(i, k) = t_seri(i, k) + (heat(i, k) - cool(i, k)) * dtphys &            t_seri(i, k) = t_seri(i, k) + (heat(i, k) - cool(i, k)) * dtphys &
# Line 978  contains Line 942  contains
942      ENDDO      ENDDO
943    
944      ! Calculer l'hydrologie de la surface      ! Calculer l'hydrologie de la surface
945      DO i = 1, klon      zxqsurf = sum(fqsurf * pctsrf, dim = 2)
946         zxqsurf(i) = 0.      zxsnow = sum(fsnow * pctsrf, dim = 2)
        zxsnow(i) = 0.  
     ENDDO  
     DO nsrf = 1, nbsrf  
        DO i = 1, klon  
           zxqsurf(i) = zxqsurf(i) + fqsurf(i, nsrf) * pctsrf(i, nsrf)  
           zxsnow(i) = zxsnow(i) + fsnow(i, nsrf) * pctsrf(i, nsrf)  
        ENDDO  
     ENDDO  
947    
948      ! Calculer le bilan du sol et la d\'erive de temp\'erature (couplage)      ! Calculer le bilan du sol et la d\'erive de temp\'erature (couplage)
   
949      DO i = 1, klon      DO i = 1, klon
950         bils(i) = radsol(i) - sens(i) + zxfluxlat(i)         bils(i) = radsol(i) - sens(i) + zxfluxlat(i)
951      ENDDO      ENDDO

Legend:
Removed from v.207  
changed lines
  Added in v.209

  ViewVC Help
Powered by ViewVC 1.1.21