NADCON5-ng  0.0.2
NADCON5 Next Generation Documentation
cpt2.f
Go to the documentation of this file.
1 c> \ingroup core
2 c> \if MANPAGE
3 c> \page cpt2
4 c> \endif
5 c>
6 c> This subroutine generates the color pallette variables
7 c> for a GMT color plot.
8 c>
9 c> This particular routine is best
10 c> for data that are all positive, but cluster near a small
11 c> value while having a lot of outliers to the high-side.
12 c> The color plot uses the MEDIAN (and a multiplier)
13 c> to set the upper limit, while forcing the lower limit
14 c> to be ZERO.
15 c>
16 c> \param[in] med Median of the gridded data
17 c> \param[in] csm Color Sigma Multiplier (The maximum color range will
18 c> be based on csm*med. The minimum color range will be zero)
19 c> \param[out] xlo Low value
20 c> \param[out] xhi High value
21 c> \param[out] xin Interval
22 c>
23 c>
24  subroutine cpt2(med,csm,xlo,xhi,xin)
25  implicit none
26  real*8 med,csm,xlo,xhi,xin
27  real*8 qv,qq,spread,std
28  integer*4 iv,iq
29 c - This subroutine generates the color pallette variables
30 c - for a GMT color plot. This particular routine is best
31 c - for data that are all positive, but cluster near a small
32 c - value while having a lot of outliers to the high-side.
33 c - The color plot uses the MEDIAN (and a multiplier)
34 c - to set the upper limit, while forcing the lower limit
35 c - to be ZERO.
36 c
37 c - Input:
38 c med = Median of the gridded data
39 c csm = Color Sigma Multiplier (The maximum color range will
40 c be based on csm*med. The minimum color range will
41 c be zero)
42 c - Output:
43 c xlo = Low value
44 c xhi = High value
45 c xin = Interval
46 
47  spread = csm*med
48  std = spread/8.d0
49 
50  iv = floor(dlog10(std))
51  qv = 10.d0**iv
52  qq = std / qv
53  iq = nint(qq)
54 
55  xin = iq * qv
56 
57  xlo = 0.d0
58  xhi = 8 * xin
59  return
60  end
subroutine cpt2(med, csm, xlo, xhi, xin)
This subroutine generates the color pallette variables for a GMT color plot.
Definition: cpt2.f:25