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

Last change on this file since 2986 was 2982, checked in by romain.vande, 3 years ago

MARS PEM:
Small correction to adapt the pem to the picky gnu compiler.
RV

File size: 4.2 KB
RevLine 
[2859]1MODULE conf_pem_mod
2
[2980]3!=======================================================================
4!
5! Purpose: Read the parameter for a PEM run in run_pem.def
6!
7! Author: RV
8!=======================================================================
9
[2864]10IMPLICIT NONE
[2859]11
[2864]12CONTAINS
[2859]13
[2864]14  SUBROUTINE conf_pem
[2859]15
[2864]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 
[2893]23  USE temps_mod_evol, ONLY: year_bp_ini, dt_pem, water_ice_criterion, co2_ice_criterion, ps_criterion, &
[2895]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
[2888]26  USE adsorption_mod,only: adsorption_pem
[2918]27  USE co2glaciers_mod, only: co2glaciersflow
[2961]28  use ice_table_mod, only: icetable_equilibrium, icetable_dynamic
[2918]29
[2888]30  CHARACTER(len=20),parameter :: modname ='conf_pem'
[2893]31
[2918]32!PEM parameters
[2893]33
[2963]34! #---------- ORBITAL parameters --------------#
[2918]35
[2963]36  evol_orbit_pem=.false.
37  CALL getin('evol_orbit_pem', evol_orbit_pem)
[2918]38
[2864]39  year_bp_ini=0.
40  CALL getin('year_bp_ini', year_bp_ini)
[2859]41
[2963]42  var_obl = .true.
43  CALL getin('var_obl',var_obl)
44  print*,'Does obliquity vary ?',var_obl
[2859]45
[2963]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
[2893]59  water_ice_criterion=0.2
60  CALL getin('water_ice_criterion', water_ice_criterion)
[2859]61
[2893]62  co2_ice_criterion=0.2
63  CALL getin('co2_ice_criterion', co2_ice_criterion)
64
[2888]65  ps_criterion = 0.15
66  CALL getin('ps_criterion',ps_criterion)
67
[2963]68  dt_pem=1
69  CALL getin('dt_pem', dt_pem)
[2859]70
[2963]71! #---------- Subsurface parameters --------------#
[2859]72
[2864]73  soil_pem=.true.
74  CALL getin('soil_pem', soil_pem)
[2859]75
[2888]76  adsorption_pem = .true.
77  CALL getin('adsorption_pem',adsorption_pem)
78
[2963]79  co2glaciersflow = .true.
80  CALL getin('co2glaciersflow', co2glaciersflow)
81
82  reg_thprop_dependp = .false.
83  CALL getin('reg_thprop_dependp',reg_thprop_dependp)
84  print*, 'Thermal properties of the regolith vary with pressure ?', reg_thprop_dependp
85
86! #---------- Layering parameters --------------#
87
[2888]88  fluxgeo = 0.
89  CALL getin('Fluxgeo_PEM',fluxgeo)
90  print*,'Flux Geothermal is set to',fluxgeo
[2895]91   
92  depth_breccia   = 10.
93  CALL getin('depth_breccia',depth_breccia)
94  print*,'Depth of breccia is set to',depth_breccia
[2894]95
[2895]96  depth_bedrock   = 1000.
97  CALL getin('depth_bedrock',depth_bedrock)
98  print*,'Depth of bedrock is set to',depth_bedrock
99
[2961]100   icetable_equilibrium = .true.
101   CALL getin('icetable_equilibrium',icetable_equilibrium)
102   print*, 'Do we compute the ice table at equilibrium?', icetable_equilibrium
[2895]103
[2961]104   icetable_dynamic = .false.
105   CALL getin('icetable_dynamic',icetable_dynamic)
106   print*, 'Do we compute the ice table with the dynamic method?', icetable_dynamic
107
[2982]108  if ((.not.soil_pem).and.((icetable_equilibrium).or.(icetable_dynamic))) then
[2961]109       print*,'Ice table  must be used when soil_pem = T'
110       call abort_physic(modname,"Ice table  must be used when soil_pem = T",1)
111  endif
112
[2982]113  if ((.not.soil_pem).and.adsorption_pem) then
[2888]114       print*,'Adsorption must be used when soil_pem = T'
115       call abort_physic(modname,"Adsorption must be used when soil_pem = T",1)
[2893]116  endif
[2888]117 
[2982]118  if ((.not.soil_pem).and.(fluxgeo.gt.0.)) then
[2888]119       print*,'Soil is not activated but Flux Geo > 0.'
[2895]120       call abort_physic(modname,"Soil is not activated but Flux Geo > 0.",1)
[2893]121  endif
[2895]122 
[2982]123  if ((.not.soil_pem).and.reg_thprop_dependp) then
[2895]124     print*,'Regolith properties vary with Ps only when soil is set to true'
125     call abort_physic(modname,'Regolith properties vary with Ps only when soil is set to true',1)
126  endif
[2894]127
128  if (evol_orbit_pem.and.year_bp_ini.eq.0.) then
[2895]129     print*,'You want to follow the file ob_ex_lsp.asc for changing orb parameters,'
130     print*,'but you did not specify from which year to start.'
131     call abort_physic(modname,"evol_orbit_pem=.true. but year_bp_ini=0",1)
132  endif
133
134  water_reservoir_nom = 1e4
[2888]135  CALL getin('water_reservoir_nom',water_reservoir_nom)
[2895]136
[2864]137  END SUBROUTINE conf_pem
[2859]138
139END MODULE conf_pem_mod
Note: See TracBrowser for help on using the repository browser.