LMDZ
phys_output_var_mod.F90
Go to the documentation of this file.
1 !
2 ! phys_local_var_mod.F90 1327 2010-03-17 15:33:56Z idelkadi $
3 
5 
6  use dimphy
7  ! Variables outputs pour les ecritures des sorties
8  !======================================================================
9  !
10  !
11  !======================================================================
12  ! Declaration des variables
13 
14  REAL, SAVE, ALLOCATABLE :: snow_o(:), zfra_o(:)
15  !$OMP THREADPRIVATE(snow_o, zfra_o)
16  INTEGER, SAVE, ALLOCATABLE :: itau_con(:) ! Nombre de pas ou rflag <= 1
17  !$OMP THREADPRIVATE(itau_con)
18  REAL, ALLOCATABLE :: bils_ec(:) ! Contribution of energy conservation
19  REAL, ALLOCATABLE :: bils_ech(:) ! Contribution of energy conservation
20  REAL, ALLOCATABLE :: bils_tke(:) ! Contribution of energy conservation
21  REAL, ALLOCATABLE :: bils_diss(:) ! Contribution of energy conservation
22  REAL, ALLOCATABLE :: bils_kinetic(:) ! bilan de chaleur au sol, kinetic
23  REAL, ALLOCATABLE :: bils_enthalp(:) ! bilan de chaleur au sol
24  REAL, ALLOCATABLE :: bils_latent(:) ! bilan de chaleur au sol
25  !$OMP THREADPRIVATE(bils_ec,bils_ech,bils_tke,bils_diss,bils_kinetic,bils_enthalp,bils_latent)
26 
27 
28  ! ug Plein de variables venues de phys_output_mod
29  INTEGER, PARAMETER :: nfiles = 9
30  LOGICAL, DIMENSION(nfiles), SAVE :: clef_files
31  LOGICAL, DIMENSION(nfiles), SAVE :: clef_stations
32  INTEGER, DIMENSION(nfiles), SAVE :: lev_files
33  INTEGER, DIMENSION(nfiles), SAVE :: nid_files
34  INTEGER, DIMENSION(nfiles), SAVE :: nnid_files
35  !$OMP THREADPRIVATE(clef_files, clef_stations, lev_files,nid_files,nnid_files)
36  INTEGER, DIMENSION(nfiles), SAVE :: nnhorim
37 
38  INTEGER, DIMENSION(nfiles), SAVE :: nhorim, nvertm
39  INTEGER, DIMENSION(nfiles), SAVE :: nvertap, nvertbp, nvertalt
40  REAL, DIMENSION(nfiles), SAVE :: zoutm
41  CHARACTER(LEN=20), DIMENSION(nfiles), SAVE :: type_ecri
42  !$OMP THREADPRIVATE(nnhorim, nhorim, nvertm, zoutm,type_ecri)
43  CHARACTER(LEN=20), DIMENSION(nfiles), SAVE :: type_ecri_files, phys_out_filetypes
44  !$OMP THREADPRIVATE(type_ecri_files, phys_out_filetypes)
45  CHARACTER(LEN=20), DIMENSION(nfiles), SAVE :: phys_out_filenames
46  !$OMP THREADPRIVATE(phys_out_filenames)
47 
48  ! swaero_diag : flag indicates if it is necessary to do calculation for some aerosol diagnostics
49  LOGICAL, SAVE :: swaero_diag=.false.
50  !$OMP THREADPRIVATE(swaero_diag)
51 
52  INTEGER, SAVE:: levmin(nfiles) = 1
53  INTEGER, SAVE:: levmax(nfiles)
54  !$OMP THREADPRIVATE(levmin, levmax)
55 
56  REAL, SAVE :: zdtime_moy
57  !$OMP THREADPRIVATE(zdtime_moy)
58 
59  LOGICAL, SAVE :: vars_defined = .false. ! ug PAS THREADPRIVATE ET C'EST NORMAL
60 
61  REAL, allocatable:: zustr_gwd_hines(:), zvstr_gwd_hines(:) ! (klon)
62  REAL, allocatable:: zustr_gwd_front(:), zvstr_gwd_front(:) ! (klon)
63  REAL, allocatable:: zustr_gwd_rando(:), zvstr_gwd_rando(:) ! (klon)
64  !$OMP THREADPRIVATE(zustr_gwd_hines, zvstr_gwd_hines)
65  !$OMP THREADPRIVATE(zustr_gwd_front, zvstr_gwd_front)
66  !$OMP THREADPRIVATE(zustr_gwd_rando, zvstr_gwd_rando)
67 
68  TYPE ctrl_out
69  INTEGER,DIMENSION(nfiles) :: flag
70  CHARACTER(len=20) :: name
71  CHARACTER(len=150) :: description
72  CHARACTER(len=20) :: unit
73  CHARACTER(len=20),DIMENSION(nfiles) :: type_ecrit
74  END TYPE ctrl_out
75 
76 CONTAINS
77 
78  !======================================================================
79  SUBROUTINE phys_output_var_init
80  use dimphy
81 
82  IMPLICIT NONE
83 
84  include "clesphys.h"
85 
86  !------------------------------------------------
87 
88  allocate(snow_o(klon), zfra_o(klon))
89  allocate(itau_con(klon))
91 
92  IF (ok_hines) allocate(zustr_gwd_hines(klon), zvstr_gwd_hines(klon))
93  IF (.not.ok_hines.and.ok_gwd_rando) &
95  IF (ok_gwd_rando) allocate(zustr_gwd_rando(klon), zvstr_gwd_rando(klon))
96 
97  END SUBROUTINE phys_output_var_init
98 
99  !======================================================================
100  SUBROUTINE phys_output_var_end
101  use dimphy
102  IMPLICIT NONE
103 
104  deallocate(snow_o,zfra_o,itau_con)
106 
107  END SUBROUTINE phys_output_var_end
108 
109 END MODULE phys_output_var_mod
real, dimension(:), allocatable bils_latent
character(len=20), dimension(nfiles), save phys_out_filenames
integer, dimension(nfiles), save nnid_files
integer, dimension(nfiles), save nid_files
real, dimension(:), allocatable bils_enthalp
integer, dimension(:), allocatable, save itau_con
character(len=20), dimension(nfiles), save phys_out_filetypes
integer, save klon
Definition: dimphy.F90:3
real, dimension(:), allocatable bils_diss
real, dimension(nfiles), save zoutm
real, dimension(:), allocatable bils_ech
real, dimension(:), allocatable, save zfra_o
real, dimension(:), allocatable zustr_gwd_hines
integer, dimension(nfiles), save nhorim
!$Id itapm1 ENDIF!IM on interpole les champs sur les niveaux STD de pression!IM a chaque pas de temps de la physique c!positionnement de l argument logique a false c!pour ne pas recalculer deux fois la meme chose!c!a cet effet un appel a plevel_new a ete deplace c!a la fin de la serie d appels c!la boucle DO nlevSTD a ete internalisee c!dans d ou la creation de cette routine c c!CALL false
Definition: calcul_STDlev.h:26
real, dimension(:), allocatable zvstr_gwd_front
real, dimension(:), allocatable zvstr_gwd_hines
logical, dimension(nfiles), save clef_stations
integer, dimension(nfiles), save nnhorim
integer, dimension(nfiles), save levmin
integer, dimension(nfiles), save levmax
character(len=20), dimension(nfiles), save type_ecri
integer, dimension(nfiles), save nvertap
integer, parameter nfiles
real, dimension(:), allocatable bils_kinetic
character(len=20), dimension(nfiles), save type_ecri_files
real, dimension(:), allocatable zvstr_gwd_rando
real, dimension(:), allocatable zustr_gwd_front
integer, dimension(nfiles), save nvertbp
integer, dimension(nfiles), save lev_files
logical, dimension(nfiles), save clef_files
real, dimension(:), allocatable zustr_gwd_rando
integer, dimension(nfiles), save nvertalt
Definition: dimphy.F90:1
real, dimension(:), allocatable bils_tke
!$Header!integer nvarmx s s unit
Definition: gradsdef.h:20
integer, dimension(nfiles), save nvertm
real, dimension(:), allocatable, save snow_o
real, dimension(:), allocatable bils_ec