source: trunk/LMDZ.COMMON/libf/evolution/compute_tendencies_mod_slope.F90 @ 2794

Last change on this file since 2794 was 2794, checked in by llange, 2 years ago

MARS PEM:

  • Add a PEMETAT0 that read "startfi_pem.nc"
  • Add the soil in the model: soil temperature, thermal properties, ice table
  • Add a routine that compute CO2 + H2O adsorption
  • Minor corrections in PEM.F90

LL

File size: 2.8 KB
Line 
1!
2! $Id $
3!
4SUBROUTINE compute_tendencies_slope(tendencies_h2o_ice,min_h2o_ice_Y1,&
5     min_h2o_ice_Y2,iim_input,jjm_input,ngrid,tendencies_h2o_ice_phys,nslope)
6
7      IMPLICIT NONE
8
9
10!=======================================================================
11!
12!  Compute the tendencies of the evolution of water ice over the years
13!
14!=======================================================================
15
16!   arguments:
17!   ----------
18
19!   INPUT
20
21     INTEGER, intent(in) :: iim_input,jjm_input,ngrid  ,nslope                           ! # of grid points along longitude/latitude/ total
22     REAL, intent(in) , dimension(iim_input+1,jjm_input+1,nslope):: min_h2o_ice_Y1       ! LON x LAT field : minimum of water ice at each point for the first year
23     REAL, intent(in) , dimension(iim_input+1,jjm_input+1,nslope):: min_h2o_ice_Y2       ! LON x LAT field : minimum of water ice at each point for the second year
24
25!   OUTPUT
26     REAL, intent(out) , dimension(iim_input+1,jjm_input+1,nslope) :: tendencies_h2o_ice ! LON x LAT field : difference between the minima = evolution of perenial ice
27     REAL, intent(out) , dimension(ngrid,nslope)   :: tendencies_h2o_ice_phys            ! physical point field : difference between the minima = evolution of perenial ice
28
29!   local:
30!   ------
31
32     INTEGER :: i,j,ig0,islope                                                           ! loop variable
33
34!=======================================================================
35
36
37!  We compute the difference
38!  tendencies_h2o_ice(:,:,:)=min_h2o_ice_Y2(:,:,:)-min_h2o_ice_Y1(:,:,:)
39
40  DO j=1,jjm_input+1
41    DO i = 1, iim_input
42       DO islope = 1, nslope
43         tendencies_h2o_ice(i,j,islope)=min_h2o_ice_Y2(i,j,islope)-min_h2o_ice_Y1(i,j,islope)
44       enddo
45    ENDDO
46  ENDDO
47
48     print *, "jjm_input+1", jjm_input+1
49     print *, "iim_input+1", iim_input+1
50     print *, "nslope+1", nslope+1
51
52!  If the difference is too small; there is no evolution
53  DO j=1,jjm_input+1
54    DO i = 1, iim_input
55       DO islope = 1, nslope
56!         print *, "tendencies_h2o_ice(i,j,islope)LAAA", tendencies_h2o_ice(i,j,islope)
57         if(abs(tendencies_h2o_ice(i,j,islope)).LT.1.0E-10) then
58            tendencies_h2o_ice(i,j,islope)=0.
59         endif
60!         print *, "tendencies_h2o_ice(i,j,islope)HERE", tendencies_h2o_ice(i,j,islope)
61       enddo
62    ENDDO
63  ENDDO
64
65
66!  We reorganise the difference on the physical grid
67  tendencies_h2o_ice_phys(1,:)=tendencies_h2o_ice(1,1,:)
68
69  ig0 = 2
70  DO j=2,jjm_input
71    DO i = 1, iim_input
72       tendencies_h2o_ice_phys(ig0,:)  =tendencies_h2o_ice(i,j,:)
73       ig0= ig0 + 1
74    ENDDO
75  ENDDO
76
77  tendencies_h2o_ice_phys(ig0,:) = tendencies_h2o_ice(1,jjm_input+1,:)
78
79!  print *, "tendencies_h2o_ice_physze", tendencies_h2o_ice_phys(:,:)
80
81
82END SUBROUTINE compute_tendencies_slope
83
84
85
86
87
Note: See TracBrowser for help on using the repository browser.