/[lmdze]/trunk/dyn3d/guide.f
ViewVC logotype

Diff of /trunk/dyn3d/guide.f

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

revision 84 by guez, Thu Mar 6 15:12:00 2014 UTC revision 85 by guez, Thu Mar 6 17:35:22 2014 UTC
# Line 17  CONTAINS Line 17  CONTAINS
17      USE comgeom, ONLY: aire, rlatu, rlonv      USE comgeom, ONLY: aire, rlatu, rlonv
18      USE conf_gcm_m, ONLY: day_step, iperiod      USE conf_gcm_m, ONLY: day_step, iperiod
19      use conf_guide_m, only: conf_guide, guide_u, guide_v, guide_t, guide_q, &      use conf_guide_m, only: conf_guide, guide_u, guide_v, guide_t, guide_q, &
20           guide_p, ncep, ini_anal, tau_min_u, tau_max_u, tau_min_v, tau_max_v, &           ncep, ini_anal, tau_min_u, tau_max_u, tau_min_v, tau_max_v, &
21           tau_min_t, tau_max_t, tau_min_q, tau_max_q, tau_min_p, tau_max_p, &           tau_min_t, tau_max_t, tau_min_q, tau_max_q, tau_min_p, tau_max_p, &
22           online           online
23      USE dimens_m, ONLY: jjm, llm      USE dimens_m, ONLY: jjm, llm
# Line 40  CONTAINS Line 40  CONTAINS
40      REAL, intent(inout):: teta(ip1jmp1, llm) ! temperature potentielle      REAL, intent(inout):: teta(ip1jmp1, llm) ! temperature potentielle
41      REAL q(ip1jmp1, llm) ! temperature potentielle      REAL q(ip1jmp1, llm) ! temperature potentielle
42      REAL, intent(out):: masse(ip1jmp1, llm) ! masse d'air      REAL, intent(out):: masse(ip1jmp1, llm) ! masse d'air
43      REAL, intent(inout):: ps(ip1jmp1) ! pression au sol      REAL, intent(in):: ps(ip1jmp1) ! pression au sol
44    
45      ! Local:      ! Local:
46    
# Line 48  CONTAINS Line 48  CONTAINS
48      REAL, save:: ucovrea1(ip1jmp1, llm), vcovrea1(ip1jm, llm) !vts cov reas      REAL, save:: ucovrea1(ip1jmp1, llm), vcovrea1(ip1jm, llm) !vts cov reas
49      REAL, save:: tetarea1(ip1jmp1, llm) ! temp pot reales      REAL, save:: tetarea1(ip1jmp1, llm) ! temp pot reales
50      REAL, save:: qrea1(ip1jmp1, llm) ! temp pot reales      REAL, save:: qrea1(ip1jmp1, llm) ! temp pot reales
     REAL, save:: psrea1(ip1jmp1) ! ps  
51      REAL, save:: ucovrea2(ip1jmp1, llm), vcovrea2(ip1jm, llm) !vts cov reas      REAL, save:: ucovrea2(ip1jmp1, llm), vcovrea2(ip1jm, llm) !vts cov reas
52      REAL, save:: tetarea2(ip1jmp1, llm) ! temp pot reales      REAL, save:: tetarea2(ip1jmp1, llm) ! temp pot reales
53      REAL, save:: qrea2(ip1jmp1, llm) ! temp pot reales      REAL, save:: qrea2(ip1jmp1, llm) ! temp pot reales
54      REAL, save:: masserea2(ip1jmp1, llm) ! masse      REAL, save:: masserea2(ip1jmp1, llm) ! masse
     REAL, save:: psrea2(ip1jmp1) ! ps  
55    
56      REAL, save:: alpha_q(ip1jmp1)      REAL, save:: alpha_q(ip1jmp1)
57      REAL, save:: alpha_t(ip1jmp1), alpha_p(ip1jmp1)      REAL, save:: alpha_t(ip1jmp1), alpha_p(ip1jmp1)
# Line 185  CONTAINS Line 183  CONTAINS
183         rcod = nf90_close(ncidpl)         rcod = nf90_close(ncidpl)
184         ! Lecture du premier etat des reanalyses.         ! Lecture du premier etat des reanalyses.
185         CALL read_reanalyse(1, ps, ucovrea2, vcovrea2, tetarea2, qrea2, &         CALL read_reanalyse(1, ps, ucovrea2, vcovrea2, tetarea2, qrea2, &
186              masserea2, psrea2, 1, nlev)              masserea2, 1, nlev)
187         qrea2(:, :) = max(qrea2(:, :), 0.1)         qrea2(:, :) = max(qrea2(:, :), 0.1)
188    
189         ! Debut de l'integration temporelle:         ! Debut de l'integration temporelle:
# Line 215  CONTAINS Line 213  CONTAINS
213            step_rea = step_rea + 1            step_rea = step_rea + 1
214            itau_test = itau            itau_test = itau
215            CALL read_reanalyse(step_rea, ps, ucovrea2, vcovrea2, tetarea2, &            CALL read_reanalyse(step_rea, ps, ucovrea2, vcovrea2, tetarea2, &
216                 qrea2, masserea2, psrea2, 1, nlev)                 qrea2, masserea2, 1, nlev)
217            qrea2(:, :) = max(qrea2(:, :), 0.1)            qrea2(:, :) = max(qrea2(:, :), 0.1)
218            factt = dtvr*iperiod/daysec            factt = dtvr*iperiod/daysec
219            ztau(:) = factt/max(alpha_t(:), 1.E-10)            ztau(:) = factt/max(alpha_t(:), 1.E-10)
# Line 270  CONTAINS Line 268  CONTAINS
268         END DO         END DO
269      END IF      END IF
270    
     ! P  
     IF (guide_p) THEN  
        DO ij = 1, ip1jmp1  
           a = (1.-tau)*psrea1(ij) + tau*psrea2(ij)  
           ps(ij) = (1.-alpha_p(ij))*ps(ij) + alpha_p(ij)*a  
           IF (first .AND. ini_anal) ps(ij) = a  
        END DO  
        forall (l = 1: llm + 1) p(:, l) = ap(l) + bp(l) * ps  
        CALL massdair(p, masse)  
     END IF  
   
     ! q  
271      IF (guide_q) THEN      IF (guide_q) THEN
272         DO l = 1, llm         DO l = 1, llm
273            DO ij = 1, ip1jmp1            DO ij = 1, ip1jmp1

Legend:
Removed from v.84  
changed lines
  Added in v.85

  ViewVC Help
Powered by ViewVC 1.1.21