Changeset 22815
- Timestamp:
- 05/30/18 22:29:37 (7 years ago)
- Location:
- issm/trunk-jpl/examples
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/examples/EsaGRACE/runme.m
r22809 r22815 1 1 2 2 clear all; 3 steps=[0:5]; % [1:5]; 3 addpath('../Data','../Functions'); 4 5 steps=[0]; % [0:5]; 4 6 5 7 if any(steps==0) % Download GRACE land_mass data {{{ … … 12 14 mget(f,'GRCTellus.JPL.200204_201701.LND.RL05_1.DSTvSCS1411.nc'); 13 15 16 !mv *.nc '../Data/' 17 14 18 % display the content of the netcdf file. 15 19 %ncdisp('GRCTellus.JPL.200204_201701.LND.RL05_1.DSTvSCS1411.nc') … … 122 126 sol3 = md.results.EsaSolution.EsaNmotion*1000; % [mm] 123 127 sol4 = md.results.EsaSolution.EsaEmotion*1000; % [mm] 128 124 129 sol_name={'Change in water equivalent height [cm]', 'Vertical displacement [mm]',... 125 130 'Horizontal (NS) displacement [mm]', 'Horizontal (EW) displacement [mm]'}; 131 fig_name={'Fig_dH.pdf','Fig_vert.pdf','Fig_horzNS.pdf','Fig_horzEW.pdf'}; 126 132 127 133 res = 1.0; % degree … … 160 166 set(0,'DefaultAxesFontSize',18,'DefaultAxesLineWidth',1,'DefaultTextFontSize',18,'DefaultLineMarkerSize',8) 161 167 figure1=figure('Position', [100, 100, 1000, 500]); 162 gcf; 163 load coast; 164 cla; 168 gcf; load coast; cla; 165 169 pcolor(lon_grid,lat_grid,sol_grid); shading flat; hold on; 170 % mask out oceans {{{ 171 if (kk==1) 172 geoshow(flipud(lat),flipud(long),'DisplayType','polygon','FaceColor','white'); 173 end % }}} 166 174 plot(long,lat,'k'); hold off; 175 % colormap, xlim etc {{{ 167 176 c1=colorbar; 168 colormap(jet); 177 colormap('haxby'); 178 caxis([-min(abs(min(sol)),abs(max(sol))) min(abs(min(sol)),abs(max(sol)))]); 169 179 xlim([-180 180]); 170 180 ylim([-90 90]); 181 % }}} 171 182 grid on; 172 183 title(sol_name(kk)); 173 184 set(gcf,'color','w'); 174 175 %export_fig( 'Fig5.pdf');185 186 %export_fig(fig_name{kk}); 176 187 end 177 188 -
issm/trunk-jpl/examples/EsaWahr/runme.m
r22811 r22815 3 3 addpath('../Functions'); 4 4 5 steps=[0 :6]; % [0:6];5 steps=[0]; % [0:6]; 6 6 7 7 if any(steps==0) % Simple mesh creation {{{ -
issm/trunk-jpl/examples/SlrFarrell/runme.m
r22813 r22815 1 1 2 2 clear all; 3 steps=[5]; % 3 4 steps=[1]; % [1:5]; 4 5 5 6 if any(steps==1) % Global mesh creation {{{ … … 128 129 md.verbose=verbose('111111111'); 129 130 131 % Choose different convergence threshold. [10% 1% 0.1%] to match Farrell 3 panels in Fig. 1 132 md.slr.reltol = 0.1/100; % per cent change in solution 133 130 134 % Solve 131 135 md=solve(md,'Slr'); … … 141 145 % solutions. 142 146 sol = md.results.SealevelriseSolution.Sealevel*100; % per cent normalized by GMSL (which 1 m) 143 144 res = 1 .0; % degree147 148 res = 1; % degree 145 149 146 150 % Make a grid of lats and lons, based on the min and max of the original vectors … … 150 154 % Make a interpolation object 151 155 F = scatteredInterpolant(md.mesh.lat,md.mesh.long,sol); 152 F.Method = ' linear';153 F.ExtrapolationMethod = ' linear';156 F.Method = 'natural'; % for smooth contour 157 F.ExtrapolationMethod = 'none'; 154 158 155 159 % Do the interpolation to get gridded solutions... … … 161 165 figure1=figure('Position', [100, 100, 1000, 500]); 162 166 gcf; load coast; cla; 163 %pcolor(lon_grid,lat_grid,sol_grid); shading flat; hold on; 164 contourf(lon_grid,lat_grid,sol_grid,[96 98 100 102 104 105]); shading flat; hold on; 165 geoshow(lat,long,'DisplayType','polygon','FaceColor','white'); 167 pcolor(lon_grid,lat_grid,sol_grid); shading flat; hold on; 168 [C,h]=contour(lon_grid,lat_grid,sol_grid,[96 98 100 102 104 105],'-k','linewidth',2); 169 clabel(C,h,'FontSize',18,'Color','red','LabelSpacing',500); 170 geoshow(lat,long,'DisplayType','polygon','FaceColor',[.82 .82 .82]); 166 171 plot(long,lat,'k'); hold off; 167 172 % define colormap, caxis, xlim etc {{{ 168 173 c1=colorbar; 169 %colormap('haxby');170 %caxis([96 104]);171 xlim([-1 80 180]);172 ylim([- 90 90]);174 colormap(flipud(haxby)); 175 caxis([96 105]); 176 xlim([-170 170]); 177 ylim([-85 85]); 173 178 % }}} 174 179 grid on; 175 title('Relative sea-level [ mm]');180 title('Relative sea-level [% of GMSL]'); 176 181 set(gcf,'color','w'); 177 182
Note:
See TracChangeset
for help on using the changeset viewer.