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

Diff of /trunk/Sources/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 212 by guez, Thu Jan 12 12:31:31 2017 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 58  contains Line 57  contains
57      USE phytrac_m, ONLY: phytrac      USE phytrac_m, ONLY: phytrac
58      use radlwsw_m, only: radlwsw      use radlwsw_m, only: radlwsw
59      use yoegwd, only: sugwd      use yoegwd, only: sugwd
60      USE suphec_m, ONLY: rcpd, retv, rg, rlvtt, romega, rsigma, rtt      USE suphec_m, ONLY: rcpd, retv, rg, rlvtt, romega, rsigma, rtt, rmo3, md
61      use time_phylmdz, only: itap, increment_itap      use time_phylmdz, only: itap, increment_itap
62      use transp_m, only: transp      use transp_m, only: transp
63      use transp_lay_m, only: transp_lay      use transp_lay_m, only: transp_lay
# 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 240  contains Line 238  contains
238      REAL, save:: pctsrf(klon, nbsrf) ! percentage of surface      REAL, save:: pctsrf(klon, nbsrf) ! percentage of surface
239      REAL, save:: albsol(klon) ! albedo du sol total visible      REAL, save:: albsol(klon) ! albedo du sol total visible
240      REAL, SAVE:: wo(klon, llm) ! column density of ozone in a cell, in kDU      REAL, SAVE:: wo(klon, llm) ! column density of ozone in a cell, in kDU
241        real, parameter:: dobson_u = 2.1415e-05 ! Dobson unit, in kg m-2
242    
243      real, save:: clwcon(klon, llm), rnebcon(klon, llm)      real, save:: clwcon(klon, llm), rnebcon(klon, llm)
244      real, save:: clwcon0(klon, llm), rnebcon0(klon, llm)      real, save:: clwcon0(klon, llm), rnebcon0(klon, llm)
# Line 569  contains Line 568  contains
568    
569      forall (k = 1: llm) zmasse(:, k) = (paprs(:, k) - paprs(:, k + 1)) / rg      forall (k = 1: llm) zmasse(:, k) = (paprs(:, k) - paprs(:, k + 1)) / rg
570    
     ! Prescrire l'ozone :  
     wo = ozonecm(REAL(julien), paprs)  
   
571      ! \'Evaporation de l'eau liquide nuageuse :      ! \'Evaporation de l'eau liquide nuageuse :
572      DO k = 1, llm      DO k = 1, llm
573         DO i = 1, klon         DO i = 1, klon
# Line 590  contains Line 586  contains
586      ! la surface.      ! la surface.
587    
588      CALL orbite(REAL(julien), longi, dist)      CALL orbite(REAL(julien), longi, dist)
589      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  
590    
591      ! Calcul de l'abedo moyen par maille      ! Calcul de l'abedo moyen par maille
592      albsol = sum(falbe * pctsrf, dim = 2)      albsol = sum(falbe * pctsrf, dim = 2)
# Line 613  contains Line 605  contains
605      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, &
606           ftsol, cdmmax, cdhmax, ksta, ksta_ter, ok_kzmin, ftsoil, qsol, &           ftsol, cdmmax, cdhmax, ksta, ksta_ter, ok_kzmin, ftsoil, qsol, &
607           paprs, play, fsnow, fqsurf, fevap, falbe, fluxlat, rain_fall, &           paprs, play, fsnow, fqsurf, fevap, falbe, fluxlat, rain_fall, &
608           snow_fall, fsolsw, fsollw, fder, rlat, frugs, agesno, rugoro, &           snow_fall, fsolsw, fsollw, fder, frugs, agesno, rugoro, d_t_vdf, &
609           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, &
610           flux_v, cdragh, cdragm, q2, dsens, devap, ycoefh, yu1, yv1, t2m, q2m, &           cdragh, cdragm, q2, dsens, devap, ycoefh, yu1, yv1, t2m, q2m, u10m, &
611           u10m, v10m, pblh, capCL, oliqCL, cteiCL, pblT, therm, trmb1, trmb2, &           v10m, pblh, capCL, oliqCL, cteiCL, pblT, therm, trmb1, trmb2, trmb3, &
612           trmb3, plcl, fqcalving, ffonte, run_off_lic_0)           plcl, fqcalving, ffonte, run_off_lic_0)
613    
614      ! Incr\'ementation des flux      ! Incr\'ementation des flux
615    
# Line 636  contains Line 628  contains
628    
629      ! Update surface temperature:      ! Update surface temperature:
630    
     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  
   
631      call assert(abs(sum(pctsrf, dim = 2) - 1.) <= EPSFRA, 'physiq: pctsrf')      call assert(abs(sum(pctsrf, dim = 2) - 1.) <= EPSFRA, 'physiq: pctsrf')
   
