source: trunk/LMDZ.COMMON/libf/evolution/criterion_co2_ice_stop_mod.F90 @ 2850

Last change on this file since 2850 was 2835, checked in by romain.vande, 3 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: 1.8 KB
Line 
1!
2! $Id $
3!
4SUBROUTINE criterion_co2_ice_stop(cell_area,initial_co2_ice,co2ice,STOPPING,ngrid,latitude,n_band_lat)
5
6  USE temps_mod_evol, ONLY: alpha_criterion
7
8      IMPLICIT NONE
9
10!=======================================================================
11!
12!  Routine that checks if the criterion to stop the PEM is reached
13!
14!=======================================================================
15
16!   arguments:
17!   ----------
18
19!   INPUT
20  INTEGER, intent(in) :: ngrid                  ! # of grid physical grid points
21  REAL,    intent(in) :: cell_area(ngrid)       ! physical point field : Area of the cells
22  REAL,    intent(in) ::  co2ice(ngrid)          ! physical point field : Actual density of water ice
23  REAL,    intent(in) ::  latitude(ngrid)          ! physical point field : Latitude
24  REAL,    intent(in) ::  initial_co2_ice(n_band_lat)  ! Initial/Actual surface of water ice
25
26!   OUTPUT
27  LOGICAL, intent(out) :: STOPPING              ! Logical : is the criterion reached?
28
29!   local:
30!   -----
31  INTEGER :: i,j,n_band_lat                    ! Loop
32  REAL :: present_co2(n_band_lat)  ! Initial/Actual surface of water ice
33  REAL :: pi
34
35!=======================================================================
36
37      pi=4.D0*DATAN(1.D0)
38
39!   initialisation to false
40    STOPPING=.FALSE.
41
42     do j=1,n_band_lat
43        present_co2(j)=0.
44     enddo
45
46  do i=1,ngrid
47            j=floor((latitude(i)+(pi/2))/(pi)*n_band_lat)+1
48      if(j.GT.n_band_lat) then
49          j=n_band_lat
50      endif
51      present_co2(j)=present_co2(j)+co2ice(i)*cell_area(i)
52  enddo
53 
54!   check of the criterion
55  do j=1,n_band_lat
56    if(present_co2(j).LT.initial_co2_ice(j)*(1-alpha_criterion) .OR. &
57       present_co2(j).GT.initial_co2_ice(j)*(1+alpha_criterion)) then
58         STOPPING=.TRUE.
59    endif
60  enddo
61
62END SUBROUTINE criterion_co2_ice_stop
63
64
65
66
67
Note: See TracBrowser for help on using the repository browser.