source: trunk/LMDZ.MARS/libf/phymars/paleoclimate_mod.F90 @ 3125

Last change on this file since 3125 was 3111, checked in by llange, 20 months ago

MARS PCM
1) Following r-3098, adding d_coeff in the OMPthreadprivate
2) Introduce a temporary "old_wsublimation_scheme": when set to true (by
default), the water frost sublimation is computed as usual. Else, it is
computed as rho Ch U (q-qsat) and not rho Cd U (q-qsat)
LL

File size: 1.6 KB
Line 
1MODULE paleoclimate_mod
2!=======================================================================
3!   subject: Module dedicated to paleoclimates studies
4!   --------
5!
6!   author: LL, 06/2023
7!   ------
8!   
9!=======================================================================
10
11    IMPLICIT NONE
12
13    LOGICAL, SAVE :: paleoclimate    ! False by default, is activate  for paleoclimates specific processes (e.g., lag layer)
14                                     ! is initialized in conf_phys
15!$OMP THREADPRIVATE(paleoclimate)
16
17    real, save, allocatable :: h2o_ice_depth(:,:)  ! Thickness of the lag before H2O ice [m]
18    real, save, allocatable :: lag_co2_ice(:,:)  ! Thickness of the lag before CO2 ice [m]
19    real, save :: albedo_perenialco2             ! Albedo for perenial co2 ice [1]
20    real, save, allocatable :: d_coef(:,:)  ! Diffusion coeficent
21    LOGICAL,SAVE :: lag_layer ! does lag layer is present?
22!$OMP THREADPRIVATE(h2o_ice_depth,d_coef,lag_co2_ice,albedo_perenialco2)
23
24    CONTAINS
25
26
27  subroutine ini_paleoclimate_h(ngrid,nslope)
28
29  implicit none
30  integer,intent(in) :: ngrid  ! number of atmospheric columns
31  integer,intent(in) :: nslope ! number of slope within a mesh
32
33    allocate(h2o_ice_depth(ngrid,nslope))
34    allocate(lag_co2_ice(ngrid,nslope))
35    allocate(d_coef(ngrid,nslope))
36  end subroutine ini_paleoclimate_h
37
38  subroutine end_paleoclimate_h
39
40  implicit none
41    if (allocated(d_coef)) deallocate(d_coef)
42    if (allocated(h2o_ice_depth)) deallocate(h2o_ice_depth)
43    if (allocated(lag_co2_ice)) deallocate(lag_co2_ice)
44  end subroutine end_paleoclimate_h
45
46
47    END MODULE paleoclimate_mod
Note: See TracBrowser for help on using the repository browser.