1 | MODULE variables_mod |
---|
2 | |
---|
3 | IMPLICIT NONE |
---|
4 | |
---|
5 | REAL*8 :: JD_cur !pday !JD_cur ! Julian day |
---|
6 | REAL*8 :: JH_cur_split !ptime !JH_cur_split ! Julian hour (fraction of day) |
---|
7 | REAL*8 :: zdt_split !ptimestep !zdt_split ! time step over which the physics are evaluated |
---|
8 | REAL*8 :: phour_ini ! start time (fraction of day) of the run 0=<phour_ini<1 |
---|
9 | REAL*8 :: counter |
---|
10 | REAL*8,DIMENSION(:,:),ALLOCATABLE :: zplev_omp !pplev !zplev_omp(klon,llm+1) ! interlayer pressure (Pa) |
---|
11 | REAL*8,DIMENSION(:,:),ALLOCATABLE :: zplay_omp !pplay !zplay_omp(klon,llm) ! mid-layer pressure (Pa) |
---|
12 | REAL*8,DIMENSION(:,:),ALLOCATABLE :: zpk_omp!(klon,llm) |
---|
13 | REAL*8,DIMENSION(:,:),ALLOCATABLE :: zphi_omp !pphi !zphi_omp(klon,llm) ! geopotential at midlayer |
---|
14 | REAL*8,DIMENSION(:),ALLOCATABLE :: zphis_omp!(klon) ! surface geopotential |
---|
15 | REAL*8,DIMENSION(:),ALLOCATABLE :: presnivs_omp!(llm) ! approximate pressure of atm. layers |
---|
16 | REAL*8,DIMENSION(:,:),ALLOCATABLE :: zufi_omp !pu !zufi_omp(klon,llm) ! zonal wind (m/s) |
---|
17 | REAL*8,DIMENSION(:,:),ALLOCATABLE :: zvfi_omp !pv !zvfi_omp(klon,llm) ! meridional wind (m/s) |
---|
18 | REAL*8,DIMENSION(:,:),ALLOCATABLE :: zrfi_omp!(klon,llm) ! relative wind vorticity, in s-1 |
---|
19 | REAL*8,DIMENSION(:,:),ALLOCATABLE :: ztfi_omp !pt !ztfi_omp(klon,llm) ! temperature (K) |
---|
20 | REAL*8,DIMENSION(:,:,:),ALLOCATABLE :: zqfi_omp !pq !zqfi_omp(klon,llm,nqtot) ! tracers (*/kg of air) |
---|
21 | REAL*8,DIMENSION(:,:),ALLOCATABLE :: flxwfi_omp !flxw !flxwfi_omp(klon,llm) ! Vertical mass flux on lower mesh interfaces (kg/s) ! tendencies (in */s) from the physics: |
---|
22 | REAL*8,DIMENSION(:,:),ALLOCATABLE :: zdufi_omp !pdu !zdufi_omp(klon,llm) ! tendency on zonal winds |
---|
23 | REAL*8,DIMENSION(:,:),ALLOCATABLE :: zdvfi_omp !pdv !zdvfi_omp(klon,llm) ! tendency on meridional winds |
---|
24 | REAL*8,DIMENSION(:,:),ALLOCATABLE :: zdtfi_omp !pdt !zdtfi_omp(klon,llm) ! tendency on temperature |
---|
25 | REAL*8,DIMENSION(:,:,:),ALLOCATABLE :: zdqfi_omp !pdq !zdqfi_omp(klon,llm,nqtot) ! tendency on tracers |
---|
26 | REAL*8,DIMENSION(:),ALLOCATABLE :: zdpsrf_omp !pdpsrf !zdpsrf_omp(klon) !tendency on surface pressure |
---|
27 | REAL*8,DIMENSION(:,:),ALLOCATABLE :: hrlw,hrsw |
---|
28 | |
---|
29 | CONTAINS |
---|
30 | |
---|
31 | SUBROUTINE allocate_interface(klon,llm,nqtot) |
---|
32 | |
---|
33 | IMPLICIT NONE |
---|
34 | |
---|
35 | INTEGER,INTENT(IN) :: klon ! (local) number of atmospheric columns |
---|
36 | INTEGER,INTENT(IN) :: llm ! number of atmospheric layers |
---|
37 | INTEGER,INTENT(IN) :: nqtot ! number of tracers |
---|
38 | |
---|
39 | IF (.NOT.ALLOCATED(zplev_omp)) ALLOCATE(zplev_omp(klon,llm+1)) |
---|
40 | IF (.NOT.ALLOCATED(zplay_omp)) ALLOCATE(zplay_omp(klon,llm)) |
---|
41 | IF (.NOT.ALLOCATED(zpk_omp)) ALLOCATE(zpk_omp(klon,llm)) |
---|
42 | IF (.NOT.ALLOCATED(zphi_omp)) ALLOCATE(zphi_omp(klon,llm)) |
---|
43 | IF (.NOT.ALLOCATED(zphis_omp)) ALLOCATE(zphis_omp(klon)) |
---|
44 | IF (.NOT.ALLOCATED(presnivs_omp)) ALLOCATE(presnivs_omp(llm)) |
---|
45 | IF (.NOT.ALLOCATED(zufi_omp)) ALLOCATE(zufi_omp(klon,llm)) |
---|
46 | IF (.NOT.ALLOCATED(zvfi_omp)) ALLOCATE(zvfi_omp(klon,llm)) |
---|
47 | IF (.NOT.ALLOCATED(zrfi_omp)) ALLOCATE(zrfi_omp(klon,llm)) |
---|
48 | IF (.NOT.ALLOCATED(ztfi_omp)) ALLOCATE(ztfi_omp(klon,llm)) |
---|
49 | IF (.NOT.ALLOCATED(zqfi_omp)) ALLOCATE(zqfi_omp(klon,llm,nqtot)) |
---|
50 | IF (.NOT.ALLOCATED(flxwfi_omp)) ALLOCATE(flxwfi_omp(klon,llm)) |
---|
51 | IF (.NOT.ALLOCATED(zdufi_omp)) ALLOCATE(zdufi_omp(klon,llm)) |
---|
52 | IF (.NOT.ALLOCATED(zdvfi_omp)) ALLOCATE(zdvfi_omp(klon,llm)) |
---|
53 | IF (.NOT.ALLOCATED(zdtfi_omp)) ALLOCATE(zdtfi_omp(klon,llm)) |
---|
54 | IF (.NOT.ALLOCATED(zdqfi_omp)) ALLOCATE(zdqfi_omp(klon,llm,nqtot)) |
---|
55 | IF (.NOT.ALLOCATED(zdpsrf_omp)) ALLOCATE(zdpsrf_omp(klon)) |
---|
56 | IF (.NOT.ALLOCATED(hrlw)) ALLOCATE(hrlw(klon,llm)) |
---|
57 | IF (.NOT.ALLOCATED(hrsw)) ALLOCATE(hrsw(klon,llm)) |
---|
58 | |
---|
59 | END SUBROUTINE allocate_interface |
---|
60 | |
---|
61 | SUBROUTINE deallocate_interface |
---|
62 | |
---|
63 | DEALLOCATE(zplev_omp) |
---|
64 | DEALLOCATE(zplay_omp) |
---|
65 | DEALLOCATE(zpk_omp) |
---|
66 | DEALLOCATE(zphi_omp) |
---|
67 | DEALLOCATE(zphis_omp) |
---|
68 | DEALLOCATE(presnivs_omp) |
---|
69 | DEALLOCATE(zufi_omp) |
---|
70 | DEALLOCATE(zvfi_omp) |
---|
71 | DEALLOCATE(zrfi_omp) |
---|
72 | DEALLOCATE(ztfi_omp) |
---|
73 | DEALLOCATE(zqfi_omp) |
---|
74 | DEALLOCATE(flxwfi_omp) |
---|
75 | DEALLOCATE(zdufi_omp) |
---|
76 | DEALLOCATE(zdvfi_omp) |
---|
77 | DEALLOCATE(zdtfi_omp) |
---|
78 | DEALLOCATE(zdqfi_omp) |
---|
79 | DEALLOCATE(zdpsrf_omp) |
---|
80 | DEALLOCATE(hrlw) |
---|
81 | DEALLOCATE(hrsw) |
---|
82 | |
---|
83 | END SUBROUTINE deallocate_interface |
---|
84 | |
---|
85 | END MODULE variables_mod |
---|