/[lmdze]/trunk/Sources/phylmd/Orography/sugwd.f
ViewVC logotype

Annotation of /trunk/Sources/phylmd/Orography/sugwd.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 54 - (hide annotations)
Tue Dec 6 15:07:04 2011 UTC (12 years, 5 months ago) by guez
Original Path: trunk/libf/phylmd/Orography/sugwd.f90
File size: 1677 byte(s)
Removed Numerical Recipes procedure "ran1". Replaced calls to "ran1"
in "inidissip" by calls to intrinsic procedures.

Split file "interface_surf.f90" into a file with a module containing
only variables, "interface_surf", and single-procedure files. Gathered
files into directory "Interface_surf".

Added argument "cdivu" to "gradiv" and "gradiv2", "cdivh" to
"divgrad2" and "divgrad", and "crot" to "nxgraro2" and
"nxgrarot". "dissip" now uses variables "cdivu", "cdivh" and "crot"
from module "inidissip_m", so it can pass them to "gradiv2",
etc. Thanks to this modification, we avoid a circular dependency
betwwen "inidissip.f90" and "gradiv2.f90", etc. The value -1. used by
"gradiv2", for instance, during computation of eigenvalues is not the
value "cdivu" computed by "inidissip".

Extracted procedure "start_inter_3d" from module "startdyn", to its
own module.

In "inidissip", unrolled loop on "ii". I find it clearer now.

Moved variables "matriceun", "matriceus", "matricevn", "matricevs",
"matrinvn" and "matrinvs" from module "parafilt" to module
"inifilr_m". Moved variables "jfiltnu", "jfiltnv", "jfiltsu",
"jfiltsv" from module "coefils" to module "inifilr_m".

1 guez 54 module sugwd_m
2 guez 23
3 guez 54 IMPLICIT NONE
4 guez 23
5 guez 54 contains
6 guez 23
7 guez 54 SUBROUTINE sugwd(paprs, pplay)
8 guez 23
9 guez 54 ! Initialize yoegwd, the common that controls the gravity wave
10     ! drag parametrization.
11 guez 23
12 guez 54 ! REFERENCE.
13     ! ECMWF Research Department documentation of the IFS
14 guez 23
15 guez 54 ! AUTHOR.
16     ! MARTIN MILLER *ECMWF*
17 guez 23
18 guez 54 ! ORIGINAL : 90-01-01
19 guez 23
20 guez 54 USE yoegwd, ONLY : gfrcrit, ghmax, gkdrag, gklift, gkwake, grahilo, &
21     grcrit, gsigcr, gssec, gtsec, gvcrit, gvsec, nktopg, nstra
22     use nr_util, only: assert_eq
23 guez 23
24 guez 54 REAL, INTENT(IN):: paprs(:, :) ! (nlon, nlev+1)
25     REAL, INTENT(IN):: pplay(:, :) ! (nlon, nlev)
26 guez 23
27 guez 54 ! Local:
28     INTEGER nlon, nlev
29     integer jk
30     REAL zpr, zstra, zsigt, zpm1r
31 guez 23
32 guez 54 !------------------------------------------------------------
33 guez 23
34 guez 54 print *, "Call sequence information: sugwd"
35     nlon = assert_eq(size(paprs, 1), size(pplay, 1), "sugwd nlon")
36     nlev = assert_eq(size(paprs, 2) - 1, size(pplay, 2), "sugwd nlon")
37 guez 23
38 guez 54 ! 1. SET THE VALUES OF THE PARAMETERS
39 guez 23
40 guez 54 ghmax = 10000.
41 guez 23
42 guez 54 zpr = 100000.
43     zstra = 0.1
44     zsigt = 0.94
45 guez 23
46 guez 54 DO jk = 1, nlev
47     zpm1r = pplay(nlon / 2, jk) / paprs(nlon / 2, 1)
48     IF (zpm1r >= zsigt) nktopg = jk
49     IF (zpm1r >= zstra) nstra = jk
50     end DO
51 guez 23
52 guez 54 ! inversion car dans orodrag on compte les niveaux a l'envers
53     nktopg = nlev - nktopg + 1
54     nstra = nlev - nstra
55     PRINT *, 'nktopg=', nktopg
56     PRINT *, 'nstra=', nstra
57 guez 23
58 guez 54 gsigcr = 0.8
59 guez 23
60 guez 54 gkdrag = 0.2
61     grahilo = 1.
62     grcrit = 0.01
63     gfrcrit = 1.
64     gkwake = 0.5
65 guez 23
66 guez 54 gklift = 0.5
67     gvcrit = 0.
68 guez 23
69 guez 54 ! 2. SET VALUES OF SECURITY PARAMETERS
70     gvsec = 0.1
71     gssec = 1E-12
72     gtsec = 1E-7
73 guez 23
74 guez 54 END SUBROUTINE sugwd
75 guez 23
76 guez 54 end module sugwd_m

  ViewVC Help
Powered by ViewVC 1.1.21