/[lmdze]/trunk/dyn3d/Guide/conf_guide.f
ViewVC logotype

Contents of /trunk/dyn3d/Guide/conf_guide.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 115 - (show annotations)
Fri Sep 19 17:36:20 2014 UTC (9 years, 8 months ago) by guez
File size: 2833 byte(s)
Extracted code from tau2alpha for first call into new procedure
init_tau2alpha. dxdys, dxdyu, dxdyv are now local variables if guide
computed by init_tau2alpha. This allows us to remove terrible argument
type of tau2alpha: we just give to tau2alpha the right dxdy and
rlat.

In module conf_guide_m, changed default values of tau_min_*, because
0.02 is too small for the default daystep = 240, iperiod = 5. Changed
default values of guide_[uv] to false. Moved variable ok_guide from
conf_gcm_m to conf_guide_m, ok_guide is no longer an input parameter,
it is computed from guide_*. Had then to move test on ok_guide and
day_step from conf_gcm_m to conf_guide_m. Added checks on input
nudging parameters in procedure conf_guide. Upgraded variable factt to
module conf_guide_m in order to check nudging parameters. Bug fix:
variable guide_q was not in namelist conf_guide_nml.

Removed unused variables aire_min, aire_max of MODULE guide_m.

Moved the call to conf_guide from guide to gcm. This was needed to
define ok_guide before getting into guide (since ok_guide is no longer
in conf_gcm_m). Moved test on grossismx and grossismy from tau2alpha
to guide. It is clearer now that only tau_max is used for a regular
grid, and we do not have to repeat this test in each call to
tau2alpha. In guide, we only call writefield when alpha is not a
constant.

1 module conf_guide_m
2
3 IMPLICIT NONE
4
5 ! Constantes de rappel, en jours :
6 REAL:: tau_min_u = 0.03
7 REAL:: tau_max_u = 10.
8 REAL:: tau_min_v = 0.03
9 REAL:: tau_max_v = 10.
10 REAL:: tau_min_t = 0.03
11 REAL:: tau_max_t = 10.
12 REAL:: tau_min_q = 0.03
13 REAL:: tau_max_q = 10.
14 REAL:: tau_min_p = 0.03
15 REAL:: tau_max_p = 10.
16
17 LOGICAL:: ncep = .false. ! Coordonnee vert NCEP ou ECMWF
18 LOGICAL:: ini_anal = .false. ! Initial = analyse
19 LOGICAL:: guide_u = .false. ! guidage de u
20 LOGICAL:: guide_v = .false. ! gvidage de v
21 LOGICAL:: guide_t = .false. ! guidage de T
22 LOGICAL:: guide_q = .false. ! guidage de q
23
24 logical:: online = .true. ! controle du guide
25 ! hors-ligne: x=x_rea
26
27 ! Latitude min et max pour le rappel dans le cas ou on 'a les
28 ! analyses que sur une bande de latitudes.
29 REAL:: lat_min_guide = -90. ! Latitude minimum pour le guidage
30 real:: lat_max_guide = 90. ! Latitude maximum pour le guidage
31
32 logical, save:: ok_guide ! guidage
33 REAL, save:: factt ! pas de temps entre deux appels au guidage, en jours
34
35 contains
36
37 SUBROUTINE conf_guide
38
39 ! From LMDZ4/libf/dyn3d/conf_guide.F, version 1.1.1.1 2004/05/19 12:53:07
40 ! Parametres de controle du run:
41
42 use abort_gcm_m, only: abort_gcm
43 use comconst, only: daysec, dtvr
44 use conf_gcm_m, only: day_step, iperiod
45 use nr_util, only: assert
46 use serre, only: grossismx, grossismy
47 use unit_nml_m, only: unit_nml
48
49 namelist /conf_guide_nml/ ncep, ini_anal, guide_u, guide_v, guide_t, &
50 guide_q, online, tau_min_u, tau_max_u, tau_min_v, tau_max_v, &
51 tau_min_t, tau_max_t, tau_min_q, tau_max_q, tau_min_p, tau_max_p, &
52 lat_min_guide, lat_max_guide
53
54 !-----------------------------------------------------------------------
55
56 print *, "Call sequence information: conf_guide"
57
58 print *, "Enter namelist 'conf_guide_nml'."
59 read(unit=*, nml=conf_guide_nml)
60 write(unit_nml, nml=conf_guide_nml)
61
62 ok_guide = any((/guide_u, guide_v, guide_t, guide_q/))
63 if (ok_guide .and. mod(day_step, 4 * iperiod) /= 0) call &
64 abort_gcm(modname = "conf_guide", &
65 message = 'ok_guide day_step iperiod', ierr = 1)
66
67 if (ok_guide .and. online) then
68 factt = dtvr * iperiod / daysec
69 print *, "factt = ", factt
70 if (abs(grossismx - 1.) >= 0.1 .and. abs(grossismy - 1.) >= 0.1) then
71 if (guide_u) call assert(factt / tau_min_u < 1, &
72 "conf_guide tau_min_u")
73 if (guide_v) call assert(factt / tau_min_v < 1, &
74 "conf_guide tau_min_v")
75 if (guide_t) call assert(factt / tau_min_t < 1, &
76 "conf_guide tau_min_t")
77 if (guide_q) call assert(factt / tau_min_q < 1, &
78 "conf_guide tau_min_q")
79 end if
80 end if
81
82 end SUBROUTINE conf_guide
83
84 end module conf_guide_m

  ViewVC Help
Powered by ViewVC 1.1.21