source: trunk/LMDZ.COMMON/libf/evolution/adsorption_mod.F90 @ 2982

Last change on this file since 2982 was 2980, checked in by romain.vande, 3 years ago

Mars PEM :

Adapt PEM to 1d runs.
Cleaning of names and unused variables.
Correct minor errors.
Adapt and correct reshape_xios_output utilitary for 1d diagfi output.

RV

File size: 18.3 KB
Line 
1  module adsorption_mod 
2  implicit none
3  LOGICAL adsorption_pem ! True by default, to compute adsorption/desorption. Read in  pem.def
4  real, save, allocatable :: co2_adsorbded_phys(:,:,:)  ! co2 that is in the regolith [kg/m^2]
5  real, save, allocatable :: h2o_adsorbded_phys(:,:,:)  ! h2o that is in the regolith [kg/m^2]
6  contains
7
8!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
9!!!
10!!! Purpose: Compute CO2 and H2O adsorption, following the methods from Zent & Quinn 1995, Jackosky et al., 1997
11!!!
12!!! Author: LL, 01/2023
13!!!
14!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
15  subroutine ini_adsorption_h_PEM(ngrid,nslope,nsoilmx_PEM)
16
17  implicit none
18  integer,intent(in) :: ngrid ! number of atmospheric columns
19  integer,intent(in) :: nslope ! number of slope within a mesh
20  integer,intent(in) :: nsoilmx_PEM ! number of soil layer in the PEM
21    allocate(co2_adsorbded_phys(ngrid,nsoilmx_PEM,nslope))
22    allocate(h2o_adsorbded_phys(ngrid,nsoilmx_PEM,nslope))
23  end subroutine ini_adsorption_h_PEM
24
25!!! -----------------------------------------------
26
27  subroutine end_adsorption_h_PEM
28
29  implicit none
30    if (allocated(co2_adsorbded_phys)) deallocate(co2_adsorbded_phys)
31    if (allocated(h2o_adsorbded_phys)) deallocate(h2o_adsorbded_phys)
32  end subroutine end_adsorption_h_PEM
33
34!!! -----------------------------------------------
35
36  subroutine regolith_adsorption(ngrid,nslope,nsoil_PEM,timelen,tend_h2oglaciers,tend_co2glaciers,waterice,co2ice,tsoil_PEM,TI_PEM,ps,q_co2,q_h2o, &
37                                m_h2o_completesoil,delta_mh2oreg, m_co2_completesoil,delta_mco2reg)
38#ifndef CPP_STD
39! inputs
40 INTEGER,INTENT(IN) :: ngrid, nslope, nsoil_PEM,timelen ! size dimension: physics x subslope x soil x timeseries
41 REAL,INTENT(IN) :: tend_h2oglaciers(ngrid,nslope),tend_co2glaciers(ngrid,nslope) !tendancies on the glaciers [1]
42 REAL,INTENT(IN) :: waterice(ngrid,nslope)              ! water ice at the surface [kg/m^2]
43 REAL,INTENT(IN) :: co2ice(ngrid,nslope)                ! co2 ice at the surface [kg/m^2]
44 REAL,INTENT(IN) :: TI_PEM(ngrid,nsoil_PEM,nslope)      ! Soil Thermal inertia (J/K/^2/s^1/2)
45 REAL,INTENT(IN) :: tsoil_PEM(ngrid,nsoil_PEM,nslope)   ! Soil temperature (K)
46 REAL,INTENT(IN) :: ps(ngrid,timelen)                   ! Average surface pressure [Pa]
47 REAL,INTENT(IN) :: q_co2(ngrid,timelen)                ! Mass mixing ratio of co2 in the first layer (kg/kg)
48 REAL,INTENT(IN) :: q_h2o(ngrid,timelen)                ! Mass mixing ratio of H2o in the first layer (kg/kg)
49
50! outputs
51 REAL,INTENT(INOUT) :: m_h2o_completesoil(ngrid,nsoil_PEM,nslope) ! Density of h2o adsorbed (kg/m^3)(ngrid,nsoil_PEM,nslope)     
52 REAL,INTENT(OUT) :: delta_mh2oreg(ngrid)                         ! Difference density of h2o adsorbed (kg/m^3)
53
54 REAL,INTENT(INOUT) :: m_co2_completesoil(ngrid,nsoil_PEM,nslope)   ! Density of co2 adsorbed (kg/m^3)
55 REAL,INTENT(OUT) :: delta_mco2reg(ngrid)                            ! Difference density of co2 adsorbed (kg/m^3)
56 
57! local variables
58 REAL :: theta_h2o_adsorbded(ngrid,nsoil_PEM,nslope) ! Fraction of the pores occupied by H2O molecules
59! -------------
60
61! Compute H2O adsorption, then CO2 adsorption
62
63  call regolith_h2oadsorption(ngrid,nslope,nsoil_PEM,timelen,tend_h2oglaciers,tend_co2glaciers,waterice,co2ice,ps,q_co2,q_h2o,tsoil_PEM,TI_PEM, &
64                                   theta_h2o_adsorbded,m_h2o_completesoil,delta_mh2oreg)
65
66
67  call regolith_co2adsorption(ngrid,nslope,nsoil_PEM,timelen,tend_h2oglaciers,tend_co2glaciers,waterice,co2ice,ps,q_co2,q_h2o, &
68                                                          tsoil_PEM,TI_PEM,m_co2_completesoil,delta_mco2reg)
69
70#endif
71   RETURN
72  end subroutine
73
74!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
75
76  subroutine regolith_h2oadsorption(ngrid,nslope,nsoil_PEM,timelen,tend_h2oglaciers,tend_co2glaciers,waterice,co2ice,ps,q_co2,q_h2o,tsoil_PEM,TI_PEM, &
77                                   theta_h2o_adsorbded,m_h2o_completesoil,delta_mreg)
78
79!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
80!!!
81!!! Purpose: Compute H2O adsorption, following the methods from Jackosky et al., 1997
82!!!
83!!! Author: LL, 01/2023
84!!!
85!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
86
87#ifndef CPP_STD
88      use comsoil_h_PEM, only: layer_PEM, mlayer_PEM,index_breccia,index_bedrock
89      USE comcstfi_h, only:  pi
90      use comslope_mod, only : subslope_dist,def_slope_mean
91      use vertical_layers_mod, ONLY: ap,bp
92      use constants_marspem_mod,only: alpha_clap_h2o,beta_clap_h2o, &
93                                      m_h2o,m_co2,m_noco2, &
94                                      rho_regolith
95#endif
96
97 implicit none
98! inputs
99 INTEGER,INTENT(IN) :: ngrid, nslope, nsoil_PEM,timelen ! size dimension
100 REAL,INTENT(IN) :: tend_h2oglaciers(ngrid,nslope),tend_co2glaciers(ngrid,nslope) !tendancies on the glaciers ()
101 REAL,INTENT(IN) :: waterice(ngrid,nslope)              ! water ice at the surface [kg/m^2]
102 REAL,INTENT(IN) :: co2ice(ngrid,nslope)                ! co2 ice at the surface [kg/m^2]
103 REAL,INTENT(IN) :: ps(ngrid,timelen)                   ! surface pressure (Pa)         
104 REAL,INTENT(IN) :: q_co2(ngrid,timelen)                ! Mass mixing ratio of co2 in the first layer (kg/kg)
105 REAL,INTENT(IN) :: q_h2o(ngrid,timelen)                ! Mass mixing ratio of H2o in the first layer (kg/kg)
106 REAL,INTENT(IN) :: TI_PEM(ngrid,nsoil_PEM,nslope)      ! Soil Thermal inertia (J/K/^2/s^1/2)
107 REAL,INTENT(IN) :: tsoil_PEM(ngrid,nsoil_PEM,nslope)   ! Soil temperature (K)
108
109! outputs
110 REAL,INTENT(INOUT) :: m_h2o_completesoil(ngrid,nsoil_PEM,nslope) ! Density of h2o adsorbed (kg/m^3)(ngrid,nsoil_PEM,nslope)     
111 REAL,INTENT(OUT) :: theta_h2o_adsorbded(ngrid,nsoil_PEM,nslope) ! Fraction of the pores occupied by H2O molecules
112 REAL,INTENT(OUT) :: delta_mreg(ngrid)                         ! Difference density of h2o adsorbed (kg/m^3)
113
114! constants
115 REAL :: Ko =  1.57e-8            ! Jackosky et al. 1997
116 REAL :: e = 2573.9               ! Jackosky et al. 1997
117 REAL :: mu = 0.48                ! Jackosky et al. 1997
118 real :: m_theta = 2.84e-7        ! Mass of h2o per m^2 absorbed Jackosky et al. 1997
119! real :: as = 18.9e3             ! Specific area, Buhler & Piqueux 2021
120 real :: as = 9.48e4              ! Specific area, Zent
121 real :: as_breccia = 1.7e4       ! Specific area of basalt, Zent
122 real ::  inertie_thresold = 800. ! TI > 800 means cementation
123
124 ! local variables
125#ifndef CPP_STD
126 REAL :: deltam_reg_complete(ngrid,index_breccia,nslope)         ! Difference in the mass per slope and soil layer (kg/m^3)
127#endif
128 real :: K                        ! Used to compute theta
129 integer ig,iloop, islope,isoil,it   ! for loops
130 INTEGER :: ispermanent_co2glaciers(ngrid,nslope)        ! Check if the co2 glacier is permanent
131 INTEGER :: ispermanent_h2oglaciers(ngrid,nslope)        ! Check if the h2o glacier is permanent
132 REAL :: deltam_reg_slope(ngrid,nslope)  ! Difference density of h2o adsorbed per slope (kg/m^3)
133 REAL :: dm_h2o_regolith_slope(ngrid,nsoil_PEM,nslope)   ! elementary h2o mass adsorded per mesh per slope
134 real :: A,B                                                   ! Used to compute the mean mass above the surface
135 real :: p_sat                                                 ! saturated vapor pressure of ice
136 real,allocatable :: mass_mean(:,:)                            ! mean mass above the surface
137 real,allocatable :: zplev_mean(:,:)                           ! pressure above the surface
138 real,allocatable :: pvapor(:,:)                               ! partial pressure above the surface
139 real, allocatable :: pvapor_avg(:)                            ! yearly
140
141! 0. Some initializations
142#ifndef CPP_STD
143
144     allocate(mass_mean(ngrid,timelen))
145     allocate(zplev_mean(ngrid,timelen))
146     allocate(pvapor(ngrid,timelen))
147     allocate(pvapor_avg(ngrid))
148     A =(1/m_co2 - 1/m_noco2)
149     B=1/m_noco2
150     theta_h2o_adsorbded(:,:,:) = 0.
151     dm_h2o_regolith_slope(:,:,:) = 0.
152
153!0.1 Look at perenial ice
154  do ig = 1,ngrid
155    do islope = 1,nslope
156     if((abs(tend_h2oglaciers(ig,islope)).gt.1e-5).and.(abs(waterice(ig,islope)).gt.0)) then
157        ispermanent_h2oglaciers(ig,islope) = 1
158     else
159        ispermanent_h2oglaciers(ig,islope) = 0
160     endif
161
162     if((abs(tend_co2glaciers(ig,islope)).gt.1e-5).and.(abs(co2ice(ig,islope)).gt.0)) then
163        ispermanent_co2glaciers(ig,islope) = 1
164     else
165        ispermanent_co2glaciers(ig,islope) = 0
166     endif
167    enddo
168   enddo
169
170!   0.2 Compute the partial pressure of vapor
171!a. the molecular mass into the column
172     do ig = 1,ngrid
173       mass_mean(ig,:) = 1/(A*q_co2(ig,:) +B)
174     enddo
175
176
177! b. pressure level
178     do it = 1,timelen
179       do ig = 1,ngrid
180         zplev_mean(ig,it) = ap(1) + bp(1)*ps(ig,it)
181       enddo
182     enddo
183! c. Vapor pressure
184     pvapor(:,:) = mass_mean(:,:)/m_h2o*q_h2o(:,:)*zplev_mean(:,:)
185     pvapor_avg(:) = sum(pvapor(:,:),2)/timelen
186     deallocate(pvapor)
187     deallocate(zplev_mean)
188     deallocate(mass_mean)
189
190! 1. we compute the mass of H2O adsorded in each layer of the meshes 
191
192 do ig = 1,ngrid
193  do islope = 1,nslope
194    do iloop = 1,index_breccia
195      K = Ko*exp(e/tsoil_PEM(ig,iloop,islope))
196      if(TI_PEM(ig,iloop,islope).lt.inertie_thresold)  then
197        theta_h2o_adsorbded(ig,iloop,islope) = (K*pvapor_avg(ig)/(1+K*pvapor_avg(ig)))**mu
198      else
199        p_sat =exp(beta_clap_h2o/tsoil_PEM(ig,iloop,islope) +alpha_clap_h2o) ! we assume fixed temperature in the ice ... not really good but ...
200        theta_h2o_adsorbded(ig,iloop,islope) = (K*p_sat/(1+K*p_sat))**mu
201      endif
202        dm_h2o_regolith_slope(ig,iloop,islope) = as*theta_h2o_adsorbded(ig,iloop,islope)*m_theta*rho_regolith
203   enddo
204  enddo
205 enddo
206
207! 2. Check the exchange between the atmosphere and the regolith
208
209  do ig = 1,ngrid
210   delta_mreg(ig) = 0.
211   do islope = 1,nslope
212    deltam_reg_slope(ig,islope) = 0.
213    do iloop = 1,index_breccia
214       if((TI_PEM(ig,iloop,islope).lt.inertie_thresold).and.(ispermanent_h2oglaciers(ig,islope).eq.0).and.(ispermanent_co2glaciers(ig,islope).eq.0)) then
215             deltam_reg_complete(ig,iloop,islope) = (dm_h2o_regolith_slope(ig,iloop,islope) - m_h2o_completesoil(ig,iloop,islope)) &
216                                                   *(layer_PEM(iloop+1) - layer_PEM(iloop))
217       else ! NO EXCHANGE AS ICE BLOCK THE DYNAMIC!
218             deltam_reg_complete(ig,iloop,islope) = 0.
219       endif
220       deltam_reg_slope(ig,islope) = deltam_reg_slope(ig,islope) + deltam_reg_complete(ig,iloop,islope)
221    enddo
222   delta_mreg(ig) = delta_mreg(ig) + deltam_reg_slope(ig,islope)*subslope_dist(ig,islope)/cos(pi*def_slope_mean(islope)/180.)
223   enddo
224  enddo
225   m_h2o_completesoil(:,:,:) = dm_h2o_regolith_slope(:,:,:)
226
227 RETURN
228#endif
229  end subroutine
230
231!------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
232!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
233!!!
234!!! Purpose: Compute CO2  following the methods from Zent & Quinn 1995
235!!!
236!!! Author: LL, 01/2023
237!!!
238!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
239
240  SUBROUTINE regolith_co2adsorption(ngrid,nslope,nsoil_PEM,timelen,tend_h2oglaciers,tend_co2glaciers,waterice,co2ice,ps,q_co2,q_h2o,&
241                                   tsoil_PEM,TI_PEM,m_co2_completesoil,delta_mreg)
242#ifndef CPP_STD
243      use comsoil_h_PEM, only: layer_PEM, mlayer_PEM,index_breccia,index_bedrock,index_breccia
244      USE comcstfi_h, only: pi
245      use comslope_mod, only : subslope_dist,def_slope_mean
246      use vertical_layers_mod, ONLY: ap,bp
247      use constants_marspem_mod, only: m_co2, m_noco2,rho_regolith
248#endif
249
250      IMPLICIT NONE
251! Inputs: 
252 INTEGER,INTENT(IN) :: ngrid, nslope, nsoil_PEM,timelen             ! size dimension
253 REAL,INTENT(IN) :: ps(ngrid,timelen)                               ! Average surface pressure [Pa]
254 REAL,INTENT(IN) :: tsoil_PEM(ngrid,nsoil_PEM,nslope)               ! Mean Soil Temperature [K]
255 REAL,INTENT(IN) :: TI_PEM(ngrid,nsoil_PEM,nslope)                  ! Mean Thermal Inertia [USI]
256 REAL,INTENT(IN) :: tend_h2oglaciers(ngrid,nslope),tend_co2glaciers(ngrid,nslope) !tendancies on the glaciers ()
257 REAL,INTENT(IN) :: q_co2(ngrid,timelen),q_h2o(ngrid,timelen)       ! Mass mixing ratio of co2 and h2o in the first layer (kg/kg)
258 REAL,INTENT(IN) :: waterice(ngrid,nslope)                          ! water ice at the surface [kg/m^2]
259 REAL,INTENT(IN) :: co2ice(ngrid,nslope)                            ! co2 ice at the surface [kg/m^2]
260
261! Outputs:
262 REAL,INTENT(INOUT) :: m_co2_completesoil(ngrid,nsoil_PEM,nslope)   ! Density of co2 adsorbed (kg/m^3)
263 REAL,INTENT(OUT) :: delta_mreg(ngrid)                              ! Difference density of co2 adsorbed (kg/m^3)
264 
265! Constants:
266
267 REAL :: alpha = 7.512e-6 ! Zent & Quinn 1995
268 REAL :: beta =  -1541.5  ! Zent & Quinn 1995
269 REAL ::  inertie_thresold = 800. ! TI > 800 means cementation
270 real :: m_theta = 4.27e-7     ! Mass of co2 per m^2 absorbed
271! real :: as = 18.9e3              ! Specific area, Buhler & Piqueux 2021
272 real :: as = 9.48e4           ! same as previous but from zent
273 real :: as_breccia = 1.7e4       ! Specific area of basalt, Zent 1997
274! Local         
275 real :: A,B                                             ! Used to compute the mean mass above the surface
276 INTEGER :: ig,islope,iloop,it                           ! for loops
277 REAL :: dm_co2_regolith_slope(ngrid,nsoil_PEM,nslope)   ! elementary mass adsorded per mesh per slope
278 INTEGER :: ispermanent_co2glaciers(ngrid,nslope)        ! Check if the co2 glacier is permanent
279 INTEGER :: ispermanent_h2oglaciers(ngrid,nslope)        ! Check if the h2o glacier is permanent
280#ifndef CPP_STD
281 REAL :: deltam_reg_complete(ngrid,index_breccia,nslope)         ! Difference in the mass per slope and soil layer (kg/m^3)
282#endif
283 REAL :: deltam_reg_slope(ngrid,nslope)                  ! Difference in the mass per slope  (kg/m^3)
284 REAL :: m_h2o_adsorbed(ngrid,nsoil_PEM,nslope)          ! Density of CO2 adsorbed (kg/m^3)
285 REAL :: theta_h2o_adsorbed(ngrid,nsoil_PEM,nslope)     ! Fraction of the pores occupied by H2O molecules
286 REAL :: delta_mh2o(ngrid)                              ! Difference density of h2o adsorbed (kg/m^3)
287!timelen array are allocated because heavy ...
288 real,allocatable :: mass_mean(:,:)                            ! mean mass above the surface
289 real,allocatable :: zplev_mean(:,:)                           ! pressure above the surface
290 real,allocatable :: pco2(:,:)                                  ! partial pressure above the surface
291 real, allocatable :: pco2_avg(:)                              ! yearly averaged
292
293! 0. Some initializations
294
295     allocate(mass_mean(ngrid,timelen))
296     allocate(zplev_mean(ngrid,timelen))
297     allocate(pco2(ngrid,timelen))
298     allocate(pco2_avg(ngrid))
299
300#ifndef CPP_STD
301 
302      m_h2o_adsorbed(:,:,:) = 0.
303      A =(1/m_co2 - 1/m_noco2)
304      B=1/m_noco2
305
306     dm_co2_regolith_slope(:,:,:) = 0
307     delta_mreg(:) = 0.
308
309!0.1 Look at perenial ice
310  do ig = 1,ngrid
311    do islope = 1,nslope
312     if((abs(tend_h2oglaciers(ig,islope)).gt.1e-5).and.(abs(waterice(ig,islope)).gt.0)) then
313        ispermanent_h2oglaciers(ig,islope) = 1
314     else
315        ispermanent_h2oglaciers(ig,islope) = 0
316     endif
317
318     if((abs(tend_co2glaciers(ig,islope)).gt.1e-5).and.(abs(co2ice(ig,islope)).gt.0)) then
319        ispermanent_co2glaciers(ig,islope) = 1
320     else
321        ispermanent_co2glaciers(ig,islope) = 0
322     endif
323    enddo
324   enddo
325
326!   0.2  Compute the partial pressure of CO2
327!a. the molecular mass into the column
328     do ig = 1,ngrid
329       mass_mean(ig,:) = 1./(A*q_co2(ig,:) +B)
330     enddo
331
332! b. pressure level
333     do it = 1,timelen
334       do ig = 1,ngrid
335         zplev_mean(ig,it) = ap(1) + bp(1)*ps(ig,it)
336       enddo
337     enddo
338
339! c. Vapor pressure
340     pco2(:,:) = mass_mean(:,:)/m_co2*q_co2(:,:)*zplev_mean(:,:)
341     pco2_avg(:) = sum(pco2(:,:),2)/timelen
342
343     deallocate(zplev_mean)
344     deallocate(mass_mean)
345     deallocate(pco2)
346
347
348! 1. Compute the fraction of the pores occupied by H2O
349
350 call regolith_h2oadsorption(ngrid,nslope,nsoil_PEM,timelen,tend_h2oglaciers,tend_co2glaciers,waterice,co2ice,ps,q_co2,q_h2o,tsoil_PEM,TI_PEM, &
351                                   theta_h2o_adsorbed, m_h2o_adsorbed,delta_mh2o)
352
353! 2.  we compute the mass of co2 adsorded in each layer of the meshes 
354
355 do ig = 1,ngrid
356  do islope = 1,nslope
357    do iloop = 1,index_breccia
358     if((TI_PEM(ig,iloop,islope).lt.inertie_thresold).and.(ispermanent_h2oglaciers(ig,islope).eq.0).and.(ispermanent_co2glaciers(ig,islope).eq.0)) then
359     dm_co2_regolith_slope(ig,iloop,islope) = as*rho_regolith*m_theta*(1-theta_h2o_adsorbed(ig,iloop,islope))*alpha*pco2_avg(ig)/ &
360                                             (alpha*pco2_avg(ig)+sqrt(tsoil_PEM(ig,iloop,islope))*exp(beta/tsoil_PEM(ig,iloop,islope)))
361     else
362        if(abs(m_co2_completesoil(ig,iloop,islope)).lt.(1e-10)) then !!! we are at first call
363          dm_co2_regolith_slope(ig,iloop,islope) = as*rho_regolith*m_theta*(1-theta_h2o_adsorbed(ig,iloop,islope))*alpha*pco2_avg(ig) &
364                                                 /(alpha*pco2_avg(ig)+sqrt(tsoil_PEM(ig,iloop,islope))*exp(beta/tsoil_PEM(ig,iloop,islope)))
365        else ! no change: permanent ice stick the atoms of CO2
366          dm_co2_regolith_slope(ig,iloop,islope) = m_co2_completesoil(ig,iloop,islope)
367        endif
368     endif
369    enddo
370 enddo
371enddo
372
373! 3. Check the exchange between the atmosphere and the regolith
374
375  do ig = 1,ngrid
376   delta_mreg(ig) = 0.
377   do islope = 1,nslope
378    deltam_reg_slope(ig,islope) = 0.
379    do iloop = 1,index_breccia
380       if((TI_PEM(ig,iloop,islope).lt.inertie_thresold).and.(ispermanent_h2oglaciers(ig,islope).eq.0).and.(ispermanent_co2glaciers(ig,islope).eq.0)) then
381             deltam_reg_complete(ig,iloop,islope) = (dm_co2_regolith_slope(ig,iloop,islope) - m_co2_completesoil(ig,iloop,islope)) &
382                                                   *(layer_PEM(iloop+1) - layer_PEM(iloop))
383       else ! NO EXCHANGE AS ICE BLOCK THE DYNAMIC!
384             deltam_reg_complete(ig,iloop,islope) = 0.
385       endif
386       deltam_reg_slope(ig,islope) = deltam_reg_slope(ig,islope) + deltam_reg_complete(ig,iloop,islope)
387    enddo
388   delta_mreg(ig) = delta_mreg(ig) + deltam_reg_slope(ig,islope)*subslope_dist(ig,islope)/cos(pi*def_slope_mean(islope)/180.)
389   enddo
390  enddo
391  m_co2_completesoil(:,:,:) = dm_co2_regolith_slope(:,:,:)
392
393!=======================================================================
394      RETURN
395#endif
396      END
397
398
399   end module
Note: See TracBrowser for help on using the repository browser.