source: trunk/LMDZ.COMMON/libf/evolution/conf_pem.F90 @ 2962

Last change on this file since 2962 was 2961, checked in by llange, 19 months ago

PEM

  • Move math functions (findroot, deriv, etc) in a specific module
  • Ice table is no longer infinite, the bottom of the ice table (zend) is set such at d(rho_vap) dz (zend) = 0. Future commit will transfer the loss of ice table to perenial glaciers

LL

File size: 3.7 KB
Line 
1MODULE conf_pem_mod
2
3IMPLICIT NONE
4
5CONTAINS
6
7  SUBROUTINE conf_pem
8
9#ifdef CPP_IOIPSL
10  use IOIPSL, only: getin
11#else
12  ! if not using IOIPSL, we still need to use (a local version of) getin
13  use ioipsl_getincom, only: getin
14#endif
15 
16  USE temps_mod_evol, ONLY: year_bp_ini, dt_pem, water_ice_criterion, co2_ice_criterion, ps_criterion, &
17                Max_iter_pem, evol_orbit_pem, var_obl, var_ex, var_lsp
18  USE comsoil_h_pem, only: soil_pem,fluxgeo,water_reservoir_nom,depth_breccia,depth_bedrock,reg_thprop_dependp
19  USE adsorption_mod,only: adsorption_pem
20  USE co2glaciers_mod, only: co2glaciersflow
21  use ice_table_mod, only: icetable_equilibrium, icetable_dynamic
22
23  CHARACTER(len=20),parameter :: modname ='conf_pem'
24
25!PEM parameters
26
27
28
29  year_bp_ini=0.
30  CALL getin('year_bp_ini', year_bp_ini)
31
32  dt_pem=1
33  CALL getin('dt_pem', dt_pem)
34
35  water_ice_criterion=0.2
36  CALL getin('water_ice_criterion', water_ice_criterion)
37
38  co2_ice_criterion=0.2
39  CALL getin('co2_ice_criterion', co2_ice_criterion)
40
41  ps_criterion = 0.15
42  CALL getin('ps_criterion',ps_criterion)
43
44  evol_orbit_pem=.false.
45  CALL getin('evol_orbit_pem', evol_orbit_pem)
46
47  Max_iter_pem=99999999
48  CALL getin('Max_iter_pem', Max_iter_pem)
49
50  co2glaciersflow = .true.
51  CALL getin('co2glaciersflow', co2glaciersflow)
52
53  soil_pem=.true.
54  CALL getin('soil_pem', soil_pem)
55
56  adsorption_pem = .true.
57  CALL getin('adsorption_pem',adsorption_pem)
58
59  fluxgeo = 0.
60  CALL getin('Fluxgeo_PEM',fluxgeo)
61  print*,'Flux Geothermal is set to',fluxgeo
62
63  var_obl = .true.
64  CALL getin('var_obl',var_obl)
65  print*,'Does obliquity vary ?',var_obl
66
67  var_ex = .true.
68  CALL getin('var_ex',var_ex)
69  print*,'Does excentricity vary ?',var_ex
70
71  var_lsp = .true.
72  CALL getin('var_lsp',var_lsp)
73  print*,'Does Ls peri vary ?',var_lsp
74   
75  depth_breccia   = 10.
76  CALL getin('depth_breccia',depth_breccia)
77  print*,'Depth of breccia is set to',depth_breccia
78
79  depth_bedrock   = 1000.
80  CALL getin('depth_bedrock',depth_bedrock)
81  print*,'Depth of bedrock is set to',depth_bedrock
82
83  reg_thprop_dependp = .false.
84  CALL getin('reg_thprop_dependp',reg_thprop_dependp)
85  print*, 'Thermal properties of the regolith vary with pressure ?', reg_thprop_dependp
86
87   icetable_equilibrium = .true.
88   CALL getin('icetable_equilibrium',icetable_equilibrium)
89   print*, 'Do we compute the ice table at equilibrium?', icetable_equilibrium
90
91   icetable_dynamic = .false.
92   CALL getin('icetable_dynamic',icetable_dynamic)
93   print*, 'Do we compute the ice table with the dynamic method?', icetable_dynamic
94
95  if ((not(soil_pem)).and.((icetable_equilibrium).or.(icetable_dynamic))) then
96       print*,'Ice table  must be used when soil_pem = T'
97       call abort_physic(modname,"Ice table  must be used when soil_pem = T",1)
98  endif
99
100  if ((not(soil_pem)).and.adsorption_pem) then
101       print*,'Adsorption must be used when soil_pem = T'
102       call abort_physic(modname,"Adsorption must be used when soil_pem = T",1)
103  endif
104 
105  if ((not(soil_pem)).and.(fluxgeo.gt.0.)) then
106       print*,'Soil is not activated but Flux Geo > 0.'
107       call abort_physic(modname,"Soil is not activated but Flux Geo > 0.",1)
108  endif
109 
110  if ((not(soil_pem)).and.reg_thprop_dependp) then
111     print*,'Regolith properties vary with Ps only when soil is set to true'
112     call abort_physic(modname,'Regolith properties vary with Ps only when soil is set to true',1)
113  endif
114
115  if (evol_orbit_pem.and.year_bp_ini.eq.0.) then
116     print*,'You want to follow the file ob_ex_lsp.asc for changing orb parameters,'
117     print*,'but you did not specify from which year to start.'
118     call abort_physic(modname,"evol_orbit_pem=.true. but year_bp_ini=0",1)
119  endif
120
121  water_reservoir_nom = 1e4
122  CALL getin('water_reservoir_nom',water_reservoir_nom)
123
124  END SUBROUTINE conf_pem
125
126END MODULE conf_pem_mod
Note: See TracBrowser for help on using the repository browser.