| Back to HOW_TO  |  Back to General Information  |

rd

Graphic display of real arrays, like topography. Resides in  ~hgs/bin  (is a link to another directory)
Source code resides in  ~hgs/Oload/p/mpp/rd.f

Uses grasol (~hgs/Oload/p/gra/otes18.f) for graphics.
 

Special commands at the graphic prompter:
To draw coastlines simply hit return.
To exit the procedure you can  ^C  at the graphic prompter and answer  Y  (yes) to quit immediately.
Or enter  S  for shut and hit return. And return again at the next prompter.
You can enter  c  and a number between 0 and 15 to define the coastline colour.

Enter C to come to a prompter where you could specify a more complicated command.

rd needs an instruction file. Example:

This is for showing topography
31 ^ &/FLZU.DAT              - needed for the CAREA section
32 ^ &/FLMH.DAT              - contains the flags and depth arrays
   q
 &param
 qflm=.true.,qclean=.true.    - qflm is set .true. to read only CAREA from 31
 title='Ocean Depth'
 range=2000.                 - meters maximum depth
 ivss=1                       - two-sided depth range, 0 to 2000 m.
 target='SPpAOoAa'            - produce a color field at all these flags.
 palfile='bathy.pal'          - the palette file. *)
 &end
   }                         - An openf-option to stop

*) should reside in the catalogue from where rd is started.
 

Files:

31 - Flags array
32 - (Possibly flags array and) first data array (H) if this is grid type M
33 - (optionally:) flags for and/or the first data array (H), not grid tyoe M
34 - (Possibly flags array and) second data array (G)
 
 

Namelist &param

qflm           - logical - .true.: Flags are read from unit 32 and used.
qsflm          - logical - .true.: Flags are read from unit 32 but later on ignored.
q_ice          - logical - .true.: The flags array contain special flags for node type "Ice".
qfmt(iun)      - logical - .true.: The file on this unit is an ascii file
nsec(iun)      - integer - Read the real array in position nsec from this file unit (default=1)
opt_revo       - char*1  - 'y' - yes, both flags and data arrays are in North-to-South order.
                           'n' - no, neither...
                           'f' - only the flag array is in North-to-South order.
                           'd' - only the data array is in North-to-South order.

In the Maxwell problem using univice.f we output a mean sea level scalar after the potential.
This value can be applied on the potential using
qrsl(iun)=.true. and qssl(iun)=.true.

title(2)       - char*64 - Title (1) for the data array read on unit 32, title (2)
                           for any other data array

target         - char*8  - Target for flags, usually 'L' (land) and/or 'S' (sea)
                           Possibly also 'I' (ice) together with q_ice=.true.
                           'A' - active boundaries
                           'O' - out-of-model area

range(2)       - real    - data range for display of fields (1) and (2) (H and G)

rangeh(2)      - real    - upper range limits for fields (1) and (2) (ivss(i)=-1)

ivss(2)        - integer -  1: Data display is two-sided -range,+range,
                            0: one-sided 0,+range
                           -1: ata display is two-sided -range,+rangeh

ix_corner
iy_corner
ix_width
iy_width
ksiz          - integer - size of picture element. 1 is the smallest (3x3 pixels)

clo, cla, sca - real    - projection centre and projection scale.
                          A negative number for sca specifies grid resolution
                          without projection.
qcircon       - logical - The field is circularly connected between M and 1
q_rev_yax     - logical - GraSol_RvyAx parameters
iadd_yax      - integer -       "          "
imul_yax      - integer -       "          "

qclean        - logical -

palfile       - char*64 - Palette file name, two-sided data plotting
pal1s_file    - char*64 - Palette file name, one-sided data plotting
ucol(16)      - integer - Color setup
npal          - integer - position in palette file

qauto         - logical - ? (loads the bathy.pal file)

gmtopt        - char*64 - Default '-A1000/3 -Dl -I1 -I2 -I3'
                          This defines the coastline features. You need to study GMT pscoast how
                          to use the options that select features. You have no way to change the
                          line style here, and projections etc. are also irrelevant.
                          It boils down to declare feature area and level (-A), resolution
                          (-D, add c for crude, l for low, i for intermediate,
                           h for high and f for full).
                          -I is used to select wet features.
 

Commands after  C  in graphic mode.

o - show the other field  (H <-> G)

h - prompt to edit the headline (title)

g - prompt for editing of the GMTOPT string (coastlines drawing options)

G_e - east  gradient
G_n - north gradient
    compute the the gradient of the first field and store it in the other field
    (G <- grad(H)). A subsequent command o is needed to switch the display.

a - compute global admittance coefficient and H <- H/G
    Use -DC option to remove DC part before admittance computation.
    Coefficient can be supplied:
    a [coeff] [-DC]

l - linear combination:
    H <- aH + bG
    l a b

r - compute local ratio of the two fields (call ratio2f) H/G
    Node values where denominator is less than eps are skipped:
    r [eps]

d - compute degree variances and output to file unit iudv:
    d [iudv] [target]

t - target flags (character array, max.length 8)
    t target

f - flag changing; a lot of options:
    f    w e s n         geographic bounds, west, east ... e > w !
        [T=target]       redefine flag symbols for viewing.
        [I=flgv]         Inside  the area, set this flag value [1]
        [O=flgv]         Outside the area, set this flag value [0]
        [ KI KO ]        Keep flags inside / outside unchanged.

w - write the displayed field to a file,
    w[f] filename
                      wf to write formatted, else binary.

n - show geographic grid on a plane array
    (only if projection (PSTERP)/RSTERP) is enabled)
    n [x-incr, y-incr]    Default = 1, 1
 

Example

Two arrays, no flags

$ setenv UNIVP /Bifrost/hgs/Maxwell/it2/
$ rd \!rd-up.ins '>SL>'

where rd-up.ins is
The following is for absolute sea level
i.e. ocpot + p_RADI
At the graphic prompter you must enter command
l 1. 1.

SL>
32 # ${UNIVP}p_RADI_?.dat
34 # ${UNIVP}ocpot_?.dat
   q
 &param
 range=300.
 target='LISA]'
 qauto=.false.
 title='RADI','RSL'
 palfile='^/standard.pal', ivss=-1,-1, opt_revo='d', range=300.,300.
 q_clip_range=.true.
 clo=180.
 GMTOPT='-A500/2 -Dc'
 ix_corner=240,iy_corner=60, scale=1., qcircon=.true.
 qslvl=.false., qrsl(34)=.true., qssl(34)=.true.
 &end
   }

.bye