DTM Generation

1.  Define box area using JVIEW.
	-> 'n' key for new box
	-> +/- keys to rotate
	-> arrow keys to resize
	-> right mouse recentre to clicked point

	e.g. cmd:
	
	jview nbcoast.chart -pickrot -maxsub 1200 -navlook ../decnav/*/*

  Output (if exited properly) consists of Box.header0, Box.header1, etc files.
  There is one header file per created box.

2.  Make blank map sheet.  This map sheet inherits the projection data from Box.header
  files (which inherits projection data from the chart file?).  The projection data
  includes projection latitude, rotation, etc.

	e.g. cmd:

	make_blank -area path/Box.header0

	-> prompts for output file name (use location_monthyear, e.g. DeepCove_Oct2000)
	-> prompts for 8bit of floating point (use float for DTM).
	-> prompts for mpp (metres per pixel), i.e. scale (keep final file size in mind)

3.  Convert to real *4 format (FORTRAN single precision float).  Use tor4 program:

	e.g. cmd:

	tor4 DeepCove_Oct2000 (uses output file from make_blank above).

4.  Create beam weights file using makeWts.

	e.g. cmd: 

	makeWts - grid

	-> input # weights (i.e. # beams, e.g. 127)
	-> enter weight string in following formats
	
	e.g.
	0 64 0.05 1.0		// from beam 0 to 64, weigh linearly from 0.05 to 1.0
	65 126 1.0 0.05		// from beam 65 to 126, weigh linearly from 1.0 to 0.05
	0 0 0 0			// exit

	******
	NOTE: bug in program assigns weight of 1.0 to final beam, fix in vi.
	******

	Rename MOS_weights to EM3000_weights.

5.  Binarize tidal data from ASCII file.  ASCII file has following format:

	295 12 45 1.516  // julian_day hour minute height

	e.g. cmd:

	binTide -year 2000 -delay 14400 PI.ascii PI.binary

	"delay" is time offset added to ASCII file time before conversion to binary, in this case from AST to GMT (+4 hrs).

6.  Merge tidal data to observations (reduces all obs to chart datum?)

	e.g. cmd:

	mergeTide -tide tides/PI.binary merged/*/*merged


Next two steps are usually done run from a script to process multiple data sets.  The commands are below, followed by a sample script (gridit).

7.  Weigh all sets of pings accounting for tides and using beam weights from makeWts above.

	e.g. cmd:
	
	weigh_grid -fresh_start -tide -custom_weight EM3000_weights -beamwidth 1.5 DeepCove_Oct2000 ../merged/JD*/*merged

	NOTE: memory intensive, use -nmap flag to perform computations on disk.  


8.  Add sun illumination.

	e.g. cmd:

	addSUN -azi 315 -vert_exag 1.0 -elev 45 fileprefix

gridit script:

#
#       -nmap \
weigh_grid \
        -fresh_start \
        -tide \
        -custom_weight EM3000_weights \
        -beamwidth 1.5 \
        $1 \
        ../merged/JD*/*merged

addSUN \
        -azi 315 \
        -vert_exag 1.0 \
        -elev 45 \
        $1 \

#jview $1.r4 $1.sun* &

note:  If seastate rough and linear beam weights not working, use gridvert script:

#
#       -nmap \
weigh_grid \
        -fresh_start \
        -tide \
        -max_incidence 60.0 -leave_outer \
        -beamwidth 1.5 \
        $1 \
        ../merged/JD*/*merged

addSUN \
        -azi 315 \
        -vert_exag 1.0 \
        -elev 45 \
        $1 \

#jview $1.r4 $1.sun* &

Last modified: February 21st, 2001