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

Last change on this file since 2893 was 2893, checked in by romain.vande, 22 months ago

Mars PEM:
Correction of recomp_tend_co2 formula and make it dependent on the presence of co2_ice.
Add different stopping criterion for water_ice and co2_ice called : water_ice_criterion and co2_ice_criterion.
Add the possibility to output a diagfi.nc each year for the amount of ice, the tendencies, tsurf and ps.
Remove useless variables (not sloped)
Remove useless file
Some cleaning
RV

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