1 | MODULE 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 |
---|