[2994] | 1 | MODULE paleoclimate_mod |
---|
| 2 | !======================================================================= |
---|
| 3 | ! subject: Module dedicated to paleoclimates studies |
---|
| 4 | ! -------- |
---|
| 5 | ! |
---|
| 6 | ! author: LL, 06/2023 |
---|
| 7 | ! ------ |
---|
[3200] | 8 | ! |
---|
[2994] | 9 | !======================================================================= |
---|
| 10 | |
---|
[3200] | 11 | implicit none |
---|
[2994] | 12 | |
---|
[3581] | 13 | logical :: paleoclimate ! False by default, is activate for paleoclimates specific processes (e.g., lag layer) is initialized in conf_phys |
---|
[3200] | 14 | |
---|
[3007] | 15 | !$OMP THREADPRIVATE(paleoclimate) |
---|
[3581] | 16 | real, allocatable, dimension(:,:) :: h2o_ice_depth ! Thickness of the lag before H2O ice [m] |
---|
| 17 | real, allocatable, dimension(:,:) :: lag_co2_ice ! Thickness of the lag before CO2 ice [m] |
---|
| 18 | real, allocatable, dimension(:,:) :: d_coef ! Diffusion coefficent |
---|
| 19 | logical :: lag_layer ! Does lag layer is present? |
---|
| 20 | logical :: include_waterbuoyancy ! Include the effect of water buoyancy when computing the sublimation of water ice ? |
---|
[3582] | 21 | !$OMP THREADPRIVATE(h2o_ice_depth,lag_co2_ice,d_coef,lag_layer,include_waterbuoyancy) |
---|
[3007] | 22 | |
---|
[3200] | 23 | !======================================================================= |
---|
| 24 | contains |
---|
| 25 | !======================================================================= |
---|
[2994] | 26 | |
---|
[3200] | 27 | SUBROUTINE ini_paleoclimate_h(ngrid,nslope) |
---|
[2994] | 28 | |
---|
[3200] | 29 | implicit none |
---|
[2994] | 30 | |
---|
[3200] | 31 | integer, intent(in) :: ngrid ! number of atmospheric columns |
---|
| 32 | integer, intent(in) :: nslope ! number of slope within a mesh |
---|
[2994] | 33 | |
---|
[3200] | 34 | allocate(h2o_ice_depth(ngrid,nslope)) |
---|
| 35 | allocate(lag_co2_ice(ngrid,nslope)) |
---|
| 36 | allocate(d_coef(ngrid,nslope)) |
---|
[2994] | 37 | |
---|
[3200] | 38 | END SUBROUTINE ini_paleoclimate_h |
---|
[2994] | 39 | |
---|
[3200] | 40 | !======================================================================= |
---|
| 41 | SUBROUTINE end_paleoclimate_h |
---|
[2994] | 42 | |
---|
[3200] | 43 | implicit none |
---|
[2994] | 44 | |
---|
[3200] | 45 | if (allocated(d_coef)) deallocate(d_coef) |
---|
| 46 | if (allocated(h2o_ice_depth)) deallocate(h2o_ice_depth) |
---|
| 47 | if (allocated(lag_co2_ice)) deallocate(lag_co2_ice) |
---|
| 48 | |
---|
| 49 | END SUBROUTINE end_paleoclimate_h |
---|
| 50 | |
---|
| 51 | END MODULE paleoclimate_mod |
---|