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 | |
---|
16 | !$OMP THREADPRIVATE(paleoclimate) |
---|
17 | real, save, allocatable, dimension(:,:) :: h2o_ice_depth ! Thickness of the lag before H2O ice [m] |
---|
18 | real, save, allocatable, dimension(:,:) :: lag_co2_ice ! Thickness of the lag before CO2 ice [m] |
---|
19 | real, save, allocatable, dimension(:,:) :: d_coef ! Diffusion coefficent |
---|
20 | real, save :: albedo_perennialco2 ! Albedo for perennial co2 ice [1] |
---|
21 | logical, save :: lag_layer ! Does lag layer is present? |
---|
22 | logical, save :: include_waterbuoyancy ! Include the effect of water buoyancy when computing the sublimation of water ice ? |
---|
23 | real, save :: albedo_co2_cap |
---|
24 | !$OMP THREADPRIVATE(h2o_ice_depth,lag_co2_ice,d_coef,albedo_perennialco2,lag_layer,include_waterbuoyancy,albedo_co2_cap) |
---|
25 | |
---|
26 | !======================================================================= |
---|
27 | contains |
---|
28 | !======================================================================= |
---|
29 | |
---|
30 | SUBROUTINE ini_paleoclimate_h(ngrid,nslope) |
---|
31 | |
---|
32 | implicit none |
---|
33 | |
---|
34 | integer, intent(in) :: ngrid ! number of atmospheric columns |
---|
35 | integer, intent(in) :: nslope ! number of slope within a mesh |
---|
36 | |
---|
37 | allocate(h2o_ice_depth(ngrid,nslope)) |
---|
38 | allocate(lag_co2_ice(ngrid,nslope)) |
---|
39 | allocate(d_coef(ngrid,nslope)) |
---|
40 | |
---|
41 | END SUBROUTINE ini_paleoclimate_h |
---|
42 | |
---|
43 | !======================================================================= |
---|
44 | SUBROUTINE end_paleoclimate_h |
---|
45 | |
---|
46 | implicit none |
---|
47 | |
---|
48 | if (allocated(d_coef)) deallocate(d_coef) |
---|
49 | if (allocated(h2o_ice_depth)) deallocate(h2o_ice_depth) |
---|
50 | if (allocated(lag_co2_ice)) deallocate(lag_co2_ice) |
---|
51 | |
---|
52 | END SUBROUTINE end_paleoclimate_h |
---|
53 | |
---|
54 | END MODULE paleoclimate_mod |
---|