/[lmdze]/trunk/dyn3d/Dissipation/gradiv2.f
ViewVC logotype

Contents of /trunk/dyn3d/Dissipation/gradiv2.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 103 - (show annotations)
Fri Aug 29 13:00:05 2014 UTC (9 years, 8 months ago) by guez
File size: 1971 byte(s)
Renamed module cvparam to cv_param. Deleted procedure
cv_param. Changed variables of module cv_param into parameters.

In procedures cv_driver, cv_uncompress and cv3_uncompress, removed
some arguments giving dimensions and used module variables klon and
klev instead.

In procedures gradiv2, laplacien_gam and laplacien, changed
declarations of local variables because klevel is not always klev.

Removed code for nudging surface pressure.

Removed arguments pim and pjm of tau2alpha. Added assignment of false
to variable first.

Replaced real argument del of procedures foeew and FOEDE by logical
argument.

1 module gradiv2_m
2
3 IMPLICIT NONE
4
5 contains
6
7 SUBROUTINE gradiv2(xcov, ycov, ld, gdx, gdy, cdivu)
8
9 ! From LMDZ4/libf/dyn3d/gradiv2.F, version 1.1.1.1 2004/05/19 12:53:07
10 ! P. Le Van
11 ! Calcul du gradient de la divergence du vecteur v.
12
13 USE comgeom, ONLY: cuvscvgam1, cvuscugam1, unsair_gam1, unsapolnga1, &
14 unsapolsga1
15 USE dimens_m, ONLY: iim, jjm
16 use divergf_m, only: divergf
17 USE filtreg_m, ONLY: filtreg
18 use grad_m, only: grad
19 use laplacien_m, only: laplacien
20 use nr_util, only: assert_eq, assert
21
22 ! Composantes covariantes de v :
23 REAL, intent(in):: xcov(:, :, :) ! (iim + 1, jjm + 1, klevel)
24 REAL, intent(in):: ycov(:, :, :) ! (iim + 1, jjm, klevel)
25
26 integer, intent(in):: ld
27 REAL, intent(out):: gdx(:, :, :) ! (iim + 1, jjm + 1, klevel)
28 REAL, intent(out):: gdy(:, :, :) ! (iim + 1, jjm, klevel)
29 real, intent(in):: cdivu
30
31 ! Variables locales :
32 REAL nugrads, div(iim + 1, jjm + 1, size(xcov, 3))
33 INTEGER iter, klevel
34
35 !--------------------------------------------------------------
36
37 call assert((/size(xcov, 1), size(ycov, 1), size(gdx, 1), size(gdy, 1)/) &
38 == iim + 1, "gradiv2 iim")
39 call assert((/size(xcov, 2) - 1, size(ycov, 2), size(gdx, 2) - 1, &
40 size(gdy, 2)/) == jjm, "gradiv2 iim")
41 klevel = assert_eq(size(xcov, 3), size(ycov, 3), size(gdx, 3), &
42 size(gdy, 3), "gradiv2 klevel")
43
44 CALL divergf(klevel, xcov, ycov, div)
45
46 IF (ld > 1) THEN
47 CALL laplacien(klevel, div)
48
49 ! Itération de l'opérateur laplacien_gam
50 DO iter = 1, ld - 2
51 CALL laplacien_gam(klevel, cuvscvgam1, cvuscugam1, unsair_gam1, &
52 unsapolnga1, unsapolsga1, div, div)
53 END DO
54 ENDIF
55
56 CALL filtreg(div, jjm + 1, klevel, 2, 1, .TRUE.)
57 CALL grad(klevel, div, gdx, gdy)
58 nugrads = (-1.)**ld * cdivu
59
60 gdx = gdx * nugrads
61 gdy = gdy * nugrads
62
63 END SUBROUTINE gradiv2
64
65 end module gradiv2_m

  ViewVC Help
Powered by ViewVC 1.1.21