/[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 288 by guez, Tue Jul 24 16:27:12 2018 UTC revision 302 by guez, Thu Sep 6 13:19:51 2018 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, ok_instan      USE clesphys, ONLY: cdhmax, cdmmax, ecrit_ins, ok_instan
22      USE clesphys2, ONLY: conv_emanuel, nbapp_rad, new_oliq, ok_orodr, ok_orolf      USE clesphys2, ONLY: conv_emanuel, nbapp_rad, new_oliq, ok_orodr, ok_orolf
23        USE conf_interface_m, ONLY: conf_interface
24      USE pbl_surface_m, ONLY: pbl_surface      USE pbl_surface_m, ONLY: pbl_surface
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 211  contains Line 212  contains
212      REAL rain_tiedtke(klon), snow_tiedtke(klon)      REAL rain_tiedtke(klon), snow_tiedtke(klon)
213    
214      REAL evap(klon) ! flux d'\'evaporation au sol      REAL evap(klon) ! flux d'\'evaporation au sol
215      real devap(klon) ! derivative of the evaporation flux at the surface      real dflux_q(klon) ! derivative of the evaporation flux at the surface
216      REAL sens(klon) ! flux de chaleur sensible au sol      REAL sens(klon) ! flux de chaleur sensible au sol
217      real dsens(klon) ! derivee du flux de chaleur sensible au sol      real dflux_t(klon) ! derivee du flux de chaleur sensible au sol
218      REAL, save:: dlw(klon) ! derivative of infra-red flux      REAL, save:: dlw(klon) ! derivative of infra-red flux
219      REAL bils(klon) ! bilan de chaleur au sol      REAL bils(klon) ! bilan de chaleur au sol
220      REAL fder(klon) ! Derive de flux (sensible et latente)      REAL fder(klon) ! Derive de flux (sensible et latente)
# Line 470  contains Line 471  contains
471         ENDIF         ENDIF
472    
473         ! Initialisation des sorties         ! Initialisation des sorties
474         call ini_histins(dtphys, ok_newmicro)         call ini_histins(ok_newmicro)
475         CALL phyredem0         CALL phyredem0
476           call conf_interface
477      ENDIF test_firstcal      ENDIF test_firstcal
478    
479      ! We will modify variables *_seri and we will not touch variables      ! We will modify variables *_seri and we will not touch variables
# Line 549  contains Line 551  contains
551         fsolsw(:, nsrf) = solsw * (1. - falbe(:, nsrf)) / (1. - albsol)         fsolsw(:, nsrf) = solsw * (1. - falbe(:, nsrf)) / (1. - albsol)
552      END forall      END forall
553    
554      CALL pbl_surface(dtphys, pctsrf, t_seri, q_seri, u_seri, v_seri, julien, &      CALL pbl_surface(pctsrf, t_seri, q_seri, u_seri, v_seri, julien, mu0, &
555           mu0, ftsol, cdmmax, cdhmax, ftsoil, qsol, paprs, play, fsnow, fqsurf, &           ftsol, cdmmax, cdhmax, ftsoil, qsol, paprs, play, fsnow, fqsurf, &
556           fevap, falbe, fluxlat, rain_fall, snow_fall, fsolsw, fsollw, frugs, &           fevap, falbe, fluxlat, rain_fall, snow_fall, fsolsw, fsollw, frugs, &
557           agesno, rugoro, d_t_vdf, d_q_vdf, d_u_vdf, d_v_vdf, d_ts, flux_t, &           agesno, rugoro, d_t_vdf, d_q_vdf, d_u_vdf, d_v_vdf, d_ts, flux_t, &
558           flux_q, flux_u, flux_v, cdragh, cdragm, q2, dsens, devap, coefh, t2m, &           flux_q, flux_u, flux_v, cdragh, cdragm, q2, dflux_t, dflux_q, coefh, &
559           q2m, u10m_srf, v10m_srf, pblh, capCL, oliqCL, cteiCL, pblT, therm, &           t2m, q2m, u10m_srf, v10m_srf, pblh, capCL, oliqCL, cteiCL, pblT, &
560           plcl, fqcalving, ffonte, run_off_lic_0)           therm, plcl, fqcalving, ffonte, run_off_lic_0)
561    
562      ! Incr\'ementation des flux      ! Incr\'ementation des flux
563    
564      sens = - sum(flux_t * pctsrf, dim = 2)      sens = - sum(flux_t * pctsrf, dim = 2)
565      evap = - sum(flux_q * pctsrf, dim = 2)      evap = - sum(flux_q * pctsrf, dim = 2)
566      fder = dlw + dsens + devap      fder = dlw + dflux_t + dflux_q
567    
568      DO k = 1, llm      DO k = 1, llm
569         DO i = 1, klon         DO i = 1, klon
# Line 572  contains Line 574  contains
574         ENDDO         ENDDO
575      ENDDO      ENDDO
576    
     ! Update surface temperature:  
   
577      call assert(abs(sum(pctsrf, dim = 2) - 1.) <= EPSFRA, 'physiq: pctsrf')      call assert(abs(sum(pctsrf, dim = 2) - 1.) <= EPSFRA, 'physiq: pctsrf')
578      ftsol = ftsol + d_ts      ftsol = ftsol + d_ts ! update surface temperature
579      tsol = sum(ftsol * pctsrf, dim = 2)      tsol = sum(ftsol * pctsrf, dim = 2)
580      zxfluxlat = sum(fluxlat * pctsrf, dim = 2)      zxfluxlat = sum(fluxlat * pctsrf, dim = 2)
581      zt2m = sum(t2m * pctsrf, dim = 2)      zt2m = sum(t2m * pctsrf, dim = 2)
# Line 641  contains Line 641  contains
641         conv_q = d_q_dyn + d_q_vdf / dtphys         conv_q = d_q_dyn + d_q_vdf / dtphys
642         conv_t = d_t_dyn + d_t_vdf / dtphys         conv_t = d_t_dyn + d_t_vdf / dtphys
643         z_avant = sum((q_seri + ql_seri) * zmasse, dim=2)         z_avant = sum((q_seri + ql_seri) * zmasse, dim=2)
644         CALL conflx(dtphys, paprs, play, t_seri(:, llm:1:- 1), &         CALL conflx(paprs, play, t_seri(:, llm:1:- 1), q_seri(:, llm:1:- 1), &
645              q_seri(:, llm:1:- 1), conv_t, conv_q, - evap, omega, d_t_con, &              conv_t, conv_q, - evap, omega, d_t_con, d_q_con, rain_con, &
646              d_q_con, rain_con, snow_con, mfu(:, llm:1:- 1), mfd(:, llm:1:- 1), &              snow_con, mfu(:, llm:1:- 1), mfd(:, llm:1:- 1), pen_u, pde_u, &
647              pen_u, pde_u, pen_d, pde_d, kcbot, kctop, kdtop, pmflxr, pmflxs)              pen_d, pde_d, kcbot, kctop, kdtop, pmflxr, pmflxs)
648         WHERE (rain_con < 0.) rain_con = 0.         WHERE (rain_con < 0.) rain_con = 0.
649         WHERE (snow_con < 0.) snow_con = 0.         WHERE (snow_con < 0.) snow_con = 0.
650         ibas_con = llm + 1 - kcbot         ibas_con = llm + 1 - kcbot
# Line 687  contains Line 687  contains
687         t_seri = t_seri + d_t_ajs         t_seri = t_seri + d_t_ajs
688         q_seri = q_seri + d_q_ajs         q_seri = q_seri + d_q_ajs
689      else      else
690         call calltherm(dtphys, play, paprs, pphi, u_seri, v_seri, t_seri, &         call calltherm(play, paprs, pphi, u_seri, v_seri, t_seri, q_seri, &
691              q_seri, d_u_ajs, d_v_ajs, d_t_ajs, d_q_ajs, fm_therm, entr_therm)              d_u_ajs, d_v_ajs, d_t_ajs, d_q_ajs, fm_therm, entr_therm)
692      endif      endif
693    
694      ! Caclul des ratqs      ! Caclul des ratqs
# Line 729  contains Line 729  contains
729         ratqs = ratqss         ratqs = ratqss
730      endif      endif
731    
732      CALL fisrtilp(dtphys, paprs, play, t_seri, q_seri, ptconv, ratqs, d_t_lsc, &      CALL fisrtilp(paprs, play, t_seri, q_seri, ptconv, ratqs, d_t_lsc, &
733           d_q_lsc, d_ql_lsc, rneb, cldliq, rain_lsc, snow_lsc, pfrac_impa, &           d_q_lsc, d_ql_lsc, rneb, cldliq, rain_lsc, snow_lsc, pfrac_impa, &
734           pfrac_nucl, pfrac_1nucl, frac_impa, frac_nucl, prfl, psfl, rhcl)           pfrac_nucl, pfrac_1nucl, frac_impa, frac_nucl, prfl, psfl, rhcl)
735    
# Line 875  contains Line 875  contains
875            ENDIF            ENDIF
876         ENDDO         ENDDO
877    
878         CALL drag_noro(dtphys, paprs, play, zmea, zstd, zsig, zgam, zthe, &         CALL drag_noro(paprs, play, zmea, zstd, zsig, zgam, zthe, zpic, zval, &
879              zpic, zval, ktest, t_seri, u_seri, v_seri, zulow, zvlow, zustrdr, &              ktest, t_seri, u_seri, v_seri, zulow, zvlow, zustrdr, zvstrdr, &
880              zvstrdr, d_t_oro, d_u_oro, d_v_oro)              d_t_oro, d_u_oro, d_v_oro)
881    
882         ! ajout des tendances         ! ajout des tendances
883         DO k = 1, llm         DO k = 1, llm
# Line 898  contains Line 898  contains
898            ENDIF            ENDIF
899         ENDDO         ENDDO
900    
901         CALL lift_noro(dtphys, paprs, play, zmea, zstd, zpic, ktest, t_seri, &         CALL lift_noro(paprs, play, zmea, zstd, zpic, ktest, t_seri, u_seri, &
902              u_seri, v_seri, zulow, zvlow, zustrli, zvstrli, d_t_lif, &              v_seri, zulow, zvlow, zustrli, zvstrli, d_t_lif, d_u_lif, d_v_lif)
             d_u_lif, d_v_lif)  
903    
904         ! Ajout des tendances :         ! Ajout des tendances :
905         DO k = 1, llm         DO k = 1, llm
# Line 918  contains Line 917  contains
917           aam, torsfc)           aam, torsfc)
918    
919      ! Calcul des tendances traceurs      ! Calcul des tendances traceurs
920      call phytrac(julien, time, firstcal, lafin, dtphys, t, paprs, play, mfu, &      call phytrac(julien, time, firstcal, lafin, t, paprs, play, mfu, mfd, &
921           mfd, pde_u, pen_d, coefh, cdragh, fm_therm, entr_therm, u(:, 1), &           pde_u, pen_d, coefh, cdragh, fm_therm, entr_therm, u(:, 1), v(:, 1), &
922           v(:, 1), ftsol, pctsrf, frac_impa, frac_nucl, da, phi, mp, upwd, &           ftsol, pctsrf, frac_impa, frac_nucl, da, phi, mp, upwd, dnwd, &
923           dnwd, tr_seri, zmasse, ncid_startphy)           tr_seri, zmasse, ncid_startphy)
924    
925      ! Calculer le transport de l'eau et de l'energie (diagnostique)      ! Calculer le transport de l'eau et de l'energie (diagnostique)
926      CALL transp(paprs, t_seri, q_seri, u_seri, v_seri, zphi, ve, vq, ue, uq)      CALL transp(paprs, t_seri, q_seri, u_seri, v_seri, zphi, ve, vq, ue, uq)

Legend:
Removed from v.288  
changed lines
  Added in v.302

  ViewVC Help
Powered by ViewVC 1.1.21