source: trunk/LMDZ.COMMON/libf/evolution/compute_tend_mod.F90 @ 3526

Last change on this file since 3526 was 3498, checked in by jbclement, 2 weeks ago

PEM:

  • Correction of the variable name for the ice table depth in "pemetat0.F90". So it is now got as intended from the "startpem.nc" file;
  • Renaming of the tendencies in the PEM with the prefix 'd_' instead of 'tend_';
  • Modification of the PEM time step type from integer to real. As a consequence, all time variables are now of real type. This change adds the possibility to consider fractions of year as time step.

JBC

File size: 1.3 KB
Line 
1MODULE compute_tend_mod
2
3implicit none
4
5!=======================================================================
6contains
7!=======================================================================
8
9SUBROUTINE compute_tend(ngrid,nslope,min_ice,d_ice)
10
11implicit none
12
13!=======================================================================
14!
15! Compute the initial tendencies of the ice evolution based on the PCM data
16!
17!=======================================================================
18
19!   arguments:
20!   ----------
21!   INPUT
22integer,                         intent(in) :: ngrid   ! # of grid points
23integer,                         intent(in) :: nslope  ! # of subslopes
24real, dimension(ngrid,nslope,2), intent(in) :: min_ice ! Minima of ice at each point for the PCM years
25
26!   OUTPUT
27real, dimension(ngrid,nslope), intent(out) :: d_ice ! Difference between the minima = evolution of perennial ice
28!=======================================================================
29! We compute the difference
30d_ice = min_ice(:,:,2) - min_ice(:,:,1)
31
32! If the difference is too small, then there is no evolution
33where (abs(d_ice) < 1.e-10) d_ice = 0.
34
35! If the minimum over the last year is 0, then we have no perennial ice
36where (abs(min_ice(:,:,2)) < 1.e-10) d_ice = 0.
37
38END SUBROUTINE compute_tend
39
40END MODULE compute_tend_mod
Note: See TracBrowser for help on using the repository browser.