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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 56 - (show annotations)
Tue Jan 10 19:02:02 2012 UTC (12 years, 4 months ago) by guez
Original Path: trunk/libf/dyn3d/Dissipation/gradiv2.f90
File size: 1446 byte(s)
Imported "writehist.f" from LMDZ.

Moved module variable "histaveid" from "com_io_dyn" to "initdynav_m".

In "inithist", access directly module variables from "com_io_dyn"
instead of going through the arguments. Copying from LMDZ, write "u"
and scalar variables to separate files. Create a new variable for the
new file in "com_io_dyn". Copying from LMDZ, change the vertical axes
of the three files.

Removed some useless initializations in "dissip".

In "bilan_dyn", removed useless variable "time". Avoiding the
approximate test on "dt_cum" being a multiple of "dt_app", just
compute "ncum" from known usage of "bilan_dyn" and compute "dt_cum"
from "ncum". Change "periodav" from real to integer in
"conf_gcm_m". Since "day_step" is required to be a multiple of
"iperiod", so is "ncum".

1 module gradiv2_m
2
3 IMPLICIT NONE
4
5 contains
6
7 SUBROUTINE gradiv2(klevel, 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 de grad div du vecteur v.
12
13 USE dimens_m, ONLY : llm
14 USE paramet_m, ONLY : ip1jm, ip1jmp1, jjp1
15 USE comgeom, ONLY : cuvscvgam1, cvuscugam1, unsair_gam1, unsapolnga1, &
16 unsapolsga1
17 USE filtreg_m, ONLY : filtreg
18
19 INTEGER, intent(in):: klevel
20
21 ! composantes covariantes de v:
22 REAL, intent(in):: xcov(ip1jmp1, klevel), ycov(ip1jm, klevel)
23
24 integer, intent(in):: ld
25 REAL, intent(out):: gdx(ip1jmp1, klevel), gdy(ip1jm, klevel)
26 real, intent(in):: cdivu
27
28 ! Variables locales :
29 REAL div(ip1jmp1, llm)
30 REAL nugrads
31 INTEGER iter
32
33 !--------------------------------------------------------------
34
35 gdx = xcov
36 gdy = ycov
37
38 CALL divergf(klevel, gdx, gdy, div)
39
40 IF (ld > 1) THEN
41 CALL laplacien(klevel, div, div)
42
43 ! Itération de l'opérateur laplacien_gam
44 DO iter = 1, ld -2
45 CALL laplacien_gam(klevel, cuvscvgam1, cvuscugam1, unsair_gam1, &
46 unsapolnga1, unsapolsga1, div, div)
47 END DO
48 ENDIF
49
50 CALL filtreg(div, jjp1, klevel, 2, 1, .TRUE., 1)
51 CALL grad(klevel, div, gdx, gdy)
52 nugrads = (-1.)**ld * cdivu
53
54 gdx = gdx * nugrads
55 gdy = gdy * nugrads
56
57 END SUBROUTINE gradiv2
58
59 end module gradiv2_m

  ViewVC Help
Powered by ViewVC 1.1.21