source: LMDZ5/trunk/libf/phylmd/phys_output_var_mod.F90 @ 2580

Last change on this file since 2580 was 2580, checked in by idelkadi, 8 years ago

Implementation du simulateur AIRS:
Le but du simulateur est de permettre la comparaison de proprietes macro-et microphysiques des nuages hauts de LMDZ avec celles restituees par les observations du satellite AIRS (Atmospheric IR Sounder). La methode est decrite dans Hendricks et al. Meteorol. Z., 2010

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
File size: 6.9 KB
Line 
1!
2! phys_local_var_mod.F90 1327 2010-03-17 15:33:56Z idelkadi $
3
4MODULE phys_output_var_mod
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! Marine
28! Variables de sortie du simulateur AIRS
29
30  REAL, ALLOCATABLE :: map_prop_hc(:),map_prop_hist(:)
31  REAL, ALLOCATABLE :: alt_tropo(:)
32  REAL, ALLOCATABLE :: &
33     & map_emis_hc(:),map_iwp_hc(:),map_deltaz_hc(:),&
34     & map_pcld_hc(:),map_tcld_hc(:)
35  REAL, ALLOCATABLE :: map_emis_hist(:),map_iwp_hist(:),map_deltaz_hist(:),&
36     & map_rad_hist(:)
37  REAL, ALLOCATABLE :: map_ntot(:),map_hc(:),map_hist(:)
38  REAL, ALLOCATABLE :: map_Cb(:),map_ThCi(:),map_Anv(:)
39  REAL, ALLOCATABLE :: map_emis_Cb(:),map_pcld_Cb(:),map_tcld_Cb(:)
40  REAL, ALLOCATABLE :: map_emis_ThCi(:),map_pcld_ThCi(:),map_tcld_ThCi(:)
41  REAL, ALLOCATABLE :: map_emis_Anv(:),map_pcld_Anv(:),map_tcld_Anv(:)
42
43
44  ! ug Plein de variables venues de phys_output_mod
45  INTEGER, PARAMETER                           :: nfiles = 9
46  LOGICAL, DIMENSION(nfiles), SAVE             :: clef_files
47  LOGICAL, DIMENSION(nfiles), SAVE             :: clef_stations
48  INTEGER, DIMENSION(nfiles), SAVE             :: lev_files
49  INTEGER, DIMENSION(nfiles), SAVE             :: nid_files
50  INTEGER, DIMENSION(nfiles), SAVE  :: nnid_files
51  !$OMP THREADPRIVATE(clef_files, clef_stations, lev_files,nid_files,nnid_files)
52  INTEGER, DIMENSION(nfiles), SAVE :: nnhorim
53
54  INTEGER, DIMENSION(nfiles), SAVE :: nhorim, nvertm
55  INTEGER, DIMENSION(nfiles), SAVE :: nvertap, nvertbp, nvertAlt
56  REAL, DIMENSION(nfiles), SAVE                :: zoutm
57  CHARACTER(LEN=20), DIMENSION(nfiles), SAVE   :: type_ecri
58  !$OMP THREADPRIVATE(nnhorim, nhorim, nvertm, zoutm,type_ecri)
59  CHARACTER(LEN=20), DIMENSION(nfiles), SAVE  :: type_ecri_files, phys_out_filetypes
60  !$OMP THREADPRIVATE(type_ecri_files, phys_out_filetypes)
61  CHARACTER(LEN=20), DIMENSION(nfiles), SAVE  :: phys_out_filenames
62  !$OMP THREADPRIVATE(phys_out_filenames)
63
64  ! swaero_diag : flag indicates if it is necessary to do calculation for some aerosol diagnostics
65  !--OB: this needs to be set to TRUE by default and changed back to FALSE after first radiation call
66  !--    and corrected back to TRUE based on output requests
67  LOGICAL, SAVE                                :: swaero_diag=.TRUE.
68  !$OMP THREADPRIVATE(swaero_diag)
69
70  INTEGER, SAVE:: levmin(nfiles) = 1
71  INTEGER, SAVE:: levmax(nfiles)
72  !$OMP THREADPRIVATE(levmin, levmax)
73
74  REAL, SAVE                :: zdtime_moy
75  !$OMP THREADPRIVATE(zdtime_moy)
76
77  LOGICAL, SAVE :: vars_defined = .FALSE. ! ug PAS THREADPRIVATE ET C'EST NORMAL
78
79  REAL, allocatable:: zustr_gwd_hines(:), zvstr_gwd_hines(:) ! (klon)
80  REAL, allocatable:: zustr_gwd_front(:), zvstr_gwd_front(:) ! (klon)
81  REAL, allocatable:: zustr_gwd_rando(:), zvstr_gwd_rando(:) ! (klon)
82  !$OMP THREADPRIVATE(zustr_gwd_hines, zvstr_gwd_hines)
83  !$OMP THREADPRIVATE(zustr_gwd_front, zvstr_gwd_front)
84  !$OMP THREADPRIVATE(zustr_gwd_rando, zvstr_gwd_rando)
85
86  TYPE ctrl_out
87     INTEGER,DIMENSION(nfiles)            :: flag
88     CHARACTER(len=20)                    :: name
89     CHARACTER(len=150)                   :: description
90     CHARACTER(len=20)                    :: unit
91     CHARACTER(len=20),DIMENSION(nfiles)  :: type_ecrit
92  END TYPE ctrl_out
93
94  REAL, SAVE, ALLOCATABLE :: sens_prec_liq_o(:,:), sens_prec_sol_o(:,:)
95  REAL, SAVE, ALLOCATABLE :: lat_prec_liq_o(:,:), lat_prec_sol_o(:,:)
96 !$OMP THREADPRIVATE(sens_prec_liq_o, sens_prec_sol_o,lat_prec_liq_o,lat_prec_sol_o)
97
98CONTAINS
99
100  !======================================================================
101  SUBROUTINE phys_output_var_init
102    use dimphy
103
104    IMPLICIT NONE
105
106    include "clesphys.h"
107
108    !------------------------------------------------
109
110    allocate(snow_o(klon), zfra_o(klon))
111    allocate(itau_con(klon))
112    allocate(sens_prec_liq_o(klon,2))
113    allocate(sens_prec_sol_o(klon,2))
114    allocate(lat_prec_liq_o(klon,2))
115    allocate(lat_prec_sol_o(klon,2))
116    sens_prec_liq_o = 0.0 ; sens_prec_sol_o = 0.0
117    lat_prec_liq_o = 0.0 ; lat_prec_sol_o = 0.0
118
119    allocate (bils_ec(klon),bils_ech(klon),bils_tke(klon),bils_diss(klon),bils_kinetic(klon),bils_enthalp(klon),bils_latent(klon))
120
121! Marine
122! Variables de sortie simulateur AIRS
123
124      allocate (map_prop_hc(klon),map_prop_hist(klon))
125      allocate (alt_tropo(klon))
126      allocate &
127     & (map_emis_hc(klon),map_iwp_hc(klon),map_deltaz_hc(klon))
128      allocate (map_pcld_hc(klon),map_tcld_hc(klon))
129      allocate (map_emis_hist(klon),map_iwp_hist(klon),map_deltaz_hist(klon))
130      allocate (map_rad_hist(klon))
131      allocate (map_ntot(klon),map_hc(klon),map_hist(klon))
132      allocate (map_Cb(klon),map_ThCi(klon),map_Anv(klon))
133      allocate (map_emis_Cb(klon),map_pcld_Cb(klon),map_tcld_Cb(klon))
134      allocate (map_emis_ThCi(klon),map_pcld_ThCi(klon),map_tcld_ThCi(klon))
135      allocate (map_emis_Anv(klon),map_pcld_Anv(klon),map_tcld_Anv(klon))
136
137    IF (ok_hines) allocate(zustr_gwd_hines(klon), zvstr_gwd_hines(klon))
138    IF (.not.ok_hines.and.ok_gwd_rando) &
139                  allocate(zustr_gwd_front(klon), zvstr_gwd_front(klon))
140    IF (ok_gwd_rando) allocate(zustr_gwd_rando(klon), zvstr_gwd_rando(klon))
141
142  END SUBROUTINE phys_output_var_init
143
144  !======================================================================
145  SUBROUTINE phys_output_var_end
146    use dimphy
147    IMPLICIT NONE
148
149    deallocate(snow_o,zfra_o,itau_con)
150    deallocate (bils_ec,bils_ech,bils_tke,bils_diss,bils_kinetic,bils_enthalp,bils_latent)
151
152! Marine
153! Variables de sortie simulateur AIRS
154
155      deallocate (map_prop_hc,map_prop_hist)
156      deallocate (alt_tropo)
157      deallocate &
158     & (map_emis_hc,map_iwp_hc,map_deltaz_hc)
159      deallocate (map_pcld_hc,map_tcld_hc)
160      deallocate (map_emis_hist,map_iwp_hist,map_deltaz_hist)
161      deallocate (map_rad_hist)
162      deallocate (map_ntot,map_hc,map_hist)
163      deallocate (map_Cb,map_ThCi,map_Anv)
164      deallocate (map_emis_Cb,map_pcld_Cb,map_tcld_Cb)
165      deallocate (map_emis_ThCi,map_pcld_ThCi,map_tcld_ThCi)
166      deallocate (map_emis_Anv,map_pcld_Anv,map_tcld_Anv)
167
168  END SUBROUTINE phys_output_var_end
169
170END MODULE phys_output_var_mod
Note: See TracBrowser for help on using the repository browser.