--- trunk/Sources/dyn3d/calfis.f 2015/04/29 15:47:56 134 +++ trunk/Sources/dyn3d/calfis.f 2015/07/24 16:54:30 162 @@ -4,8 +4,8 @@ contains - SUBROUTINE calfis(dayvrai, time, ucov, vcov, teta, q, pk, phis, phi, w, & - dufi, dvfi, dtetafi, dqfi, lafin) + SUBROUTINE calfis(ucov, vcov, teta, q, p3d, pk, phis, phi, w, dufi, dvfi, & + dtetafi, dqfi, dayvrai, time, lafin) ! From dyn3d/calfis.F, version 1.3, 2005/05/25 13:10:09 ! Authors: P. Le Van, F. Hourdin @@ -30,20 +30,15 @@ ! rayonnement) et l'aire de la maille (quand on veut int\'egrer une ! grandeur horizontalement). - use comconst, only: kappa, cpp, dtphys, g - use comgeom, only: apoln, cu_2d, cv_2d, unsaire_2d, apols, rlonu, rlonv + use comconst, only: kappa, cpp, g + use comgeom, only: apoln, cu_2d, cv_2d, unsaire_2d, apols use dimens_m, only: iim, jjm, llm, nqmx use dimphy, only: klon use disvert_m, only: preff + use dynetat0_m, only: rlonu, rlonv use grid_change, only: dyn_phy, gr_fi_dyn use nr_util, only: pi 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 REAL, intent(in):: ucov(:, :, :) ! (iim + 1, jjm + 1, llm) ! covariant zonal velocity @@ -57,6 +52,11 @@ REAL, intent(in):: q(:, :, :, :) ! (iim + 1, jjm + 1, llm, nqmx) ! mass fractions of advected fields + REAL, intent(in):: p3d(:, :, :) ! (iim + 1, jjm + 1, llm+1) + ! pressure at layer interfaces, in Pa + ! ("p3d(i, j, l)" is at longitude "rlonv(i)", latitude "rlatu(j)", + ! for interface "l") + REAL, intent(in):: pk(:, :, :) ! (iim + 1, jjm + 1, llm) ! Exner = cp * (p / preff)**kappa @@ -74,6 +74,11 @@ ! tendency for the potential temperature REAL, intent(out):: dqfi(:, :, :, :) ! (iim + 1, jjm + 1, llm, nqmx) + + 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 LOGICAL, intent(in):: lafin ! Local: @@ -103,8 +108,7 @@ ! 43. Température et pression milieu couche DO l = 1, llm pksurcp = pk(:, :, l) / cpp - pls(:, :, l) = preff * pksurcp**(1./ kappa) - play(:, l) = pack(pls(:, :, l), dyn_phy) + play(:, l) = pack(preff * pksurcp**(1./ kappa), dyn_phy) t(:, l) = pack(teta(:, :, l) * pksurcp, dyn_phy) ENDDO @@ -178,8 +182,8 @@ forall(l = 1: llm) v(:, l) = pack(zvfi(:, :, l), dyn_phy) ! Appel de la physique : - CALL physiq(lafin, dayvrai, time, dtphys, paprs, play, pphi, pphis, u, & - v, t, qx, omega, d_u, d_v, d_t, d_qx) + CALL physiq(lafin, dayvrai, time, paprs, play, pphi, pphis, u, v, t, qx, & + omega, d_u, d_v, d_t, d_qx) ! transformation des tendances physiques en tendances dynamiques: