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

Last change on this file since 2347 was 2260, checked in by jnaar, 5 years ago

[MARS GCM] Adding a new 2D variable "watercap", perennial ground water ice.
qsurf(ig,igcm_h2o_ice) can no longer be negative.
When watercaptag=true, ie when there is an infinite amount of water avalaible for sublimation,
and there is no more h2o frost, sublimation digs into watercap reservoir.
For now watercap can't grow, even on watercaptag, and has same albedo than qsurf(h2o_ice).
When using old start file, watercap is automatically initiated as 0.
Added watercap in newstart.F aswell.
JN

File size: 3.6 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  logical,save :: temptag !temp tag for water caps
14     
15  real,save :: albedo_h2o_ice ! water ice albedo
16  real,save :: inert_h2o_ice ! water ice thermal inertia
17  real,save :: frost_albedo_threshold ! water frost thickness on the ground (kg.m^-2, ie mm)
18  real,save :: TESice_Ncoef ! coefficient for TES ice albedo in Northern hemisphere
19  real,save :: TESice_Scoef ! coefficient for TES ice albedo in Southern hemisphere
20  real,save :: iceradius(2) , dtemisice(2)
21  real,save,allocatable :: zmea(:),zstd(:),zsig(:),zgam(:),zthe(:)
22  real,save,allocatable :: hmons(:),summit(:),base(:)
23  real,save,allocatable :: z0(:) ! surface roughness length (m)
24  real,save :: z0_default ! default (constant over planet) surface roughness (m)
25
26  !! variables
27  REAL,SAVE,ALLOCATABLE :: tsurf(:)   ! Surface temperature (K)
28  REAL,SAVE,ALLOCATABLE :: co2ice(:)  ! co2 ice surface layer (kg.m-2) 
29  REAL,SAVE,ALLOCATABLE :: emis(:)    ! Thermal IR surface emissivity
30  REAL,SAVE,ALLOCATABLE :: capcal(:) ! surface heat capacity (J m-2 K-1)
31  REAL,SAVE,ALLOCATABLE :: fluxgrd(:) ! surface conduction flux (W.m-2)
32  REAL,ALLOCATABLE,SAVE :: qsurf(:,:) ! tracer on surface (e.g. kg.m-2)
33  REAL,SAVE,ALLOCATABLE :: watercap(:) ! Surface water ice (kg.m-2)
34
35contains
36
37  subroutine ini_surfdat_h(ngrid,nq)
38 
39  implicit none
40  integer,intent(in) :: ngrid ! number of atmospheric columns
41  integer,intent(in) :: nq ! number of tracers 
42
43    allocate(albedodat(ngrid))
44    allocate(phisfi(ngrid))
45    allocate(watercaptag(ngrid))
46    allocate(dryness(ngrid))
47    allocate(zmea(ngrid))
48    allocate(zstd(ngrid))
49    allocate(zsig(ngrid))
50    allocate(zgam(ngrid))
51    allocate(zthe(ngrid))
52    allocate(z0(ngrid))
53    allocate(qsurf(ngrid,nq))
54    allocate(tsurf(ngrid))
55    allocate(co2ice(ngrid))
56    allocate(watercap(ngrid))
57    allocate(emis(ngrid))
58    allocate(capcal(ngrid))
59    allocate(fluxgrd(ngrid))
60    allocate(hmons(ngrid))
61    allocate(summit(ngrid))
62    allocate(base(ngrid))
63   
64  end subroutine ini_surfdat_h
65
66
67  subroutine end_surfdat_h
68
69  implicit none
70
71    if (allocated(albedodat))   deallocate(albedodat)
72    if (allocated(phisfi))      deallocate(phisfi)
73    if (allocated(watercaptag)) deallocate(watercaptag)
74    if (allocated(dryness))     deallocate(dryness)
75    if (allocated(zmea))        deallocate(zmea)
76    if (allocated(zstd))        deallocate(zstd)
77    if (allocated(zsig))        deallocate(zsig)
78    if (allocated(zgam))        deallocate(zgam)
79    if (allocated(zthe))        deallocate(zthe)
80    if (allocated(z0))          deallocate(z0)
81    if (allocated(qsurf))       deallocate(qsurf)
82    if (allocated(tsurf))       deallocate(tsurf)
83    if (allocated(co2ice))      deallocate(co2ice)
84    if (allocated(watercap))    deallocate(watercap)
85    if (allocated(emis))        deallocate(emis)
86    if (allocated(capcal))      deallocate(capcal)
87    if (allocated(fluxgrd))     deallocate(fluxgrd)
88    if (allocated(hmons))       deallocate(hmons)
89    if (allocated(summit))      deallocate(summit)
90    if (allocated(base))        deallocate(base)
91   
92  end subroutine end_surfdat_h
93
94end module surfdat_h
Note: See TracBrowser for help on using the repository browser.