Changeset 22815


Ignore:
Timestamp:
05/30/18 22:29:37 (7 years ago)
Author:
adhikari
Message:

CHG: final minor changes to all tutorials

Location:
issm/trunk-jpl/examples
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/examples/EsaGRACE/runme.m

    r22809 r22815  
    11
    22clear all;
    3 steps=[0:5]; % [1:5];
     3addpath('../Data','../Functions');
     4
     5steps=[0]; % [0:5];
    46
    57if any(steps==0) % Download GRACE land_mass data {{{
     
    1214   mget(f,'GRCTellus.JPL.200204_201701.LND.RL05_1.DSTvSCS1411.nc');
    1315
     16        !mv *.nc '../Data/'
     17       
    1418        % display the content of the netcdf file.
    1519        %ncdisp('GRCTellus.JPL.200204_201701.LND.RL05_1.DSTvSCS1411.nc')
     
    122126        sol3 = md.results.EsaSolution.EsaNmotion*1000; % [mm]
    123127        sol4 = md.results.EsaSolution.EsaEmotion*1000; % [mm]
     128
    124129        sol_name={'Change in water equivalent height [cm]', 'Vertical displacement [mm]',...
    125130                'Horizontal (NS) displacement [mm]', 'Horizontal (EW) displacement [mm]'};
     131        fig_name={'Fig_dH.pdf','Fig_vert.pdf','Fig_horzNS.pdf','Fig_horzEW.pdf'};
    126132
    127133        res = 1.0; % degree
     
    160166                set(0,'DefaultAxesFontSize',18,'DefaultAxesLineWidth',1,'DefaultTextFontSize',18,'DefaultLineMarkerSize',8)
    161167                figure1=figure('Position', [100, 100, 1000, 500]);
    162                 gcf;
    163                 load coast;
    164                 cla;
     168                gcf; load coast; cla;
    165169                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 % }}}
    166174                plot(long,lat,'k'); hold off;
     175                % colormap, xlim etc {{{
    167176                c1=colorbar;
    168                 colormap(jet);
     177                colormap('haxby');
     178                caxis([-min(abs(min(sol)),abs(max(sol))) min(abs(min(sol)),abs(max(sol)))]);
    169179                xlim([-180 180]);
    170180                ylim([-90 90]);
     181                % }}}
    171182                grid on;
    172183                title(sol_name(kk));
    173184                set(gcf,'color','w');
    174 
    175                 %export_fig('Fig5.pdf');
     185               
     186                %export_fig(fig_name{kk});
    176187        end
    177188
  • issm/trunk-jpl/examples/EsaWahr/runme.m

    r22811 r22815  
    33addpath('../Functions');
    44
    5 steps=[0:6]; % [0:6];
     5steps=[0]; % [0:6];
    66
    77if any(steps==0) % Simple mesh creation {{{
  • issm/trunk-jpl/examples/SlrFarrell/runme.m

    r22813 r22815  
    11
    22clear all;
    3 steps=[5]; %
     3
     4steps=[1]; % [1:5];
    45
    56if any(steps==1) % Global mesh creation {{{
     
    128129        md.verbose=verbose('111111111');
    129130
     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
    130134        % Solve
    131135        md=solve(md,'Slr');
     
    141145        % solutions.
    142146        sol = md.results.SealevelriseSolution.Sealevel*100; % per cent normalized by GMSL (which 1 m) 
    143        
    144         res = 1.0; % degree
     147
     148        res = 1; % degree
    145149
    146150        % Make a grid of lats and lons, based on the min and max of the original vectors
     
    150154        % Make a interpolation object
    151155        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';
    154158       
    155159        % Do the interpolation to get gridded solutions...
     
    161165        figure1=figure('Position', [100, 100, 1000, 500]);
    162166        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]);
    166171        plot(long,lat,'k'); hold off;
    167172        % define colormap, caxis, xlim etc {{{
    168173        c1=colorbar;
    169         %colormap('haxby');
    170         %caxis([96 104]);
    171         xlim([-180 180]);
    172         ylim([-90 90]);
     174        colormap(flipud(haxby));
     175        caxis([96 105]);
     176        xlim([-170 170]);
     177        ylim([-85 85]);
    173178        % }}}
    174179        grid on;
    175         title('Relative sea-level [mm]');
     180        title('Relative sea-level [% of GMSL]');
    176181        set(gcf,'color','w');
    177182
Note: See TracChangeset for help on using the changeset viewer.