| [3206] | 1 | MODULE soil_thermalproperties_mod |
|---|
| [2962] | 2 | |
|---|
| [3206] | 3 | implicit none |
|---|
| [2962] | 4 | |
|---|
| 5 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
|---|
| 6 | !!! |
|---|
| 7 | !!! Purpose: Compute the soil thermal properties |
|---|
| 8 | !!! Author: LL, 04/2023 |
|---|
| 9 | !!! |
|---|
| 10 | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
|---|
| 11 | |
|---|
| [3206] | 12 | !======================================================================= |
|---|
| 13 | contains |
|---|
| 14 | !======================================================================= |
|---|
| [2962] | 15 | |
|---|
| [3206] | 16 | SUBROUTINE ice_thermal_properties(ispureice,pore_filling,surf_thermalinertia,ice_thermalinertia) |
|---|
| [2962] | 17 | !======================================================================= |
|---|
| 18 | ! subject: Compute ice thermal properties |
|---|
| 19 | ! -------- |
|---|
| 20 | ! |
|---|
| 21 | ! author: LL, 04/2023 |
|---|
| [3206] | 22 | ! ------- |
|---|
| [2962] | 23 | ! |
|---|
| 24 | !======================================================================= |
|---|
| 25 | |
|---|
| [3206] | 26 | use constants_marspem_mod, only: porosity |
|---|
| [2962] | 27 | |
|---|
| [3206] | 28 | implicit none |
|---|
| [2962] | 29 | |
|---|
| 30 | !----------------------------------------------------------------------- |
|---|
| 31 | !======================================================================= |
|---|
| 32 | ! Declarations : |
|---|
| 33 | !======================================================================= |
|---|
| 34 | ! |
|---|
| 35 | ! Input/Output |
|---|
| 36 | ! ------------ |
|---|
| [3206] | 37 | logical, intent(in) :: ispureice ! Boolean to check if ice is massive or just pore filling |
|---|
| 38 | real, intent(in) :: pore_filling ! ice pore filling in each layer (1) |
|---|
| 39 | real, intent(in) :: surf_thermalinertia ! surface thermal inertia (J/m^2/K/s^1/2) |
|---|
| 40 | real, intent(out) :: ice_thermalinertia ! Thermal inertia of ice when present in the pore (J/m^2/K/s^1/2) |
|---|
| [2962] | 41 | |
|---|
| 42 | ! Local Variables |
|---|
| 43 | ! -------------- |
|---|
| [3206] | 44 | REAL :: inertie_purewaterice = 2100 ! 2050 is better according to my computations with the formula from Siegler et al., 2012, but let's follow Mellon et al. (2004) |
|---|
| [2962] | 45 | !======================================================================= |
|---|
| 46 | ! Beginning of the code |
|---|
| 47 | !======================================================================= |
|---|
| 48 | |
|---|
| [3206] | 49 | if (ispureice) then |
|---|
| 50 | ice_thermalinertia = inertie_purewaterice |
|---|
| 51 | else |
|---|
| 52 | ice_thermalinertia = sqrt(surf_thermalinertia**2 + porosity*pore_filling*inertie_purewaterice**2) ! Siegler et al., 2012 |
|---|
| 53 | endif |
|---|
| [2962] | 54 | |
|---|
| [3206] | 55 | END SUBROUTINE |
|---|
| 56 | !======================================================================= |
|---|
| [2962] | 57 | |
|---|
| [3206] | 58 | SUBROUTINE update_soil_thermalproperties(ngrid,nslope,nsoil_PEM,tendencies_waterice,waterice,p_avg_new,ice_depth,ice_thickness,TI_PEM) |
|---|
| [2985] | 59 | |
|---|
| [3206] | 60 | use comsoil_h, only: volcapa |
|---|
| 61 | use comsoil_h_PEM, only: layer_PEM, inertiedat_PEM, depth_breccia, depth_bedrock, index_breccia, index_bedrock, reg_thprop_dependp |
|---|
| 62 | use constants_marspem_mod, only: TI_breccia, TI_bedrock, TI_regolith_avg |
|---|
| 63 | |
|---|
| 64 | implicit none |
|---|
| 65 | |
|---|
| [2962] | 66 | ! Input: |
|---|
| [3206] | 67 | integer, intent(in) :: ngrid, nslope, nsoil_PEM ! Shape of the arrays: physical grid, number of sub-grid slopes, number of layer in the soil |
|---|
| 68 | real, intent(in) :: p_avg_new ! Global average surface pressure [Pa] |
|---|
| 69 | real, intent(in) :: tendencies_waterice(ngrid,nslope) ! Tendencies on the water ice [kg/m^2/year] |
|---|
| 70 | real, intent(in) :: waterice(ngrid,nslope) ! Surface Water ice [kg/m^2] |
|---|
| 71 | real, intent(in) :: ice_depth(ngrid,nslope) ! Ice table depth [m] |
|---|
| 72 | real, intent(in) :: ice_thickness(ngrid,nslope) ! Ice table thickness [m] |
|---|
| [2962] | 73 | ! Outputs: |
|---|
| 74 | |
|---|
| [3206] | 75 | real, intent(inout) :: TI_PEM(ngrid,nsoil_PEM,nslope) ! Soil Thermal Inertia [J/m^2/K/s^1/2] |
|---|
| [2962] | 76 | |
|---|
| 77 | ! Constants: |
|---|
| 78 | |
|---|
| [3202] | 79 | REAL :: reg_inertie_thresold = 370. ! Above this thermal inertia, the regolith has too much cementation to be dependant on the pressure [J/m^2/K/s^1/2] |
|---|
| 80 | REAL :: reg_inertie_minvalue = 50. ! Minimum value of the Thermal Inertia at low pressure (Piqueux & Christensen 2009) [J/m^2/K/s^1/2] |
|---|
| 81 | REAL :: reg_inertie_maxvalue = 370. ! Maximum value of the Thermal Inertia at low pressure (Piqueux & Christensen 2009) [J/m^2/K/s^1/2] |
|---|
| 82 | REAL :: ice_inertia ! Inertia of water ice [SI] |
|---|
| 83 | REAL :: P610 = 610.0 ! current average pressure on Mars [Pa] |
|---|
| 84 | REAL :: C = 0.0015 ! Constant to derive TI as a function of P, from Presley and Christensen 1997 [uniteless] |
|---|
| 85 | REAL :: K = 8.1*1e4 ! Constant to derive TI as a function of P, from Presley and Christensen 1997 [tor, or 133.3Pa] |
|---|
| 86 | REAL :: Pa2Tor = 1./133.3 ! Conversion from Pa to tor [Pa/tor] |
|---|
| [2962] | 87 | |
|---|
| [3202] | 88 | |
|---|
| [2962] | 89 | ! Local variables: |
|---|
| 90 | |
|---|
| [3202] | 91 | INTEGER :: ig,islope,isoil,iref,iend ! Loop variables |
|---|
| 92 | REAL :: regolith_inertia(ngrid,nslope) ! Thermal inertia of the regolith (first layer in the GCM) [J/m^2/K/s^1/2] |
|---|
| 93 | REAL :: delta ! Difference of depth to compute the thermal inertia in a mixed layer [m] |
|---|
| 94 | REAL :: ice_bottom_depth ! Bottom depth of the subsurface ice [m] |
|---|
| 95 | REAL :: d_part ! Regolith particle size [micrometer] |
|---|
| 96 | |
|---|
| [2962] | 97 | |
|---|
| [3149] | 98 | write(*,*) "Update soil propreties" |
|---|
| 99 | |
|---|
| [2962] | 100 | ! 1. Modification of the regolith thermal inertia. |
|---|
| 101 | do islope = 1,nslope |
|---|
| 102 | regolith_inertia(:,islope) = inertiedat_PEM(:,1) |
|---|
| 103 | do ig = 1,ngrid |
|---|
| 104 | if((tendencies_waterice(ig,islope).lt.-1e-5).and.(waterice(ig,islope).eq.0)) then |
|---|
| 105 | regolith_inertia(ig,islope) = TI_regolith_avg |
|---|
| 106 | endif |
|---|
| 107 | if(reg_thprop_dependp) then |
|---|
| [3202] | 108 | if(TI_PEM(ig,1,islope).lt.reg_inertie_thresold) then |
|---|
| 109 | d_part = (regolith_inertia(ig,islope)**2/(volcapa*C*(P610*Pa2Tor)**(0.6)))**(-1./(0.11*log10(P610*Pa2Tor/K))) ! compute particle size, in micrometer |
|---|
| 110 | regolith_inertia(ig,islope) = sqrt(volcapa*C*(p_avg_new*Pa2Tor)**(0.6)*d_part**(-0.11*log10(p_avg_new*Pa2Tor/K))) |
|---|
| 111 | if(regolith_inertia(ig,islope).gt.reg_inertie_maxvalue) regolith_inertia(ig,islope) = reg_inertie_maxvalue |
|---|
| 112 | if(regolith_inertia(ig,islope).lt.reg_inertie_minvalue) regolith_inertia(ig,islope) = reg_inertie_minvalue |
|---|
| [2962] | 113 | endif |
|---|
| 114 | endif |
|---|
| 115 | enddo |
|---|
| 116 | enddo |
|---|
| 117 | |
|---|
| 118 | ! 2. Build new Thermal Inertia |
|---|
| 119 | do islope=1,nslope |
|---|
| 120 | do ig = 1,ngrid |
|---|
| [3202] | 121 | do isoil = 1,index_breccia |
|---|
| 122 | TI_PEM(ig,isoil,islope) = regolith_inertia(ig,islope) |
|---|
| [2962] | 123 | enddo |
|---|
| [3202] | 124 | if(regolith_inertia(ig,islope).lt.TI_breccia) then |
|---|
| [2962] | 125 | !!! transition |
|---|
| 126 | delta = depth_breccia |
|---|
| 127 | TI_PEM(ig,index_breccia+1,islope) = sqrt((layer_PEM(index_breccia+1)-layer_PEM(index_breccia))/ & |
|---|
| 128 | (((delta-layer_PEM(index_breccia))/(TI_PEM(ig,index_breccia,islope)**2))+ & |
|---|
| [3202] | 129 | ((layer_PEM(index_breccia+1)-delta)/(TI_breccia**2)))) |
|---|
| 130 | do isoil=index_breccia+2,index_bedrock |
|---|
| 131 | TI_PEM(ig,isoil,islope) = TI_breccia |
|---|
| [2962] | 132 | enddo |
|---|
| 133 | else ! we keep the high ti values |
|---|
| [3202] | 134 | do isoil=index_breccia+1,index_bedrock |
|---|
| 135 | TI_PEM(ig,isoil,islope) = TI_PEM(ig,index_breccia,islope) |
|---|
| [2962] | 136 | enddo |
|---|
| 137 | endif ! TI PEM and breccia comparison |
|---|
| 138 | !! transition |
|---|
| 139 | delta = depth_bedrock |
|---|
| 140 | TI_PEM(ig,index_bedrock+1,islope) = sqrt((layer_PEM(index_bedrock+1)-layer_PEM(index_bedrock))/ & |
|---|
| 141 | (((delta-layer_PEM(index_bedrock))/(TI_PEM(ig,index_bedrock,islope)**2))+ & |
|---|
| 142 | ((layer_PEM(index_bedrock+1)-delta)/(TI_bedrock**2)))) |
|---|
| [3202] | 143 | do isoil=index_bedrock+2,nsoil_PEM |
|---|
| 144 | TI_PEM(ig,isoil,islope) = TI_bedrock |
|---|
| [2962] | 145 | enddo |
|---|
| 146 | enddo ! ig |
|---|
| 147 | ENDDO ! islope |
|---|
| 148 | |
|---|
| 149 | ! 3. Build new TI in case of ice table |
|---|
| 150 | do ig=1,ngrid |
|---|
| 151 | do islope=1,nslope |
|---|
| 152 | if (ice_depth(ig,islope).gt.-1e-6) then |
|---|
| [3130] | 153 | ! 3.0 Case where it is perennial ice |
|---|
| [2962] | 154 | if (ice_depth(ig,islope).lt. 1e-10) then |
|---|
| 155 | call ice_thermal_properties(.true.,1.,0.,ice_inertia) |
|---|
| [3202] | 156 | do isoil = 1,nsoil_PEM |
|---|
| 157 | TI_PEM(ig,isoil,islope)=ice_inertia |
|---|
| [2962] | 158 | enddo |
|---|
| 159 | else |
|---|
| 160 | |
|---|
| 161 | call ice_thermal_properties(.false.,1.,regolith_inertia(ig,islope),ice_inertia) |
|---|
| 162 | ! 3.1.1 find the index of the mixed layer |
|---|
| 163 | iref=0 ! initialize iref |
|---|
| [3202] | 164 | do isoil=1,nsoil_PEM ! loop on layers to find the beginning of the ice table |
|---|
| 165 | if (ice_depth(ig,islope).ge.layer_PEM(isoil)) then |
|---|
| 166 | iref=isoil ! pure regolith layer up to here |
|---|
| [2962] | 167 | else |
|---|
| 168 | ! correct iref was obtained in previous cycle |
|---|
| 169 | exit |
|---|
| 170 | endif |
|---|
| 171 | enddo |
|---|
| 172 | ! 3.1.2 find the index of the end of the ice table |
|---|
| 173 | iend=0 ! initialize iend |
|---|
| 174 | ice_bottom_depth = ice_depth(ig,islope)+ice_thickness(ig,islope) |
|---|
| [3202] | 175 | do isoil=1,nsoil_PEM ! loop on layers to find the end of the ice table |
|---|
| 176 | if (ice_bottom_depth.ge.layer_PEM(isoil)) then |
|---|
| 177 | iend=isoil ! pure regolith layer up to here |
|---|
| [2962] | 178 | else |
|---|
| 179 | ! correct iref was obtained in previous cycle |
|---|
| 180 | exit |
|---|
| 181 | endif |
|---|
| 182 | enddo |
|---|
| 183 | ! 3.2 Build the new ti |
|---|
| [3202] | 184 | do isoil=1,iref |
|---|
| 185 | TI_PEM(ig,isoil,islope) = TI_PEM(ig,1,islope) |
|---|
| [2962] | 186 | enddo |
|---|
| 187 | if (iref.lt.nsoil_PEM) then |
|---|
| 188 | if(iref.eq.iend) then |
|---|
| 189 | ! Ice table begins and end in the same mixture Mixtures with three components |
|---|
| 190 | if (iref.ne.0) then ! |
|---|
| 191 | ! mixed layer |
|---|
| 192 | TI_PEM(ig,iref+1,islope)=sqrt((layer_PEM(iref+1)-layer_PEM(iref))/ & |
|---|
| 193 | (((ice_depth(ig,islope)-layer_PEM(iref))/(TI_PEM(ig,iref,islope)**2))+ & |
|---|
| 194 | ((ice_bottom_depth-ice_depth(ig,islope))/(ice_inertia**2))+ & |
|---|
| 195 | ((layer_PEM(iref+1)-ice_bottom_depth)/(TI_PEM(ig,iref+1,islope)**2)))) |
|---|
| 196 | else ! first layer is already a mixed layer |
|---|
| 197 | ! (ie: take layer(iref=0)=0) |
|---|
| 198 | TI_PEM(ig,1,islope)=sqrt((layer_PEM(1))/ & |
|---|
| 199 | (((ice_depth(ig,islope))/(TI_PEM(ig,1,islope)**2))+ & |
|---|
| 200 | ((ice_bottom_depth-ice_depth(ig,islope))/(ice_inertia**2))+ & |
|---|
| 201 | ((layer_PEM(2)-ice_bottom_depth)/(TI_PEM(ig,2,islope)**2)))) |
|---|
| 202 | endif ! of if (iref.ne.0) |
|---|
| 203 | else |
|---|
| 204 | if (iref.ne.0) then |
|---|
| 205 | ! mixed layer |
|---|
| 206 | TI_PEM(ig,iref+1,islope)=sqrt((layer_PEM(iref+1)-layer_PEM(iref))/ & |
|---|
| 207 | (((ice_depth(ig,islope)-layer_PEM(iref))/(TI_PEM(ig,iref,islope)**2))+ & |
|---|
| 208 | ((layer_PEM(iref+1)-ice_depth(ig,islope))/(ice_inertia**2)))) |
|---|
| 209 | else ! first layer is already a mixed layer |
|---|
| 210 | ! (ie: take layer(iref=0)=0) |
|---|
| 211 | TI_PEM(ig,1,islope)=sqrt((layer_PEM(1))/ & |
|---|
| 212 | (((ice_depth(ig,islope))/(TI_PEM(ig,1,islope)**2))+ & |
|---|
| 213 | ((layer_PEM(1)-ice_depth(ig,islope))/(ice_inertia**2)))) |
|---|
| 214 | endif ! of if (iref.ne.0) |
|---|
| 215 | endif ! iref.eq.iend |
|---|
| 216 | ! 3.3 Build the new ti |
|---|
| [3202] | 217 | do isoil=iref+2,iend |
|---|
| 218 | TI_PEM(ig,isoil,islope)=ice_inertia |
|---|
| [2962] | 219 | enddo |
|---|
| 220 | |
|---|
| 221 | |
|---|
| 222 | if(iend.lt.nsoil_PEM) then |
|---|
| 223 | TI_PEM(ig,iend+1,islope)=sqrt((layer_PEM(iend+1)-layer_PEM(iend))/ & |
|---|
| 224 | (((ice_bottom_depth-layer_PEM(iend))/(TI_PEM(ig,iend,islope)**2)) + & |
|---|
| 225 | ((layer_PEM(iend+1)-ice_bottom_depth)/(ice_inertia**2)))) |
|---|
| 226 | endif |
|---|
| 227 | |
|---|
| 228 | |
|---|
| 229 | endif ! of if (iref.lt.(nsoilmx)) |
|---|
| 230 | endif ! permanent glaciers |
|---|
| 231 | endif !ice_depth(ig,islope) > 0. |
|---|
| 232 | ! write(*,*) 'TI=', TI_PEM(ig,:,islope) |
|---|
| 233 | enddo !islope |
|---|
| 234 | enddo !ig |
|---|
| 235 | |
|---|
| [3206] | 236 | END SUBROUTINE update_soil_thermalproperties |
|---|
| [2962] | 237 | |
|---|
| [3206] | 238 | END MODULE soil_thermalproperties_mod |
|---|