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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 57 - (hide annotations)
Mon Jan 30 12:54:02 2012 UTC (12 years, 3 months ago) by guez
Original Path: trunk/libf/dyn3d/Dissipation/gradiv2.f90
File size: 1924 byte(s)
Write used namelists to file "" instead of standard output.

Avoid aliasing in "inidissip" in calls to "divgrad2", "divgrad",
"gradiv2", "gradiv", "nxgraro2" and "nxgrarot". Add a degenerate
dimension to arrays so they have rank 3, like the dummy arguments in
"divgrad2", "divgrad", "gradiv2", "gradiv", "nxgraro2" and "nxgrarot".

Extract the initialization part from "bilan_dyn" and make a separate
procedure, "init_dynzon", from it.

Move variables from modules "iniprint" and "logic" to module
"conf_gcm_m".

Promote internal procedures of "fxy" to private procedures of module
"fxy_m".

Extracted documentation from "inigeom". Removed useless "save"
attributes. Removed useless intermediate variables. Extracted
processing of poles from loop on latitudes. Write coordinates to file
"longitude_latitude.txt" instead of standard output.

Do not use ozone tracer for radiative transfer.

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 57 SUBROUTINE gradiv2(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 57 USE dimens_m, ONLY : iim, jjm, llm
14     use divergf_m, only: divergf
15 guez 55 USE comgeom, ONLY : cuvscvgam1, cvuscugam1, unsair_gam1, unsapolnga1, &
16     unsapolsga1
17     USE filtreg_m, ONLY : filtreg
18 guez 57 use nr_util, only: assert_eq, assert
19 guez 3
20 guez 57 ! Composantes covariantes de v :
21     REAL, intent(in):: xcov(:, :, :) ! (iim + 1, jjm + 1, klevel)
22     REAL, intent(in):: ycov(:, :, :) ! (iim + 1, jjm, klevel)
23 guez 3
24 guez 54 integer, intent(in):: ld
25 guez 57 REAL, intent(out):: gdx(:, :, :) ! (iim + 1, jjm + 1, klevel)
26     REAL, intent(out):: gdy(:, :, :) ! (iim + 1, jjm, klevel)
27 guez 54 real, intent(in):: cdivu
28 guez 3
29 guez 55 ! Variables locales :
30 guez 57 REAL nugrads, div(iim + 1, jjm + 1, llm)
31     INTEGER iter, klevel
32 guez 3
33 guez 54 !--------------------------------------------------------------
34    
35 guez 57 call assert((/size(xcov, 1), size(ycov, 1), size(gdx, 1), size(gdy, 1)/) &
36     == iim + 1, "gradiv2 iim")
37     call assert((/size(xcov, 2) - 1, size(ycov, 2), size(gdx, 2) - 1, &
38     size(gdy, 2)/) == jjm, "gradiv2 iim")
39     klevel = assert_eq(size(xcov, 3), size(ycov, 3), size(gdx, 3), &
40     size(gdy, 3), "gradiv2 klevel")
41    
42 guez 55 gdx = xcov
43     gdy = ycov
44 guez 54
45 guez 55 CALL divergf(klevel, gdx, gdy, div)
46 guez 54
47 guez 56 IF (ld > 1) THEN
48     CALL laplacien(klevel, div, div)
49 guez 54
50 guez 56 ! Itération de l'opérateur laplacien_gam
51 guez 54 DO iter = 1, ld -2
52 guez 56 CALL laplacien_gam(klevel, cuvscvgam1, cvuscugam1, unsair_gam1, &
53 guez 54 unsapolnga1, unsapolsga1, div, div)
54 guez 56 END DO
55 guez 54 ENDIF
56    
57 guez 57 CALL filtreg(div, jjm + 1, klevel, 2, 1, .TRUE., 1)
58 guez 56 CALL grad(klevel, div, gdx, gdy)
59 guez 54 nugrads = (-1.)**ld * cdivu
60    
61 guez 56 gdx = gdx * nugrads
62     gdy = gdy * nugrads
63 guez 54
64     END SUBROUTINE gradiv2
65    
66     end module gradiv2_m

  ViewVC Help
Powered by ViewVC 1.1.21