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