source: trunk/LMDZ.COMMON/libf/evolution/compute_tendencies_mod.F90 @ 2835

Last change on this file since 2835 was 2835, checked in by romain.vande, 2 years ago

Mars PEM:
Introduction of the possibility to follow an orbital forcing.
Introduction of new control parameters.
Cleaning of the PEM (removing unused files, add comments and new files)

A file named run_PEM.def can be added to the run.def. It contains the following variables:

_ evol_orbit_pem: Boolean. Do you want to follow an orbital forcing predefined (read in ob_ex_lsp.asc for example)? (default=false)
_ year_bp_ini: Integer. Number of year before present to start the pem run if evol_orbit_pem=.true. , default=0
_ Max_iter_pem: Integer. Maximal number of iteration if none of the stopping criterion is reached and if evol_orbit_pem=.false., default=99999999
_ dt_pem: Integer. Time step of the PEM in year, default=1
_ alpha_criterion: Real. Acceptance rate of sublimating ice surface change, default=0.2
_ soil_pem: Boolean. Do you want to run with subsurface physical processes in the PEM? default=.true.

RV

File size: 2.1 KB
Line 
1!
2! $Id $
3!
4SUBROUTINE compute_tendencies(tendencies_h2o_ice,min_h2o_ice_Y1,&
5     min_h2o_ice_Y2,iim_input,jjm_input,ngrid,tendencies_h2o_ice_phys)
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                             ! # of grid points along longitude/latitude/ total
22     REAL, intent(in) , dimension(iim_input+1,jjm_input+1):: 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):: 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) :: tendencies_h2o_ice ! LON x LAT field : difference between the minima = evolution of perenial ice
27     REAL, intent(out) , dimension(ngrid)   :: 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                                                           ! 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!  If the difference is too small; there is no evolution
41  DO j=1,jjm_input+1
42    DO i = 1, iim_input
43       if(abs(tendencies_h2o_ice(i,j)).LT.1.0E-10) then
44          tendencies_h2o_ice(i,j)=0.
45       endif
46    ENDDO
47  ENDDO
48
49!  We reorganise the difference on the physical grid
50  tendencies_h2o_ice_phys(1)=tendencies_h2o_ice(1,1)
51
52  ig0 = 2
53  DO j=2,jjm_input
54    DO i = 1, iim_input
55       tendencies_h2o_ice_phys(ig0)  =tendencies_h2o_ice(i,j)
56       ig0= ig0 + 1
57    ENDDO
58  ENDDO
59
60  tendencies_h2o_ice_phys(ig0) = tendencies_h2o_ice(1,jjm_input+1)
61
62END SUBROUTINE compute_tendencies
63
64
65
66
67
Note: See TracBrowser for help on using the repository browser.