Changeset 2888
- Timestamp:
- Feb 1, 2023, 8:19:12 PM (22 months ago)
- Location:
- trunk/LMDZ.COMMON/libf/evolution
- Files:
-
- 3 added
- 3 deleted
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/adsorption_mod.F90
r2863 r2888 1 1 module adsorption_mod 2 2 implicit none 3 LOGICAL adsorption_pem ! True by default, to compute adsorption/desorption. Read in pem.def 4 real, save, allocatable :: co2_adsorbded_phys(:,:,:) ! co2 that is in the regolith [kg/m^2] 5 real, save, allocatable :: h2o_adsorbded_phys(:,:,:) ! h2o that is in the regolith [kg/m^2] 3 6 contains 4 7 … … 10 13 !!! 11 14 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 15 16 17 subroutine ini_adsorption_h_PEM(ngrid,nslope,nsoilmx_PEM) 18 19 implicit none 20 integer,intent(in) :: ngrid ! number of atmospheric columns 21 integer,intent(in) :: nslope ! number of slope within a mesh 22 integer,intent(in) :: nsoilmx_PEM ! number of soil layer in the PEM 23 allocate(co2_adsorbded_phys(ngrid,nsoilmx_PEM,nslope)) 24 allocate(h2o_adsorbded_phys(ngrid,nsoilmx_PEM,nslope)) 25 end subroutine ini_adsorption_h_PEM 26 27 subroutine end_adsorption_h_PEM 28 29 implicit none 30 if (allocated(co2_adsorbded_phys)) deallocate(co2_adsorbded_phys) 31 if (allocated(h2o_adsorbded_phys)) deallocate(h2o_adsorbded_phys) 32 end subroutine end_adsorption_h_PEM 33 34 35 36 37 12 38 13 39 subroutine regolith_adsorption(ngrid,nslope,nsoil_PEM,timelen,tend_h2oglaciers,tend_co2glaciers,waterice,co2ice,tsoil_PEM,TI_PEM,ps,q_co2,q_h2o, & -
trunk/LMDZ.COMMON/libf/evolution/computeice_table.F90
r2855 r2888 31 31 32 32 enddo 33 33 if (ig.eq.400) then 34 write(*,*) 'ig,islope,diff',ig,islope,diff_rho(:) 35 write(*,*) 'rho surf',rhowatersurf_ave(ig,islope) 36 write(*,*) 'rho soil',rhowatersoil_ave(ig,:,islope) 37 endif 34 38 if(diff_rho(1) > 0) then ! ice is at the surface 35 39 ice_table(ig,islope) = 0. -
trunk/LMDZ.COMMON/libf/evolution/comsoil_h_PEM.F90
r2885 r2888 15 15 real,save,allocatable :: coefq_PEM(:) ! (FC) q_{k+1/2} coefficients [SI] 16 16 real,save,allocatable :: coefd_PEM(:,:) ! (FC) d_k coefficients [SI] 17 real,save,allocatable :: alph_PEM(:,: ,:) ! (FC) alpha_k coefficients [SI]18 real,save,allocatable :: beta_PEM(:,: ,:) ! beta_k coefficients [SI]17 real,save,allocatable :: alph_PEM(:,:) ! (FC) alpha_k coefficients [SI] 18 real,save,allocatable :: beta_PEM(:,:) ! beta_k coefficients [SI] 19 19 real,save :: mu_PEM ! mu coefficient [SI] 20 real,parameter :: fluxgeo = 30e-3 ! Geothermal flux [W/m^2] 21 real, save, allocatable :: co2_adsorbded_phys(:,:,:) ! co2 that is in the regolith [kg/m^2] 22 real, save, allocatable :: h2o_adsorbded_phys(:,:,:) ! h2o that is in the regolith [kg/m^2] 20 real,save :: fluxgeo ! Geothermal flux [W/m^2] 23 21 LOGICAL soil_pem ! True by default, to run with the subsurface physic. Read in pem.def 24 22 real,save,allocatable,dimension(:) :: water_reservoir ! Large reserve of water [kg/m^2] 25 23 real,save :: water_reservoir_nom 26 24 contains 27 25 … … 40 38 allocate(coefq_PEM(0:nsoilmx_PEM-1)) 41 39 allocate(coefd_PEM(ngrid,nsoilmx_PEM-1)) 42 allocate(alph_PEM(ngrid,nsoilmx_PEM-1 ,nslope))43 allocate(beta_PEM(ngrid,nsoilmx_PEM-1 ,nslope))40 allocate(alph_PEM(ngrid,nsoilmx_PEM-1)) 41 allocate(beta_PEM(ngrid,nsoilmx_PEM-1)) 44 42 allocate(inertiedat_PEM(ngrid,nsoilmx_PEM)) 45 allocate(co2_adsorbded_phys(ngrid,nsoilmx_PEM,nslope)) 46 allocate(h2o_adsorbded_phys(ngrid,nsoilmx_PEM,nslope)) 43 allocate(water_reservoir(ngrid)) 47 44 allocate(water_reservoir(ngrid)) 48 45 end subroutine ini_comsoil_h_PEM … … 64 61 if (allocated(beta_PEM)) deallocate(beta_PEM) 65 62 if (allocated(inertiedat_PEM)) deallocate(inertiedat_PEM) 66 if (allocated(co2_adsorbded_phys)) deallocate(co2_adsorbded_phys) 67 if (allocated(h2o_adsorbded_phys)) deallocate(h2o_adsorbded_phys) 63 if (allocated(water_reservoir)) deallocate(water_reservoir) 68 64 if (allocated(water_reservoir)) deallocate(water_reservoir) 69 65 end subroutine end_comsoil_h_PEM -
trunk/LMDZ.COMMON/libf/evolution/conf_pem.F90
r2864 r2888 14 14 #endif 15 15 16 USE temps_mod_evol, ONLY: year_bp_ini, dt_pem, alpha_criterion, &16 USE temps_mod_evol, ONLY: year_bp_ini, dt_pem, ice_criterion, ps_criterion, & 17 17 Max_iter_pem, evol_orbit_pem 18 USE comsoil_h_pem, only: soil_pem 19 20 18 USE comsoil_h_pem, only: soil_pem,fluxgeo,water_reservoir_nom 19 USE adsorption_mod,only: adsorption_pem 20 CHARACTER(len=20),parameter :: modname ='conf_pem' 21 21 !PEM parameter 22 22 year_bp_ini=0. … … 26 26 CALL getin('dt_pem', dt_pem) 27 27 28 alpha_criterion=0.2 29 CALL getin('alpha_criterion', alpha_criterion) 28 ice_criterion=0.2 29 CALL getin('ice_criterion', ice_criterion) 30 31 ps_criterion = 0.15 32 CALL getin('ps_criterion',ps_criterion) 30 33 31 34 evol_orbit_pem=.false. … … 38 41 CALL getin('soil_pem', soil_pem) 39 42 43 adsorption_pem = .true. 44 CALL getin('adsorption_pem',adsorption_pem) 45 46 fluxgeo = 0. 47 CALL getin('Fluxgeo_PEM',fluxgeo) 48 print*,'Flux Geothermal is set to',fluxgeo 49 50 if ((not(soil_pem)).and.adsorption_pem) then 51 print*,'Adsorption must be used when soil_pem = T' 52 call abort_physic(modname,"Adsorption must be used when soil_pem = T",1) 53 endif 54 55 56 if ((not(soil_pem)).and.fluxgeo.gt.0.) then 57 print*,'Soil is not activated but Flux Geo > 0.' 58 call abort_physic(modname,"Soil is not activated but Flux Geo > 0.'",1) 59 endif 60 61 62 water_reservoir_nom = 1e4 63 CALL getin('water_reservoir_nom',water_reservoir_nom) 40 64 END SUBROUTINE conf_pem 41 65 -
trunk/LMDZ.COMMON/libf/evolution/evol_h2o_ice_s_mod_slope.F90
r2863 r2888 7 7 USE temps_mod_evol, ONLY: dt_pem 8 8 use comslope_mod, ONLY: subslope_dist 9 9 use criterion_pem_stop_mod, only: criterion_waterice_stop 10 10 IMPLICIT NONE 11 11 … … 80 80 print *, "Tendencies on ice increasing=", pos_tend 81 81 print *, "This can be due to the absence of water ice in the PCM run!!" 82 call criterion_ ice_stop_water_slope(cell_area,1.,qsurf(:,:)*0.,STOPPING,ngrid,cell_area)82 call criterion_waterice_stop(cell_area,1.,qsurf(:,:)*0.,STOPPING,ngrid,cell_area) 83 83 do i=1,ngrid 84 84 do islope=1,nslope -
trunk/LMDZ.COMMON/libf/evolution/info_run_PEM.F90
r2886 r2888 1 1 SUBROUTINE info_run_PEM(year_iter, criterion_stop) 2 2 3 3 IMPLICIT NONE 4 4 5 5 INTEGER, intent(in) :: year_iter, criterion_stop ! # of year and reason to stop 6 6 7 open(1,file='info_run_PEM.txt', status='new') 8 9 write(1,*) year_iter, criterion_stop 10 11 close(1) 7 logical :: exist 12 8 13 9 10 inquire(file='info_run_PEM.txt', exist=exist) 11 if (exist) then 12 open(12, file='info_run_PEM.txt', status="old", position="append", action="write") 13 else 14 open(12, file='info_run_PEM.txt', status="new", action="write") 15 end if 16 write(12, *) year_iter, criterion_stop 17 close(12) 18 14 19 END SUBROUTINE info_run_PEM -
trunk/LMDZ.COMMON/libf/evolution/pem.F90
r2885 r2888 84 84 USE geometry_mod, only: latitude_deg 85 85 use conf_pem_mod, only: conf_pem 86 use pemredem, only: pemdem 186 use pemredem, only: pemdem0,pemdem1 87 87 use co2glaciers_mod,only: co2glaciers_evol 88 use criterion_pem_stop_mod,only: criterion_waterice_stop,criterion_co2_stop 88 89 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! SOIL 89 90 use comsoil_h_PEM, only: soil_pem,ini_comsoil_h_PEM,end_comsoil_h_PEM,nsoilmx_PEM, & 90 TI_PEM,inertiedat_PEM, alph_PEM, beta_PEM,& ! soil thermal inertia91 TI_PEM,inertiedat_PEM, & ! soil thermal inertia 91 92 tsoil_PEM, mlayer_PEM,layer_PEM, & !number of subsurface layers, soil mid layer depths 92 fluxgeo, co2_adsorbded_phys, h2o_adsorbded_phys, & ! geothermal flux, mass of co2 & h2o in the regolith 93 water_reservoir 94 use adsorption_mod, only : regolith_adsorption 93 fluxgeo,water_reservoir ! geothermal flux 94 use adsorption_mod, only : regolith_adsorption,adsorption_pem, & ! bool to check if adsorption, main subroutine 95 ini_adsorption_h_PEM, end_adsorption_h_PEM, & ! allocate arrays 96 co2_adsorbded_phys, h2o_adsorbded_phys ! mass of co2 and h2O adsorbded 95 97 96 98 !!! For orbit parameters … … 98 100 use orbit_param_criterion_mod, only : orbit_param_criterion 99 101 use recomp_orb_param_mod, only: recomp_orb_param 102 use ice_table_mod, only: computeice_table_equilibrium 100 103 101 104 … … 189 192 LOGICAL :: STOPPING_1_co2 ! Logical : is there still water ice to sublimate? 190 193 LOGICAL :: STOPPING_pressure 191 INTEGER :: criterion_stop !Which criterion is reached : 1=surf h20, 2=surf_co2, 3=ps, 4=orb.param194 INTEGER :: criterion_stop ! which criterion is reached ? 1= h2o ice surf, 2 = co2 ice surf, 3 = ps, 4 = orb param 192 195 193 196 … … 216 219 !!!!!!!!!!!!!!!!!!!!!!!! SLOPE 217 220 REAL ,allocatable :: watercap_slope(:,:) ! Physics x Nslope: watercap per slope 221 REAL ,allocatable :: watercap_slope_saved ! Value saved at the previous time step 218 222 REAL , dimension(:,:,:), allocatable :: min_co2_ice_slope_1 ! LON x LAT field : minimum of co2 ice at each point for the first year [kg/m^2] 219 223 REAL , dimension(:,:,:), allocatable :: min_co2_ice_slope_2 ! LON x LAT field : minimum of co2 ice at each point for the second year [kg/m^2] … … 229 233 REAL, dimension(:,:),allocatable :: tendencies_co2_ice_phys_slope ! physical point xslope field : Tendency of evolution of perenial co2 ice over a year 230 234 REAL, dimension(:,:),allocatable :: tendencies_co2_ice_phys_slope_ini ! physical point x slope field x nslope: Tendency of evolution of perenial co2 ice over a year in the GCM 231 REAL, dimension(:,:),allocatable :: tendencies_h2o_ice_phys_slope ! physical pointx slope field : Tendency of evolution of perenial co2 ice235 REAL, dimension(:,:),allocatable :: tendencies_h2o_ice_phys_slope ! physical pointx slope field : Tendency of evolution of perenial h2o ice 232 236 REAL , dimension(:,:), allocatable :: flag_co2flow(:,:) !(ngrid,nslope) ! To flag where there is a glacier flow 233 237 REAL , dimension(:), allocatable :: flag_co2flow_mesh(:) !(ngrid) ! To flag where there is a glacier flow … … 257 261 REAL,ALLOCATABLE :: Tsoil_locslope(:,:) ! Physic x Soil: intermediate when computing Tsoil [K] 258 262 REAL,ALLOCATABLE :: Tsurf_locslope(:) ! Physic x Soil: Intermediate surface temperature to compute Tsoil [K] 259 REAL,ALLOCATABLE :: alph_locslope(:,:) ! Physic x Soil: Intermediate to compute Tsoil [1]260 REAL,ALLOCATABLE :: beta_locslope(:,:) ! Physic x Soil : Intermediate tocompute Tsoil [K]261 263 REAL,ALLOCATABLE :: watersurf_density_timeseries(:,:,:,:) ! Lon x Lat x Slope x Times: water surface density, time series [kg/m^3] 262 264 REAL,ALLOCATABLE :: watersoil_density_timeseries(:,:,:,:,:) ! Lon x Lat x Soil x Slope x Times water soil density, time series [kg /m^3] … … 278 280 INTEGER :: year_iter ! number of iteration 279 281 INTEGER :: year_iter_max ! maximum number of iterations before stopping 280 REAL :: timestep ! timestep [s] 282 REAL :: timestep ! timestep [s] 283 REAL :: watercap_sum ! total mass of water cap [kg/m^2] 284 281 285 REAL WC_sum 282 286 … … 424 428 enddo 425 429 enddo 426 430 427 431 call surfini(ngrid,qsurf) 432 call surfini(ngrid,qsurf) 428 433 429 434 #else 430 435 call phys_state_var_init(nq) 431 436 IF (.NOT.ALLOCATED(noms)) ALLOCATE(noms(nq)) ! (because noms is an argument of physdem1 whether or not tracer is on) 432 437 call initracer(ngrid,nq) … … 615 620 call end_comsoil_h_PEM 616 621 call ini_comsoil_h_PEM(ngrid,nslope) 617 622 call end_adsorption_h_PEM 623 call ini_adsorption_h_PEM(ngrid,nslope,nsoilmx_PEM) 618 624 allocate(ice_depth(ngrid,nslope)) 619 625 ice_depth(:,:) = 0. … … 800 806 tendencies_h2o_ice_phys_slope,tendencies_co2_ice_phys_slope,co2ice_slope,qsurf_slope(:,igcm_h2o_ice,:),global_ave_press_GCM,& 801 807 watersurf_density_phys_ave,watersoil_density_phys_PEM_ave, & 802 co2_adsorbded_phys,delta_co2_adsorbded,h2o_adsorbded_phys,delta_h2o_adsorbded) 803 804 do ig=1,ngrid 805 do islope=1,nslope 806 qsurf_slope(ig,igcm_h2o_ice,islope)=qsurf_slope(ig,igcm_h2o_ice,islope)+watercap_slope(ig,islope)+water_reservoir(ig) 807 enddo 808 co2_adsorbded_phys,delta_co2_adsorbded,h2o_adsorbded_phys,delta_h2o_adsorbded,water_reservoir) 809 810 do ig = 1,ngrid 811 do islope = 1,nslope 812 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.) 808 813 enddo 809 810 if(soil_pem) then 814 enddo 815 816 817 818 if(adsorption_pem) then 811 819 totmassco2_adsorbded = 0. 812 820 totmassh2o_adsorbded = 0. … … 878 886 print *, 'Global average pressure new time step',global_ave_press_new 879 887 880 if( soil_pem) then888 if(adsorption_pem) then 881 889 do i=1,ngrid 882 890 global_ave_press_new = global_ave_press_new -g*cell_area(i)*delta_co2_adsorbded(i)/Total_surface … … 986 994 987 995 !------------------------ 988 996 989 997 ! II_d.1 Update Tsurf 990 998 … … 1063 1071 allocate(Tsoil_locslope(ngrid,nsoilmx_PEM)) 1064 1072 allocate(Tsurf_locslope(ngrid)) 1065 allocate(alph_locslope(ngrid,nsoilmx_PEM-1))1066 allocate(beta_locslope(ngrid,nsoilmx_PEM-1))1067 1068 1073 print *,"Updating soil temperature" 1069 1074 … … 1071 1076 do islope = 1,nslope 1072 1077 TI_locslope(:,:) = TI_PEM(:,:,islope) 1073 alph_locslope(:,:) = alph_PEM(:,:,islope)1074 beta_locslope(:,:) = beta_PEM(:,:,islope)1075 1078 do t = 1,timelen 1076 1079 Tsoil_locslope(:,:) = tsoil_phys_PEM_timeseries(:,:,islope,t) 1077 1080 Tsurf_locslope(:) = tsurf_phys_GCM_timeseries(:,islope,t) 1078 1079 call soil_pem_routine(ngrid,nsoilmx_PEM,.true.,TI_locslope,timestep/timelen,Tsurf_locslope,Tsoil_locslope,alph_locslope,beta_locslope) 1080 call soil_pem_routine(ngrid,nsoilmx_PEM,.false.,TI_locslope,timestep/timelen,Tsurf_locslope,Tsoil_locslope,alph_locslope,beta_locslope) 1081 1082 1081 call soil_pem_routine(ngrid,nsoilmx_PEM,.true.,TI_locslope,timestep/timelen,Tsurf_locslope,Tsoil_locslope) 1082 call soil_pem_routine(ngrid,nsoilmx_PEM,.false.,TI_locslope,timestep/timelen,Tsurf_locslope,Tsoil_locslope) 1083 1083 tsoil_phys_PEM_timeseries(:,:,islope,t) = Tsoil_locslope(:,:) 1084 1084 do ig = 1,ngrid 1085 1085 do isoil = 1,nsoilmx_PEM 1086 watersoil_density_phys_PEM_timeseries(ig, l,islope,t) = exp(alpha_clap_h2o/Tsoil_locslope(ig,isoil) + beta_clap_h2o)/Tsoil_locslope(ig,isoil)1086 watersoil_density_phys_PEM_timeseries(ig,isoil,islope,t) = exp(alpha_clap_h2o/Tsoil_locslope(ig,isoil) + beta_clap_h2o)/Tsoil_locslope(ig,isoil) 1087 1087 if(isnan(Tsoil_locslope(ig,isoil))) then 1088 write(*,*)'Tsoil=',ig,isoil,Tsoil_locslope(ig,isoil) 1089 stop 1088 call abort_pem("PEM - Update Tsoil","NAN detected in Tsoil ",1) 1090 1089 endif 1091 1090 enddo 1092 1091 enddo 1093 enddo 1094 alph_PEM(:,:,islope) = alph_locslope(:,:) 1095 beta_PEM(:,:,islope) = beta_locslope(:,:)1092 1093 1094 enddo 1096 1095 enddo 1097 1098 1099 1096 tsoil_PEM(:,:,:) = SUM(tsoil_phys_PEM_timeseries(:,:,:,:),4)/timelen 1100 1097 watersoil_density_phys_PEM_ave(:,:,:)= SUM(watersoil_density_phys_PEM_timeseries(:,:,:,:),4)/timelen 1098 1099 1101 1100 print *, "Update of soil temperature done" 1102 1101 … … 1104 1103 deallocate(Tsoil_locslope) 1105 1104 deallocate(Tsurf_locslope) 1106 deallocate(alph_locslope)1107 deallocate(beta_locslope)1108 1109 1105 write(*,*) "Compute ice table" 1110 1106 1111 1107 ! II_d.3 Update the ice table 1112 call computeice_table (ngrid,nslope,nsoilmx_PEM,watersurf_density_phys_ave,watersoil_density_phys_PEM_ave,ice_depth)1108 call computeice_table_equilibrium(ngrid,nslope,nsoilmx_PEM,watercaptag,watersurf_density_phys_ave,watersoil_density_phys_PEM_ave,ice_depth) 1113 1109 1114 1110 print *, "Update soil propreties" 1115 1111 ! II_d.4 Update the soil thermal properties 1116 call update_soil(ngrid,nslope,nsoilmx _PEM,tendencies_h2o_ice_phys_slope,tendencies_co2_ice_phys_slope,co2ice_slope,qsurf_slope(:,igcm_h2o_ice,:),global_ave_press_new, &1112 call update_soil(ngrid,nslope,nsoilmx,nsoilmx_PEM,tendencies_h2o_ice_phys_slope,qsurf_slope(:,igcm_h2o_ice,:),global_ave_press_new, & 1117 1113 ice_depth,TI_PEM) 1118 1114 1119 1115 ! II_d.5 Update the mass of the regolith adsorbded 1120 1116 if(adsorption_pem) then 1121 1117 call regolith_adsorption(ngrid,nslope,nsoilmx_PEM,timelen,tendencies_h2o_ice_phys_slope,tendencies_co2_ice_phys_slope,qsurf_slope(:,igcm_h2o_ice,:),co2ice_slope, & 1122 1118 tsoil_PEM,TI_PEM,ps_phys_timeseries,q_co2_PEM_phys,q_h2o_PEM_phys, & 1123 1119 h2o_adsorbded_phys,delta_h2o_adsorbded,co2_adsorbded_phys,delta_co2_adsorbded) 1124 1120 1121 endif 1125 1122 endif !soil_pem 1126 1123 … … 1151 1148 1152 1149 !------------------------ 1153 call criterion_ice_stop_water_slope(cell_area,ini_surf_h2o,qsurf_slope(:,igcm_h2o_ice,:),STOPPING_water,ngrid,initial_h2o_ice_slope) 1154 1155 call criterion_ice_stop_slope(cell_area,ini_surf_co2,co2ice_slope,STOPPING_co2,STOPPING_pressure,ngrid,initial_co2_ice_sublim_slope,global_ave_press_GCM,global_ave_press_new,nslope) 1150 call criterion_waterice_stop(cell_area,ini_surf_h2o,qsurf_slope(:,igcm_h2o_ice,:),STOPPING_water,ngrid,initial_h2o_ice_slope) 1151 1152 call criterion_co2_stop(cell_area,ini_surf_co2,co2ice_slope,STOPPING_co2,STOPPING_pressure,ngrid, & 1153 initial_co2_ice_sublim_slope,global_ave_press_GCM,global_ave_press_new,nslope) 1156 1154 1157 1155 year_iter=year_iter+dt_pem 1156 1157 1158 1158 1159 1159 print *, "Checking all the stopping criterion." 1160 1160 if (STOPPING_water) then 1161 print *, "STOPPING because surface of water ice sublimating is too low, see message above", STOPPING_water 1161 print *, "STOPPING because surface of water ice sublimating is too low, see message above", STOPPING_water 1162 criterion_stop=1 1162 1163 criterion_stop=1 1163 1164 endif … … 1183 1184 endif 1184 1185 1185 1186 1187 if (STOPPING_water .or. STOPPING_1_water .or. STOPPING_co2 .or. STOPPING_1_co2 .or. STOPPING_pressure) then 1186 if (STOPPING_water .or. STOPPING_1_water .or. STOPPING_co2 .or. STOPPING_1_co2 .or. STOPPING_pressure) then 1188 1187 exit 1189 1188 else 1190 1189 print *, "We continue!" 1191 print *, "Number of iteration of the PEM : year_iter=", year_iter 1190 print *, "Number of iteration of the PEM : year_iter=", year_iter 1192 1191 endif 1192 1193 1193 1194 1194 1195 global_ave_press_old=global_ave_press_new … … 1221 1222 #endif 1222 1223 ENDDO ! of DO ig=1,ngrid 1224 1225 1226 ! H2O ice 1227 1228 1229 1230 DO ig=1,ngrid 1231 if(watercaptag(ig)) then 1232 1233 watercap_sum=0. 1234 DO islope=1,nslope 1235 watercap_slope_saved = watercap_slope(ig,islope) 1236 if(qsurf_slope(ig,igcm_h2o_ice,islope).GT. (watercap_slope(ig,islope)+water_reservoir(ig)*cos(pi*def_slope_mean(islope)/180.))) then 1237 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.)) 1238 else 1239 watercap_slope(ig,islope)=watercap_slope(ig,islope)+qsurf_slope(ig,igcm_h2o_ice,islope)-(watercap_slope(ig,islope)+water_reservoir(ig)*cos(pi*def_slope_mean(islope)/180.)) 1240 qsurf_slope(ig,igcm_h2o_ice,islope)=0. 1241 endif 1242 watercap_sum=watercap_sum+(watercap_slope(ig,islope)-watercap_slope_saved)*subslope_dist(ig,islope)/cos(pi*def_slope_mean(islope)/180.) 1243 ! watercap_slope(ig,islope)=0. 1244 enddo 1245 water_reservoir(ig)=water_reservoir(ig)+watercap_sum 1246 endif 1247 enddo 1248 1249 1250 DO ig = 1,ngrid 1251 qsurf(ig,igcm_h2o_ice) = 0. 1252 DO islope = 1,nslope 1253 qsurf(ig,igcm_h2o_ice) = qsurf(ig,igcm_h2o_ice) + qsurf_slope(ig,igcm_h2o_ice,islope) & 1254 * subslope_dist(ig,islope) / & 1255 cos(pi*def_slope_mean(islope)/180.) 1256 ENDDO 1257 ENDDO ! of DO ig=1,ngrid 1258 1259 DO ig=1,ngrid 1260 ! DO islope=1,nslope 1261 if(qsurf(ig,igcm_h2o_ice).GT.500) then 1262 watercaptag(ig)=.true. 1263 DO islope=1,nslope 1264 qsurf_slope(ig,igcm_h2o_ice,islope)=qsurf_slope(ig,igcm_h2o_ice,islope)-250 1265 water_reservoir(ig)=water_reservoir(ig)+250 1266 ENDDO 1267 endif 1268 ! enddo 1269 enddo 1270 1271 DO ig=1,ngrid 1272 if(water_reservoir(ig).LT. 10) then 1273 watercaptag(ig)=.false. 1274 qsurf(ig,igcm_h2o_ice)=qsurf(ig,igcm_h2o_ice)+water_reservoir(ig) 1275 DO islope=1,nslope 1276 qsurf_slope(ig,igcm_h2o_ice,islope)=qsurf_slope(ig,igcm_h2o_ice,islope)+water_reservoir(ig) 1277 ENDDO 1278 endif 1279 1280 enddo 1281 1282 DO ig = 1,ngrid 1283 watercap(ig) = 0. 1284 DO islope = 1,nslope 1285 watercap(ig) = watercap(ig) + watercap_slope(ig,islope) & 1286 * subslope_dist(ig,islope) / & 1287 cos(pi*def_slope_mean(islope)/180.) 1288 ENDDO 1289 ENDDO ! of DO ig=1,ngrid 1290 1291 1292 1293 1294 1295 1296 1223 1297 1224 1298 ! III_a.2 Tsoil update (for startfi) … … 1460 1534 1461 1535 !------------------------ 1462 1463 call pemdem1("restartfi_PEM.nc",year_iter,nsoilmx_PEM,ngrid,nslope , & 1536 call pemdem0("restartfi_PEM.nc",longitude,latitude,cell_area,nsoilmx_PEM,ngrid, & 1537 float(day_ini),0.,nslope,def_slope,subslope_dist) 1538 1539 1540 call pemdem1("restartfi_PEM.nc",year_iter,nsoilmx_PEM,ngrid,nslope , & 1464 1541 tsoil_PEM, TI_PEM, ice_depth,co2_adsorbded_phys,h2o_adsorbded_phys,water_reservoir) 1465 1466 call info_run_PEM(year_iter, criterion_stop) 1542 call info_run_PEM(year_iter, criterion_stop) 1467 1543 1468 1544 print *, "restartfi_PEM.nc has been written" -
trunk/LMDZ.COMMON/libf/evolution/pemetat0.F90
r2885 r2888 1 1 SUBROUTINE pemetat0(filename,ngrid,nsoil_GCM,nsoil_PEM,nslope,timelen,timestep,TI_PEM,tsoil_PEM_yr1,tsoil_PEM,ice_table, & 2 2 tsurf_ave_yr1,tsurf_ave_yr2,q_co2,q_h2o,ps_inst,tsoil_inst,tend_h2oglaciers,tend_co2glaciers,co2ice,waterice, & 3 global_ave_pressure,watersurf_ave,watersoil_ave, m_co2_regolith_phys,deltam_co2_regolith_phys, m_h2o_regolith_phys,deltam_h2o_regolith_phys) 3 global_ave_pressure,watersurf_ave,watersoil_ave, m_co2_regolith_phys,deltam_co2_regolith_phys, & 4 m_h2o_regolith_phys,deltam_h2o_regolith_phys, water_reservoir) 4 5 5 6 use iostart_PEM, only: open_startphy, close_startphy, get_field, get_var 6 use comsoil_h_PEM, only: soil_pem,layer_PEM, mlayer_PEM,n_1km,fluxgeo,inertiedat_PEM, water_reservoir7 use comsoil_h_PEM, only: soil_pem,layer_PEM, mlayer_PEM,n_1km,fluxgeo,inertiedat_PEM,water_reservoir_nom 7 8 use comsoil_h, only: volcapa,inertiedat 8 use adsorption_mod, only : regolith_adsorption 9 use adsorption_mod, only : regolith_adsorption,adsorption_pem 9 10 USE temps_mod_evol, ONLY: year_PEM 11 USE ice_table_mod, only: computeice_table_equilibrium 10 12 #ifndef CPP_STD 11 13 use surfdat_h, only: watercaptag 12 14 #endif 13 14 15 15 16 implicit none … … 45 46 real,intent(inout) :: m_h2o_regolith_phys(ngrid,nsoil_PEM,nslope) ! mass of h2o adsorbed [kg/m^2] 46 47 real,intent(out) :: deltam_h2o_regolith_phys(ngrid) ! mass of h2o that is exchanged due to adsorption desorption [kg/m^2] 48 real,intent(inout) :: water_reservoir(ngrid) ! mass of h2o that is exchanged due to adsorption desorption [kg/m^2] 47 49 ! local 48 50 real :: tsoil_startPEM(ngrid,nsoil_PEM,nslope) ! soil temperature saved in the start [K] … … 70 72 !!! Purpose: read start_pem. Need a specific iostart_PEM 71 73 !!! 72 !!! Order: 1. Previous year of the PEM run 73 !!! 2. Thermal Inertia 74 !!! 3. Soil Temperature 75 !!! 4. Ice table 76 !!! 5. Mass of CO2 adsorbed 74 !!! Order: 0. Previous year of the PEM run 75 !!! 1. Thermal Inertia 76 !!! 2. Soil Temperature 77 !!! 3. Ice table 78 !!! 4. Mass of CO2 & H2O adsorbed 79 !!! 5. Water reservoir 77 80 !!! 78 81 !!! /!\ This order must be respected ! … … 86 89 inquire(file=filename,exist = startpem_file) 87 90 88 write(*,*)' Start PEM=',startpem_file89 90 91 write(*,*)'Is start PEM?',startpem_file 92 93 startpem_file = .false. 91 94 !1. Run 92 95 … … 213 216 tsoil_PEM(ig,iloop,islope) = tsoil_PEM(ig,n_1km+1,islope) + fluxgeo/kcond*(mlayer_PEM(iloop-1)-mlayer_PEM(n_1km)) 214 217 enddo 215 enddo 216 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 227 217 228 else 218 229 ! predictor corrector: restart from year 1 of the GCM and build the evolution of … … 220 231 221 232 tsoil_tmp_yr1(:,:,islope) = tsoil_startPEM(:,:,islope) 222 call soil_pem_routine(ngrid,nsoil_PEM,.true.,TI_PEM(:,:,islope),timestep,tsurf_ave_yr1(:,islope),tsoil_tmp_yr1(:,:,islope) ,alph_tmp,beta_tmp)223 call soil_pem_routine(ngrid,nsoil_PEM,.false.,TI_PEM(:,:,islope),timestep,tsurf_ave_yr1(:,islope),tsoil_tmp_yr1(:,:,islope) ,alph_tmp,beta_tmp)233 call soil_pem_routine(ngrid,nsoil_PEM,.true.,TI_PEM(:,:,islope),timestep,tsurf_ave_yr1(:,islope),tsoil_tmp_yr1(:,:,islope)) 234 call soil_pem_routine(ngrid,nsoil_PEM,.false.,TI_PEM(:,:,islope),timestep,tsurf_ave_yr1(:,islope),tsoil_tmp_yr1(:,:,islope)) 224 235 tsoil_tmp_yr2(:,:,islope) = tsoil_tmp_yr1(:,:,islope) 225 call soil_pem_routine(ngrid,nsoil_PEM,.true.,TI_PEM(:,:,islope),timestep,tsurf_ave_yr2(:,islope),tsoil_tmp_yr2(:,:,islope) ,alph_tmp,beta_tmp)236 call soil_pem_routine(ngrid,nsoil_PEM,.true.,TI_PEM(:,:,islope),timestep,tsurf_ave_yr2(:,islope),tsoil_tmp_yr2(:,:,islope)) 226 237 227 238 … … 243 254 244 255 245 ENDDO 256 ENDDO ! islope 246 257 247 258 print *,'PEMETAT0: SOIL TEMP DONE' … … 253 264 254 265 255 call computeice_table (ngrid,nslope,nsoil_PEM,watersurf_ave,watersoil_ave, ice_table)256 call update_soil(ngrid,nslope,nsoil_ PEM,tend_h2oglaciers,tend_co2glaciers,co2ice,waterice,global_ave_pressure,ice_table,TI_PEM)266 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) 257 268 258 269 … … 262 273 263 274 !4. CO2 & H2O Adsorption 275 if(adsorption_pem) then 264 276 DO islope=1,nslope 265 277 write(num,fmt='(i2.2)') islope … … 290 302 endif 291 303 print *,'PEMETAT0: CO2 & H2O adsorption done ' 292 304 endif 293 305 endif ! soil_pem 306 307 308 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 309 310 !. 5 water reservoir 311 312 #ifndef CPP_STD 313 call get_field("water_reservoir",water_reservoir,found) 314 if(.not.found) then 315 write(*,*)'Pemetat0: failed loading <water_reservoir>' 316 write(*,*)'will reconstruct the values from watercaptag' 317 do ig=1,ngrid 318 if(watercaptag(ig)) then 319 water_reservoir=water_reservoir_nom 320 else 321 water_reservoir=0. 322 endif 323 enddo 324 endif 325 #endif 326 294 327 295 328 call close_startphy … … 396 429 tsoil_PEM(ig,iloop,islope) = tsoil_PEM(ig,n_1km+1,islope) + fluxgeo/kcond*(mlayer_PEM(iloop-1)-mlayer_PEM(n_1km)) 397 430 enddo 398 enddo 399 431 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 442 400 443 do it = 1,timelen 401 444 do isoil = nsoil_GCM+1,nsoil_PEM … … 412 455 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 413 456 !c) Ice table 414 call computeice_table (ngrid,nslope,nsoil_PEM,watersurf_ave,watersoil_ave, ice_table)415 call update_soil(ngrid,nslope,nsoil_ PEM,tend_h2oglaciers,tend_co2glaciers,co2ice,waterice,global_ave_pressure,ice_table,TI_PEM)457 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) 416 459 417 460 … … 425 468 !d) Regolith adsorbed 426 469 427 470 if(adsorption_pem) then 428 471 m_co2_regolith_phys(:,:,:) = 0. 429 472 m_h2o_regolith_phys(:,:,:) = 0. … … 434 477 deltam_co2_regolith_phys(:) = 0. 435 478 deltam_h2o_regolith_phys(:) = 0. 479 endif 480 481 print *,'PEMETAT0: CO2 adsorption done ' 482 483 endif !soil_pem 484 485 endif ! of if (startphy_file) 486 487 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 436 488 437 489 438 print *,'PEMETAT0: CO2 adsorption done ' 439 440 endif !soil_pem 441 442 endif ! of if (startphy_file) 443 444 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 445 446 if(soil_pem) then 447 448 449 490 491 !. e) water reservoir 492 493 #ifndef CPP_STD 494 495 do ig=1,ngrid 496 if(watercaptag(ig)) then 497 water_reservoir=water_reservoir_nom 498 else 499 water_reservoir=0. 500 endif 501 enddo 502 503 #endif 504 505 if(soil_pem) then 450 506 !! Sanity check 451 507 DO ig = 1,ngrid … … 453 509 DO iloop = 1,nsoil_PEM 454 510 if(isnan(tsoil_PEM(ig,iloop,islope))) then 455 write(*,*) "failed nan construction", ig, iloop, islope 456 stop 511 call abort_pem("PEM - pemetat0","NAN detected in Tsoil",1) 457 512 endif 458 513 ENDDO 459 514 ENDDO 460 515 ENDDO 461 462 endif!soil_pem 516 endif!soil_pem 463 517 464 518 -
trunk/LMDZ.COMMON/libf/evolution/pemredem.F90
r2885 r2888 64 64 call put_field("subslope_dist","under mesh slope distribution",subslope_dist) 65 65 66 call put_var("FluxGeo","Geothermal Flux (W/m^2)",fluxgeo)67 66 68 67 ! Close file … … 74 73 tsoil_slope_PEM,inertiesoil_slope_PEM,ice_table, & 75 74 m_co2_regolith,m_h2o_regolith,water_reservoir) 75 76 76 77 ! write time-dependent variable to restart file 77 78 use iostart_PEM, only : open_restartphy, close_restartphy, & … … 96 97 real,intent(in) :: m_co2_regolith(ngrid,nsoil_PEM,nslope) 97 98 real,intent(in) :: m_h2o_regolith(ngrid,nsoil_PEM,nslope) 98 real,intent( IN) :: water_reservoir(ngrid)99 real,intent(in) :: water_reservoir(ngrid) 99 100 integer :: islope 100 101 CHARACTER*2 :: num … … 116 117 ! set time counter in file 117 118 call put_var("Time","Year of simulation",year_tot) 118 119 call put_field('water_reservoir','water_reservoir', & 120 water_reservoir,year_tot) 119 121 call put_field("water_reservoir","water_reservoir", & 120 122 water_reservoir,year_tot) -
trunk/LMDZ.COMMON/libf/evolution/read_data_GCM.F90
r2885 r2888 69 69 REAL, ALLOCATABLE :: co2_ice_s(:,:,:) ! co2 ice, mesh averaged, of the concatenated file [kg/m^2] 70 70 REAL, ALLOCATABLE :: h2o_ice_s_slope(:,:,:,:) ! h2o ice per slope of the concatenated file [kg/m^2] 71 REAL, ALLOCATABLE :: watercap_slope(:,:,:,:) 72 71 REAL, ALLOCATABLE :: watercap_slope(:,:,:,:) 73 72 !----------------------------------------------------------------------- 74 73 modname="read_data_gcm" … … 83 82 allocate(watercap_slope(iim_input+1,jjm_input+1,nslope,timelen)) 84 83 allocate(h2o_ice_s(iim+1,jjm+1,timelen)) 84 allocate(watercap_slope(iim_input+1,jjm_input+1,nslope,timelen)) 85 85 86 86 print *, "Opening ", fichnom, "..." … … 135 135 136 136 print *, "Downloading data for h2o_ice_s_slope done" 137 137 138 print *, "Downloading data for watercap_slope ..." 138 139 DO islope=1,nslope 140 write(num,fmt='(i2.2)') islope 141 call get_var3("watercap_slope"//num,watercap_slope(:,:,islope,:)) 142 ENDDO 143 139 DO islope=1,nslope 140 write(num,fmt='(i2.2)') islope 141 call get_var3("watercap_slope"//num,watercap_slope(:,:,islope,:)) 142 ENDDO 144 143 print *, "Downloading data for watercap_slope done" 145 print *, "Downloading data for tsurf_slope ..." 144 145 print *, "Downloading data for tsurf_slope ..." 146 146 147 147 DO islope=1,nslope -
trunk/LMDZ.COMMON/libf/evolution/soil_pem.F90
r2855 r2888 1 1 subroutine soil_pem_routine(ngrid,nsoil,firstcall, & 2 therm_i, & 3 timestep,tsurf,tsoil,alph_PEM,beta_PEM) 2 therm_i,timestep,tsurf,tsoil) 4 3 5 4 6 5 use comsoil_h_PEM, only: layer_PEM, mlayer_PEM, & 7 6 mthermdiff_PEM, thermdiff_PEM, coefq_PEM, & 8 coefd_PEM, mu_PEM, fluxgeo7 coefd_PEM, mu_PEM,alph_PEM,beta_PEM,fluxgeo 9 8 use comsoil_h,only: volcapa 10 9 implicit none … … 34 33 ! outputs: 35 34 real,intent(inout) :: tsoil(ngrid,nsoil) ! soil (mid-layer) temperature [K] 36 real,intent(inout) :: alph_PEM(ngrid,nsoil-1) ! intermediate for computations [1]37 real,intent(inout) :: beta_PEM(ngrid,nsoil-1) ! intermediate for computations [K]38 39 35 ! local variables: 40 36 integer ig,ik -
trunk/LMDZ.COMMON/libf/evolution/temps_mod_evol.F90
r2835 r2888 5 5 INTEGER year_bp_ini ! year_bp_ini : Initial year of the simulation of the PEM (in evol.def) 6 6 INTEGER dt_pem ! dt_pem : in years, the time step used by the PEM 7 REAL alpha_criterion ! alpha_criterion : percentage of change before stopping the PEM 7 REAL ice_criterion ! ice_criterion : percentage of change of ice before stopping the PEM 8 REAL ps_criterion ! ice_criterion : percentage of change of ice before stopping the PEM 8 9 INTEGER year_PEM ! year written in startfiPEM.nc 9 10 INTEGER Max_iter_pem ! Maximal number of iteration when converging to a steady state, read in evol.def -
trunk/LMDZ.COMMON/libf/evolution/update_soil.F90
r2863 r2888 1 SUBROUTINE update_soil(ngrid,nslope,nsoil_PEM,tend_h2oglaciers,tend_co2glaciers,co2ice,waterice,p_avg_new,& 2 ice_depth,TI_PEM) 1 SUBROUTINE update_soil(ngrid,nslope,nsoil_GCM,nsoil_PEM,tendencies_waterice,waterice,p_avg_new,ice_depth,TI_PEM) 3 2 #ifndef CPP_STD 4 3 USE comsoil_h, only: inertiedat, volcapa … … 8 7 implicit none 9 8 ! Input: 10 INTEGER,INTENT(IN) :: ngrid, nslope, nsoil_PEM 11 REAL,INTENT(IN) :: tend_h2oglaciers(ngrid,nslope),tend_co2glaciers(ngrid,nslope) 9 INTEGER,INTENT(IN) :: ngrid, nslope,nsoil_GCM, nsoil_PEM 12 10 REAL,INTENT(IN) :: p_avg_new 13 REAL,INTENT(IN) :: co2ice(ngrid,nslope)11 REAL,INTENT(IN) :: tendencies_waterice(ngrid,nslope) 14 12 REAL,INTENT(IN) :: waterice(ngrid,nslope) 15 13 REAL,INTENT(in) :: ice_depth(ngrid,nslope) 16 17 14 ! Outputs: 18 15 … … 21 18 ! Constants: 22 19 23 REAL :: alpha = 0.224 REAL :: beta = 1.08e725 REAL :: To = 273.1526 REAL :: R = 8.31427 REAL :: L = 51058.28 20 REAL :: inertie_thresold = 800. ! look for ice 29 21 REAL :: inertie_averaged = 250 ! Mellon et al. 2000 30 22 REAL :: ice_inertia = 1200 ! Inertia of ice 31 REAL :: P610 = 610.0 32 REAL :: m_h2o = 18.01528E-3 33 REAL :: m_co2 = 44.01E-3 ! CO2 molecular mass (kg/mol) 34 REAL :: m_noco2 = 33.37E-3 ! Non condensible mol mass (kg/mol) 35 REAL :: A,B,mmean 23 REAL :: P610 = 610.0 ! current average pressure on Mars [Pa] 24 REAL :: TI_breccia = 750. ! THermal inertia of Breccia following Wood 2009 [SI] 25 REAL :: TI_bedrock = 2300. ! Thermal inertia of Bedrock following Wood 2009 [SI] 36 26 37 27 ! Local variables: … … 39 29 INTEGER :: ig,islope,iloop,iref,k 40 30 REAL :: regolith_inertia(ngrid,nslope) ! TI of the regolith 41 REAL :: d(ngrid,nsoil_PEM,nslope) 42 REAL :: Total_surface 43 INTEGER :: ispermanent_co2glaciers(ngrid,nslope) 44 INTEGER :: ispermanent_h2oglaciers(ngrid,nslope) 45 46 ! 0. Initialisation 47 48 ! do ig = 1,ngrid 49 ! do islope = 1,nslope 50 ! if((abs(tend_h2oglaciers(ig,islope)).lt.1e-5).and.(abs(waterice(ig,islope)).gt.(1.e-4))) then 51 ! ispermanent_h2oglaciers(ig,islope) = 1 52 ! else 53 ! ispermanent_h2oglaciers(ig,islope) = 0 54 ! endif 55 ! 56 ! if((abs(tend_co2glaciers(ig,islope)).lt.1e-5).and.(abs(co2ice(ig,islope)).gt.(1.e-4))) then 57 ! ispermanent_co2glaciers(ig,islope) = 1 58 ! else 59 ! ispermanent_co2glaciers(ig,islope) = 0 60 ! endif 61 ! enddo 62 ! enddo 63 64 65 31 REAL :: delta 32 REAL :: TI_breccia_new 66 33 ! 1.Ice TI feedback 67 34 … … 72 39 ! 2. Modification of the regolith thermal inertia. 73 40 74 ! do ig=1,ngrid75 ! do islope=1,nslope76 ! do iloop =1,n_1km77 ! d(ig,iloop,islope) = ((inertiedat_PEM(ig,iloop)*inertiedat_PEM(ig,iloop))/(volcapa*alpha*P610**0.6))**(-1/(0.11*log10(P610/beta)))78 ! if(TI_PEM(ig,iloop,islope).lt.inertie_thresold) then ! we are modifying the regolith properties, not ice79 ! TI_PEM(ig,iloop,islope) = sqrt(volcapa*alpha*(p_avg_new**0.6)* d(ig,iloop,islope)**(-0.11*log10(p_avg_new/beta)))80 !81 ! endif82 ! enddo83 ! enddo84 !enddo85 41 86 ! 3. Build new TI for the PEM 42 43 44 do islope = 1,nslope 45 regolith_inertia(:,islope) = inertiedat_PEM(:,1) 46 do ig = 1,ngrid 47 48 if((tendencies_waterice(ig,islope).lt.-1e-5).and.(waterice(ig,islope).eq.0)) then 49 regolith_inertia(ig,islope) = inertie_averaged 50 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 56 enddo 57 enddo 58 59 60 ! 3. Build new Thermal Inertia 61 62 do islope=1,nslope 63 do ig = 1,ngrid 64 do iloop = 1,nsoil_GCM 65 TI_PEM(ig,iloop,islope) = regolith_inertia(ig,islope) 66 enddo 67 if(regolith_inertia(ig,islope).lt.TI_breccia_new) then 68 !!! 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_1km 74 TI_PEM(ig,iloop,islope) = TI_breccia_new 75 enddo 76 else ! we keep the high ti values 77 do iloop=nsoil_GCM+1,n_1km 78 TI_PEM(ig,iloop,islope) = TI_PEM(ig,nsoil_GCM,islope) 79 enddo 80 endif ! TI PEM and breccia comparison 81 !! 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_PEM 87 TI_PEM(ig,iloop,islope) = TI_bedrock 88 enddo 89 enddo ! ig 90 ENDDO ! islope 91 92 ! 4. Build new TI in case of ice table 87 93 ! a) For the regolith 88 94 do ig=1,ngrid
Note: See TracChangeset
for help on using the changeset viewer.