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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 56 - (hide 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 guez 54 module gradiv2_m
2 guez 3
3 guez 54 IMPLICIT NONE
4 guez 3
5 guez 54 contains
6 guez 3
7 guez 54 SUBROUTINE gradiv2(klevel, xcov, ycov, ld, gdx, gdy, cdivu)
8 guez 3
9 guez 54 ! From LMDZ4/libf/dyn3d/gradiv2.F, version 1.1.1.1 2004/05/19 12:53:07
10     ! P. Le Van
11 guez 55 ! Calcul de grad div du vecteur v.
12 guez 3
13 guez 55 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 guez 3
19 guez 55 INTEGER, intent(in):: klevel
20 guez 3
21 guez 55 ! composantes covariantes de v:
22 guez 56 REAL, intent(in):: xcov(ip1jmp1, klevel), ycov(ip1jm, klevel)
23 guez 55
24 guez 54 integer, intent(in):: ld
25 guez 56 REAL, intent(out):: gdx(ip1jmp1, klevel), gdy(ip1jm, klevel)
26 guez 54 real, intent(in):: cdivu
27 guez 3
28 guez 55 ! Variables locales :
29 guez 56 REAL div(ip1jmp1, llm)
30 guez 54 REAL nugrads
31 guez 56 INTEGER iter
32 guez 3
33 guez 54 !--------------------------------------------------------------
34    
35 guez 55 gdx = xcov
36     gdy = ycov
37 guez 54
38 guez 55 CALL divergf(klevel, gdx, gdy, div)
39 guez 54
40 guez 56 IF (ld > 1) THEN
41     CALL laplacien(klevel, div, div)
42 guez 54
43 guez 56 ! Itération de l'opérateur laplacien_gam
44 guez 54 DO iter = 1, ld -2
45 guez 56 CALL laplacien_gam(klevel, cuvscvgam1, cvuscugam1, unsair_gam1, &
46 guez 54 unsapolnga1, unsapolsga1, div, div)
47 guez 56 END DO
48 guez 54 ENDIF
49    
50 guez 55 CALL filtreg(div, jjp1, klevel, 2, 1, .TRUE., 1)
51 guez 56 CALL grad(klevel, div, gdx, gdy)
52 guez 54 nugrads = (-1.)**ld * cdivu
53    
54 guez 56 gdx = gdx * nugrads
55     gdy = gdy * nugrads
56 guez 54
57     END SUBROUTINE gradiv2
58    
59     end module gradiv2_m

  ViewVC Help
Powered by ViewVC 1.1.21