| 1 | MODULE soil_TIfeedback_PEM_mod |
|---|
| 2 | |
|---|
| 3 | implicit none |
|---|
| 4 | |
|---|
| 5 | !======================================================================= |
|---|
| 6 | contains |
|---|
| 7 | !======================================================================= |
|---|
| 8 | |
|---|
| 9 | SUBROUTINE soil_TIfeedback_PEM(ngrid,nsoil,icecover,newtherm_i) |
|---|
| 10 | |
|---|
| 11 | use comsoil_h_PEM, only: layer_PEM, inertiedat_PEM |
|---|
| 12 | |
|---|
| 13 | implicit none |
|---|
| 14 | |
|---|
| 15 | !======================================================================= |
|---|
| 16 | ! Description : |
|---|
| 17 | ! Surface water ice / Thermal inertia feedback. |
|---|
| 18 | ! |
|---|
| 19 | ! When surface water-ice is thick enough, this routine creates a new |
|---|
| 20 | ! soil thermal inertia with three different layers : |
|---|
| 21 | ! - One layer of surface water ice (the thickness is given |
|---|
| 22 | ! by the variable icecover (in kg of ice per m2) and the thermal |
|---|
| 23 | ! inertia is prescribed by inert_h2o_ice (see surfdat_h)); |
|---|
| 24 | ! - A transitional layer of mixed thermal inertia; |
|---|
| 25 | ! - A last layer of regolith below the ice cover whose thermal inertia |
|---|
| 26 | ! is equal to inertiedat. |
|---|
| 27 | ! |
|---|
| 28 | ! To use the model : |
|---|
| 29 | ! SET THE tifeedback LOGICAL TO ".true." in callphys.def. |
|---|
| 30 | ! |
|---|
| 31 | ! Author: Adapted from J.-B. Madeleine Mars 2008 ( Updated November 2012) by LL, 2022 |
|---|
| 32 | !======================================================================= |
|---|
| 33 | |
|---|
| 34 | !Inputs |
|---|
| 35 | !------ |
|---|
| 36 | integer, intent(in) :: ngrid ! Number of horizontal grid points |
|---|
| 37 | integer, intent(in) :: nsoil ! Number of soil layers |
|---|
| 38 | real, dimension(ngrid), intent(in) :: icecover ! tracer on the surface (kg.m-2) |
|---|
| 39 | !Outputs |
|---|
| 40 | !------- |
|---|
| 41 | real,intent(inout) :: newtherm_i(ngrid,nsoil) ! New soil thermal inertia |
|---|
| 42 | !Local variables |
|---|
| 43 | !--------------- |
|---|
| 44 | integer :: ig ! Grid point (ngrid) |
|---|
| 45 | integer :: ik ! Grid point (nsoil) |
|---|
| 46 | integer :: iref ! Ice/Regolith boundary index |
|---|
| 47 | real :: icedepth ! Ice cover thickness (m) |
|---|
| 48 | real :: inert_h2o_ice = 800. ! surface water ice thermal inertia [SI] |
|---|
| 49 | real :: rho_ice = 920. ! density of water ice [kg/m^3] |
|---|
| 50 | real :: prev_thermi(ngrid,nsoil) ! previous thermal inertia [SI] |
|---|
| 51 | |
|---|
| 52 | prev_thermi(:,:) = newtherm_i(:,:) |
|---|
| 53 | |
|---|
| 54 | !Creating the new soil thermal inertia table |
|---|
| 55 | !------------------------------------------- |
|---|
| 56 | do ig = 1,ngrid |
|---|
| 57 | ! Calculating the ice cover thickness |
|---|
| 58 | icedepth = icecover(ig)/rho_ice |
|---|
| 59 | |
|---|
| 60 | ! If the ice cover is too thick or watercaptag = true, the entire column is changed: |
|---|
| 61 | if (icedepth >= layer_PEM(nsoil)) then |
|---|
| 62 | do ik = 1,nsoil |
|---|
| 63 | newtherm_i(ig,ik) = max(inert_h2o_ice,prev_thermi(ig,ik)) |
|---|
| 64 | enddo |
|---|
| 65 | ! We neglect the effect of a very thin ice cover: |
|---|
| 66 | else if (icedepth < layer_PEM(1)) then |
|---|
| 67 | do ik = 1,nsoil |
|---|
| 68 | newtherm_i(ig,ik) = inertiedat_PEM(ig,ik) |
|---|
| 69 | enddo |
|---|
| 70 | else |
|---|
| 71 | ! Ice/regolith boundary index: |
|---|
| 72 | iref = 1 |
|---|
| 73 | ! Otherwise, we find the ice/regolith boundary: |
|---|
| 74 | do ik=1,nsoil-1 |
|---|
| 75 | if ((icedepth >= layer_PEM(ik)) .and. (icedepth < layer_PEM(ik + 1))) then |
|---|
| 76 | iref = ik + 1 |
|---|
| 77 | exit |
|---|
| 78 | endif |
|---|
| 79 | enddo |
|---|
| 80 | ! And we change the thermal inertia: |
|---|
| 81 | do ik = 1,iref - 1 |
|---|
| 82 | newtherm_i(ig,ik) = max(inert_h2o_ice,prev_thermi(ig,ik)) |
|---|
| 83 | enddo |
|---|
| 84 | ! Transition (based on the equations of thermal conduction): |
|---|
| 85 | newtherm_i(ig,iref) = sqrt((layer_PEM(iref) - layer_PEM(iref-1))/(((icedepth - layer_PEM(iref - 1))/newtherm_i(ig,iref - 1)**2) & |
|---|
| 86 | + ((layer_PEM(iref) - icedepth)/inertiedat_PEM(ig,ik)**2) ) ) |
|---|
| 87 | ! Underlying regolith: |
|---|
| 88 | do ik = iref + 1,nsoil |
|---|
| 89 | newtherm_i(ig,ik) = inertiedat_PEM(ig,ik) |
|---|
| 90 | enddo |
|---|
| 91 | endif ! icedepth |
|---|
| 92 | enddo ! ig |
|---|
| 93 | |
|---|
| 94 | return |
|---|
| 95 | |
|---|
| 96 | END SUBROUTINE soil_TIfeedback_PEM |
|---|
| 97 | |
|---|
| 98 | END MODULE soil_TIfeedback_PEM_mod |
|---|