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

Contents of /trunk/dyn3d/geopot.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 70 - (show annotations)
Mon Jun 24 15:39:52 2013 UTC (10 years, 11 months ago) by guez
Original Path: trunk/libf/dyn3d/geopot.f90
File size: 1457 byte(s)
In procedure, "addfi" access directly the module variable "dtphys"
instead of going through an argument.

In "conflx", do not create a local variable for temperature with
reversed order of vertical levels. Instead, give an actual argument
with reversed order in "physiq".

Changed names of variables "rmd" and "rmv" from module "suphec_m" to
"md" and "mv".

In "hgardfou", print only the first temperature out of range found.

1 module geopot_m
2
3 IMPLICIT NONE
4
5 contains
6
7 SUBROUTINE geopot(teta, pk, pks, phis, phi)
8
9 ! From libf/dyn3d/geopot.F, version 1.1.1.1 2004/05/19
10 ! Author: P. Le Van
11 ! Objet : calcul du géopotentiel aux milieux des couches
12 ! L'intégration se fait de bas en haut.
13
14 USE dimens_m, ONLY: iim, jjm, llm
15 use nr_util, only: assert
16
17 REAL, INTENT(IN):: teta(:, :, :) ! (iim + 1, jjm + 1, llm)
18 REAL, INTENT(IN):: pk(:, :, :) ! (iim + 1, jjm + 1, llm)
19 REAL, INTENT(IN):: pks(:, :) ! (iim + 1, jjm + 1)
20 REAL, INTENT(IN):: phis(:, :) ! (iim + 1, jjm + 1)
21 REAL, INTENT(out):: phi(:, :, :) ! (iim + 1, jjm + 1, llm)
22
23 ! Local:
24 INTEGER l
25
26 ! -----------------------------------------------------------------------
27
28 call assert((/size(teta, 1), size(pk, 1), size(pks, 1), size(phis, 1), &
29 size(phi, 1)/) == iim + 1, "geopot iim")
30 call assert((/size(teta, 2), size(pk, 2), size(pks, 2), size(phis, 2), &
31 size(phi, 2)/) == jjm + 1, "geopot jjm")
32 call assert((/size(teta, 3), size(pk, 3), size(phi, 3)/) == llm, &
33 "geopot llm")
34
35 ! Calcul de phi au niveau 1 près du sol :
36 phi(:, :, 1) = phis + teta(:, :, 1) * (pks - pk(:, :, 1))
37
38 ! Calcul de phi aux niveaux supérieurs :
39 DO l = 2, llm
40 phi(:, :, l) = phi(:, :, l-1) + 0.5 * (teta(:, :, l) + teta(:, :, l-1)) &
41 * (pk(:, :, l-1) - pk(:, :, l))
42 END DO
43
44 END SUBROUTINE geopot
45
46 end module geopot_m

  ViewVC Help
Powered by ViewVC 1.1.21