1 | module surfdat_h |
---|
2 | |
---|
3 | ! arrays are allocated in conf_phys |
---|
4 | real,save,allocatable :: albedodat(:) ! albedo of bare ground |
---|
5 | real,save,allocatable :: phisfi(:) ! geopotential at ground level |
---|
6 | real,save :: albedice(2) ! default albedo for ice (1: North H. 2: South H.) |
---|
7 | real,save :: emisice(2) ! ice emissivity; 1:Northern hemisphere 2:Southern hemisphere |
---|
8 | real,save :: emissiv ! emissivity of bare ground |
---|
9 | logical,save :: TESicealbedo ! use TES ice cap albedoes (if set to .true.) |
---|
10 | logical,save,allocatable :: watercaptag(:) ! flag for water ice surface |
---|
11 | real, save, allocatable :: dryness(:) |
---|
12 | |
---|
13 | !$OMP THREADPRIVATE(albedodat, phisfi,albedice,emisice,emissiv,TESicealbedo, & |
---|
14 | !$OMP watercaptag,dryness) |
---|
15 | |
---|
16 | logical,save :: temptag !temp tag for water caps |
---|
17 | |
---|
18 | !$OMP THREADPRIVATE(temptag) |
---|
19 | |
---|
20 | real,save :: albedo_h2o_cap ! water cap albedo |
---|
21 | real,save :: albedo_h2o_frost ! water frost albedo |
---|
22 | real,save :: inert_h2o_ice ! water ice thermal inertia |
---|
23 | real,save :: frost_albedo_threshold ! water frost thickness on the ground (kg.m^-2, ie mm) |
---|
24 | real,save :: frost_metam_threshold ! water frost threshold before conversion to ice (kg.m^-2, ie mm) |
---|
25 | real,save :: TESice_Ncoef ! coefficient for TES ice albedo in Northern hemisphere |
---|
26 | real,save :: TESice_Scoef ! coefficient for TES ice albedo in Southern hemisphere |
---|
27 | real,save :: iceradius(2) , dtemisice(2) |
---|
28 | real,save,allocatable :: zmea(:),zstd(:),zsig(:),zgam(:),zthe(:) |
---|
29 | real,save,allocatable :: hmons(:),summit(:),base(:) |
---|
30 | real,save,allocatable :: z0(:) ! surface roughness length (m) |
---|
31 | real,save :: z0_default ! default (constant over planet) surface roughness (m) |
---|
32 | |
---|
33 | !$OMP THREADPRIVATE(albedo_h2o_cap,albedo_h2o_frost,inert_h2o_ice, & |
---|
34 | !$OMP frost_albedo_threshold,frost_metam_threshold,TESice_Ncoef, & |
---|
35 | !$OMP TESice_Scoef,iceradius,dtemisice, & |
---|
36 | !$OMP zmea,zstd,zsig,zgam,zthe,hmons,summit,base,z0,z0_default ) |
---|
37 | |
---|
38 | !! mountain top dust flows |
---|
39 | REAL,SAVE,ALLOCATABLE :: alpha_hmons(:) ! sub-grid scale mountain mesh fraction |
---|
40 | REAL,SAVE,ALLOCATABLE :: hsummit(:) ! mountain height above the GCM surface |
---|
41 | LOGICAL,SAVE,ALLOCATABLE :: contains_mons(:) ! is there a mountain in the grid mesh ? |
---|
42 | |
---|
43 | !$OMP THREADPRIVATE(alpha_hmons,hsummit,contains_mons) |
---|
44 | |
---|
45 | !! variables |
---|
46 | REAL,SAVE,ALLOCATABLE :: tsurf(:,:) ! Surface temperature (K) |
---|
47 | REAL,SAVE,ALLOCATABLE :: emis(:,:) ! Thermal IR surface emissivity |
---|
48 | REAL,SAVE,ALLOCATABLE :: capcal(:,:) ! surface heat capacity (J m-2 K-1) |
---|
49 | REAL,SAVE,ALLOCATABLE :: fluxgrd(:,:) ! surface conduction flux (W.m-2) |
---|
50 | REAL,ALLOCATABLE,SAVE :: qsurf(:,:,:) ! tracer on surface (e.g. kg.m-2) |
---|
51 | REAL,SAVE,ALLOCATABLE :: watercap(:,:) ! Surface water ice (kg.m-2) |
---|
52 | REAL,SAVE,ALLOCATABLE :: perenial_co2ice(:,:) ! Perenial CO2 ice (kg.m-2) |
---|
53 | !$OMP THREADPRIVATE(tsurf,emis,capcal,fluxgrd,qsurf,watercap,perenial_co2ice) |
---|
54 | |
---|
55 | contains |
---|
56 | |
---|
57 | subroutine ini_surfdat_h(ngrid,nq,nslope) |
---|
58 | |
---|
59 | implicit none |
---|
60 | integer,intent(in) :: ngrid ! number of atmospheric columns |
---|
61 | integer,intent(in) :: nq ! number of tracers |
---|
62 | integer,intent(in) :: nslope ! number of sub-grid scale slope |
---|
63 | allocate(albedodat(ngrid)) |
---|
64 | allocate(phisfi(ngrid)) |
---|
65 | allocate(watercaptag(ngrid)) |
---|
66 | allocate(dryness(ngrid)) |
---|
67 | allocate(zmea(ngrid)) |
---|
68 | allocate(zstd(ngrid)) |
---|
69 | allocate(zsig(ngrid)) |
---|
70 | allocate(zgam(ngrid)) |
---|
71 | allocate(zthe(ngrid)) |
---|
72 | allocate(z0(ngrid)) |
---|
73 | allocate(qsurf(ngrid,nq,nslope)) |
---|
74 | allocate(tsurf(ngrid,nslope)) |
---|
75 | allocate(watercap(ngrid,nslope)) |
---|
76 | allocate(perenial_co2ice(ngrid,nslope)) |
---|
77 | allocate(emis(ngrid,nslope)) |
---|
78 | allocate(capcal(ngrid,nslope)) |
---|
79 | allocate(fluxgrd(ngrid,nslope)) |
---|
80 | allocate(hmons(ngrid)) |
---|
81 | allocate(summit(ngrid)) |
---|
82 | allocate(base(ngrid)) |
---|
83 | allocate(alpha_hmons(ngrid)) |
---|
84 | allocate(hsummit(ngrid)) |
---|
85 | allocate(contains_mons(ngrid)) |
---|
86 | |
---|
87 | end subroutine ini_surfdat_h |
---|
88 | |
---|
89 | |
---|
90 | subroutine end_surfdat_h |
---|
91 | |
---|
92 | implicit none |
---|
93 | |
---|
94 | if (allocated(albedodat)) deallocate(albedodat) |
---|
95 | if (allocated(phisfi)) deallocate(phisfi) |
---|
96 | if (allocated(watercaptag)) deallocate(watercaptag) |
---|
97 | if (allocated(dryness)) deallocate(dryness) |
---|
98 | if (allocated(zmea)) deallocate(zmea) |
---|
99 | if (allocated(zstd)) deallocate(zstd) |
---|
100 | if (allocated(zsig)) deallocate(zsig) |
---|
101 | if (allocated(zgam)) deallocate(zgam) |
---|
102 | if (allocated(zthe)) deallocate(zthe) |
---|
103 | if (allocated(z0)) deallocate(z0) |
---|
104 | if (allocated(qsurf)) deallocate(qsurf) |
---|
105 | if (allocated(tsurf)) deallocate(tsurf) |
---|
106 | if (allocated(watercap)) deallocate(watercap) |
---|
107 | if (allocated(perenial_co2ice)) deallocate(perenial_co2ice) |
---|
108 | if (allocated(emis)) deallocate(emis) |
---|
109 | if (allocated(capcal)) deallocate(capcal) |
---|
110 | if (allocated(fluxgrd)) deallocate(fluxgrd) |
---|
111 | if (allocated(hmons)) deallocate(hmons) |
---|
112 | if (allocated(summit)) deallocate(summit) |
---|
113 | if (allocated(base)) deallocate(base) |
---|
114 | if (allocated(alpha_hmons)) deallocate(alpha_hmons) |
---|
115 | if (allocated(hsummit)) deallocate(hsummit) |
---|
116 | if (allocated(contains_mons)) deallocate(contains_mons) |
---|
117 | |
---|
118 | end subroutine end_surfdat_h |
---|
119 | |
---|
120 | subroutine ini_surfdat_h_slope_var(ngrid,nq,nslope) |
---|
121 | |
---|
122 | implicit none |
---|
123 | integer,intent(in) :: ngrid ! number of atmospheric columns |
---|
124 | integer,intent(in) :: nq ! number of tracers |
---|
125 | integer,intent(in) :: nslope ! number of sub-grid scale slope |
---|
126 | allocate(qsurf(ngrid,nq,nslope)) |
---|
127 | allocate(tsurf(ngrid,nslope)) |
---|
128 | allocate(watercap(ngrid,nslope)) |
---|
129 | allocate(perenial_co2ice(ngrid,nslope)) |
---|
130 | allocate(emis(ngrid,nslope)) |
---|
131 | allocate(capcal(ngrid,nslope)) |
---|
132 | allocate(fluxgrd(ngrid,nslope)) |
---|
133 | |
---|
134 | end subroutine ini_surfdat_h_slope_var |
---|
135 | |
---|
136 | subroutine end_surfdat_h_slope_var |
---|
137 | |
---|
138 | implicit none |
---|
139 | |
---|
140 | if (allocated(qsurf)) deallocate(qsurf) |
---|
141 | if (allocated(tsurf)) deallocate(tsurf) |
---|
142 | if (allocated(watercap)) deallocate(watercap) |
---|
143 | if (allocated(perenial_co2ice)) deallocate(perenial_co2ice) |
---|
144 | if (allocated(emis)) deallocate(emis) |
---|
145 | if (allocated(capcal)) deallocate(capcal) |
---|
146 | if (allocated(fluxgrd)) deallocate(fluxgrd) |
---|
147 | |
---|
148 | end subroutine end_surfdat_h_slope_var |
---|
149 | |
---|
150 | end module surfdat_h |
---|