source: trunk/LMDZ.COMMON/libf/evolution/recomp_tend_co2_slope.F90 @ 2944

Last change on this file since 2944 was 2944, checked in by llange, 20 months ago

PEM
Introduce module 'constants_marspem': Constants that are used are now put in this module, and load in each subroutine.
LL

File size: 2.2 KB
Line 
1!
2! $Id $
3!
4SUBROUTINE recomp_tend_co2_slope(tendencies_co2_ice_phys,tendencies_co2_ice_phys_ini,co2ice_slope,vmr_co2_gcm,vmr_co2_pem,ps_GCM_2,global_ave_press_GCM,global_ave_press_new,timelen,ngrid,nslope)
5
6      use constants_marspem_mod, only : alpha_clap_co2, beta_clap_co2, sigmaB,Lco2
7
8      IMPLICIT NONE
9
10!=======================================================================
11!
12!  Routine that compute the evolution of the tendencie for co2 ice
13!
14!=======================================================================
15
16!   arguments:
17!   ----------
18
19!   INPUT
20  INTEGER, intent(in) :: timelen,ngrid,nslope
21  REAL, INTENT(in) ::  vmr_co2_gcm(ngrid,timelen)                ! physical point field : Volume mixing ratio of co2 in the first layer
22  REAL, INTENT(in) ::  vmr_co2_pem(ngrid,timelen)                ! physical point field : Volume mixing ratio of co2 in the first layer
23  REAL, intent(in) :: ps_GCM_2(ngrid,timelen)                 ! physical point field : Surface pressure in the GCM
24  REAL, intent(in) :: global_ave_press_GCM
25  REAL, intent(in) :: global_ave_press_new
26  REAL, intent(in) ::  tendencies_co2_ice_phys_ini(ngrid,nslope) ! physical point field : Evolution of perenial ice over one year
27  REAL, intent(in) :: co2ice_slope(ngrid,nslope)
28
29!   OUTPUT
30  REAL, intent(inout) ::  tendencies_co2_ice_phys(ngrid,nslope) ! physical point field : Evolution of perenial ice over one year
31
32!   local:
33!   ----
34
35  INTEGER :: i,t,islope
36  REAL :: eps, coef, ave
37
38  eps=0.95
39  coef=669*88875*eps*sigmaB/Lco2
40
41! Evolution of the water ice for each physical point
42  do i=1,ngrid
43    do islope=1,nslope
44      ave=0.
45!      if(abs(tendencies_co2_ice_phys(i,islope)).gt.1e-4) then
46      if(co2ice_slope(i,islope).gt.1e-4 .and. abs(tendencies_co2_ice_phys(i,islope)).gt.1e-5) then
47        do t=1,timelen
48           ave=ave+(beta_clap_co2/(alpha_clap_co2-log(vmr_co2_gcm(i,t)*ps_GCM_2(i,t)/100.)))**4  &
49              -(beta_clap_co2/(alpha_clap_co2-log(vmr_co2_pem(i,t)*ps_GCM_2(i,t)*(global_ave_press_new/global_ave_press_GCM)/100.)))**4
50         enddo
51      endif
52      if(ave.lt.1e-4) ave = 0.
53      tendencies_co2_ice_phys(i,islope)=tendencies_co2_ice_phys_ini(i,islope)-coef*ave/timelen
54    enddo
55  enddo
56
57END SUBROUTINE recomp_tend_co2_slope
Note: See TracBrowser for help on using the repository browser.