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

Last change on this file since 2514 was 2508, checked in by jnaar, 4 years ago

The water ice albedo is now conceptually decoupled between old perennial ice
and seasonal frost. For now, "old ice" is only on watercaptag = .true.
The variable albedo_h2o_ice has been decomposed into albedo_h2o_cap and
albedo_h2o_frost. Default values are both 0.35 and retrocompatible with
old callphys.def and albedo_h2o_ice if needed.
JN

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