1 | MODULE recomp_tend_co2_slope_mod |
---|
2 | |
---|
3 | implicit none |
---|
4 | |
---|
5 | !======================================================================= |
---|
6 | contains |
---|
7 | !======================================================================= |
---|
8 | |
---|
9 | SUBROUTINE recomp_tend_co2(ngrid,nslope,timelen,d_co2ice_phys,d_co2ice_ini,co2ice,emissivity, & |
---|
10 | vmr_co2_PCM,vmr_co2_PEM,ps_PCM_2,global_avg_press_PCM,global_avg_press_new) |
---|
11 | |
---|
12 | use constants_marspem_mod, only : alpha_clap_co2, beta_clap_co2, sigmaB, Lco2, sols_per_my, sec_per_sol |
---|
13 | |
---|
14 | implicit none |
---|
15 | |
---|
16 | !======================================================================= |
---|
17 | ! |
---|
18 | ! Routine that compute the evolution of the tendencie for co2 ice |
---|
19 | ! |
---|
20 | !======================================================================= |
---|
21 | |
---|
22 | ! arguments: |
---|
23 | ! ---------- |
---|
24 | ! INPUT |
---|
25 | integer, intent(in) :: timelen, ngrid, nslope |
---|
26 | real, dimension(ngrid,timelen), intent(in) :: vmr_co2_PCM ! physical point field: Volume mixing ratio of co2 in the first layer |
---|
27 | real, dimension(ngrid,timelen), intent(in) :: vmr_co2_PEM ! physical point field: Volume mixing ratio of co2 in the first layer |
---|
28 | real, dimension(ngrid,timelen), intent(in) :: ps_PCM_2 ! physical point field: Surface pressure in the PCM |
---|
29 | real, intent(in) :: global_avg_press_PCM ! global averaged pressure at previous timestep |
---|
30 | real, intent(in) :: global_avg_press_new ! global averaged pressure at current timestep |
---|
31 | real, dimension(ngrid,nslope), intent(in) :: d_co2ice_ini ! physical point field: Evolution of perennial ice over one year |
---|
32 | real, dimension(ngrid,nslope), intent(in) :: co2ice ! CO2 ice per mesh and sub-grid slope (kg/m^2) |
---|
33 | real, dimension(ngrid,nslope), intent(in) :: emissivity ! Emissivity per mesh and sub-grid slope(1) |
---|
34 | ! OUTPUT |
---|
35 | real, dimension(ngrid,nslope), intent(inout) :: d_co2ice_phys ! physical point field: Evolution of perennial ice over one year |
---|
36 | |
---|
37 | ! local: |
---|
38 | ! ------ |
---|
39 | integer :: i, t, islope |
---|
40 | real :: coef, ave |
---|
41 | |
---|
42 | write(*,*) "Update of the CO2 tendency from the current pressure" |
---|
43 | |
---|
44 | ! Evolution of the water ice for each physical point |
---|
45 | do i = 1,ngrid |
---|
46 | do islope = 1,nslope |
---|
47 | coef = sols_per_my*sec_per_sol*emissivity(i,islope)*sigmaB/Lco2 |
---|
48 | ave = 0. |
---|
49 | if (co2ice(i,islope) > 1.e-4 .and. abs(d_co2ice_phys(i,islope)) > 1.e-5) then |
---|
50 | do t = 1,timelen |
---|
51 | ave = ave + (beta_clap_co2/(alpha_clap_co2-log(vmr_co2_PCM(i,t)*ps_PCM_2(i,t)/100.)))**4 & |
---|
52 | - (beta_clap_co2/(alpha_clap_co2-log(vmr_co2_PEM(i,t)*ps_PCM_2(i,t)*(global_avg_press_new/global_avg_press_PCM)/100.)))**4 |
---|
53 | enddo |
---|
54 | if (ave < 1.e-4) ave = 0. |
---|
55 | d_co2ice_phys(i,islope) = d_co2ice_ini(i,islope) - coef*ave/timelen |
---|
56 | endif |
---|
57 | enddo |
---|
58 | enddo |
---|
59 | |
---|
60 | END SUBROUTINE recomp_tend_co2 |
---|
61 | |
---|
62 | END MODULE recomp_tend_co2_slope_mod |
---|