function [R,r,c,rho,n,l,w,gamma,U,V]=load_solar_model(EXCLUDE_F,fname); % MATLAB HELP: % % function [R,r,c,rho,n,l,w,gamma,U,V]=load_solar_model(EXCLUDE_F,fname); % % code to load a solar_model structure and take out what we need % % ouputs % R, the solar radius % r, the grid in fractional radius % c, sound speed (cgs) % rho, density (cgs) % n, radial order % l, angular degree % w, angular frequency (cgs) % gamma, damping rate (cgs) % U, radial eigenfunction % V, horizontal eigenfunction % % see codes.ps or codes.pdf for details % % aaron birch, may 21, 2002 % % load the solar model % sm=load(fname); % % if EXCLUDE_F then remove the fmode % if (EXCLUDE_F) I=find(sm.solar_model.n~=0); else I=1:length(sm.solar_model.n); end; % % extract only the modes that we need % n=sm.solar_model.n(I); l=sm.solar_model.l(I); w=sm.solar_model.w(I); gamma=sm.solar_model.gamma(I); % % eigefunctions with the normalization of 1 for the integral over % the sun % U=sm.solar_model.U(I,:)/sqrt(sm.solar_model.mass); V=sm.solar_model.V(I,:)/sqrt(sm.solar_model.mass); % % extract solar model functions % R=sm.solar_model.R; r=sm.solar_model.r; rho=sm.solar_model.rho; c=sm.solar_model.c;