/[MITgcm]/MITgcm/verification/global_ocean.90x40x15/diags_matlab/jet0.m
ViewVC logotype

Annotation of /MITgcm/verification/global_ocean.90x40x15/diags_matlab/jet0.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1.2.1 - (hide annotations) (download)
Wed Oct 23 18:26:35 2002 UTC (21 years, 8 months ago) by mlosch
Branch: release1
CVS Tags: release1_p12, release1_p10, release1_p16, release1_p15, release1_p11, release1_p14, release1_p13, release1_p17, release1_p8, release1_p9, release1_p6, release1_p7, release1_p13_pre, release1_p12_pre
Branch point for: release1_50yr
Changes since 1.1: +1 -1 lines
o fixed the verification/global_ocean.90x40x15 experiment:
 - new bathymetry (the world according to A., JMC, and M.)
 - new initial fields and forcing fields (*.bin files)
 - new POLY3.COEFFS (for the next release one should switch to a full
   equation of state)
 - fixed several errors and redundancies in the data file
 - experiment uses looped cells
 - added matlab directory with diagnostic scripts for plotting of output

1 mlosch 1.1 function J = jet0(m)
2     %JET0 Variant of JET.
3     % JET0(M), a variant of JET(M), is the colormap used with the
4     % NCSA fluid jet image, but with the central colors set to white.
5     % JET0, by itself, is the same length as the current colormap.
6     % Use COLORMAP(JET0).
7     %
8     % See also JET, HSV, HOT, PINK, FLAG, COLORMAP, RGBPLOT.
9    
10     % taken from jet.m, Martin Losch, 3-8-02
11     % C. B. Moler, 5-10-91, 8-19-92.
12     % Copyright 1984-2001 The MathWorks, Inc.
13 mlosch 1.1.2.1 % $Revision: 1.1 $ $Date: 2002/10/22 13:30:40 $
14 mlosch 1.1
15     if nargin < 1, m = size(get(gcf,'colormap'),1); end
16     n = max(round(m/4),1);
17     x = (1:n)'/n;
18     y = (n/2:n)'/n;
19     e = ones(length(x),1);
20     r = [0*y; 0*e; x; e; flipud(y)];
21     g = [0*y; x; e; flipud(x); 0*y];
22     b = [y; e; flipud(x); 0*e; 0*y];
23     J = [r g b];
24     while size(J,1) > m
25     J(1,:) = [];
26     if size(J,1) > m, J(size(J,1),:) = []; end
27     end
28     % set central colors to white
29     if mod(m,2)
30     ic = ceil(m/2);
31     J(ic-1:ic+1,:) = ones(3,3);
32     else
33     J(m/2:m/2+1,:) = ones(2,3);
34     end

  ViewVC Help
Powered by ViewVC 1.1.22