Changeset 28265
- Timestamp:
- 05/09/24 09:53:45 (11 months ago)
- Location:
- issm/trunk-jpl/src/m/contrib/adhikari
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/contrib/adhikari/wahr.m
r26267 r28265 1 function [vert, horz ] = wahr(disc_rad,xi,love_h,love_l);2 % a function to compute vertical and horizontal crustal motion...1 function [vert, horz, accl] = wahr(disc_rad,xi,love_h,love_l,love_k); 2 % a function to compute 3D crustal motion and change in gravitational acceleration... 3 3 % ...for a disc load, inspired by Figure 1 of Wahr et al., 2013. 4 4 % … … 8 8 % vert = vertical crustal motion [m] 9 9 % horz = horizontal crustal motion [m] 10 % accl = change in gravitational acceleration [m/s2] 10 11 % disc_rad = disc radius [m] => set to 20 km to replicate the Wahr experiment. 11 12 % xi = grid points along the distance away from the disc center [m] 12 % love_h = load Love numbers h for the vertical crustal motion. 13 % love_l = load Love numbers l for the horizontal crustal motion. 13 % love_h = load Love numbers h for vertical crustal motion. 14 % love_l = load Love numbers l for horizontal crustal motion. 15 % love_k = load Love numbers l for gravitational potential. 14 16 % 15 17 … … 31 33 % disc radius in degree 32 34 disc_rad = km2deg(disc_rad)/180*pi; 33 tau=zeros(size(love_h));34 tau(1) = 0.5*(1-cos(disc_rad)); % tau_035 35 p_value_disc = p_polynomial_value(1,n+1,cos(disc_rad)); 36 36 p_prime_disc = p_polynomial_prime(1,n,cos(disc_rad)); 37 for jj=2:n+1 38 nnn = jj-1; 39 tau(jj) = 0.5 * (p_value_disc(jj-1) - p_value_disc(jj+1)); 37 38 %for jj=2:n+1 39 % nnn = jj-1; 40 % tau(jj) = 0.5 * (p_value_disc(jj-1) - p_value_disc(jj+1)); 41 %end 42 43 for jj=1:n+1 44 n_d = jj-1; % n degree 45 coeff(jj) = 1/(2*(jj-1)+1); 46 coeff_accl(jj) = (n_d + 2*love_h(jj) - (n_d+1)*love_k(jj)) / (2*n_d + 1); 47 if jj==1 48 tau(jj) = 0.5*(1-cos(disc_rad)); % tau_0 49 else 50 tau(jj) = 0.5 * (p_value_disc(jj-1) - p_value_disc(jj+1)); 51 end 40 52 end 41 53 42 const=zeros(size(love_h)); 43 for jj=1:n+1 44 const(jj) = 1/(2*(jj-1)+1); 45 end 54 disc=sum(bsxfun(@times,p_value,tau),2); 46 55 47 disc=sum(bsxfun(@times,p_value,tau'),2); 56 g1 = -sum(bsxfun(@times,p_value,tau.*coeff.*love_h'),2); 57 g5 = -sum(bsxfun(@times,-sin(ang),bsxfun(@times,p_prime,tau.*coeff.*love_l')),2); 58 % gravitational potential 59 accl = -sum(bsxfun(@times,p_value,tau.*coeff_accl),2); 48 60 49 g1 = -sum(bsxfun(@times,p_value,(tau.*love_h.*const)'),2); 50 g5 = -sum(bsxfun(@times,-sin(ang),bsxfun(@times,p_prime,(tau.*love_l.*const)')),2); 51 52 % coeff 53 coeff = 1000*4*pi*(6.67408*10^-11)*(6.3781*10^6)/9.81; 61 % constants 62 const = 1000*4*pi*(6.67408*10^-11)*(6.3781*10^6)/9.81; % [m] 63 const_accl = 4*pi*(6.67408*10^-11); % [m/s2] 54 64 55 65 % vertical and horizontal solutions 56 vert = g1*coeff; % m 57 horz = g5*coeff; % m 66 vert = g1*const; % m g1 and g1_check give the same results. 67 horz = g5*const; % m 68 accl = accl*const_accl; % [m/s2] 58 69
Note:
See TracChangeset
for help on using the changeset viewer.