Changeset 3206 for trunk/LMDZ.COMMON/libf/evolution
- Timestamp:
- Feb 8, 2024, 11:42:00 AM (10 months ago)
- Location:
- trunk/LMDZ.COMMON/libf/evolution
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/adsorption_mod.F90
r3130 r3206 88 88 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 89 89 90 use comsoil_h_PEM, only: layer_PEM, mlayer_PEM,index_breccia,index_bedrock 91 use comslope_mod, only : subslope_dist,def_slope_mean 92 use vertical_layers_mod, ONLY: ap,bp 93 use constants_marspem_mod,only: alpha_clap_h2o,beta_clap_h2o, & 94 m_h2o,m_co2,m_noco2, & 95 rho_regolith 90 use comsoil_h_PEM, only: layer_PEM, index_breccia 91 use comslope_mod, only: subslope_dist, def_slope_mean 92 use vertical_layers_mod, only: ap,bp 93 use constants_marspem_mod, only: alpha_clap_h2o, beta_clap_h2o, m_h2o, m_co2,m_noco2, rho_regolith 94 96 95 #ifndef CPP_STD 97 96 use comcstfi_h, only: pi … … 102 101 implicit none 103 102 ! inputs 104 INTEGER,INTENT(IN) :: ngrid, nslope, nsoil_PEM,timelen ! size dimension105 REAL,INTENT(IN) :: tend_h2oglaciers(ngrid,nslope),tend_co2glaciers(ngrid,nslope) ! tendancies on the glaciers ()106 REAL,INTENT(IN) :: waterice(ngrid,nslope) ! water ice at the surface [kg/m^2]107 REAL,INTENT(IN) :: co2ice(ngrid,nslope) ! co2 ice at the surface [kg/m^2]108 REAL,INTENT(IN) :: ps(ngrid,timelen) ! surface pressure (Pa)103 INTEGER,INTENT(IN) :: ngrid, nslope, nsoil_PEM,timelen ! Size dimension 104 REAL,INTENT(IN) :: tend_h2oglaciers(ngrid,nslope),tend_co2glaciers(ngrid,nslope) ! Tendencies on the glaciers () 105 REAL,INTENT(IN) :: waterice(ngrid,nslope) ! Water ice at the surface [kg/m^2] 106 REAL,INTENT(IN) :: co2ice(ngrid,nslope) ! CO2 ice at the surface [kg/m^2] 107 REAL,INTENT(IN) :: ps(ngrid,timelen) ! Surface pressure (Pa) 109 108 REAL,INTENT(IN) :: q_co2(ngrid,timelen) ! Mass mixing ratio of co2 in the first layer (kg/kg) 110 109 REAL,INTENT(IN) :: q_h2o(ngrid,timelen) ! Mass mixing ratio of H2o in the first layer (kg/kg) … … 114 113 ! outputs 115 114 REAL,INTENT(INOUT) :: m_h2o_completesoil(ngrid,nsoil_PEM,nslope) ! Density of h2o adsorbed (kg/m^3)(ngrid,nsoil_PEM,nslope) 116 REAL,INTENT(OUT) :: theta_h2o_adsorbded(ngrid,nsoil_PEM,nslope) ! Fraction of the pores occupied by H2O molecules117 REAL,INTENT(OUT) :: delta_mreg(ngrid) ! Difference density of h2o adsorbed (kg/m^3)115 REAL,INTENT(OUT) :: theta_h2o_adsorbded(ngrid,nsoil_PEM,nslope) ! Fraction of the pores occupied by H2O molecules 116 REAL,INTENT(OUT) :: delta_mreg(ngrid) ! Difference density of h2o adsorbed (kg/m^3) 118 117 119 118 ! constants … … 124 123 ! real :: as = 18.9e3 ! Specific area, Buhler & Piqueux 2021 125 124 real :: as = 9.48e4 ! Specific area, Zent 126 real :: as_breccia = 1.7e4 ! Specific area of basalt, Zent127 125 real :: inertie_thresold = 800. ! TI > 800 means cementation 128 126 129 127 ! local variables 130 REAL :: deltam_reg_complete(ngrid,index_breccia,nslope) 128 REAL :: deltam_reg_complete(ngrid,index_breccia,nslope) ! Difference in the mass per slope and soil layer (kg/m^3) 131 129 real :: K ! Used to compute theta 132 integer ig, iloop, islope,isoil,it ! for loops133 INTEGER :: ispermanent_co2glaciers(ngrid,nslope) 134 INTEGER :: ispermanent_h2oglaciers(ngrid,nslope) 135 REAL :: deltam_reg_slope(ngrid,nslope) ! Difference density of h2o adsorbed per slope (kg/m^3)136 REAL :: dm_h2o_regolith_slope(ngrid,nsoil_PEM,nslope) ! elementary h2o mass adsorded per mesh per slope137 real :: A,B 138 real :: p_sat ! saturated vapor pressure of ice139 real,allocatable :: mass_mean(:,:) ! mean mass above the surface140 real,allocatable :: zplev_mean(:,:) ! pressure above the surface141 real,allocatable :: pvapor(:,:) ! partial pressure above the surface142 real, allocatable :: pvapor_avg(:) ! yearly130 integer ig, iloop, islope, it ! For loops 131 INTEGER :: ispermanent_co2glaciers(ngrid,nslope) ! Check if the co2 glacier is permanent 132 INTEGER :: ispermanent_h2oglaciers(ngrid,nslope) ! Check if the h2o glacier is permanent 133 REAL :: deltam_reg_slope(ngrid,nslope) ! Difference density of h2o adsorbed per slope (kg/m^3) 134 REAL :: dm_h2o_regolith_slope(ngrid,nsoil_PEM,nslope) ! Elementary h2o mass adsorded per mesh per slope 135 real :: A,B ! Used to compute the mean mass above the surface 136 real :: p_sat ! Saturated vapor pressure of ice 137 real,allocatable :: mass_mean(:,:) ! Mean mass above the surface 138 real,allocatable :: zplev_mean(:,:) ! Pressure above the surface 139 real,allocatable :: pvapor(:,:) ! Partial pressure above the surface 140 real, allocatable :: pvapor_avg(:) ! Yearly averaged 143 141 144 142 ! 0. Some initializations … … 248 246 tsoil_PEM,TI_PEM,m_co2_completesoil,delta_mreg) 249 247 250 use comsoil_h_PEM, only: layer_PEM, mlayer_PEM,index_breccia,index_bedrock,index_breccia 251 use comslope_mod, only : subslope_dist,def_slope_mean 252 use vertical_layers_mod, ONLY: ap,bp 253 use constants_marspem_mod, only: m_co2, m_noco2,rho_regolith 248 use comsoil_h_PEM, only: layer_PEM, index_breccia, index_breccia 249 use comslope_mod, only: subslope_dist, def_slope_mean 250 use vertical_layers_mod, only: ap, bp 251 use constants_marspem_mod, only: m_co2, m_noco2, rho_regolith 252 254 253 #ifndef CPP_STD 255 254 use comcstfi_h, only: pi … … 260 259 IMPLICIT NONE 261 260 ! Inputs: 262 INTEGER,INTENT(IN) :: ngrid, nslope, nsoil_PEM,timelen ! size dimension261 INTEGER,INTENT(IN) :: ngrid, nslope, nsoil_PEM,timelen ! Size dimension 263 262 REAL,INTENT(IN) :: ps(ngrid,timelen) ! Average surface pressure [Pa] 264 263 REAL,INTENT(IN) :: tsoil_PEM(ngrid,nsoil_PEM,nslope) ! Mean Soil Temperature [K] 265 264 REAL,INTENT(IN) :: TI_PEM(ngrid,nsoil_PEM,nslope) ! Mean Thermal Inertia [USI] 266 REAL,INTENT(IN) :: tend_h2oglaciers(ngrid,nslope),tend_co2glaciers(ngrid,nslope) ! tendancies on the glaciers ()265 REAL,INTENT(IN) :: tend_h2oglaciers(ngrid,nslope),tend_co2glaciers(ngrid,nslope) ! Tendencies on the glaciers () 267 266 REAL,INTENT(IN) :: q_co2(ngrid,timelen),q_h2o(ngrid,timelen) ! Mass mixing ratio of co2 and h2o in the first layer (kg/kg) 268 REAL,INTENT(IN) :: waterice(ngrid,nslope) ! water ice at the surface [kg/m^2]269 REAL,INTENT(IN) :: co2ice(ngrid,nslope) ! co2 ice at the surface [kg/m^2]267 REAL,INTENT(IN) :: waterice(ngrid,nslope) ! Water ice at the surface [kg/m^2] 268 REAL,INTENT(IN) :: co2ice(ngrid,nslope) ! CO2 ice at the surface [kg/m^2] 270 269 271 270 ! Outputs: … … 275 274 ! Constants: 276 275 277 REAL :: alpha = 7.512e-6 ! Zent & Quinn 1995278 REAL :: beta = -1541.5 ! Zent & Quinn 1995276 REAL :: alpha = 7.512e-6 ! Zent & Quinn 1995 277 REAL :: beta = -1541.5 ! Zent & Quinn 1995 279 278 REAL :: inertie_thresold = 800. ! TI > 800 means cementation 280 real :: m_theta = 4.27e-7 ! Mass of co2 per m^2 absorbed 281 ! real :: as = 18.9e3 ! Specific area, Buhler & Piqueux 2021 282 real :: as = 9.48e4 ! same as previous but from zent 283 real :: as_breccia = 1.7e4 ! Specific area of basalt, Zent 1997 279 real :: m_theta = 4.27e-7 ! Mass of co2 per m^2 absorbed 280 ! real :: as = 18.9e3 ! Specific area, Buhler & Piqueux 2021 281 real :: as = 9.48e4 ! Same as previous but from zent 284 282 ! Local 285 283 real :: A,B ! Used to compute the mean mass above the surface 286 INTEGER :: ig,islope,iloop,it ! for loops287 REAL :: dm_co2_regolith_slope(ngrid,nsoil_PEM,nslope) ! elementary mass adsorded per mesh per slope284 INTEGER :: ig,islope,iloop,it ! For loops 285 REAL :: dm_co2_regolith_slope(ngrid,nsoil_PEM,nslope) ! Elementary mass adsorded per mesh per slope 288 286 INTEGER :: ispermanent_co2glaciers(ngrid,nslope) ! Check if the co2 glacier is permanent 289 287 INTEGER :: ispermanent_h2oglaciers(ngrid,nslope) ! Check if the h2o glacier is permanent 290 REAL :: deltam_reg_complete(ngrid,index_breccia,nslope) 288 REAL :: deltam_reg_complete(ngrid,index_breccia,nslope) ! Difference in the mass per slope and soil layer (kg/m^3) 291 289 REAL :: deltam_reg_slope(ngrid,nslope) ! Difference in the mass per slope (kg/m^3) 292 290 REAL :: m_h2o_adsorbed(ngrid,nsoil_PEM,nslope) ! Density of CO2 adsorbed (kg/m^3) 293 REAL :: theta_h2o_adsorbed(ngrid,nsoil_PEM,nslope) ! Fraction of the pores occupied by H2O molecules294 REAL :: delta_mh2o(ngrid) ! Difference density of h2o adsorbed (kg/m^3)291 REAL :: theta_h2o_adsorbed(ngrid,nsoil_PEM,nslope) ! Fraction of the pores occupied by H2O molecules 292 REAL :: delta_mh2o(ngrid) ! Difference density of h2o adsorbed (kg/m^3) 295 293 !timelen array are allocated because heavy ... 296 real,allocatable :: mass_mean(:,:) ! mean mass above the surface297 real,allocatable :: zplev_mean(:,:) ! pressure above the surface298 real,allocatable :: pco2(:,:) ! partial pressure above the surface299 real, allocatable :: pco2_avg(:) ! yearly averaged294 real,allocatable :: mass_mean(:,:) ! Mean mass above the surface 295 real,allocatable :: zplev_mean(:,:) ! Pressure above the surface 296 real,allocatable :: pco2(:,:) ! Partial pressure above the surface 297 real, allocatable :: pco2_avg(:) ! Yearly averaged 300 298 301 299 ! 0. Some initializations -
trunk/LMDZ.COMMON/libf/evolution/changelog.txt
r3202 r3206 230 230 Some cleaning in the routine update_soilproperties 231 231 232 == 08/02/2024 == JBC 233 Cleanings of unused variables/arguments and bad type conversions. -
trunk/LMDZ.COMMON/libf/evolution/conf_pem.F90
r3161 r3206 63 63 year_bp_ini = 0. 64 64 call getin('year_earth_bp_ini',year_earth_bp_ini) 65 year_bp_ini = year_earth_bp_ini/convert_years65 year_bp_ini = integer(year_earth_bp_ini/convert_years) 66 66 67 67 var_obl = .true. -
trunk/LMDZ.COMMON/libf/evolution/evol_ice_mod.F90
r3152 r3206 76 76 ! local: 77 77 ! ------ 78 integer :: i, j, islope! Loop variables78 integer :: i, islope ! Loop variables 79 79 real :: pos_tend, neg_tend, real_coefficient, negative_part ! Variable to conserve h2o 80 80 real, dimension(ngrid,nslope) :: new_tendencies ! Tendencies computed in order to conserve h2o ice on the surface, only exchange between surface are done -
trunk/LMDZ.COMMON/libf/evolution/ice_table_mod.F90
r3082 r3206 67 67 ! Local 68 68 ! ----------- 69 real :: z1,z2 ! intermediate variables used when doing a linear interpolation between two depths to find the root70 69 integer ig, islope,isoil,isoilend ! loop variables 71 70 real :: diff_rho(nsoil_PEM) ! difference of water vapor density between the surface and at depth [kg/m^3] … … 259 258 integer :: index_firstice ! first index where ice appears (i.e., f > 0) 260 259 real :: dz_eta(nsoilmx_PEM) ! \partial z \eta 261 real :: dz_eta_low ! same but evaluated at the interface for ice262 260 real :: dzz_psat(nsoilmx_PEM) ! \partial \partial psat 263 261 real :: massfillabove,massfillafter ! h2O mass above and after index_geothermal -
trunk/LMDZ.COMMON/libf/evolution/iostart_PEM.F90
r3149 r3206 680 680 INTEGER :: ierr 681 681 INTEGER :: nvarid 682 INTEGER :: idim683 682 684 683 CALL gather(field,field_glo) -
trunk/LMDZ.COMMON/libf/evolution/nb_time_step_PCM_mod.F90
r3149 r3206 31 31 !======================================================================= 32 32 ! Local Variables 33 integer :: iq, fID, vID, idecal, ierr33 integer :: fID, vID, ierr 34 34 integer :: timelen ! number of times stored in the file 35 35 !----------------------------------------------------------------------- -
trunk/LMDZ.COMMON/libf/evolution/orbit_param_criterion_mod.F90
r3203 r3206 54 54 real :: min_obl, min_ecc, min_lsp ! Minimum value of orbit param given the admissible change 55 55 integer :: max_obl_iter, max_ecc_iter, max_lsp_iter ! Maximum year iteration before reaching an inadmissible value of orbit param 56 integer :: ilask , iylask ! Loop variables56 integer :: ilask ! Loop variable 57 57 real :: xa, xb, ya, yb ! Variables for interpolation 58 58 logical :: found_obl, found_ecc, found_lsp ! Flag variables for orbital parameters -
trunk/LMDZ.COMMON/libf/evolution/pem.F90
r3203 r3206 32 32 use netcdf, only: nf90_open, NF90_NOWRITE, nf90_get_var, nf90_inq_varid, nf90_close 33 33 use turb_mod, only: q2, wstar 34 use comslope_mod, only: nslope, def_slope, def_slope_mean, subslope_dist, iflat, major_slope,ini_comslope_h34 use comslope_mod, only: nslope, def_slope, def_slope_mean, subslope_dist, iflat, ini_comslope_h 35 35 use logic_mod, only: iflag_phys 36 36 use mod_const_mpi, only: COMM_LMDZ … … 45 45 use evol_ice_mod, only: evol_co2_ice, evol_h2o_ice 46 46 use comsoil_h_PEM, only: soil_pem, ini_comsoil_h_PEM, end_comsoil_h_PEM, nsoilmx_PEM, & 47 TI_PEM, inertiedat_PEM,& ! soil thermal inertia48 tsoil_PEM, mlayer_PEM,layer_PEM, & ! Soil temp, number of subsurface layers, soil mid layer depths47 TI_PEM, & ! soil thermal inertia 48 tsoil_PEM, layer_PEM, & ! Soil temp, number of subsurface layers, soil mid layer depths 49 49 fluxgeo ! Geothermal flux for the PEM and PCM 50 50 use adsorption_mod, only: regolith_adsorption, adsorption_pem, & ! Bool to check if adsorption, main subroutine … … 57 57 ini_ice_table_porefilling, icetable_equilibrium, computeice_table_equilibrium,compute_massh2o_exchange_ssi 58 58 use soil_thermalproperties_mod, only: update_soil_thermalproperties 59 use time_phylmdz_mod, only: daysec, dtphys , day_end59 use time_phylmdz_mod, only: daysec, dtphys 60 60 use abort_pem_mod, only: abort_pem 61 61 use soil_settings_PEM_mod, only: soil_settings_PEM … … 71 71 72 72 #ifndef CPP_STD 73 use comsoil_h, only: tsoil, nsoilmx, ini_comsoil_h, inertiedat, mlayer, volcapa,inertiesoil, flux_geo, nqsoil, qsoil73 use comsoil_h, only: tsoil, nsoilmx, ini_comsoil_h, inertiedat, mlayer, inertiesoil, flux_geo, nqsoil, qsoil 74 74 use surfdat_h, only: tsurf, emis, qsurf, watercap, ini_surfdat_h, & 75 75 albedodat, zmea, zstd, zsig, zgam, zthe, & 76 hmons, summit, base,albedo_h2o_frost,&77 frost_albedo_threshold,emissiv, watercaptag, perennial_co2ice, emisice, albedice76 albedo_h2o_frost,frost_albedo_threshold, & 77 emissiv, watercaptag, perennial_co2ice, emisice, albedice 78 78 use dimradmars_mod, only: totcloudfrac, albedo 79 79 use dust_param_mod, only: tauscaling … … 81 81 use mod_phys_lmdz_para, only: is_parallel, is_sequential, is_mpi_root, is_omp_root, is_master 82 82 use planete_h, only: aphelie, periheli, year_day, peri_day, obliquit, iniorbit 83 use paleoclimate_mod, only: albedo_perennialco2, paleoclimate 84 use comcstfi_h, only: pi, rad, g, cpp, mugaz, r 83 use comcstfi_h, only: pi, rad, g, mugaz, r 85 84 use surfini_mod, only: surfini 86 85 #else … … 91 90 use aerosol_mod, only: iniaerosol 92 91 use planete_mod, only: apoastr, periastr, year_day, peri_day, obliquit 93 use comcstfi_mod, only: pi, rad, g, cpp,mugaz, r92 use comcstfi_mod, only: pi, rad, g, mugaz, r 94 93 #endif 95 94 … … 147 146 character(*), parameter :: startfi_name = "startfi_evol.nc" ! Name of the file used to initialize the PEM 148 147 character(2) :: str2 149 integer :: ncid, varid, status ! Variable for handling opening of files 150 integer :: phydimid, subdimid, nlayerdimid, nqdimid ! Variable ID for Netcdf files 151 integer :: lonvarid, latvarid, areavarid, sdvarid ! Variable ID for Netcdf files 152 integer :: apvarid, bpvarid ! Variable ID for Netcdf files 148 integer :: ncid, status ! Variable for handling opening of files 149 integer :: lonvarid, latvarid, areavarid, sdvarid ! Variable ID for Netcdf files 150 integer :: apvarid, bpvarid ! Variable ID for Netcdf files 153 151 154 152 ! Variables to read starfi.nc and write restartfi.nc … … 160 158 ! Variables for h2o_ice evolution 161 159 real, dimension(:,:), allocatable :: h2o_ice ! h2o ice in the PEM 162 real, dimension(:,:), allocatable :: h2o_ice_ini ! Initial amount of h2o ice in the PEM163 160 real, dimension(:,:,:), allocatable :: min_h2o_ice ! Minima of h2o ice at each point for the PCM years [kg/m^2] 164 161 real :: h2o_surf_ini ! Initial surface of sublimating h2o ice … … 189 186 ! Variables for slopes 190 187 real, dimension(:,:,:), allocatable :: co2_ice_PCM ! Physics x NSLOPE x Times field: co2 ice given by the PCM [kg/m^2] 191 real, dimension(:,:), allocatable :: co2_ice_ini_sublim ! physical point field: Logical array indicating sublimating point of co2 ice192 real, dimension(:,:), allocatable :: initial_h2o_ice ! physical point field: Logical array indicating if there is h2o ice at initial state193 188 real, dimension(:,:), allocatable :: tend_co2_ice ! physical point x slope field: Tendency of evolution of perennial co2 ice over a year 194 189 real, dimension(:,:), allocatable :: tend_co2_ice_ini ! physical point x slope field x nslope: Tendency of evolution of perennial co2 ice over a year in the PCM … … 252 247 integer :: nsplit_phys 253 248 integer, parameter :: jjm_value = jjm - 1 254 integer :: ierr255 249 256 250 ! Dummy variables to use the subroutine 'init_testphys1d' … … 269 263 270 264 ! Loop variables 271 integer :: i, j, ig0, l, ig, nnq, t, islope, ig_loop, islope_loop, iloop, isoil, icap265 integer :: i, l, ig, nnq, t, islope, ig_loop, islope_loop, isoil, icap 272 266 273 267 ! Parallel variables … … 1087 1081 ! III_c Write the "restartpem.nc" 1088 1082 !------------------------ 1089 call pemdem0("restartpem.nc",longitude,latitude,cell_area,nsoilmx_PEM,ngrid, & 1090 float(day_ini),0.,nslope,def_slope,subslope_dist) 1083 call pemdem0("restartpem.nc",longitude,latitude,cell_area,ngrid,nslope,def_slope,subslope_dist) 1091 1084 call pemdem1("restartpem.nc",i_myear,nsoilmx_PEM,ngrid,nslope,tsoil_PEM, & 1092 1085 TI_PEM, porefillingice_depth,porefillingice_thickness, & -
trunk/LMDZ.COMMON/libf/evolution/pemetat0.F90
r3203 r3206 73 73 real :: delta ! Depth of the interface regolith-breccia, breccia -bedrock [m] 74 74 character(2) :: num ! intermediate string to read PEM start sloped variables 75 real, dimension(ngrid,nsoil_PEM) :: tsoil_saved ! saved soil temperature [K]76 75 real, dimension(ngrid,nsoil_PEM,nslope) :: tsoil_tmp_yr1 ! intermediate soil temperature during yr 1 [K] 77 76 real, dimension(ngrid,nsoil_PEM,nslope) :: tsoil_tmp_yr2 ! intermediate soil temperature during yr 2 [K] 78 real, dimension(ngrid,nsoil_PEM - 1) :: alph_tmp ! Intermediate for tsoil computation []79 real, dimension(ngrid,nsoil_PEM - 1) :: beta_tmp ! Intermediate for tsoil computatio []80 77 logical :: startpem_file ! boolean to check if we read the startfile or not 81 78 -
trunk/LMDZ.COMMON/libf/evolution/pemredem.F90
r3172 r3206 16 16 !======================================================================= 17 17 18 SUBROUTINE pemdem0(filename,lonfi,latfi,cell_area,n soil_PEM,ngrid,day_ini,time,nslope,def_slope,subslope_dist)18 SUBROUTINE pemdem0(filename,lonfi,latfi,cell_area,ngrid,nslope,def_slope,subslope_dist) 19 19 20 20 ! create physics restart file and write time-independent variables 21 use comsoil_h_PEM, only: soil_pem,mlayer_PEM,inertiedat_PEM 22 use iostart_PEM, only: open_restartphy, close_restartphy, put_var, put_field, length 23 use mod_grid_phy_lmdz, only: klon_glo 24 use time_phylmdz_mod, only: daysec 25 26 #ifndef CPP_STD 27 use planete_h, only: aphelie, emin_turb, lmixmin, obliquit, peri_day, periheli, year_day 28 use comcstfi_h, only: g, mugaz, omeg, rad, rcp 29 #else 30 use planete_mod, only: apoastr, emin_turb, lmixmin, obliquit, peri_day, periastr, year_day 31 use comcstfi_mod, only: g, mugaz, omeg, rad, rcp 32 #endif 21 use comsoil_h_PEM, only: mlayer_PEM 22 use iostart_PEM, only: open_restartphy, close_restartphy, put_var, put_field, length 33 23 34 24 implicit none 35 25 36 26 character(*), intent(in) :: filename 37 integer, intent(in) :: n soil_PEM, ngrid, nslope27 integer, intent(in) :: ngrid, nslope 38 28 real, dimension(ngrid), intent(in) :: lonfi, latfi 39 real, intent(in) :: day_ini, time40 29 real, dimension(ngrid), intent(in) :: cell_area ! boundaries for bining of the slopes 41 30 real, dimension(ngrid + 1), intent(in) :: def_slope ! boundaries for bining of the slopes … … 73 62 ! write time-dependent variable to restart file 74 63 use iostart_PEM, only: open_restartphy, close_restartphy, put_var, put_field 75 use comsoil_h_PEM, only: mlayer_PEM,inertiedat_PEM, soil_pem64 use comsoil_h_PEM, only: inertiedat_PEM, soil_pem 76 65 use time_evol_mod, only: year_bp_ini, convert_years 77 66 … … 93 82 integer :: islope 94 83 character(2) :: num 95 integer :: iq96 character(30) :: txt ! To store some text97 84 real :: Year ! Year of the simulation 98 85 -
trunk/LMDZ.COMMON/libf/evolution/read_data_PCM_mod.F90
r3181 r3206 55 55 !======================================================================= 56 56 ! Local Variables 57 character(12) :: start_file_type = "earth" ! default start file type 58 real, dimension(:), allocatable :: time ! times stored in start 59 integer :: indextime ! index of selected time 60 integer :: edges(4), corner(4) 61 integer :: i, j, l, t ! loop variables 62 real :: A, B, mmean ! Molar Mass of co2 and no co2, A;B intermediate variables to compute the mean molar mass of the layer 63 integer :: islope ! loop for variables 64 character(2) :: num ! for reading sloped variables 57 integer :: i, j, t ! loop variables 58 real :: A, B, mmean ! Molar Mass of co2 and no co2, A;B intermediate variables to compute the mean molar mass of the layer 59 integer :: islope ! loop for variables 60 character(2) :: num ! for reading sloped variables 65 61 real, dimension(iim_input + 1,jjm_input + 1,nslope,timelen) :: h2o_ice_s_dyn ! h2o ice per slope of the concatenated file [kg/m^2] 66 62 real, dimension(iim_input + 1,jjm_input + 1,nslope,timelen) :: watercap … … 80 76 real, dimension(iim_input + 1,jjm_input + 1,nslope) :: watersurf_density_dyn_avg ! Water density at the surface, dynamic grid, yearly averaged [kg/m^3] 81 77 real, dimension(iim_input + 1,jjm_input + 1,nsoilmx,nslope,timelen) :: watersoil_density_dyn ! Water density in the soil layer, time series [kg/m^3] 82 real, dimension(ngrid,nslope,timelen) :: watersurf_density ! Water density at the surface, physical grid, time series [kg/m^3]83 78 !----------------------------------------------------------------------- 84 79 ! Open the NetCDF file -
trunk/LMDZ.COMMON/libf/evolution/recomp_orb_param_mod.F90
r3082 r3206 15 15 SUBROUTINE recomp_orb_param(i_myear,year_iter) 16 16 17 use time_evol_mod, only: year_bp_ini, var_obl, var_ecc, var_lsp , convert_years17 use time_evol_mod, only: year_bp_ini, var_obl, var_ecc, var_lsp 18 18 use lask_param_mod, only: yearlask, obllask, ecclask, lsplask, end_lask_param_mod, last_ilask 19 19 #ifndef CPP_STD -
trunk/LMDZ.COMMON/libf/evolution/soil_settings_PEM_mod.F90
r3149 r3206 9 9 SUBROUTINE soil_settings_PEM(ngrid,nslope,nsoil_PEM,nsoil_PCM,TI_PCM,TI_PEM) 10 10 11 ! use netcdf 12 use comsoil_h_PEM, only: layer_PEM, mlayer_PEM, depth_breccia, depth_bedrock, index_breccia, index_bedrock 13 use comsoil_h, only: inertiedat, layer, mlayer, volcapa 14 15 use iostart, only: inquire_field_ndims, get_var, get_field, inquire_field, inquire_dimension_length 11 use comsoil_h_PEM, only: layer_PEM, mlayer_pem, depth_breccia, depth_bedrock, index_breccia, index_bedrock 12 use iostart, only: inquire_field_ndims, get_var, get_field, inquire_field, inquire_dimension_length 16 13 17 14 implicit none … … 46 43 ! local variables: 47 44 integer :: ig, iloop, islope ! loop counters 48 logical :: found 49 real :: alpha,lay1 ! coefficients for building layers 50 real :: xmin, xmax ! to display min and max of a field 51 real :: index_powerlaw ! coefficient to match the power low grid with the exponential one 45 real :: alpha, lay1 ! coefficients for building layers 46 real :: index_powerlaw ! coefficient to match the power low grid with the exponential one 52 47 !======================================================================= 53 48 ! 1. Depth coordinate -
trunk/LMDZ.COMMON/libf/evolution/soil_thermalproperties_mod.F90
r3202 r3206 1 modulesoil_thermalproperties_mod2 3 1 MODULE soil_thermalproperties_mod 2 3 implicit none 4 4 5 5 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 10 10 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 11 11 12 contains 13 14 subroutine ice_thermal_properties(ispureice,pore_filling,surf_thermalinertia,ice_thermalinertia) 15 16 17 12 !======================================================================= 13 contains 14 !======================================================================= 15 16 SUBROUTINE ice_thermal_properties(ispureice,pore_filling,surf_thermalinertia,ice_thermalinertia) 18 17 !======================================================================= 19 18 ! subject: Compute ice thermal properties … … 21 20 ! 22 21 ! author: LL, 04/2023 23 ! ------ 22 ! ------- 24 23 ! 25 24 !======================================================================= 26 25 27 USE constants_marspem_mod,only: porosity28 29 IMPLICIT NONE 26 use constants_marspem_mod, only: porosity 27 28 implicit none 30 29 31 30 !----------------------------------------------------------------------- … … 36 35 ! Input/Output 37 36 ! ------------ 38 LOGICAL,INTENT(IN) :: ispureice! Boolean to check if ice is massive or just pore filling39 REAL,INTENT(IN) :: pore_filling! ice pore filling in each layer (1)40 REAL,INTENT(IN) :: surf_thermalinertia! surface thermal inertia (J/m^2/K/s^1/2)41 REAL,INTENT(OUT) :: ice_thermalinertia! Thermal inertia of ice when present in the pore (J/m^2/K/s^1/2)37 logical, intent(in) :: ispureice ! Boolean to check if ice is massive or just pore filling 38 real, intent(in) :: pore_filling ! ice pore filling in each layer (1) 39 real, intent(in) :: surf_thermalinertia ! surface thermal inertia (J/m^2/K/s^1/2) 40 real, intent(out) :: ice_thermalinertia ! Thermal inertia of ice when present in the pore (J/m^2/K/s^1/2) 42 41 43 42 ! Local Variables 44 43 ! -------------- 45 44 REAL :: inertie_purewaterice = 2100 ! 2050 is better according to my computations with the formula from Siegler et al., 2012, but let's follow Mellon et al. (2004) 46 45 !======================================================================= 47 46 ! Beginning of the code 48 47 !======================================================================= 49 48 50 if(ispureice) then 51 ice_thermalinertia = inertie_purewaterice 52 else 53 ice_thermalinertia = sqrt(surf_thermalinertia**2 + porosity*pore_filling*inertie_purewaterice**2) ! Siegler et al.,2012 54 endif 55 56 end subroutine 57 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 58 59 SUBROUTINE update_soil_thermalproperties(ngrid,nslope,nsoil_PEM,tendencies_waterice,waterice,p_avg_new,ice_depth,ice_thickness,TI_PEM) 60 61 USE comsoil_h, only: inertiedat, volcapa 62 USE comsoil_h_PEM, only: layer_PEM,inertiedat_PEM,depth_breccia,depth_bedrock,index_breccia,index_bedrock,reg_thprop_dependp 63 USE vertical_layers_mod, ONLY: ap,bp 64 USE constants_marspem_mod,only: TI_breccia,TI_bedrock, TI_regolith_avg 65 implicit none 49 if (ispureice) then 50 ice_thermalinertia = inertie_purewaterice 51 else 52 ice_thermalinertia = sqrt(surf_thermalinertia**2 + porosity*pore_filling*inertie_purewaterice**2) ! Siegler et al., 2012 53 endif 54 55 END SUBROUTINE 56 !======================================================================= 57 58 SUBROUTINE update_soil_thermalproperties(ngrid,nslope,nsoil_PEM,tendencies_waterice,waterice,p_avg_new,ice_depth,ice_thickness,TI_PEM) 59 60 use comsoil_h, only: volcapa 61 use comsoil_h_PEM, only: layer_PEM, inertiedat_PEM, depth_breccia, depth_bedrock, index_breccia, index_bedrock, reg_thprop_dependp 62 use constants_marspem_mod, only: TI_breccia, TI_bedrock, TI_regolith_avg 63 64 implicit none 65 66 66 ! Input: 67 INTEGER,INTENT(IN) :: ngrid, nslope, nsoil_PEM! Shape of the arrays: physical grid, number of sub-grid slopes, number of layer in the soil68 REAL,INTENT(IN) :: p_avg_new! Global average surface pressure [Pa]69 REAL,INTENT(IN) :: tendencies_waterice(ngrid,nslope)! Tendencies on the water ice [kg/m^2/year]70 REAL,INTENT(IN) :: waterice(ngrid,nslope)! Surface Water ice [kg/m^2]71 REAL,INTENT(in) :: ice_depth(ngrid,nslope)! Ice table depth [m]72 REAL,INTENT(in) :: ice_thickness(ngrid,nslope)! Ice table thickness [m]67 integer, intent(in) :: ngrid, nslope, nsoil_PEM ! Shape of the arrays: physical grid, number of sub-grid slopes, number of layer in the soil 68 real, intent(in) :: p_avg_new ! Global average surface pressure [Pa] 69 real, intent(in) :: tendencies_waterice(ngrid,nslope) ! Tendencies on the water ice [kg/m^2/year] 70 real, intent(in) :: waterice(ngrid,nslope) ! Surface Water ice [kg/m^2] 71 real, intent(in) :: ice_depth(ngrid,nslope) ! Ice table depth [m] 72 real, intent(in) :: ice_thickness(ngrid,nslope) ! Ice table thickness [m] 73 73 ! Outputs: 74 74 75 REAL,INTENT(INOUT) :: TI_PEM(ngrid,nsoil_PEM,nslope)! Soil Thermal Inertia [J/m^2/K/s^1/2]75 real, intent(inout) :: TI_PEM(ngrid,nsoil_PEM,nslope) ! Soil Thermal Inertia [J/m^2/K/s^1/2] 76 76 77 77 ! Constants: … … 234 234 enddo !ig 235 235 236 !======================================================================= 237 RETURN 238 END subroutine update_soil_thermalproperties 239 240 end module soil_thermalproperties_mod 241 236 END SUBROUTINE update_soil_thermalproperties 237 238 END MODULE soil_thermalproperties_mod -
trunk/LMDZ.COMMON/libf/evolution/stopping_crit_mod.F90
r3159 r3206 129 129 endif 130 130 131 if (abs(surf_ini) < 1.e-5) stopPEM = .false.131 if (abs(surf_ini) < 1.e-5) stopPEM = 0 132 132 133 133 if (global_avg_press_new < global_avg_press_PCM*(1. - ps_criterion)) then
Note: See TracChangeset
for help on using the changeset viewer.