Skip to content

Commit

Permalink
update manual to version 2Beta, aps_wrf_SAR delay computation based o…
Browse files Browse the repository at this point in the history
…n surface pressure
  • Loading branch information
dbekaert committed Jul 7, 2016
1 parent 2a1ffa7 commit 392c430
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 6 deletions.
Binary file modified manual/TRAIN_manual.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion matlab/aps_weather_model_SAR.m
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
% DB 02/2016 Close netcdf files
% DB 04/2016 Branch into weather model script and include merra too
% SSS 04/2016 Clear variables such memory need is reduced

% DB 07/2016 redefine hydrostatic delay to be based on surface pressure.

fig_test = 1; % when 1 show the dem as debug figure
save_3D_delays = 0; % When 1 saves the tropopsheric delays for each x,y and with height
Expand Down
2 changes: 1 addition & 1 deletion matlab/aps_weather_model_nan_check.m
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
step_level = [1:length(Pressure_level)]';
end

% loopign though and use TEMP as inital check for nan
% looping though and use TEMP as inital check for nan
n_pixels = size(P,1)*size(P,2);
for k=1:length(Pressure_level)
ix_nan = isnan(Temp(:,:,step_level(k)));
Expand Down
28 changes: 24 additions & 4 deletions matlab/aps_wrf_SAR.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
% 27/09/2015 DB Separate the DEM loading, ask for number of domains.
% 28/09/2015 DB Also save the delay computation for a grid or z to include Pirate compartibility.
% 28/09/2015 DB Include multi-core from matlab
% 07/07/2016 DB Redefine hydrostatic delay to be based on surface pressure.

save_complete=0; % save support information when 0

Expand Down Expand Up @@ -281,10 +282,20 @@
ylist = ylist(ix);
latlist = latlist(ix);
lonlist = lonlist(ix);

latlist=double(latlist);
lonlist=double(lonlist);

numy = length(unique(latlist));
numx = length(unique(lonlist));
ulatlist = unique(latlist);
ulonlist = unique(lonlist);
uxlist = unique(xlist);
uylist = unique(ylist);





if save_complete==0
% saving the information for support plotting
wrf.wrf_lonlat = [lonlist latlist];
Expand Down Expand Up @@ -346,6 +357,14 @@

%% Calculate Geometric Height, Z
Z = (H.*Re)./(g/g0.*Re - H);

% Find middle of scene to work out glocal and Rlocal for use later
midx = round(mean(uxlist));
midy = round(mean(uylist));
glocal = g(midy,midx,1);
Rlocal = Re(midy,midx,1);



%% Find middle of scene to work out glocal and Rlocal for use later
cdslices = maxdem/vertres +1;
Expand All @@ -354,7 +373,7 @@
cdstack_wet = zeros(size(lonlist,1),cdslices);

XI=(0:zincr:zref)';
%gh = glocal.*(Rlocal./(Rlocal+XI)).^2; %gravity with height for XI height range
gh = glocal.*(Rlocal./(Rlocal+XI)).^2; %gravity with height for XI height range

% Interpolate Temp P and e from 0:20:15000 m
% then integrate using trapz to estimate delay as function of height
Expand Down Expand Up @@ -383,8 +402,9 @@
Lw = (10^-6).*-1*flipud(cumtrapz(flipud(XI),flipud(tmp1)));
% L is zenith delay one way in metres
tmp2 = k1.*YPI./YTI;
Ld = (10^-6).*-1*flipud(cumtrapz(flipud(XI),flipud(tmp2)));

%Ld = (10^-6).*-1*flipud(cumtrapz(flipud(XI),flipud(tmp2))); % This is using P/T expression (Hanssen, 2001)
gm = glocal;
Ld = (10^-6).*((k1*Rd/gm).*(YPI - YPI(zref/zincr +1))); % This is P0 expression (Hanssen, 2001)

% Interpolate important part (i.e. total delay at elevations
% less than maxdem) at high res i.e. vertres, and put in cdstack.
Expand Down

0 comments on commit 392c430

Please sign in to comment.