/[lmdze]/trunk/Sources/dyn3d/calfis.f
ViewVC logotype

Diff of /trunk/Sources/dyn3d/calfis.f

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

revision 134 by guez, Wed Apr 29 15:47:56 2015 UTC revision 162 by guez, Fri Jul 24 16:54:30 2015 UTC
# Line 4  module calfis_m Line 4  module calfis_m
4    
5  contains  contains
6    
7    SUBROUTINE calfis(dayvrai, time, ucov, vcov, teta, q, pk, phis, phi, w, &    SUBROUTINE calfis(ucov, vcov, teta, q, p3d, pk, phis, phi, w, dufi, dvfi, &
8         dufi, dvfi, dtetafi, dqfi, lafin)         dtetafi, dqfi, dayvrai, time, lafin)
9    
10      ! From dyn3d/calfis.F, version 1.3, 2005/05/25 13:10:09      ! From dyn3d/calfis.F, version 1.3, 2005/05/25 13:10:09
11      ! Authors: P. Le Van, F. Hourdin      ! Authors: P. Le Van, F. Hourdin
# Line 30  contains Line 30  contains
30      ! rayonnement) et l'aire de la maille (quand on veut int\'egrer une      ! rayonnement) et l'aire de la maille (quand on veut int\'egrer une
31      ! grandeur horizontalement).      ! grandeur horizontalement).
32    
33      use comconst, only: kappa, cpp, dtphys, g      use comconst, only: kappa, cpp, g
34      use comgeom, only: apoln, cu_2d, cv_2d, unsaire_2d, apols, rlonu, rlonv      use comgeom, only: apoln, cu_2d, cv_2d, unsaire_2d, apols
35      use dimens_m, only: iim, jjm, llm, nqmx      use dimens_m, only: iim, jjm, llm, nqmx
36      use dimphy, only: klon      use dimphy, only: klon
37      use disvert_m, only: preff      use disvert_m, only: preff
38        use dynetat0_m, only: rlonu, rlonv
39      use grid_change, only: dyn_phy, gr_fi_dyn      use grid_change, only: dyn_phy, gr_fi_dyn
40      use nr_util, only: pi      use nr_util, only: pi
41      use physiq_m, only: physiq      use physiq_m, only: physiq
     use pressure_var, only: p3d, pls  
   
     integer, intent(in):: dayvrai  
     ! current day number, based at value 1 on January 1st of annee_ref  
   
     REAL, intent(in):: time ! time of day, as a fraction of day length  
42    
43      REAL, intent(in):: ucov(:, :, :) ! (iim + 1, jjm + 1, llm)      REAL, intent(in):: ucov(:, :, :) ! (iim + 1, jjm + 1, llm)
44      ! covariant zonal velocity      ! covariant zonal velocity
# Line 57  contains Line 52  contains
52      REAL, intent(in):: q(:, :, :, :) ! (iim + 1, jjm + 1, llm, nqmx)      REAL, intent(in):: q(:, :, :, :) ! (iim + 1, jjm + 1, llm, nqmx)
53      ! mass fractions of advected fields      ! mass fractions of advected fields
54    
55        REAL, intent(in):: p3d(:, :, :) ! (iim + 1, jjm + 1, llm+1)
56        ! pressure at layer interfaces, in Pa
57        ! ("p3d(i, j, l)" is at longitude "rlonv(i)", latitude "rlatu(j)",
58        ! for interface "l")
59    
60      REAL, intent(in):: pk(:, :, :) ! (iim + 1, jjm + 1, llm)      REAL, intent(in):: pk(:, :, :) ! (iim + 1, jjm + 1, llm)
61      ! Exner = cp * (p / preff)**kappa      ! Exner = cp * (p / preff)**kappa
62    
# Line 74  contains Line 74  contains
74      ! tendency for the potential temperature      ! tendency for the potential temperature
75    
76      REAL, intent(out):: dqfi(:, :, :, :) ! (iim + 1, jjm + 1, llm, nqmx)      REAL, intent(out):: dqfi(:, :, :, :) ! (iim + 1, jjm + 1, llm, nqmx)
77    
78        integer, intent(in):: dayvrai
79        ! current day number, based at value 1 on January 1st of annee_ref
80    
81        REAL, intent(in):: time ! time of day, as a fraction of day length
82      LOGICAL, intent(in):: lafin      LOGICAL, intent(in):: lafin
83    
84      ! Local:      ! Local:
# Line 103  contains Line 108  contains
108      ! 43. Température et pression milieu couche      ! 43. Température et pression milieu couche
109      DO l = 1, llm      DO l = 1, llm
110         pksurcp = pk(:, :, l) / cpp         pksurcp = pk(:, :, l) / cpp
111         pls(:, :, l) = preff * pksurcp**(1./ kappa)         play(:, l) = pack(preff * pksurcp**(1./ kappa), dyn_phy)
        play(:, l) = pack(pls(:, :, l), dyn_phy)  
112         t(:, l) = pack(teta(:, :, l) * pksurcp, dyn_phy)         t(:, l) = pack(teta(:, :, l) * pksurcp, dyn_phy)
113      ENDDO      ENDDO
114    
# Line 178  contains Line 182  contains
182      forall(l = 1: llm) v(:, l) = pack(zvfi(:, :, l), dyn_phy)      forall(l = 1: llm) v(:, l) = pack(zvfi(:, :, l), dyn_phy)
183    
184      ! Appel de la physique :      ! Appel de la physique :
185      CALL physiq(lafin, dayvrai, time, dtphys, paprs, play, pphi, pphis, u, &      CALL physiq(lafin, dayvrai, time, paprs, play, pphi, pphis, u, v, t, qx, &
186           v, t, qx, omega, d_u, d_v, d_t, d_qx)           omega, d_u, d_v, d_t, d_qx)
187    
188      ! transformation des tendances physiques en tendances dynamiques:      ! transformation des tendances physiques en tendances dynamiques:
189    

Legend:
Removed from v.134  
changed lines
  Added in v.162

  ViewVC Help
Powered by ViewVC 1.1.21