source: trunk/LMDZ.MARS/libf/phymars/surfdat_h.F90

Last change on this file was 3130, checked in by jbclement, 13 months ago

PEM:
The perennial co2 ice is now taken into account with co2 frost (qsurf) to compute the tendency and to make the update + Rework of how co2 frost is converted to perennial co2 ice at the end of the PEM run + Correction of the value of 'threshold_co2_frost2perennial' to correspond to 10 m + Perennial co2 ice is now handled outside 'paleoclimate' in "phyetat0_mod.F90" of the Mars PCM + Some cleanings.

/!\ Commit for the PEM management of co2 ice before a rework of ice management in the PEM!
JBC

File size: 6.4 KB
Line 
1module 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  LOGICAL, SAVE :: old_wsublimation_scheme    ! TEMPORARY : TO USE THE OLD WATER SUBLIMATION SCHEME (i.e., using Cd instead of Ch), true by default
34
35!$OMP THREADPRIVATE(albedo_h2o_cap,albedo_h2o_frost,inert_h2o_ice,               &
36!$OMP                frost_albedo_threshold,frost_metam_threshold,TESice_Ncoef,  &
37!$OMP                TESice_Scoef,iceradius,dtemisice,                           &
38!$OMP                zmea,zstd,zsig,zgam,zthe,hmons,summit,base,z0,z0_default, &
39!$OMP                old_wsublimation_scheme)
40
41  !! mountain top dust flows
42  REAL,SAVE,ALLOCATABLE :: alpha_hmons(:) ! sub-grid scale mountain mesh fraction
43  REAL,SAVE,ALLOCATABLE :: hsummit(:) ! mountain height above the GCM surface
44  LOGICAL,SAVE,ALLOCATABLE :: contains_mons(:) ! is there a mountain in the grid mesh ?
45         
46!$OMP THREADPRIVATE(alpha_hmons,hsummit,contains_mons)
47
48  !! variables
49  REAL,SAVE,ALLOCATABLE :: tsurf(:,:)   ! Surface temperature (K)
50  REAL,SAVE,ALLOCATABLE :: emis(:,:)    ! Thermal IR surface emissivity
51  REAL,SAVE,ALLOCATABLE :: capcal(:,:) ! surface heat capacity (J m-2 K-1)
52  REAL,SAVE,ALLOCATABLE :: fluxgrd(:,:) ! surface conduction flux (W.m-2)
53  REAL,ALLOCATABLE,SAVE :: qsurf(:,:,:) ! tracer on surface (e.g. kg.m-2)
54  REAL,SAVE,ALLOCATABLE :: watercap(:,:) ! Surface water ice (kg.m-2)
55  REAL,SAVE,ALLOCATABLE :: perennial_co2ice(:,:) ! Perennial CO2 ice (kg.m-2)
56!$OMP THREADPRIVATE(tsurf,emis,capcal,fluxgrd,qsurf,watercap,perennial_co2ice)
57
58contains
59
60  subroutine ini_surfdat_h(ngrid,nq,nslope)
61 
62  implicit none
63  integer,intent(in) :: ngrid ! number of atmospheric columns
64  integer,intent(in) :: nq ! number of tracers 
65  integer,intent(in) :: nslope ! number of sub-grid scale slope 
66    allocate(albedodat(ngrid))
67    allocate(phisfi(ngrid))
68    allocate(watercaptag(ngrid))
69    allocate(dryness(ngrid))
70    allocate(zmea(ngrid))
71    allocate(zstd(ngrid))
72    allocate(zsig(ngrid))
73    allocate(zgam(ngrid))
74    allocate(zthe(ngrid))
75    allocate(z0(ngrid))
76    allocate(qsurf(ngrid,nq,nslope))
77    allocate(tsurf(ngrid,nslope))
78    allocate(watercap(ngrid,nslope))
79    allocate(perennial_co2ice(ngrid,nslope))
80    allocate(emis(ngrid,nslope))
81    allocate(capcal(ngrid,nslope))
82    allocate(fluxgrd(ngrid,nslope))
83    allocate(hmons(ngrid))
84    allocate(summit(ngrid))
85    allocate(base(ngrid))
86    allocate(alpha_hmons(ngrid))
87    allocate(hsummit(ngrid))
88    allocate(contains_mons(ngrid))
89       
90  end subroutine ini_surfdat_h
91
92
93  subroutine end_surfdat_h
94
95  implicit none
96
97    if (allocated(albedodat))        deallocate(albedodat)
98    if (allocated(phisfi))           deallocate(phisfi)
99    if (allocated(watercaptag))      deallocate(watercaptag)
100    if (allocated(dryness))          deallocate(dryness)
101    if (allocated(zmea))             deallocate(zmea)
102    if (allocated(zstd))             deallocate(zstd)
103    if (allocated(zsig))             deallocate(zsig)
104    if (allocated(zgam))             deallocate(zgam)
105    if (allocated(zthe))             deallocate(zthe)
106    if (allocated(z0))               deallocate(z0)
107    if (allocated(qsurf))            deallocate(qsurf)
108    if (allocated(tsurf))            deallocate(tsurf)
109    if (allocated(watercap))         deallocate(watercap)
110    if (allocated(perennial_co2ice))  deallocate(perennial_co2ice)
111    if (allocated(emis))             deallocate(emis)
112    if (allocated(capcal))           deallocate(capcal)
113    if (allocated(fluxgrd))          deallocate(fluxgrd)
114    if (allocated(hmons))            deallocate(hmons)
115    if (allocated(summit))           deallocate(summit)
116    if (allocated(base))             deallocate(base)
117    if (allocated(alpha_hmons))      deallocate(alpha_hmons)
118    if (allocated(hsummit))          deallocate(hsummit)
119    if (allocated(contains_mons))    deallocate(contains_mons)
120   
121  end subroutine end_surfdat_h
122
123  subroutine ini_surfdat_h_slope_var(ngrid,nq,nslope)
124 
125  implicit none
126  integer,intent(in) :: ngrid ! number of atmospheric columns
127  integer,intent(in) :: nq ! number of tracers 
128  integer,intent(in) :: nslope ! number of sub-grid scale slope 
129    allocate(qsurf(ngrid,nq,nslope))
130    allocate(tsurf(ngrid,nslope))
131    allocate(watercap(ngrid,nslope))
132    allocate(perennial_co2ice(ngrid,nslope))
133    allocate(emis(ngrid,nslope))
134    allocate(capcal(ngrid,nslope))
135    allocate(fluxgrd(ngrid,nslope))
136       
137  end subroutine ini_surfdat_h_slope_var
138
139  subroutine end_surfdat_h_slope_var
140
141  implicit none
142
143    if (allocated(qsurf))            deallocate(qsurf)
144    if (allocated(tsurf))            deallocate(tsurf)
145    if (allocated(watercap))         deallocate(watercap)
146    if (allocated(perennial_co2ice)) deallocate(perennial_co2ice)
147    if (allocated(emis))             deallocate(emis)
148    if (allocated(capcal))           deallocate(capcal)
149    if (allocated(fluxgrd))          deallocate(fluxgrd)
150   
151  end subroutine end_surfdat_h_slope_var
152
153end module surfdat_h
Note: See TracBrowser for help on using the repository browser.