Skip to content

Commit 392c430

Browse files
committed
update manual to version 2Beta, aps_wrf_SAR delay computation based on surface pressure
1 parent 2a1ffa7 commit 392c430

File tree

4 files changed

+26
-6
lines changed

4 files changed

+26
-6
lines changed

manual/TRAIN_manual.pdf

-6.26 KB
Binary file not shown.

matlab/aps_weather_model_SAR.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
% DB 02/2016 Close netcdf files
6767
% DB 04/2016 Branch into weather model script and include merra too
6868
% SSS 04/2016 Clear variables such memory need is reduced
69-
69+
% DB 07/2016 redefine hydrostatic delay to be based on surface pressure.
7070

7171
fig_test = 1; % when 1 show the dem as debug figure
7272
save_3D_delays = 0; % When 1 saves the tropopsheric delays for each x,y and with height

matlab/aps_weather_model_nan_check.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
step_level = [1:length(Pressure_level)]';
3636
end
3737

38-
% loopign though and use TEMP as inital check for nan
38+
% looping though and use TEMP as inital check for nan
3939
n_pixels = size(P,1)*size(P,2);
4040
for k=1:length(Pressure_level)
4141
ix_nan = isnan(Temp(:,:,step_level(k)));

matlab/aps_wrf_SAR.m

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
% 27/09/2015 DB Separate the DEM loading, ask for number of domains.
5454
% 28/09/2015 DB Also save the delay computation for a grid or z to include Pirate compartibility.
5555
% 28/09/2015 DB Include multi-core from matlab
56+
% 07/07/2016 DB Redefine hydrostatic delay to be based on surface pressure.
5657

5758
save_complete=0; % save support information when 0
5859

@@ -281,10 +282,20 @@
281282
ylist = ylist(ix);
282283
latlist = latlist(ix);
283284
lonlist = lonlist(ix);
284-
285285
latlist=double(latlist);
286286
lonlist=double(lonlist);
287287

288+
numy = length(unique(latlist));
289+
numx = length(unique(lonlist));
290+
ulatlist = unique(latlist);
291+
ulonlist = unique(lonlist);
292+
uxlist = unique(xlist);
293+
uylist = unique(ylist);
294+
295+
296+
297+
298+
288299
if save_complete==0
289300
% saving the information for support plotting
290301
wrf.wrf_lonlat = [lonlist latlist];
@@ -346,6 +357,14 @@
346357

347358
%% Calculate Geometric Height, Z
348359
Z = (H.*Re)./(g/g0.*Re - H);
360+
361+
% Find middle of scene to work out glocal and Rlocal for use later
362+
midx = round(mean(uxlist));
363+
midy = round(mean(uylist));
364+
glocal = g(midy,midx,1);
365+
Rlocal = Re(midy,midx,1);
366+
367+
349368

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

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

359378
% Interpolate Temp P and e from 0:20:15000 m
360379
% then integrate using trapz to estimate delay as function of height
@@ -383,8 +402,9 @@
383402
Lw = (10^-6).*-1*flipud(cumtrapz(flipud(XI),flipud(tmp1)));
384403
% L is zenith delay one way in metres
385404
tmp2 = k1.*YPI./YTI;
386-
Ld = (10^-6).*-1*flipud(cumtrapz(flipud(XI),flipud(tmp2)));
387-
405+
%Ld = (10^-6).*-1*flipud(cumtrapz(flipud(XI),flipud(tmp2))); % This is using P/T expression (Hanssen, 2001)
406+
gm = glocal;
407+
Ld = (10^-6).*((k1*Rd/gm).*(YPI - YPI(zref/zincr +1))); % This is P0 expression (Hanssen, 2001)
388408

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

0 commit comments

Comments
 (0)