[1335] | 1 | ! |
---|
| 2 | ! phys_local_var_mod.F90 1327 2010-03-17 15:33:56Z idelkadi $ |
---|
| 3 | |
---|
[1938] | 4 | MODULE phys_output_var_mod |
---|
[1335] | 5 | |
---|
[1938] | 6 | use dimphy |
---|
| 7 | ! Variables outputs pour les ecritures des sorties |
---|
| 8 | !====================================================================== |
---|
| 9 | ! |
---|
| 10 | ! |
---|
| 11 | !====================================================================== |
---|
| 12 | ! Declaration des variables |
---|
[1335] | 13 | |
---|
[1938] | 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) |
---|
[2585] | 18 | REAL, SAVE, ALLOCATABLE :: bils_ec(:) ! Contribution of energy conservation |
---|
| 19 | REAL, SAVE, ALLOCATABLE :: bils_ech(:) ! Contribution of energy conservation |
---|
| 20 | REAL, SAVE, ALLOCATABLE :: bils_tke(:) ! Contribution of energy conservation |
---|
| 21 | REAL, SAVE, ALLOCATABLE :: bils_diss(:) ! Contribution of energy conservation |
---|
| 22 | REAL, SAVE, ALLOCATABLE :: bils_kinetic(:) ! bilan de chaleur au sol, kinetic |
---|
| 23 | REAL, SAVE, ALLOCATABLE :: bils_enthalp(:) ! bilan de chaleur au sol |
---|
| 24 | REAL, SAVE, ALLOCATABLE :: bils_latent(:) ! bilan de chaleur au sol |
---|
[2042] | 25 | !$OMP THREADPRIVATE(bils_ec,bils_ech,bils_tke,bils_diss,bils_kinetic,bils_enthalp,bils_latent) |
---|
[1753] | 26 | |
---|
[2580] | 27 | ! Marine |
---|
| 28 | ! Variables de sortie du simulateur AIRS |
---|
[1865] | 29 | |
---|
[2585] | 30 | REAL, SAVE, ALLOCATABLE :: map_prop_hc(:),map_prop_hist(:),alt_tropo(:) |
---|
| 31 | !$OMP THREADPRIVATE(map_prop_hc,map_prop_hist,alt_tropo) |
---|
| 32 | REAL, SAVE, ALLOCATABLE :: map_emis_hc(:),map_iwp_hc(:),map_deltaz_hc(:), & |
---|
| 33 | map_pcld_hc(:),map_tcld_hc(:) |
---|
| 34 | !$OMP THREADPRIVATE(map_emis_hc,map_iwp_hc,map_deltaz_hc,map_pcld_hc,map_tcld_hc) |
---|
| 35 | REAL, SAVE, ALLOCATABLE :: map_emis_hist(:),map_iwp_hist(:),map_deltaz_hist(:),map_rad_hist(:) |
---|
| 36 | !$OMP THREADPRIVATE(map_emis_hist,map_iwp_hist,map_deltaz_hist,map_rad_hist) |
---|
| 37 | REAL, SAVE, ALLOCATABLE :: map_ntot(:),map_hc(:),map_hist(:) |
---|
| 38 | REAL, SAVE, ALLOCATABLE :: map_Cb(:),map_ThCi(:),map_Anv(:) |
---|
| 39 | !$OMP THREADPRIVATE(map_ntot,map_hc,map_hist,map_Cb,map_ThCi,map_Anv) |
---|
| 40 | REAL, SAVE, ALLOCATABLE :: map_emis_Cb(:),map_pcld_Cb(:),map_tcld_Cb(:) |
---|
| 41 | REAL, SAVE, ALLOCATABLE :: map_emis_ThCi(:),map_pcld_ThCi(:),map_tcld_ThCi(:) |
---|
| 42 | !$OMP THREADPRIVATE(map_emis_Cb,map_pcld_Cb,map_tcld_Cb,map_emis_ThCi) |
---|
| 43 | REAL, SAVE, ALLOCATABLE :: map_emis_Anv(:),map_pcld_Anv(:),map_tcld_Anv(:) |
---|
| 44 | !$OMP THREADPRIVATE(map_pcld_ThCi,map_tcld_ThCi,map_emis_Anv,map_pcld_Anv,map_tcld_Anv) |
---|
| 45 | |
---|
[2580] | 46 | |
---|
[1938] | 47 | ! ug Plein de variables venues de phys_output_mod |
---|
| 48 | INTEGER, PARAMETER :: nfiles = 9 |
---|
| 49 | LOGICAL, DIMENSION(nfiles), SAVE :: clef_files |
---|
| 50 | LOGICAL, DIMENSION(nfiles), SAVE :: clef_stations |
---|
| 51 | INTEGER, DIMENSION(nfiles), SAVE :: lev_files |
---|
| 52 | INTEGER, DIMENSION(nfiles), SAVE :: nid_files |
---|
| 53 | INTEGER, DIMENSION(nfiles), SAVE :: nnid_files |
---|
| 54 | !$OMP THREADPRIVATE(clef_files, clef_stations, lev_files,nid_files,nnid_files) |
---|
| 55 | INTEGER, DIMENSION(nfiles), SAVE :: nnhorim |
---|
[1761] | 56 | |
---|
[1938] | 57 | INTEGER, DIMENSION(nfiles), SAVE :: nhorim, nvertm |
---|
| 58 | INTEGER, DIMENSION(nfiles), SAVE :: nvertap, nvertbp, nvertAlt |
---|
| 59 | REAL, DIMENSION(nfiles), SAVE :: zoutm |
---|
| 60 | CHARACTER(LEN=20), DIMENSION(nfiles), SAVE :: type_ecri |
---|
| 61 | !$OMP THREADPRIVATE(nnhorim, nhorim, nvertm, zoutm,type_ecri) |
---|
| 62 | CHARACTER(LEN=20), DIMENSION(nfiles), SAVE :: type_ecri_files, phys_out_filetypes |
---|
| 63 | !$OMP THREADPRIVATE(type_ecri_files, phys_out_filetypes) |
---|
| 64 | CHARACTER(LEN=20), DIMENSION(nfiles), SAVE :: phys_out_filenames |
---|
| 65 | !$OMP THREADPRIVATE(phys_out_filenames) |
---|
[1791] | 66 | |
---|
[1938] | 67 | ! swaero_diag : flag indicates if it is necessary to do calculation for some aerosol diagnostics |
---|
[2529] | 68 | !--OB: this needs to be set to TRUE by default and changed back to FALSE after first radiation call |
---|
| 69 | !-- and corrected back to TRUE based on output requests |
---|
| 70 | LOGICAL, SAVE :: swaero_diag=.TRUE. |
---|
[1938] | 71 | !$OMP THREADPRIVATE(swaero_diag) |
---|
[1791] | 72 | |
---|
[1938] | 73 | INTEGER, SAVE:: levmin(nfiles) = 1 |
---|
| 74 | INTEGER, SAVE:: levmax(nfiles) |
---|
| 75 | !$OMP THREADPRIVATE(levmin, levmax) |
---|
[1791] | 76 | |
---|
[1938] | 77 | REAL, SAVE :: zdtime_moy |
---|
| 78 | !$OMP THREADPRIVATE(zdtime_moy) |
---|
[1797] | 79 | |
---|
[1938] | 80 | LOGICAL, SAVE :: vars_defined = .FALSE. ! ug PAS THREADPRIVATE ET C'EST NORMAL |
---|
[1807] | 81 | |
---|
[2333] | 82 | REAL, allocatable:: zustr_gwd_hines(:), zvstr_gwd_hines(:) ! (klon) |
---|
| 83 | REAL, allocatable:: zustr_gwd_front(:), zvstr_gwd_front(:) ! (klon) |
---|
[1938] | 84 | REAL, allocatable:: zustr_gwd_rando(:), zvstr_gwd_rando(:) ! (klon) |
---|
[2341] | 85 | !$OMP THREADPRIVATE(zustr_gwd_hines, zvstr_gwd_hines) |
---|
| 86 | !$OMP THREADPRIVATE(zustr_gwd_front, zvstr_gwd_front) |
---|
[1938] | 87 | !$OMP THREADPRIVATE(zustr_gwd_rando, zvstr_gwd_rando) |
---|
| 88 | |
---|
[1791] | 89 | TYPE ctrl_out |
---|
| 90 | INTEGER,DIMENSION(nfiles) :: flag |
---|
| 91 | CHARACTER(len=20) :: name |
---|
| 92 | CHARACTER(len=150) :: description |
---|
| 93 | CHARACTER(len=20) :: unit |
---|
| 94 | CHARACTER(len=20),DIMENSION(nfiles) :: type_ecrit |
---|
| 95 | END TYPE ctrl_out |
---|
[1938] | 96 | |
---|
[2538] | 97 | REAL, SAVE, ALLOCATABLE :: sens_prec_liq_o(:,:), sens_prec_sol_o(:,:) |
---|
| 98 | REAL, SAVE, ALLOCATABLE :: lat_prec_liq_o(:,:), lat_prec_sol_o(:,:) |
---|
| 99 | !$OMP THREADPRIVATE(sens_prec_liq_o, sens_prec_sol_o,lat_prec_liq_o,lat_prec_sol_o) |
---|
| 100 | |
---|
[1335] | 101 | CONTAINS |
---|
| 102 | |
---|
[1938] | 103 | !====================================================================== |
---|
| 104 | SUBROUTINE phys_output_var_init |
---|
| 105 | use dimphy |
---|
[1335] | 106 | |
---|
[1938] | 107 | IMPLICIT NONE |
---|
[1335] | 108 | |
---|
[1938] | 109 | include "clesphys.h" |
---|
[1335] | 110 | |
---|
[1938] | 111 | !------------------------------------------------ |
---|
[1335] | 112 | |
---|
[1938] | 113 | allocate(snow_o(klon), zfra_o(klon)) |
---|
| 114 | allocate(itau_con(klon)) |
---|
[2538] | 115 | allocate(sens_prec_liq_o(klon,2)) |
---|
| 116 | allocate(sens_prec_sol_o(klon,2)) |
---|
| 117 | allocate(lat_prec_liq_o(klon,2)) |
---|
| 118 | allocate(lat_prec_sol_o(klon,2)) |
---|
| 119 | sens_prec_liq_o = 0.0 ; sens_prec_sol_o = 0.0 |
---|
| 120 | lat_prec_liq_o = 0.0 ; lat_prec_sol_o = 0.0 |
---|
| 121 | |
---|
[2042] | 122 | allocate (bils_ec(klon),bils_ech(klon),bils_tke(klon),bils_diss(klon),bils_kinetic(klon),bils_enthalp(klon),bils_latent(klon)) |
---|
[1335] | 123 | |
---|
[2580] | 124 | ! Marine |
---|
| 125 | ! Variables de sortie simulateur AIRS |
---|
| 126 | |
---|
[2585] | 127 | ! if (ok_airs) then |
---|
[2580] | 128 | allocate (map_prop_hc(klon),map_prop_hist(klon)) |
---|
| 129 | allocate (alt_tropo(klon)) |
---|
[2582] | 130 | allocate (map_emis_hc(klon),map_iwp_hc(klon),map_deltaz_hc(klon)) |
---|
[2580] | 131 | allocate (map_pcld_hc(klon),map_tcld_hc(klon)) |
---|
| 132 | allocate (map_emis_hist(klon),map_iwp_hist(klon),map_deltaz_hist(klon)) |
---|
| 133 | allocate (map_rad_hist(klon)) |
---|
| 134 | allocate (map_ntot(klon),map_hc(klon),map_hist(klon)) |
---|
| 135 | allocate (map_Cb(klon),map_ThCi(klon),map_Anv(klon)) |
---|
| 136 | allocate (map_emis_Cb(klon),map_pcld_Cb(klon),map_tcld_Cb(klon)) |
---|
| 137 | allocate (map_emis_ThCi(klon),map_pcld_ThCi(klon),map_tcld_ThCi(klon)) |
---|
| 138 | allocate (map_emis_Anv(klon),map_pcld_Anv(klon),map_tcld_Anv(klon)) |
---|
[2585] | 139 | ! endif |
---|
[2580] | 140 | |
---|
[2333] | 141 | IF (ok_hines) allocate(zustr_gwd_hines(klon), zvstr_gwd_hines(klon)) |
---|
| 142 | IF (.not.ok_hines.and.ok_gwd_rando) & |
---|
| 143 | allocate(zustr_gwd_front(klon), zvstr_gwd_front(klon)) |
---|
[1938] | 144 | IF (ok_gwd_rando) allocate(zustr_gwd_rando(klon), zvstr_gwd_rando(klon)) |
---|
[1335] | 145 | |
---|
[1938] | 146 | END SUBROUTINE phys_output_var_init |
---|
[1335] | 147 | |
---|
[1938] | 148 | !====================================================================== |
---|
| 149 | SUBROUTINE phys_output_var_end |
---|
| 150 | use dimphy |
---|
| 151 | IMPLICIT NONE |
---|
| 152 | |
---|
[2582] | 153 | include "clesphys.h" |
---|
| 154 | |
---|
[1938] | 155 | deallocate(snow_o,zfra_o,itau_con) |
---|
[2042] | 156 | deallocate (bils_ec,bils_ech,bils_tke,bils_diss,bils_kinetic,bils_enthalp,bils_latent) |
---|
[1938] | 157 | |
---|
[2580] | 158 | ! Marine |
---|
| 159 | ! Variables de sortie simulateur AIRS |
---|
| 160 | |
---|
[2585] | 161 | ! if (ok_airs) then |
---|
[2580] | 162 | deallocate (map_prop_hc,map_prop_hist) |
---|
| 163 | deallocate (alt_tropo) |
---|
[2582] | 164 | deallocate (map_emis_hc,map_iwp_hc,map_deltaz_hc) |
---|
[2580] | 165 | deallocate (map_pcld_hc,map_tcld_hc) |
---|
| 166 | deallocate (map_emis_hist,map_iwp_hist,map_deltaz_hist) |
---|
| 167 | deallocate (map_rad_hist) |
---|
| 168 | deallocate (map_ntot,map_hc,map_hist) |
---|
| 169 | deallocate (map_Cb,map_ThCi,map_Anv) |
---|
| 170 | deallocate (map_emis_Cb,map_pcld_Cb,map_tcld_Cb) |
---|
| 171 | deallocate (map_emis_ThCi,map_pcld_ThCi,map_tcld_ThCi) |
---|
| 172 | deallocate (map_emis_Anv,map_pcld_Anv,map_tcld_Anv) |
---|
[2585] | 173 | ! endif |
---|
[2580] | 174 | |
---|
[1938] | 175 | END SUBROUTINE phys_output_var_end |
---|
| 176 | |
---|
[1335] | 177 | END MODULE phys_output_var_mod |
---|