@@ -111,13 +111,13 @@ function plot_snap(max_depl=0,max_T=0,fullV=-1,part=0,reduc=0,fin=' ')
endif
endif
if(size(data.depl,1)>1),produce_plot('D2Dc_',sprintf(strcat("Depletion at t=",num2str(data.time/data.t_yr/1000000.0,"%04.0f"),"Myr")),-data.depl,input,data,res,ar,50,'jet',min_z=-max_depl,max_z=0,full=fullV),endif
if(size(data.depl,1)>1),produce_plot('D2D_',sprintf(strcat("Depletion at t=",num2str(data.time/data.t_yr/1000000.0,"%04.0f"),"Myr")),data.depl,input,data,res,ar,20,'bgry',min_z=0,max_z=max_depl,full=fullV),endif
if(size(data.depl,1)>1),produce_plot('D2Db_',sprintf(strcat("Depletion at t=",num2str(data.time/data.t_yr/1000000.0,"%04.0f"),"Myr")),data.depl,input,data,res,ar,20,'hot',min_z=0,max_z=max_depl,full=fullV),endif
% if(size(data.depl,1)>1), produce_plot('D2Dc_',sprintf(strcat("Depletion at t=",num2str(data.time/data.t_yr/1000000.0,"%04.0f"),"Myr")),-data.depl,input,data,res,ar,50,'jet',min_z=-max_depl,max_z=0,full=fullV), endif
% if(size(data.depl,1)>1), produce_plot('D2D_',sprintf(strcat("Depletion at t=",num2str(data.time/data.t_yr/1000000.0,"%04.0f"),"Myr")),data.depl,input,data,res,ar,20,'bgry',min_z=0,max_z=max_depl,full=fullV), endif
% if(size(data.depl,1)>1), produce_plot('D2Db_',sprintf(strcat("Depletion at t=",num2str(data.time/data.t_yr/1000000.0,"%04.0f"),"Myr")),data.depl,input,data,res,ar,20,'hot',min_z=0,max_z=max_depl,full=fullV), endif
if(size(data.w,1)>1),produce_plot('W2D_',"Water content in ppm",-data.w,input,data,res,ar,50,'jet',min_z=-100,max_z=0,full=fullV),endif%input.H2O), endif
&pN%p_average,pN%p_average2,pN%pr_time,pP%moveRef)! transfer particle properties to cells
if(pI%compress.ge.4)callUpdatePressure(jmin_2D,cell%ref_p,cell%ref_g,cell%ref_r,mesh%rc,pE%Gr,pE%Psurf,pF)! Get real pressure profile depending on actual density and gravity fields
pI%Psurf=pE%Psurf*(pF%D*pF%rho*pF%g)*pF%D**2/(pF%kappa*pF%eta_ref)! from lithostatic pressure to stress as used e.g. for pore pressure in plasticity.f90
pM%Psurf=pE%Psurf! used in melt.f90 -> no need to use pE as additional input parameter then
part%df(m)=(field%T(i,j,k)-solidus_ref)/(mc%liquidus(i,j,k)-solidus_ref)!mc%solidus_ref(i,j,k)) (see explanation above for hydrated case) ! CHECK if T-solidus_ref or T-solidus ?
else
...
...
@@ -166,6 +167,8 @@ contains
part%df(m)=0.0_dp
endif
if((pM%DeltaF_min.gt.0.0_dp).and.(part%df(m).lt.pM%DeltaF_min))part%df(m)=0.0_dp! extract melt only above specific threshold
if(mc%DeltaF(i,j,k).ne.0.0_dp)then! bring new crust to surface
mc%cr_age(i,j)=t! always assume that newest crust goes (partly) to the surface
...
...
@@ -810,22 +824,22 @@ contains
if((pX%dU238.ne.0.0_dp).and.(cell%r(i,j,k).lt.0.5_dp).and.(mc%DeltaF(i,j,k).gt.0.0_dp))then! is (in average) primordial mantle material or wedge material (should be 0 if primordial mantle)
elseif((pX%dU238.ne.0.0_dp).and.(mc%DeltaF(i,j,k).gt.0.0_dp))then! part of cell in crust, hence cannot use cell radiogenic heat sources -> use cell value below
!part%X_U238(m) = part%X_U238(m) * (1.0_dp - part%df(m))**(1.0_dp/pX%dU238) !/ (1.0_dp - part%df(m)) ! /(1-dF) to fill up whole cell again with same concentration
!part%X_U238(m) = part%X_U238(m) * (1.0_dp - part%df(m))**(1.0_dp/pX%dU238) !/ (1.0_dp-mc%DeltaF(i,j,k)) !/ (1.0_dp - part%df(m)) ! /(1-dF) to fill up whole cell again with same concentration
part%X_U238(m)=max(0.0_dp,part%X_U238(m)*(1.0_dp-mc%DeltaF(i,j,k))**(1.0_dp/pX%dU238)/(1.0_dp-mc%DeltaF(i,j,k)))! /(1-dF) to fill up whole cell again with same concentration
if(cell%fld_x)part%X_U238(m)=part%X_U238(m)+mc%X_U238_add(i,j)!/ compr_fac !cell%X_U238(i,j,k) ! do not divide again by density since was already divided by melt mass above