| [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) |
|---|
| 18 | REAL, ALLOCATABLE :: bils_ec(:) ! Contribution of energy conservation |
|---|
| [2042] | 19 | REAL, ALLOCATABLE :: bils_ech(:) ! Contribution of energy conservation |
|---|
| [1938] | 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 |
|---|
| [2042] | 25 | !$OMP THREADPRIVATE(bils_ec,bils_ech,bils_tke,bils_diss,bils_kinetic,bils_enthalp,bils_latent) |
|---|
| [1753] | 26 | |
|---|
| [1865] | 27 | |
|---|
| [1938] | 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 |
|---|
| [1761] | 37 | |
|---|
| [1938] | 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) |
|---|
| [1791] | 47 | |
|---|
| [1938] | 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) |
|---|
| [1791] | 51 | |
|---|
| [1938] | 52 | INTEGER, SAVE:: levmin(nfiles) = 1 |
|---|
| 53 | INTEGER, SAVE:: levmax(nfiles) |
|---|
| 54 | !$OMP THREADPRIVATE(levmin, levmax) |
|---|
| [1791] | 55 | |
|---|
| [1938] | 56 | REAL, SAVE :: zdtime_moy |
|---|
| 57 | !$OMP THREADPRIVATE(zdtime_moy) |
|---|
| [1797] | 58 | |
|---|
| [1938] | 59 | LOGICAL, SAVE :: vars_defined = .FALSE. ! ug PAS THREADPRIVATE ET C'EST NORMAL |
|---|
| [1807] | 60 | |
|---|
| [1938] | 61 | REAL, allocatable:: zustr_gwd_rando(:), zvstr_gwd_rando(:) ! (klon) |
|---|
| 62 | !$OMP THREADPRIVATE(zustr_gwd_rando, zvstr_gwd_rando) |
|---|
| 63 | |
|---|
| [1791] | 64 | TYPE ctrl_out |
|---|
| 65 | INTEGER,DIMENSION(nfiles) :: flag |
|---|
| 66 | CHARACTER(len=20) :: name |
|---|
| 67 | CHARACTER(len=150) :: description |
|---|
| 68 | CHARACTER(len=20) :: unit |
|---|
| 69 | CHARACTER(len=20),DIMENSION(nfiles) :: type_ecrit |
|---|
| 70 | END TYPE ctrl_out |
|---|
| [1938] | 71 | |
|---|
| [1335] | 72 | CONTAINS |
|---|
| 73 | |
|---|
| [1938] | 74 | !====================================================================== |
|---|
| 75 | SUBROUTINE phys_output_var_init |
|---|
| 76 | use dimphy |
|---|
| [1335] | 77 | |
|---|
| [1938] | 78 | IMPLICIT NONE |
|---|
| [1335] | 79 | |
|---|
| [1938] | 80 | include "clesphys.h" |
|---|
| [1335] | 81 | |
|---|
| [1938] | 82 | !------------------------------------------------ |
|---|
| [1335] | 83 | |
|---|
| [1938] | 84 | allocate(snow_o(klon), zfra_o(klon)) |
|---|
| 85 | allocate(itau_con(klon)) |
|---|
| [2042] | 86 | allocate (bils_ec(klon),bils_ech(klon),bils_tke(klon),bils_diss(klon),bils_kinetic(klon),bils_enthalp(klon),bils_latent(klon)) |
|---|
| [1335] | 87 | |
|---|
| [1938] | 88 | IF (ok_gwd_rando) allocate(zustr_gwd_rando(klon), zvstr_gwd_rando(klon)) |
|---|
| [1335] | 89 | |
|---|
| [1938] | 90 | END SUBROUTINE phys_output_var_init |
|---|
| [1335] | 91 | |
|---|
| [1938] | 92 | !====================================================================== |
|---|
| 93 | SUBROUTINE phys_output_var_end |
|---|
| 94 | use dimphy |
|---|
| 95 | IMPLICIT NONE |
|---|
| 96 | |
|---|
| 97 | deallocate(snow_o,zfra_o,itau_con) |
|---|
| [2042] | 98 | deallocate (bils_ec,bils_ech,bils_tke,bils_diss,bils_kinetic,bils_enthalp,bils_latent) |
|---|
| [1938] | 99 | |
|---|
| 100 | END SUBROUTINE phys_output_var_end |
|---|
| 101 | |
|---|
| [1335] | 102 | END MODULE phys_output_var_mod |
|---|