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

Last change on this file since 3026 was 2999, checked in by llange, 18 months ago

Mars PCM
Include perenial_co2ice (equivalent of watercap) to distinguich between CO2 frost and perenial CO2 ice for paleoclimate studies.
When no frost is present and we dig into perenial ice, the surface albedo is changed. The albedo for seasonal ice is set to 0.65, and the perenial ice albedo can be fixed in the callphys.def. I recommand values between 0.8 and 0.9.
To use this, paleoclimate must be set to True and TESalbedo to false in the callphys.def. Else, it runs as usual with TES albedo
LL

File size: 6.2 KB
RevLine 
[1047]1module surfdat_h
2
[1224]3  ! arrays are allocated in conf_phys
[1047]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
[1224]11  real, save, allocatable :: dryness(:)
[2578]12
13!$OMP THREADPRIVATE(albedodat, phisfi,albedice,emisice,emissiv,TESicealbedo,     &
14!$OMP                watercaptag,dryness)
[1047]15     
16  logical,save :: temptag !temp tag for water caps
[2578]17
18!$OMP THREADPRIVATE(temptag)
[1047]19     
[2508]20  real,save :: albedo_h2o_cap ! water cap albedo
21  real,save :: albedo_h2o_frost ! water frost albedo
[1047]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)
[2561]24  real,save :: frost_metam_threshold ! water frost threshold before conversion to ice (kg.m^-2, ie mm)
[1047]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(:)
[2079]29  real,save,allocatable :: hmons(:),summit(:),base(:)
[1047]30  real,save,allocatable :: z0(:) ! surface roughness length (m)
31  real,save :: z0_default ! default (constant over planet) surface roughness (m)
32
[2578]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
[2628]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
[1224]45  !! variables
[2900]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)
[2999]52  REAL,SAVE,ALLOCATABLE :: perenial_co2ice(:,:) ! Perenial CO2 ice (kg.m-2)
53!$OMP THREADPRIVATE(tsurf,emis,capcal,fluxgrd,qsurf,watercap,perenial_co2ice)
[1224]54
[1047]55contains
56
[2900]57  subroutine ini_surfdat_h(ngrid,nq,nslope)
[1047]58 
59  implicit none
60  integer,intent(in) :: ngrid ! number of atmospheric columns
[1224]61  integer,intent(in) :: nq ! number of tracers 
[2900]62  integer,intent(in) :: nslope ! number of sub-grid scale slope 
[1047]63    allocate(albedodat(ngrid))
64    allocate(phisfi(ngrid))
65    allocate(watercaptag(ngrid))
[1224]66    allocate(dryness(ngrid))
[1047]67    allocate(zmea(ngrid))
68    allocate(zstd(ngrid))
69    allocate(zsig(ngrid))
70    allocate(zgam(ngrid))
71    allocate(zthe(ngrid))
72    allocate(z0(ngrid))
[2900]73    allocate(qsurf(ngrid,nq,nslope))
74    allocate(tsurf(ngrid,nslope))
75    allocate(watercap(ngrid,nslope))
[2999]76    allocate(perenial_co2ice(ngrid,nslope))
[2900]77    allocate(emis(ngrid,nslope))
78    allocate(capcal(ngrid,nslope))
79    allocate(fluxgrd(ngrid,nslope))
[1974]80    allocate(hmons(ngrid))
[2079]81    allocate(summit(ngrid))
82    allocate(base(ngrid))
[2628]83    allocate(alpha_hmons(ngrid))
84    allocate(hsummit(ngrid))
85    allocate(contains_mons(ngrid))
86       
[1047]87  end subroutine ini_surfdat_h
88
[1770]89
90  subroutine end_surfdat_h
91
92  implicit none
93
[2999]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)
[2079]117   
[1770]118  end subroutine end_surfdat_h
119
[2909]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))
[2999]129    allocate(perenial_co2ice(ngrid,nslope))
[2909]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
[2999]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)
[2909]147   
148  end subroutine end_surfdat_h_slope_var
149
[1047]150end module surfdat_h
Note: See TracBrowser for help on using the repository browser.