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

Last change on this file since 2566 was 2561, checked in by jnaar, 4 years ago

Water cycle flag update & addition :

  • "cap_albedo" renamed "cst_cap_albedo" (default false) : if true, water ice cap albedo remains constant even when frost with higher albedo condensates on it
  • "refill_watercap" added (default false) : turns h2o_ice_s into watercap when above a given threshold
  • "frost_metam_threshold" added (default 0.05 km.m-2) : threshold used by "refill_watercap"

JN

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