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

Diff of /trunk/Sources/dyn3d/Guide/conf_guide.f

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/libf/dyn3d/conf_guide.f90 revision 44 by guez, Wed Apr 13 12:29:18 2011 UTC trunk/Sources/dyn3d/Guide/conf_guide.f revision 171 by guez, Tue Sep 29 19:48:59 2015 UTC
# Line 2  module conf_guide_m Line 2  module conf_guide_m
2    
3    IMPLICIT NONE    IMPLICIT NONE
4    
5    REAL tau_min_u, tau_max_u    ! Constantes de rappel, en jours :
6    REAL tau_min_v, tau_max_v    REAL:: tau_min_u = 0.03
7    REAL tau_min_t, tau_max_t    REAL:: tau_max_u = 10.
8    REAL tau_min_q, tau_max_q    REAL:: tau_min_v = 0.03
9    REAL tau_min_p, tau_max_p    REAL:: tau_max_v = 10.
10    LOGICAL ncep, ini_anal    REAL:: tau_min_t = 0.03
11    LOGICAL guide_u, guide_v, guide_t, guide_q, guide_p    REAL:: tau_max_t = 10.
12    INTEGER online    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      ! Dans le cas où on n'a les analyses que sur une bande de latitudes :
28      REAL, save:: lat_min_guide ! minimum latitude for nudging, in rad
29      real, save:: lat_max_guide ! maximum latitude for nudging, in rad
30    
31      logical, save:: ok_guide ! guidage
32      REAL, save:: factt ! pas de temps entre deux appels au guidage, en jours
33    
34  contains  contains
35    
# Line 18  contains Line 38  contains
38      ! From LMDZ4/libf/dyn3d/conf_guide.F, version 1.1.1.1 2004/05/19 12:53:07      ! From LMDZ4/libf/dyn3d/conf_guide.F, version 1.1.1.1 2004/05/19 12:53:07
39      !  Parametres de controle du run:      !  Parametres de controle du run:
40    
41      use getparam, only: ini_getparam, getpar, fin_getparam      use abort_gcm_m, only: abort_gcm
42      use tau2alpha_m, only: lat_max_guide, lat_min_guide      use comconst, only: daysec, dtvr
43        use conf_gcm_m, only: day_step, iperiod
44        use dynetat0_m, only: grossismx, grossismy
45        use nr_util, only: assert, pi
46        use unit_nml_m, only: unit_nml
47    
48        ! Local:
49    
50        REAL:: lat_min_guide_deg = -90. ! in degrees
51        real:: lat_max_guide_deg = 90. ! in degrees
52    
53        namelist /conf_guide_nml/ ncep, ini_anal, guide_u, guide_v, guide_t, &
54             guide_q, online, tau_min_u, tau_max_u, tau_min_v, tau_max_v, &
55             tau_min_t, tau_max_t, tau_min_q, tau_max_q, tau_min_p, tau_max_p, &
56             lat_min_guide_deg, lat_max_guide_deg
57    
58      !-----------------------------------------------------------------------      !-----------------------------------------------------------------------
59    
60      print *, "Call sequence information: conf_guide"      print *, "Call sequence information: conf_guide"
     call ini_getparam('guide.eff')  
   
     call getpar('online',1,online,'Index de controle du guide')  
     CALL getpar('ncep',.false.,ncep,'Coordonnee vert NCEP ou ECMWF')  
     CALL getpar('ini_anal',.false.,ini_anal,'Initial = analyse')  
   
     CALL getpar('guide_u',.true.,guide_u,'guidage de u')  
     CALL getpar('guide_v',.true.,guide_v,'guidage de v')  
     CALL getpar('guide_T',.true.,guide_T,'guidage de T')  
     CALL getpar('guide_P',.true.,guide_P,'guidage de P')  
     CALL getpar('guide_Q',.true.,guide_Q,'guidage de Q')  
   
     !   Constantes de rappel. Unite : fraction de jour  
     CALL getpar('tau_min_u',0.02,tau_min_u,'Cste de rappel min, u')  
     CALL getpar('tau_max_u', 10.,tau_max_u,'Cste de rappel max, u')  
     CALL getpar('tau_min_v',0.02,tau_min_v,'Cste de rappel min, v')  
     CALL getpar('tau_max_v', 10.,tau_max_v,'Cste de rappel max, v')  
     CALL getpar('tau_min_T',0.02,tau_min_T,'Cste de rappel min, T')  
     CALL getpar('tau_max_T', 10.,tau_max_T,'Cste de rappel max, T')  
     CALL getpar('tau_min_Q',0.02,tau_min_Q,'Cste de rappel min, Q')  
     CALL getpar('tau_max_Q', 10.,tau_max_Q,'Cste de rappel max, Q')  
     CALL getpar('tau_min_P',0.02,tau_min_P,'Cste de rappel min, P')  
     CALL getpar('tau_max_P', 10.,tau_max_P,'Cste de rappel max, P')  
   
     !   Latitude min et max pour le rappel.  
     !   dans le cas ou on 'a les analyses que sur une bande de latitudes.  
     CALL getpar('lat_min_guide',-90.,lat_min_guide &  
          ,'Latitude minimum pour le guidage ')  
     CALL getpar('lat_max_guide', 90.,lat_max_guide &  
          ,'Latitude maximum pour le guidage ')  
61    
62      CALL fin_getparam      print *, "Enter namelist 'conf_guide_nml'."
63        read(unit=*, nml=conf_guide_nml)
64        write(unit_nml, nml=conf_guide_nml)
65    
66        lat_min_guide = lat_min_guide_deg / 180. * pi
67        lat_max_guide = lat_max_guide_deg / 180. * pi
68    
69        ok_guide = any((/guide_u, guide_v, guide_t, guide_q/))
70        if (ok_guide .and. mod(day_step, 4 * iperiod) /= 0) call &
71             abort_gcm("conf_guide", 'ok_guide day_step iperiod')
72    
73        if (ok_guide .and. online) then
74           factt = dtvr * iperiod / daysec
75           print *, "factt = ", factt
76           if (abs(grossismx - 1.) >= 0.1 .and. abs(grossismy - 1.) >= 0.1) then
77              if (guide_u) call assert(factt / tau_min_u < 1, &
78                   "conf_guide tau_min_u")
79              if (guide_v) call assert(factt / tau_min_v < 1, &
80                   "conf_guide tau_min_v")
81              if (guide_t) call assert(factt / tau_min_t < 1, &
82                   "conf_guide tau_min_t")
83              if (guide_q) call assert(factt / tau_min_q < 1, &
84                   "conf_guide tau_min_q")
85           end if
86        end if
87    
88    end SUBROUTINE conf_guide    end SUBROUTINE conf_guide
89    

Legend:
Removed from v.44  
changed lines
  Added in v.171

  ViewVC Help
Powered by ViewVC 1.1.21