Changeset 2895
- Timestamp:
- Feb 10, 2023, 8:35:22 PM (22 months ago)
- Location:
- trunk
- Files:
-
- 1 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/adsorption_mod.F90
r2888 r2895 89 89 90 90 #ifndef CPP_STD 91 use comsoil_h_PEM, only: layer_PEM, mlayer_PEM, n_1km91 use comsoil_h_PEM, only: layer_PEM, mlayer_PEM,index_breccia,index_bedrock 92 92 USE comcstfi_h, only: pi 93 93 use comslope_mod, only : subslope_dist,def_slope_mean … … 117 117 REAL :: mu = 0.48 ! Jackosky et al. 1997 118 118 real :: m_theta = 2.84e-7 ! Mass of h2o per m^2 absorbed Jackosky et al. 1997 119 real :: as = 18.9e3 ! Specific area, Buhler & Piqueux 2021 119 ! real :: as = 18.9e3 ! Specific area, Buhler & Piqueux 2021 120 real :: as = 9.48e4 ! Specific area, Zent 121 real :: as_breccia = 1.7e4 ! Specific area of basalt, Zent 120 122 real :: inertie_thresold = 800. ! TI > 800 means cementation 121 123 real :: m_h2o = 18.01528E-3 ! Molecular weight of h2o (kg/mol) 122 124 real :: m_co2 = 44.01E-3 ! Molecular weight of co2 (kg/mol) 123 125 real :: m_noco2 = 33.37E-3 ! Molecular weight of non co2 (kg/mol) 124 real :: rho_regolith = 1500. ! density of the regolith (2000 for buhler & piqueux 2021)126 real :: rho_regolith = 2000. ! density of the regolith (Zent 1995, Buhler & piqueux 2021) 125 127 real :: alpha_clapeyron = -6143.7! eq. (2) in Murphy & Koop 2005 126 128 real :: beta_clapeyron = 28.9074 ! eq. (2) in Murphy & Koop 2005 127 129 ! local variables 128 130 #ifndef CPP_STD 129 REAL :: deltam_reg_complete(ngrid, n_1km,nslope) ! Difference in the mass per slope and soil layer (kg/m^3)131 REAL :: deltam_reg_complete(ngrid,index_breccia,nslope) ! Difference in the mass per slope and soil layer (kg/m^3) 130 132 #endif 131 133 real :: K ! Used to compute theta … … 195 197 do ig = 1,ngrid 196 198 do islope = 1,nslope 197 do iloop = 1, n_1km199 do iloop = 1,index_breccia 198 200 K = Ko*exp(e/tsoil_PEM(ig,iloop,islope)) 199 201 if(TI_PEM(ig,iloop,islope).lt.inertie_thresold) then … … 203 205 theta_h2o_adsorbded(ig,iloop,islope) = (K*p_sat/(1+K*p_sat))**mu 204 206 endif 205 dm_h2o_regolith_slope(ig,iloop,islope) = as*theta_h2o_adsorbded(ig,iloop,islope)*m_theta*rho_regolith207 dm_h2o_regolith_slope(ig,iloop,islope) = as*theta_h2o_adsorbded(ig,iloop,islope)*m_theta*rho_regolith 206 208 enddo 207 209 enddo … … 214 216 do islope = 1,nslope 215 217 deltam_reg_slope(ig,islope) = 0. 216 do iloop = 1, n_1km218 do iloop = 1,index_breccia 217 219 if((TI_PEM(ig,iloop,islope).lt.inertie_thresold).and.(ispermanent_h2oglaciers(ig,islope).eq.0).and.(ispermanent_co2glaciers(ig,islope).eq.0)) then 218 220 deltam_reg_complete(ig,iloop,islope) = (dm_h2o_regolith_slope(ig,iloop,islope) - m_h2o_completesoil(ig,iloop,islope)) & … … 245 247 tsoil_PEM,TI_PEM,m_co2_completesoil,delta_mreg) 246 248 #ifndef CPP_STD 247 use comsoil_h_PEM, only: layer_PEM, mlayer_PEM, n_1km249 use comsoil_h_PEM, only: layer_PEM, mlayer_PEM,index_breccia,index_bedrock,index_breccia 248 250 USE comcstfi_h, only: pi 249 251 use comslope_mod, only : subslope_dist,def_slope_mean … … 271 273 REAL :: beta = -1541.5 ! Zent & Quinn 1995 272 274 REAL :: inertie_thresold = 800. ! TI > 800 means cementation 273 REAL :: rho_regolith = 1500. ! density of the reoglith, buhler & piqueux 2021275 REAL :: rho_regolith = 2000. ! density of the regolith, buhler & piqueux 2021 274 276 real :: m_co2 = 44.01E-3 ! Molecular weight of co2 (kg/mol) 275 277 real :: m_noco2 = 33.37E-3 ! Molecular weight of h2o (kg/mol) 276 278 real :: m_theta = 4.27e-7 ! Mass of co2 per m^2 absorbed 277 real :: as = 18.9e3 ! Specific area, Buhler & Piqueux 2021 278 279 ! real :: as = 18.9e3 ! Specific area, Buhler & Piqueux 2021 280 real :: as = 9.48e4 ! same as previous but from zent 281 real :: as_breccia = 1.7e4 ! Specific area of basalt, Zent 1997 279 282 ! Local 280 283 real :: A,B ! Used to compute the mean mass above the surface … … 284 287 INTEGER :: ispermanent_h2oglaciers(ngrid,nslope) ! Check if the h2o glacier is permanent 285 288 #ifndef CPP_STD 286 REAL :: deltam_reg_complete(ngrid, n_1km,nslope) ! Difference in the mass per slope and soil layer (kg/m^3)289 REAL :: deltam_reg_complete(ngrid,index_breccia,nslope) ! Difference in the mass per slope and soil layer (kg/m^3) 287 290 #endif 288 291 REAL :: deltam_reg_slope(ngrid,nslope) ! Difference in the mass per slope (kg/m^3) … … 362 365 do ig = 1,ngrid 363 366 do islope = 1,nslope 364 do iloop = 1, n_1km367 do iloop = 1,index_breccia 365 368 if((TI_PEM(ig,iloop,islope).lt.inertie_thresold).and.(ispermanent_h2oglaciers(ig,islope).eq.0).and.(ispermanent_co2glaciers(ig,islope).eq.0)) then 366 369 dm_co2_regolith_slope(ig,iloop,islope) = as*rho_regolith*m_theta*(1-theta_h2o_adsorbed(ig,iloop,islope))*alpha*pco2_avg(ig)/ & … … 374 377 endif 375 378 endif 376 enddo379 enddo 377 380 enddo 378 381 enddo … … 384 387 do islope = 1,nslope 385 388 deltam_reg_slope(ig,islope) = 0. 386 do iloop = 1, n_1km389 do iloop = 1,index_breccia 387 390 if((TI_PEM(ig,iloop,islope).lt.inertie_thresold).and.(ispermanent_h2oglaciers(ig,islope).eq.0).and.(ispermanent_co2glaciers(ig,islope).eq.0)) then 388 391 deltam_reg_complete(ig,iloop,islope) = (dm_co2_regolith_slope(ig,iloop,islope) - m_co2_completesoil(ig,iloop,islope)) & -
trunk/LMDZ.COMMON/libf/evolution/comsoil_h_PEM.F90
r2893 r2895 19 19 real,save :: mu_PEM ! mu coefficient [SI] 20 20 real,save :: fluxgeo ! Geothermal flux [W/m^2] 21 real,save :: depth_breccia ! Depth at which we have breccia [m] 22 real,save :: depth_bedrock ! Depth at which we have bedrock [m] 23 integer,save :: index_breccia ! last index of the depth grid before having breccia 24 integer,save :: index_bedrock ! last index of the depth grid before having bedrock 21 25 LOGICAL soil_pem ! True by default, to run with the subsurface physic. Read in pem.def 22 26 real,save,allocatable,dimension(:) :: water_reservoir ! Large reserve of water [kg/m^2] 23 27 real,save :: water_reservoir_nom 28 logical, save :: reg_thprop_dependp ! thermal properites of the regolith vary with the surface pressure 29 24 30 contains 25 31 … … 61 67 if (allocated(inertiedat_PEM)) deallocate(inertiedat_PEM) 62 68 if (allocated(water_reservoir)) deallocate(water_reservoir) 63 if (allocated(water_reservoir)) deallocate(water_reservoir)64 69 end subroutine end_comsoil_h_PEM 65 70 -
trunk/LMDZ.COMMON/libf/evolution/conf_pem.F90
r2894 r2895 15 15 16 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_lsp18 USE comsoil_h_pem, only: soil_pem,fluxgeo,water_reservoir_nom 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 19 USE adsorption_mod,only: adsorption_pem 20 20 CHARACTER(len=20),parameter :: modname ='conf_pem' … … 55 55 var_obl = .true. 56 56 CALL getin('var_obl',var_obl) 57 print*,'Does obliquity vary ?',var_obl 57 58 58 59 var_ex = .true. 59 60 CALL getin('var_ex',var_ex) 61 print*,'Does excentricity vary ?',var_ex 60 62 61 63 var_lsp = .true. 62 64 CALL getin('var_lsp',var_lsp) 65 print*,'Does Ls peri vary ?',var_lsp 66 67 depth_breccia = 10. 68 CALL getin('depth_breccia',depth_breccia) 69 print*,'Depth of breccia is set to',depth_breccia 70 71 depth_bedrock = 1000. 72 CALL getin('depth_bedrock',depth_bedrock) 73 print*,'Depth of bedrock is set to',depth_bedrock 74 75 reg_thprop_dependp = .false. 76 CALL getin('reg_thprop_dependp',reg_thprop_dependp) 77 print*, 'Thermal properties of the regolith vary with pressure ?', reg_thprop_dependp 78 63 79 64 80 if ((not(soil_pem)).and.adsorption_pem) then … … 69 85 if ((not(soil_pem)).and.fluxgeo.gt.0.) then 70 86 print*,'Soil is not activated but Flux Geo > 0.' 71 call abort_physic(modname,"Soil is not activated but Flux Geo > 0.'",1) 87 call abort_physic(modname,"Soil is not activated but Flux Geo > 0.",1) 88 endif 89 90 if ((not(soil_pem)).and.reg_thprop_dependp) then 91 print*,'Regolith properties vary with Ps only when soil is set to true' 92 call abort_physic(modname,'Regolith properties vary with Ps only when soil is set to true',1) 72 93 endif 73 94 74 95 if (evol_orbit_pem.and.year_bp_ini.eq.0.) then 75 76 77 78 endif 79 80 96 print*,'You want to follow the file ob_ex_lsp.asc for changing orb parameters,' 97 print*,'but you did not specify from which year to start.' 98 call abort_physic(modname,"evol_orbit_pem=.true. but year_bp_ini=0",1) 99 endif 100 101 water_reservoir_nom = 1e4 81 102 CALL getin('water_reservoir_nom',water_reservoir_nom) 103 82 104 END SUBROUTINE conf_pem 83 105 -
trunk/LMDZ.COMMON/libf/evolution/pem.F90
r2893 r2895 78 78 co2iceflow, beta_slope, capcal_slope,& 79 79 albedo_slope,emiss_slope,qsurf_slope,& 80 iflat,major_slope,ini_comslope_h 80 iflat,major_slope,ini_comslope_h,fluxgeo_slope 81 81 use time_phylmdz_mod, only: daysec,dtphys 82 82 USE comconst_mod, ONLY: rad,g,r,cpp,pi … … 89 89 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! SOIL 90 90 use comsoil_h_PEM, only: soil_pem,ini_comsoil_h_PEM,end_comsoil_h_PEM,nsoilmx_PEM, & 91 TI_PEM,inertiedat_PEM, & ! soil thermal inertia 92 tsoil_PEM, mlayer_PEM,layer_PEM, & !number of subsurface layers, soil mid layer depths 93 fluxgeo,water_reservoir ! geothermal flux 91 TI_PEM,inertiedat_PEM, & ! soil thermal inertia 92 tsoil_PEM, mlayer_PEM,layer_PEM, & ! Soil temp, number of subsurface layers, soil mid layer depths 93 fluxgeo, & ! geothermal flux for the PEM and GCM 94 water_reservoir ! Water ressources 94 95 use adsorption_mod, only : regolith_adsorption,adsorption_pem, & ! bool to check if adsorption, main subroutine 95 96 ini_adsorption_h_PEM, end_adsorption_h_PEM, & ! allocate arrays … … 159 160 160 161 ! Variable for h2o_ice evolution 161 REAL :: ini_surf_h2o ! Initial surface of sublimating water ice162 REAL :: ini_surf_h2o 162 163 REAL :: ini_surf_co2 ! Initial surface of sublimating co2 ice 163 164 … … 258 259 REAL :: beta_clap_h2o = 28.9074 ! coefficient to compute psat, from Murphie et Kood 2005 [1] 259 260 LOGICAL :: bool_sublim ! logical to check if there is sublimation or not 261 260 262 261 263 !! Some parameters for the PEM run … … 265 267 REAL :: timestep ! timestep [s] 266 268 REAL :: watercap_sum ! total mass of water cap [kg/m^2] 267 268 REAL WC_sum269 269 270 270 #ifdef CPP_STD … … 482 482 allocate(flag_co2flow_mesh(ngrid)) 483 483 484 flag_co2flow(:,:) = 0.485 flag_co2flow_mesh(:) = 0.484 flag_co2flow(:,:) = 0. 485 flag_co2flow_mesh(:) = 0. 486 486 487 487 … … 499 499 500 500 call nb_time_step_GCM("data_GCM_Y1.nc",timelen) 501 501 502 502 503 allocate(vmr_co2_gcm(iim+1,jjm+1,timelen)) … … 530 531 allocate(watersoil_density_phys_PEM_timeseries(ngrid,nsoilmx_PEM,nslope,timelen)) 531 532 allocate(watersoil_density_phys_PEM_ave(ngrid,nsoilmx_PEM,nslope)) 533 532 534 print *, "Downloading data Y1..." 533 535 534 call read_data_GCM("data_GCM_Y1.nc",timelen, iim,jjm,vmr_co2_gcm,ps_GCM_yr1,min_co2_ice_slope_1,min_h2o_ice_slope_1,& 536 call read_data_GCM("data_GCM_Y1.nc",timelen, iim,jjm,vmr_co2_gcm,ps_GCM_yr1,min_co2_ice_slope_1,min_h2o_ice_slope_1,& 535 537 nslope,tsurf_ave_yr1,tsoil_ave_yr1, tsurf_GCM_timeseries,tsoil_GCM_timeseries,TI_GCM,q_co2_GCM,q_h2o_GCM,co2_ice_GCM_slope, & 536 538 watersurf_density_timeseries,watersoil_density_timeseries) … … 661 663 662 664 !----- Compute tendencies from the PCM run 665 663 666 allocate(tendencies_co2_ice_slope(iim+1,jjm+1,nslope)) 664 667 allocate(tendencies_co2_ice_phys_slope(ngrid,nslope)) … … 765 768 do ig = 1,ngrid 766 769 do islope = 1,nslope 767 qsurf_slope(ig,igcm_h2o_ice,islope)=qsurf_slope(ig,igcm_h2o_ice,islope)+watercap_slope(ig,islope)+water_reservoir(ig)*cos(pi*def_slope_mean(islope)/180.)770 ! qsurf_slope(ig,igcm_h2o_ice,islope)=qsurf_slope(ig,igcm_h2o_ice,islope)+watercap_slope(ig,islope)+water_reservoir(ig)*cos(pi*def_slope_mean(islope)/180.) 768 771 enddo 769 772 enddo … … 787 790 write(*,*) "Tot mass of CO2 in the regolith=", totmassco2_adsorbded 788 791 write(*,*) "Tot mass of H2O in the regolith=", totmassh2o_adsorbded 792 endif ! adsorption 789 793 deallocate(tsoil_ave_phys_yr1) 790 endif !soil_pem791 794 deallocate(tsurf_ave_phys_yr1) 792 795 deallocate(ps_phys_timeseries_yr1) … … 837 840 enddo 838 841 print *, 'Global average pressure old time step',global_ave_press_old 839 print *, 'Global average pressure new time step',global_ave_press_new 842 843 call WRITEDIAGFI(ngrid,'ps_ave','Global average pressure','Pa',0,global_ave_press_new) 840 844 841 845 if(adsorption_pem) then 842 846 do i=1,ngrid 843 847 global_ave_press_new = global_ave_press_new -g*cell_area(i)*delta_co2_adsorbded(i)/Total_surface 844 enddo845 print *, 'Global average pressure old time step',global_ave_press_old846 print *, 'Global average pressure new time step',global_ave_press_new848 enddo 849 print *, 'Global average pressure old time step',global_ave_press_old 850 print *, 'Global average pressure new time step',global_ave_press_new 847 851 endif 848 849 call WRITEDIAGFI(ngrid,'ps_ave','Global average pressure','Pa',0,global_ave_press_new)850 852 851 853 ! II.a.2. Old pressure levels for the timeseries, this value is deleted when unused and recreated each time (big memory consuption) … … 916 918 call evol_h2o_ice_s_slope(qsurf_slope(:,igcm_h2o_ice,:),tendencies_h2o_ice_phys_slope,iim,jjm,ngrid,cell_area,STOPPING_1_water,nslope) 917 919 918 DO islope=1, nslope919 write(str2(1:2),'(i2.2)') islope920 call WRITEDIAGFI(ngrid,'h2o_ice_s_slope'//str2,'H2O ice','kg.m-2',2,qsurf_slope(:,igcm_h2o_ice,islope))921 call WRITEDIAGFI(ngrid,'tendencies_h2o_ice_slope'//str2,'H2O ice tend','kg.m-2.year-1',2,tendencies_h2o_ice_phys_slope(:,islope))922 ENDDO923 920 924 921 print *, "Evolution of co2 ice" 925 922 call evol_co2_ice_s_slope(co2ice_slope,tendencies_co2_ice_phys_slope,iim,jjm,ngrid,cell_area,STOPPING_1_co2,nslope) 923 924 DO islope=1, nslope 925 write(str2(1:2),'(i2.2)') islope 926 call WRITEDIAGFI(ngrid,'h2o_ice_s_slope'//str2,'H2O ice','kg.m-2',2,qsurf_slope(:,igcm_h2o_ice,islope)) 927 call WRITEDIAGFI(ngrid,'tendencies_h2o_ice_slope'//str2,'H2O ice tend','kg.m-2.year-1',2,tendencies_h2o_ice_phys_slope(:,islope)) 928 ENDDO 926 929 927 930 !------------------------ … … 939 942 global_ave_press_GCM,global_ave_press_new,co2ice_slope,flag_co2flow,flag_co2flow_mesh) 940 943 941 DO islope=1, nslope942 write(str2(1:2),'(i2.2)') islope943 call WRITEDIAGFI(ngrid,'co2ice_slope'//str2,'CO2 ice','kg.m-2',2,co2ice_slope(:,islope))944 call WRITEDIAGFI(ngrid,'tendencies_co2_ice_slope'//str2,'CO2 ice tend','kg.m-2.year-1',2,tendencies_co2_ice_phys_slope(:,islope))945 ENDDO944 DO islope=1, nslope 945 write(str2(1:2),'(i2.2)') islope 946 call WRITEDIAGFI(ngrid,'co2ice_slope'//str2,'CO2 ice','kg.m-2',2,co2ice_slope(:,islope)) 947 call WRITEDIAGFI(ngrid,'tendencies_co2_ice_slope'//str2,'CO2 ice tend','kg.m-2.year-1',2,tendencies_co2_ice_phys_slope(:,islope)) 948 ENDDO 946 949 947 950 !------------------------ … … 1071 1074 print *, "Update soil propreties" 1072 1075 ! II_d.4 Update the soil thermal properties 1073 call update_soil(ngrid,nslope,nsoilmx ,nsoilmx_PEM,tendencies_h2o_ice_phys_slope,qsurf_slope(:,igcm_h2o_ice,:),global_ave_press_new, &1076 call update_soil(ngrid,nslope,nsoilmx_PEM,tendencies_h2o_ice_phys_slope,qsurf_slope(:,igcm_h2o_ice,:),global_ave_press_new, & 1074 1077 ice_depth,TI_PEM) 1075 1078 … … 1114 1117 initial_co2_ice_sublim_slope,global_ave_press_GCM,global_ave_press_new,nslope) 1115 1118 1116 year_iter=year_iter+dt_pem 1119 year_iter=year_iter+dt_pem 1117 1120 1118 1121 print *, "Checking all the stopping criterion." 1119 1122 if (STOPPING_water) then 1120 1123 print *, "STOPPING because surface of water ice sublimating is too low, see message above", STOPPING_water 1121 criterion_stop=11122 1124 criterion_stop=1 1123 1125 endif … … 1150 1152 endif 1151 1153 1154 1155 1152 1156 global_ave_press_old=global_ave_press_new 1153 1157 … … 1181 1185 1182 1186 ! H2O ice 1187 1183 1188 DO ig=1,ngrid 1184 1189 if(watercaptag(ig)) then … … 1193 1198 endif 1194 1199 watercap_sum=watercap_sum+(watercap_slope(ig,islope)-watercap_slope_saved)*subslope_dist(ig,islope)/cos(pi*def_slope_mean(islope)/180.) 1195 !watercap_slope(ig,islope)=0.1200 watercap_slope(ig,islope)=0. 1196 1201 enddo 1197 1202 water_reservoir(ig)=water_reservoir(ig)+watercap_sum … … 1240 1245 1241 1246 if(soil_pem) then 1247 fluxgeo_slope(:,:) = fluxgeo 1242 1248 call interpolate_TIPEM_TIGCM(ngrid,nslope,nsoilmx_PEM,nsoilmx,TI_PEM,TI_GCM_phys) 1243 1249 tsoil_slope(:,:,:) = tsoil_phys_PEM_timeseries(:,:,:,timelen) … … 1279 1285 ENDDO 1280 1286 ENDDO 1287 1281 1288 1282 1289 DO ig = 1,ngrid … … 1346 1353 enddo 1347 1354 enddo 1348 1349 DO ig=1,ngrid1350 if(watercaptag(ig)) then1351 WC_sum=0.1352 DO islope=1,nslope1353 if(qsurf_slope(ig,igcm_h2o_ice,islope).GT. (watercap_slope(ig,islope)+water_reservoir(ig))) then1354 qsurf_slope(ig,igcm_h2o_ice,islope)=qsurf_slope(ig,igcm_h2o_ice,islope)-(watercap_slope(ig,islope)+water_reservoir(ig))1355 else1356 watercap_slope(ig,islope)=watercap_slope(ig,islope)+qsurf_slope(ig,igcm_h2o_ice,islope)-(watercap_slope(ig,islope)+water_reservoir(ig)/nslope)1357 qsurf_slope(ig,igcm_h2o_ice,islope)=0.1358 endif1359 WC_sum=WC_sum+watercap_slope(ig,islope)*subslope_dist(ig,islope)/cos(pi*def_slope_mean(islope)/180.)1360 watercap_slope(ig,islope)=0.1361 enddo1362 water_reservoir(ig)=water_reservoir(ig)+WC_sum1363 endif1364 enddo1365 1366 ! H2o ice1367 DO ig = 1,ngrid1368 qsurf(ig,igcm_h2o_ice) = 0.1369 DO islope = 1,nslope1370 qsurf(ig,igcm_h2o_ice) = qsurf(ig,igcm_h2o_ice) + qsurf_slope(ig,igcm_h2o_ice,islope) &1371 * subslope_dist(ig,islope) / &1372 cos(pi*def_slope_mean(islope)/180.)1373 ENDDO1374 ENDDO ! of DO ig=1,ngrid1375 1376 DO ig=1,ngrid1377 ! DO islope=1,nslope1378 if(qsurf(ig,igcm_h2o_ice).GT.500) then1379 watercaptag(ig)=.true.1380 DO islope=1,nslope1381 qsurf_slope(ig,igcm_h2o_ice,islope)=qsurf_slope(ig,igcm_h2o_ice,islope)-2501382 water_reservoir(ig)=water_reservoir(ig)+2501383 ENDDO1384 endif1385 ! enddo1386 enddo1387 1388 DO ig=1,ngrid1389 ! DO islope=1,nslope1390 if(water_reservoir(ig).LT. 10) then1391 watercaptag(ig)=.false.1392 qsurf(ig,igcm_h2o_ice)=qsurf(ig,igcm_h2o_ice)+water_reservoir(ig)1393 DO islope=1,nslope1394 qsurf_slope(ig,igcm_h2o_ice,islope)=qsurf_slope(ig,igcm_h2o_ice,islope)+water_reservoir(ig)1395 ENDDO1396 endif1397 ! enddo1398 enddo1399 1400 DO ig = 1,ngrid1401 watercap(ig) = 0.1402 DO islope = 1,nslope1403 watercap(ig) = watercap(ig) + watercap_slope(ig,islope) &1404 * subslope_dist(ig,islope) / &1405 cos(pi*def_slope_mean(islope)/180.)1406 ENDDO1407 ENDDO ! of DO ig=1,ngrid1408 1409 1355 1410 1356 !------------------------ -
trunk/LMDZ.COMMON/libf/evolution/pemetat0.F90
r2893 r2895 5 5 6 6 use iostart_PEM, only: open_startphy, close_startphy, get_field, get_var 7 use comsoil_h_PEM, only: soil_pem,layer_PEM, mlayer_PEM,n_1km,fluxgeo,inertiedat_PEM,water_reservoir_nom 7 use comsoil_h_PEM, only: soil_pem,layer_PEM, mlayer_PEM,n_1km,fluxgeo,inertiedat_PEM,water_reservoir_nom,depth_breccia,depth_bedrock,index_breccia,index_bedrock 8 8 use comsoil_h, only: volcapa,inertiedat 9 9 use adsorption_mod, only : regolith_adsorption,adsorption_pem … … 91 91 write(*,*)'Is start PEM?',startpem_file 92 92 93 startpem_file = .true. 93 94 94 !1. Run 95 95 … … 119 119 120 120 do ig = 1,ngrid 121 if(TI_PEM(ig, nsoil_GCM,islope).lt.TI_breccia) then121 if(TI_PEM(ig,index_breccia,islope).lt.TI_breccia) then 122 122 !!! transition 123 delta = 50.124 TI_PEM(ig, nsoil_GCM+1,islope) = sqrt((layer_PEM(nsoil_GCM+1)-layer_PEM(nsoil_GCM))/ &125 (((delta-layer_PEM( nsoil_GCM))/(TI_PEM(ig,nsoil_GCM,islope)**2))+ &126 ((layer_PEM( nsoil_GCM+1)-delta)/(TI_breccia**2))))127 do iloop= nsoil_GCM+2,n_1km123 delta = depth_breccia 124 TI_PEM(ig,index_breccia+1,islope) = sqrt((layer_PEM(index_breccia+1)-layer_PEM(index_breccia))/ & 125 (((delta-layer_PEM(index_breccia))/(TI_PEM(ig,index_breccia,islope)**2))+ & 126 ((layer_PEM(index_breccia+1)-delta)/(TI_breccia**2)))) 127 do iloop=index_breccia+2,index_bedrock 128 128 TI_PEM(ig,iloop,islope) = TI_breccia 129 129 enddo 130 130 else ! we keep the high ti values 131 do iloop= nsoil_GCM+1,n_1km132 TI_PEM(ig,iloop,islope) = TI_PEM(ig, nsoil_GCM,islope)131 do iloop=index_breccia+1,index_bedrock 132 TI_PEM(ig,iloop,islope) = TI_PEM(ig,index_breccia,islope) 133 133 enddo 134 134 endif ! TI PEM and breccia comparison 135 135 !! transition 136 delta = 1000.137 TI_PEM(ig, n_1km+1,islope) = sqrt((layer_PEM(n_1km+1)-layer_PEM(n_1km))/ &138 (((delta-layer_PEM( n_1km))/(TI_PEM(ig,n_1km,islope)**2))+ &139 ((layer_PEM( n_1km+1)-delta)/(TI_bedrock**2))))140 do iloop= n_1km+2,nsoil_PEM136 delta = depth_bedrock 137 TI_PEM(ig,index_bedrock+1,islope) = sqrt((layer_PEM(index_bedrock+1)-layer_PEM(index_bedrock))/ & 138 (((delta-layer_PEM(index_bedrock))/(TI_PEM(ig,index_bedrock,islope)**2))+ & 139 ((layer_PEM(index_bedrock+1)-delta)/(TI_bedrock**2)))) 140 do iloop=index_bedrock+2,nsoil_PEM 141 141 TI_PEM(ig,iloop,islope) = TI_bedrock 142 142 enddo 143 143 enddo 144 else 144 else ! found 145 145 do iloop = nsoil_GCM+1,nsoil_PEM 146 146 TI_PEM(:,iloop,islope) = TI_startPEM(:,iloop,islope) ! ! 1st layers can change because of the presence of ice at the surface, so we don't change it here. … … 158 158 enddo 159 159 !!! zone de transition 160 delta = 50.160 delta = depth_breccia 161 161 do ig = 1,ngrid 162 if(inertiedat_PEM(ig, nsoil_GCM).lt.TI_breccia) then163 inertiedat_PEM(ig, nsoil_GCM+1) = sqrt((layer_PEM(nsoil_GCM+1)-layer_PEM(nsoil_GCM))/ &164 (((delta-layer_PEM( nsoil_GCM))/(inertiedat(ig,nsoil_GCM)**2))+ &165 ((layer_PEM( nsoil_GCM+1)-delta)/(TI_breccia**2))))166 167 do iloop = nsoil_GCM+2,n_1km162 if(inertiedat_PEM(ig,index_breccia).lt.TI_breccia) then 163 inertiedat_PEM(ig,index_breccia+1) = sqrt((layer_PEM(index_breccia+1)-layer_PEM(index_breccia))/ & 164 (((delta-layer_PEM(index_breccia))/(inertiedat(ig,index_breccia)**2))+ & 165 ((layer_PEM(index_breccia+1)-delta)/(TI_breccia**2)))) 166 167 do iloop = index_breccia+2,index_bedrock 168 168 inertiedat_PEM(ig,iloop) = TI_breccia 169 169 enddo 170 170 171 171 else 172 do iloop= nsoil_GCM+1,n_1km172 do iloop=index_breccia+1,index_bedrock 173 173 inertiedat_PEM(ig,iloop) = inertiedat_PEM(ig,nsoil_GCM) 174 174 enddo … … 177 177 178 178 !!! zone de transition 179 delta = 1000.179 delta = depth_bedrock 180 180 do ig = 1,ngrid 181 inertiedat_PEM(ig, n_1km+1) = sqrt((layer_PEM(n_1km+1)-layer_PEM(n_1km))/ &182 (((delta-layer_PEM( n_1km))/(inertiedat_PEM(ig,n_1km)**2))+ &183 ((layer_PEM( n_1km+1)-delta)/(TI_bedrock**2))))181 inertiedat_PEM(ig,index_bedrock+1) = sqrt((layer_PEM(index_bedrock+1)-layer_PEM(index_bedrock))/ & 182 (((delta-layer_PEM(index_bedrock))/(inertiedat_PEM(ig,index_bedrock)**2))+ & 183 ((layer_PEM(index_bedrock+1)-delta)/(TI_bedrock**2)))) 184 184 enddo 185 185 186 do iloop = n_1km+2, nsoil_PEM186 do iloop = index_bedrock+2, nsoil_PEM 187 187 do ig = 1,ngrid 188 188 inertiedat_PEM(ig,iloop) = TI_bedrock … … 201 201 write(*,*)'PEM settings: failed loading <tsoil_PEM_slope'//num//'>' 202 202 write(*,*)'will reconstruct the values of Tsoil' 203 do ig = 1,ngrid 204 kcond = (TI_PEM(ig,nsoil_GCM+1,islope)*TI_PEM(ig,nsoil_GCM+1,islope))/volcapa 205 tsoil_PEM(ig,nsoil_GCM+1,islope) = tsoil_PEM(ig,nsoil_GCM,islope) + fluxgeo/kcond*(mlayer_PEM(nsoil_GCM)-mlayer_PEM(nsoil_GCM-1)) 206 207 do iloop=nsoil_GCM+2,n_1km 208 kcond = (TI_PEM(ig,iloop,islope)*TI_PEM(ig,iloop,islope))/volcapa 209 tsoil_PEM(ig,iloop,islope) = tsoil_PEM(ig,nsoil_GCM+1,islope) + fluxgeo/kcond*(mlayer_PEM(iloop-1)-mlayer_PEM(nsoil_GCM)) 210 enddo 211 kcond = (TI_PEM(ig,n_1km+1,islope)*TI_PEM(ig,n_1km+1,islope))/volcapa 212 tsoil_PEM(ig,n_1km+1,islope) = tsoil_PEM(ig,n_1km,islope) + fluxgeo/kcond*(mlayer_PEM(n_1km)-mlayer_PEM(n_1km-1)) 213 214 do iloop=n_1km+2,nsoil_PEM 215 kcond = (TI_PEM(ig,iloop,islope)*TI_PEM(ig,iloop,islope))/volcapa 216 tsoil_PEM(ig,iloop,islope) = tsoil_PEM(ig,n_1km+1,islope) + fluxgeo/kcond*(mlayer_PEM(iloop-1)-mlayer_PEM(n_1km)) 217 enddo 218 do iloop = nsoil_GCM+1,nsoil_PEM 219 tsoil_PEM(ig,iloop,islope) = tsoil_PEM(ig,nsoil_GCM,islope) 220 enddo 221 enddo 222 ! call soil_pem_routine(ngrid,nsoil_PEM,.true.,TI_PEM(:,:,islope),timestep,tsurf_ave_yr2(:,islope),tsoil_PEM(:,:,islope)) 223 ! do iloop = 1,2000000 224 ! write(*,*) 'iloop,islope',islope,iloop 225 ! call soil_pem_routine(ngrid,nsoil_PEM,.false.,TI_PEM(:,:,islope),timestep,tsurf_ave_yr2(:,islope),tsoil_PEM(:,:,islope)) 226 ! enddo 203 ! do ig = 1,ngrid 204 ! kcond = (TI_PEM(ig,index_breccia+1,islope)*TI_PEM(ig,index_breccia+1,islope))/volcapa 205 ! tsoil_PEM(ig,index_breccia+1,islope) = tsoil_PEM(ig,index_breccia,islope) + fluxgeo/kcond*(mlayer_PEM(index_breccia)-mlayer_PEM(index_breccia-1)) 206 ! do iloop=index_breccia+2,index_bedrock 207 ! kcond = (TI_PEM(ig,iloop,islope)*TI_PEM(ig,iloop,islope))/volcapa 208 ! tsoil_PEM(ig,iloop,islope) = tsoil_PEM(ig,index_breccia+1,islope) + fluxgeo/kcond*(mlayer_PEM(iloop-1)-mlayer_PEM(index_breccia)) 209 ! enddo 210 ! kcond = (TI_PEM(ig,index_bedrock+1,islope)*TI_PEM(ig,index_bedrock+1,islope))/volcapa 211 ! tsoil_PEM(ig,index_bedrock+1,islope) = tsoil_PEM(ig,index_bedrock,islope) + fluxgeo/kcond*(mlayer_PEM(index_bedrock)-mlayer_PEM(index_bedrock-1)) 212 ! 213 ! do iloop=index_bedrock+2,nsoil_PEM 214 ! kcond = (TI_PEM(ig,iloop,islope)*TI_PEM(ig,iloop,islope))/volcapa 215 ! tsoil_PEM(ig,iloop,islope) = tsoil_PEM(ig,index_bedrock+1,islope) + fluxgeo/kcond*(mlayer_PEM(iloop-1)-mlayer_PEM(index_bedrock)) 216 ! enddo 217 ! enddo 218 219 220 call soil_pem_ini(ngrid,nsoil_PEM,TI_PEM(:,:,islope),tsurf_ave_yr2(:,islope),tsoil_PEM(:,:,islope)) 221 call soil_pem_routine(ngrid,nsoil_PEM,.true.,TI_PEM(:,:,islope),timestep,tsurf_ave_yr2(:,islope),tsoil_PEM(:,:,islope)) 222 227 223 228 224 else … … 240 236 tsoil_PEM(:,iloop,islope) = tsoil_tmp_yr2(:,iloop,islope) 241 237 enddo 242 endif 238 endif !found 243 239 244 240 do it = 1,timelen … … 263 259 264 260 265 261 call get_field("ice_table",ice_table,found) 262 if(.not.found) then 263 write(*,*)'PEM settings: failed loading <ice_table>' 264 write(*,*)'will reconstruct the values of the ice table given the current state' 266 265 call computeice_table_equilibrium(ngrid,nslope,nsoil_PEM,watercaptag,watersurf_ave,watersoil_ave, ice_table) 267 call update_soil(ngrid,nslope,nsoil_GCM,nsoil_PEM,tend_h2oglaciers,waterice,global_ave_pressure,ice_table,TI_PEM) 268 266 call update_soil(ngrid,nslope,nsoil_PEM,tend_h2oglaciers,waterice,global_ave_pressure,ice_table,TI_PEM) 267 do islope = 1,nslope 268 call soil_pem_ini(ngrid,nsoil_PEM,TI_PEM(:,:,islope),tsurf_ave_yr2(:,islope),tsoil_PEM(:,:,islope)) 269 enddo 270 endif 269 271 270 272 print *,'PEMETAT0: ICE TABLE DONE' … … 338 340 do ig = 1,ngrid 339 341 340 if(TI_PEM(ig, nsoil_GCM,islope).lt.TI_breccia) then342 if(TI_PEM(ig,index_breccia,islope).lt.TI_breccia) then 341 343 !!! transition 342 delta = 50.343 TI_PEM(ig, nsoil_GCM+1,islope) =sqrt((layer_PEM(nsoil_GCM+1)-layer_PEM(nsoil_GCM))/ &344 (((delta-layer_PEM( nsoil_GCM))/(TI_PEM(ig,nsoil_GCM,islope)**2))+ &345 ((layer_PEM( nsoil_GCM+1)-delta)/(TI_breccia**2))))346 347 do iloop= nsoil_GCM+2,n_1km344 delta = depth_breccia 345 TI_PEM(ig,index_breccia+1,islope) =sqrt((layer_PEM(index_breccia+1)-layer_PEM(index_breccia))/ & 346 (((delta-layer_PEM(index_breccia))/(TI_PEM(ig,index_breccia,islope)**2))+ & 347 ((layer_PEM(index_breccia+1)-delta)/(TI_breccia**2)))) 348 349 do iloop=index_breccia+2,index_bedrock 348 350 TI_PEM(ig,iloop,islope) = TI_breccia 349 351 enddo 350 352 else ! we keep the high ti values 351 do iloop= nsoil_GCM+1,n_1km352 TI_PEM(ig,iloop,islope) = TI_PEM(ig, nsoil_GCM,islope)353 do iloop=index_breccia+1,index_bedrock 354 TI_PEM(ig,iloop,islope) = TI_PEM(ig,index_breccia,islope) 353 355 enddo 354 356 endif 355 357 356 358 !! transition 357 delta = 1000.358 TI_PEM(ig, n_1km+1,islope) = sqrt((layer_PEM(n_1km+1)-layer_PEM(n_1km))/ &359 (((delta-layer_PEM( n_1km))/(TI_PEM(ig,n_1km,islope)**2))+ &360 ((layer_PEM( n_1km+1)-delta)/(TI_breccia**2))))361 do iloop= n_1km+2,nsoil_PEM359 delta = depth_bedrock 360 TI_PEM(ig,index_bedrock+1,islope) = sqrt((layer_PEM(index_bedrock+1)-layer_PEM(index_bedrock))/ & 361 (((delta-layer_PEM(index_bedrock))/(TI_PEM(ig,index_bedrock,islope)**2))+ & 362 ((layer_PEM(index_bedrock+1)-delta)/(TI_breccia**2)))) 363 do iloop=index_bedrock+2,nsoil_PEM 362 364 TI_PEM(ig,iloop,islope) = TI_bedrock 363 365 enddo … … 369 371 enddo 370 372 !!! zone de transition 371 delta = 50.373 delta = depth_breccia 372 374 do ig = 1,ngrid 373 if(inertiedat_PEM(ig, nsoil_GCM).lt.TI_breccia) then374 inertiedat_PEM(ig, nsoil_GCM+1) = sqrt((layer_PEM(nsoil_GCM+1)-layer_PEM(nsoil_GCM))/ &375 (((delta-layer_PEM( nsoil_GCM))/(inertiedat(ig,nsoil_GCM)**2))+ &376 ((layer_PEM( nsoil_GCM+1)-delta)/(TI_breccia**2))))377 378 379 do iloop = nsoil_GCM+2,n_1km375 if(inertiedat_PEM(ig,index_breccia).lt.TI_breccia) then 376 inertiedat_PEM(ig,index_breccia+1) = sqrt((layer_PEM(index_breccia+1)-layer_PEM(index_breccia))/ & 377 (((delta-layer_PEM(index_breccia))/(inertiedat(ig,index_breccia)**2))+ & 378 ((layer_PEM(index_breccia+1)-delta)/(TI_breccia**2)))) 379 380 381 do iloop = index_breccia+2,index_bedrock 380 382 381 383 inertiedat_PEM(ig,iloop) = TI_breccia … … 383 385 enddo 384 386 else 385 do iloop = nsoil_GCM+1,n_1km386 inertiedat_PEM(ig,iloop) = inertiedat_PEM(ig, nsoil_GCM)387 do iloop = index_breccia+1,index_bedrock 388 inertiedat_PEM(ig,iloop) = inertiedat_PEM(ig,index_breccia) 387 389 enddo 388 390 … … 392 394 393 395 !!! zone de transition 394 delta = 1000.396 delta = depth_bedrock 395 397 do ig = 1,ngrid 396 inertiedat_PEM(ig, n_1km+1) = sqrt((layer_PEM(n_1km+1)-layer_PEM(n_1km))/ &397 (((delta-layer_PEM( n_1km))/(inertiedat_PEM(ig,n_1km)**2))+ &398 ((layer_PEM( n_1km+1)-delta)/(TI_bedrock**2))))398 inertiedat_PEM(ig,index_bedrock+1) = sqrt((layer_PEM(index_bedrock+1)-layer_PEM(index_bedrock))/ & 399 (((delta-layer_PEM(index_bedrock))/(inertiedat_PEM(ig,index_bedrock)**2))+ & 400 ((layer_PEM(index_bedrock+1)-delta)/(TI_bedrock**2)))) 399 401 enddo 400 402 401 403 402 404 403 do iloop = n_1km+2, nsoil_PEM405 do iloop = index_bedrock+2, nsoil_PEM 404 406 do ig = 1,ngrid 405 407 inertiedat_PEM(ig,iloop) = TI_bedrock … … 414 416 !b) Soil temperature 415 417 do islope = 1,nslope 416 do ig = 1,ngrid417 kcond = (TI_PEM(ig,nsoil_GCM+1,islope)*TI_PEM(ig,nsoil_GCM+1,islope))/volcapa418 tsoil_PEM(ig,nsoil_GCM+1,islope) = tsoil_PEM(ig,nsoil_GCM,islope) + fluxgeo/kcond*(mlayer_PEM(nsoil_GCM)-mlayer_PEM(nsoil_GCM-1))419 420 do iloop=nsoil_GCM+2,n_1km 421 kcond = (TI_PEM(ig,iloop,islope)*TI_PEM(ig,iloop,islope))/volcapa422 tsoil_PEM(ig,iloop,islope) = tsoil_PEM(ig,nsoil_GCM+1,islope) + fluxgeo/kcond*(mlayer_PEM(iloop-1)-mlayer_PEM(nsoil_GCM))423 enddo424 kcond = (TI_PEM(ig,n_1km+1,islope)*TI_PEM(ig,n_1km+1,islope))/volcapa425 tsoil_PEM(ig,n_1km+1,islope) = tsoil_PEM(ig,n_1km,islope) + fluxgeo/kcond*(mlayer_PEM(n_1km)-mlayer_PEM(n_1km-1))426 427 do iloop=n_1km+2,nsoil_PEM428 kcond = (TI_PEM(ig,iloop,islope)*TI_PEM(ig,iloop,islope))/volcapa429 tsoil_PEM(ig,iloop,islope) = tsoil_PEM(ig,n_1km+1,islope) + fluxgeo/kcond*(mlayer_PEM(iloop-1)-mlayer_PEM(n_1km))430 enddo418 ! do ig = 1,ngrid 419 ! kcond = (TI_PEM(ig,index_breccia+1,islope)*TI_PEM(ig,index_breccia+1,islope))/volcapa 420 ! tsoil_PEM(ig,index_breccia+1,islope) = tsoil_PEM(ig,index_breccia,islope) + fluxgeo/kcond*(mlayer_PEM(index_breccia)-mlayer_PEM(index_breccia-1)) 421 ! 422 ! do iloop=index_breccia+2,index_bedrock 423 ! kcond = (TI_PEM(ig,iloop,islope)*TI_PEM(ig,iloop,islope))/volcapa 424 ! tsoil_PEM(ig,iloop,islope) = tsoil_PEM(ig,index_breccia+1,islope) + fluxgeo/kcond*(mlayer_PEM(iloop-1)-mlayer_PEM(index_breccia)) 425 ! enddo 426 ! kcond = (TI_PEM(ig,index_bedrock+1,islope)*TI_PEM(ig,index_bedrock+1,islope))/volcapa 427 ! tsoil_PEM(ig,index_bedrock+1,islope) = tsoil_PEM(ig,index_bedrock,islope) + fluxgeo/kcond*(mlayer_PEM(index_bedrock)-mlayer_PEM(index_bedrock-1)) 428 429 ! do iloop=index_bedrock+2,nsoil_PEM 430 ! kcond = (TI_PEM(ig,iloop,islope)*TI_PEM(ig,iloop,islope))/volcapa 431 ! tsoil_PEM(ig,iloop,islope) = tsoil_PEM(ig,index_bedrock+1,islope) + fluxgeo/kcond*(mlayer_PEM(iloop-1)-mlayer_PEM(index_bedrock)) 432 ! enddo 431 433 432 do iloop = nsoil_GCM+1,nsoil_PEM 433 tsoil_PEM(ig,iloop,islope) = tsoil_PEM(ig,nsoil_GCM,islope) 434 enddo 435 enddo 436 ! call soil_pem_routine(ngrid,nsoil_PEM,.true.,TI_PEM(:,:,islope),timestep,tsurf_ave_yr2(:,islope),tsoil_PEM(:,:,islope)) 437 ! do iloop = 1,2000000 438 ! write(*,*) 'islope,iloop',islope,iloop 439 ! call soil_pem_routine(ngrid,nsoil_PEM,.false.,TI_PEM(:,:,islope),timestep,tsurf_ave_yr2(:,islope),tsoil_PEM(:,:,islope)) 440 ! enddo 441 434 ! enddo 435 436 call soil_pem_ini(ngrid,nsoil_PEM,TI_PEM(:,:,islope),tsurf_ave_yr2(:,islope),tsoil_PEM(:,:,islope)) 437 call soil_pem_routine(ngrid,nsoil_PEM,.true.,TI_PEM(:,:,islope),timestep,tsurf_ave_yr2(:,islope),tsoil_PEM(:,:,islope)) 438 442 439 443 440 do it = 1,timelen … … 446 443 enddo 447 444 enddo 445 448 446 do isoil = nsoil_GCM+1,nsoil_PEM 449 447 do ig = 1,ngrid … … 451 449 enddo 452 450 enddo 453 enddo 451 enddo !islope 454 452 print *,'PEMETAT0: TSOIL DONE ' 455 453 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 456 454 !c) Ice table 457 455 call computeice_table_equilibrium(ngrid,nslope,nsoil_PEM,watercaptag,watersurf_ave,watersoil_ave, ice_table) 458 call update_soil(ngrid,nslope,nsoil_GCM,nsoil_PEM,tend_h2oglaciers,waterice,global_ave_pressure,ice_table,TI_PEM) 456 call update_soil(ngrid,nslope,nsoil_PEM,tend_h2oglaciers,waterice,global_ave_pressure,ice_table,TI_PEM) 457 do islope = 1,nslope 458 call soil_pem_ini(ngrid,nsoil_PEM,TI_PEM(:,:,islope),tsurf_ave_yr2(:,islope),tsoil_PEM(:,:,islope)) 459 enddo 460 459 461 460 462 … … 483 485 endif !soil_pem 484 486 487 488 489 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 490 491 492 485 493 !. e) water reservoir 486 494 … … 489 497 do ig=1,ngrid 490 498 if(watercaptag(ig)) then 491 water_reservoir =water_reservoir_nom499 water_reservoir(ig)=water_reservoir_nom 492 500 else 493 water_reservoir =0.501 water_reservoir(ig)=0. 494 502 endif 495 503 enddo … … 498 506 499 507 endif ! of if (startphy_file) 500 501 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!502 508 503 509 if(soil_pem) then -
trunk/LMDZ.COMMON/libf/evolution/pemredem.F90
r2888 r2895 119 119 call put_field('water_reservoir','water_reservoir', & 120 120 water_reservoir,year_tot) 121 call put_field("water_reservoir","water_reservoir", &122 water_reservoir,year_tot)123 124 121 if(soil_pem) then 125 122 -
trunk/LMDZ.COMMON/libf/evolution/read_data_GCM.F90
r2893 r2895 77 77 78 78 allocate(h2o_ice_s_slope(iim+1,jjm+1,nslope,timelen)) 79 allocate(watercap_slope(iim_input+1,jjm_input+1,nslope,timelen))80 79 81 80 print *, "Opening ", fichnom, "..." … … 123 122 DO islope=1,nslope 124 123 write(num,fmt='(i2.2)') islope 125 call get_var3("watercap_slope"//num,watercap_slope(:,:,islope,:)) 124 ! call get_var3("watercap_slope"//num,watercap_slope(:,:,islope,:)) 125 watercap_slope(:,:,:,:)= 0. 126 126 ENDDO 127 127 print *, "Downloading data for watercap_slope done" … … 187 187 ! Compute the minimum over the year for each point 188 188 print *, "Computing the min of h2o_ice_slope" 189 min_h2o_ice_slope(:,:,:)=minval(h2o_ice_s_slope+watercap_slope,4) 189 ! min_h2o_ice_slope(:,:,:)=minval(h2o_ice_s_slope+watercap_slope,4) 190 min_h2o_ice_slope(:,:,:)=minval(h2o_ice_s_slope,4) 190 191 print *, "Computing the min of co2_ice_slope" 191 192 min_co2_ice_slope(:,:,:)=minval(co2_ice_slope,4) … … 210 211 min_co2_ice_slope(i,j,islope) = 0. 211 212 endif 212 !if (min_h2o_ice_slope(i,j,islope).LT.0) then213 !min_h2o_ice_slope(i,j,islope) = 0.214 !endif213 if (min_h2o_ice_slope(i,j,islope).LT.0) then 214 min_h2o_ice_slope(i,j,islope) = 0. 215 endif 215 216 ENDDO 216 217 ENDDO -
trunk/LMDZ.COMMON/libf/evolution/soil_pem.F90
r2888 r2895 15 15 ! Note: depths of layers and mid-layers, soil thermal inertia and 16 16 ! heat capacity are commons in comsoil_PEM.h 17 ! A convergence loop is added until equilibrium18 17 !----------------------------------------------------------------------- 19 18 -
trunk/LMDZ.COMMON/libf/evolution/soil_settings_PEM.F
r2855 r2895 4 4 5 5 ! use netcdf 6 use comsoil_h_PEM, only: layer_PEM, mlayer_PEM 7 use comsoil_h, only: inertiedat,layer,mlayer, volcapa 6 use comsoil_h_PEM, only: layer_PEM, mlayer_PEM, 7 & depth_breccia,depth_bedrock,index_breccia,index_bedrock 8 use comsoil_h, only: inertiedat,layer,mlayer, volcapa 9 10 8 11 use iostart, only: inquire_field_ndims, get_var, get_field, 9 12 & inquire_field, inquire_dimension_length … … 86 89 enddo 87 90 91 92 ! 3. Index for subsurface layering 93 ! ------------------ 94 write(*,*) 'depth=',depth_breccia,depth_bedrock 95 index_breccia= 1 96 do iloop = 1,nsoil_PEM-1 97 if (depth_breccia.ge.layer_PEM(iloop)) then 98 index_breccia=iloop 99 else 100 exit 101 endif 102 enddo 103 104 index_bedrock= 1 105 do iloop = 1,nsoil_PEM-1 106 if (depth_bedrock.ge.layer_PEM(iloop)) then 107 index_bedrock=iloop 108 else 109 exit 110 endif 111 enddo 112 113 88 114 end subroutine soil_settings_PEM -
trunk/LMDZ.COMMON/libf/evolution/update_soil.F90
r2888 r2895 1 SUBROUTINE update_soil(ngrid,nslope,nsoil_ GCM,nsoil_PEM,tendencies_waterice,waterice,p_avg_new,ice_depth,TI_PEM)1 SUBROUTINE update_soil(ngrid,nslope,nsoil_PEM,tendencies_waterice,waterice,p_avg_new,ice_depth,TI_PEM) 2 2 #ifndef CPP_STD 3 3 USE comsoil_h, only: inertiedat, volcapa 4 USE comsoil_h_PEM, only: layer_PEM,n_1km,inertiedat_PEM 4 USE comsoil_h_PEM, only: layer_PEM,n_1km,inertiedat_PEM,depth_breccia,depth_bedrock,index_breccia,index_bedrock,reg_thprop_dependp 5 5 USE vertical_layers_mod, ONLY: ap,bp 6 6 USE comsoil_h_PEM, only: n_1km 7 7 implicit none 8 8 ! Input: 9 INTEGER,INTENT(IN) :: ngrid, nslope, nsoil_GCM,nsoil_PEM9 INTEGER,INTENT(IN) :: ngrid, nslope, nsoil_PEM 10 10 REAL,INTENT(IN) :: p_avg_new 11 11 REAL,INTENT(IN) :: tendencies_waterice(ngrid,nslope) … … 41 41 42 42 43 44 43 do islope = 1,nslope 45 44 regolith_inertia(:,islope) = inertiedat_PEM(:,1) 46 45 do ig = 1,ngrid 47 48 46 if((tendencies_waterice(ig,islope).lt.-1e-5).and.(waterice(ig,islope).eq.0)) then 49 47 regolith_inertia(ig,islope) = inertie_averaged 50 48 endif 51 write(*,*) 'ig,islope',ig,islope,inertie_thresold,TI_PEM(ig,1,islope) 52 if(TI_PEM(ig,1,islope).lt.inertie_thresold) then 53 ! regolith_inertia(ig,islope) = regolith_inertia(ig,islope)*(p_avg_new/P610)**0.3 54 endif 55 TI_breccia_new = TI_breccia !*(p_avg_new/P610)**0.3 49 if(reg_thprop_dependp) then 50 if(TI_PEM(ig,1,islope).lt.inertie_thresold) then 51 regolith_inertia(ig,islope) = regolith_inertia(ig,islope)*(p_avg_new/P610)**0.3 52 endif 53 TI_breccia_new = TI_breccia*(p_avg_new/P610)**0.3 54 else 55 TI_breccia_new = TI_breccia 56 endif 56 57 enddo 57 58 enddo … … 62 63 do islope=1,nslope 63 64 do ig = 1,ngrid 64 do iloop = 1, nsoil_GCM65 do iloop = 1,index_breccia 65 66 TI_PEM(ig,iloop,islope) = regolith_inertia(ig,islope) 66 67 enddo 67 68 if(regolith_inertia(ig,islope).lt.TI_breccia_new) then 68 69 !!! transition 69 delta = 50.70 TI_PEM(ig, nsoil_GCM+1,islope) = sqrt((layer_PEM(nsoil_GCM+1)-layer_PEM(nsoil_GCM))/ &71 (((delta-layer_PEM( nsoil_GCM))/(TI_PEM(ig,nsoil_GCM,islope)**2))+ &72 ((layer_PEM( nsoil_GCM+1)-delta)/(TI_breccia_new**2))))73 do iloop= nsoil_GCM+2,n_1km70 delta = depth_breccia 71 TI_PEM(ig,index_breccia+1,islope) = sqrt((layer_PEM(index_breccia+1)-layer_PEM(index_breccia))/ & 72 (((delta-layer_PEM(index_breccia))/(TI_PEM(ig,index_breccia,islope)**2))+ & 73 ((layer_PEM(index_breccia+1)-delta)/(TI_breccia_new**2)))) 74 do iloop=index_breccia+2,index_bedrock 74 75 TI_PEM(ig,iloop,islope) = TI_breccia_new 75 76 enddo 76 77 else ! we keep the high ti values 77 do iloop= nsoil_GCM+1,n_1km78 TI_PEM(ig,iloop,islope) = TI_PEM(ig, nsoil_GCM,islope)78 do iloop=index_breccia+1,index_bedrock 79 TI_PEM(ig,iloop,islope) = TI_PEM(ig,index_breccia,islope) 79 80 enddo 80 81 endif ! TI PEM and breccia comparison 81 82 !! transition 82 delta = 1000.83 TI_PEM(ig, n_1km+1,islope) = sqrt((layer_PEM(n_1km+1)-layer_PEM(n_1km))/ &84 (((delta-layer_PEM( n_1km))/(TI_PEM(ig,n_1km,islope)**2))+ &85 ((layer_PEM( n_1km+1)-delta)/(TI_bedrock**2))))86 do iloop= n_1km+2,nsoil_PEM83 delta = depth_bedrock 84 TI_PEM(ig,index_bedrock+1,islope) = sqrt((layer_PEM(index_bedrock+1)-layer_PEM(index_bedrock))/ & 85 (((delta-layer_PEM(index_bedrock))/(TI_PEM(ig,index_bedrock,islope)**2))+ & 86 ((layer_PEM(index_bedrock+1)-delta)/(TI_bedrock**2)))) 87 do iloop=index_bedrock+2,nsoil_PEM 87 88 TI_PEM(ig,iloop,islope) = TI_bedrock 88 89 enddo … … 94 95 do ig=1,ngrid 95 96 do islope=1,nslope 96 do iloop = 1,n_1km 97 TI_PEM(ig,iloop,islope) = TI_PEM(ig,1,islope)98 enddo97 ! do iloop = 1,index_bedrock 98 ! TI_PEM(ig,iloop,islope) = TI_PEM(ig,1,islope) 99 ! enddo 99 100 if (ice_depth(ig,islope).gt. -1.e-10) then 100 101 ! 3.0 FIrst if permanent ice 101 102 if (ice_depth(ig,islope).lt. 1e-10) then 102 103 do iloop = 1,nsoil_PEM 103 TI_PEM(ig,iloop,islope)= max(ice_inertia,inertiedat_PEM(ig,iloop))104 TI_PEM(ig,iloop,islope)=ice_inertia 104 105 enddo 105 106 else -
trunk/LMDZ.MARS/README
r2894 r2895 3874 3874 If false, it is set to constant (to the value of the tab_cntrl in the start) 3875 3875 3876 == 10/02/2023 == LL 3877 PEM 3878 Soil temperature initialisation has been updated 3879 Conf_PEM improved by adding some options to the users (thermal regolith depend on the pressure, depth of the subsurface layers, etc.) 3880 Minor edits then (+ svn update with RV had some issues, so there are some "artefact changes" ...) 3881
Note: See TracChangeset
for help on using the changeset viewer.