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

Annotation of /trunk/dyn3d/geopot.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 70 - (hide 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 guez 43 module geopot_m
2 guez 3
3 guez 43 IMPLICIT NONE
4 guez 3
5 guez 43 contains
6 guez 3
7 guez 70 SUBROUTINE geopot(teta, pk, pks, phis, phi)
8 guez 3
9 guez 43 ! 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 guez 3
14 guez 70 USE dimens_m, ONLY: iim, jjm, llm
15     use nr_util, only: assert
16 guez 3
17 guez 70 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 guez 3
23 guez 43 ! Local:
24     INTEGER l
25 guez 3
26 guez 43 ! -----------------------------------------------------------------------
27 guez 3
28 guez 70 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 guez 43 ! Calcul de phi au niveau 1 près du sol :
36 guez 70 phi(:, :, 1) = phis + teta(:, :, 1) * (pks - pk(:, :, 1))
37 guez 43
38     ! Calcul de phi aux niveaux supérieurs :
39     DO l = 2, llm
40 guez 70 phi(:, :, l) = phi(:, :, l-1) + 0.5 * (teta(:, :, l) + teta(:, :, l-1)) &
41     * (pk(:, :, l-1) - pk(:, :, l))
42 guez 43 END DO
43    
44     END SUBROUTINE geopot
45    
46     end module geopot_m

  ViewVC Help
Powered by ViewVC 1.1.21