/[lmdze]/trunk/libf/phylmd/Orography/sugwd.f90
ViewVC logotype

Contents of /trunk/libf/phylmd/Orography/sugwd.f90

Parent Directory Parent Directory | Revision Log Revision Log


Revision 54 - (show annotations)
Tue Dec 6 15:07:04 2011 UTC (12 years, 5 months ago) by guez
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 module sugwd_m
2
3 IMPLICIT NONE
4
5 contains
6
7 SUBROUTINE sugwd(paprs, pplay)
8
9 ! Initialize yoegwd, the common that controls the gravity wave
10 ! drag parametrization.
11
12 ! REFERENCE.
13 ! ECMWF Research Department documentation of the IFS
14
15 ! AUTHOR.
16 ! MARTIN MILLER *ECMWF*
17
18 ! ORIGINAL : 90-01-01
19
20 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
24 REAL, INTENT(IN):: paprs(:, :) ! (nlon, nlev+1)
25 REAL, INTENT(IN):: pplay(:, :) ! (nlon, nlev)
26
27 ! Local:
28 INTEGER nlon, nlev
29 integer jk
30 REAL zpr, zstra, zsigt, zpm1r
31
32 !------------------------------------------------------------
33
34 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
38 ! 1. SET THE VALUES OF THE PARAMETERS
39
40 ghmax = 10000.
41
42 zpr = 100000.
43 zstra = 0.1
44 zsigt = 0.94
45
46 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
52 ! 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
58 gsigcr = 0.8
59
60 gkdrag = 0.2
61 grahilo = 1.
62 grcrit = 0.01
63 gfrcrit = 1.
64 gkwake = 0.5
65
66 gklift = 0.5
67 gvcrit = 0.
68
69 ! 2. SET VALUES OF SECURITY PARAMETERS
70 gvsec = 0.1
71 gssec = 1E-12
72 gtsec = 1E-7
73
74 END SUBROUTINE sugwd
75
76 end module sugwd_m

  ViewVC Help
Powered by ViewVC 1.1.21