632      ftsol = ftsol + d_ts      ftsol = ftsol + d_ts
633      ztsol = sum(ftsol * pctsrf, dim = 2)      ztsol = sum(ftsol * pctsrf, dim = 2)
634      DO nsrf = 1, nbsrf      zxfluxlat = sum(fluxlat * pctsrf, dim = 2)
635         DO i = 1, klon      zt2m = sum(t2m * pctsrf, dim = 2)
636            zxfluxlat(i) = zxfluxlat(i) + fluxlat(i, nsrf) * pctsrf(i, nsrf)      zq2m = sum(q2m * pctsrf, dim = 2)
637        zu10m = sum(u10m * pctsrf, dim = 2)
638            zt2m(i) = zt2m(i) + t2m(i, nsrf) * pctsrf(i, nsrf)      zv10m = sum(v10m * pctsrf, dim = 2)
639            zq2m(i) = zq2m(i) + q2m(i, nsrf) * pctsrf(i, nsrf)      zxffonte = sum(ffonte * pctsrf, dim = 2)
640            zu10m(i) = zu10m(i) + u10m(i, nsrf) * pctsrf(i, nsrf)      zxfqcalving = sum(fqcalving * pctsrf, dim = 2)
641            zv10m(i) = zv10m(i) + v10m(i, nsrf) * pctsrf(i, nsrf)      s_pblh = sum(pblh * pctsrf, dim = 2)
642            zxffonte(i) = zxffonte(i) + ffonte(i, nsrf) * pctsrf(i, nsrf)      s_lcl = sum(plcl * pctsrf, dim = 2)
643            zxfqcalving(i) = zxfqcalving(i) + &      s_capCL = sum(capCL * pctsrf, dim = 2)
644                 fqcalving(i, nsrf) * pctsrf(i, nsrf)      s_oliqCL = sum(oliqCL * pctsrf, dim = 2)
645            s_pblh(i) = s_pblh(i) + pblh(i, nsrf) * pctsrf(i, nsrf)      s_cteiCL = sum(cteiCL * pctsrf, dim = 2)
646            s_lcl(i) = s_lcl(i) + plcl(i, nsrf) * pctsrf(i, nsrf)      s_pblT = sum(pblT * pctsrf, dim = 2)
647            s_capCL(i) = s_capCL(i) + capCL(i, nsrf) * pctsrf(i, nsrf)      s_therm = sum(therm * pctsrf, dim = 2)
648            s_oliqCL(i) = s_oliqCL(i) + oliqCL(i, nsrf) * pctsrf(i, nsrf)      s_trmb1 = sum(trmb1 * pctsrf, dim = 2)
649            s_cteiCL(i) = s_cteiCL(i) + cteiCL(i, nsrf) * pctsrf(i, nsrf)      s_trmb2 = sum(trmb2 * pctsrf, dim = 2)
650            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  
651    
652      ! Si une sous-fraction n'existe pas, elle prend la valeur moyenne :      ! Si une sous-fraction n'existe pas, elle prend la valeur moyenne :
653      DO nsrf = 1, nbsrf      DO nsrf = 1, nbsrf
# Line 955  contains Line 918  contains
918      endif      endif
919    
920      IF (MOD(itap - 1, radpas) == 0) THEN      IF (MOD(itap - 1, radpas) == 0) THEN
921           ! Prescrire l'ozone :
922           wo = ozonecm(REAL(julien), paprs)
923    
924         ! Appeler le rayonnement mais calculer tout d'abord l'albedo du sol.         ! Appeler le rayonnement mais calculer tout d'abord l'albedo du sol.
925         ! Calcul de l'abedo moyen par maille         ! Calcul de l'abedo moyen par maille
926         albsol = sum(falbe * pctsrf, dim = 2)         albsol = sum(falbe * pctsrf, dim = 2)
# Line 969  contains Line 935  contains
935      ENDIF      ENDIF
936    
937      ! Ajouter la tendance des rayonnements (tous les pas)      ! Ajouter la tendance des rayonnements (tous les pas)
   
938      DO k = 1, llm      DO k = 1, llm
939         DO i = 1, klon         DO i = 1, klon
940            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 943  contains
943      ENDDO      ENDDO
944    
945      ! Calculer l'hydrologie de la surface      ! Calculer l'hydrologie de la surface
946      DO i = 1, klon      zxqsurf = sum(fqsurf * pctsrf, dim = 2)
947         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  
948    
949      ! 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)
   
950      DO i = 1, klon      DO i = 1, klon
951         bils(i) = radsol(i) - sens(i) + zxfluxlat(i)         bils(i) = radsol(i) - sens(i) + zxfluxlat(i)
952      ENDDO      ENDDO
# Line 1174  contains Line 1130  contains
1130      END DO      END DO
1131    
1132      CALL histwrite_phy("albs", albsol)      CALL histwrite_phy("albs", albsol)
1133        CALL histwrite_phy("tro3", wo * dobson_u * 1e3 / zmasse / rmo3 * md)
1134      CALL histwrite_phy("rugs", zxrugs)      CALL histwrite_phy("rugs", zxrugs)
1135      CALL histwrite_phy("s_pblh", s_pblh)      CALL histwrite_phy("s_pblh", s_pblh)
1136      CALL histwrite_phy("s_pblt", s_pblt)      CALL histwrite_phy("s_pblt", s_pblt)

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

  ViewVC Help
Powered by ViewVC 1.1.21