ADVANCED SURFER TRICKS for beginners - by Dr.D.
February 8, 2011
READ ALL INSTRUCTIONS BEFORE STARTING!

Reminder - each image for this class should include your name as an object that image.

Blanking files will be used to (1) generate a cross section from a previously generated grid (.grd) file, and, (2) to erase contours from those areas a rectangular contour map where measurements were NOT taken, where contours are an artifact to node values extrapolated from distant measurements, also by operating on a .grd file.  Such extrapolated contours are meaningless.  I will first demonstrate the Slice procedure (cross section or profile) and then the Blank function (getting rid of contours beyond the range of the data).

Blanking files can be used to erase contours from those areas of a map where data have not been collected but where Surfer nevertheless calculates values and plots the results.  Not all maps include rectangular coverage with respect to data. Surfer draws contours even where no observations were made, observations necessary to constrain contours.  Large parts of the rectangular area defined by minimum and maximum X and Y values were not covered as part of this field survey. It is usually a good idea to "erase" those sections of maps where there are no data. This can be done by "blanking" out part of the grid.

In order to link data points and contour maps, plot the post map and the contour map.  Select both maps (click one map, then hold down the shift key and click the other map).  Then, in the Map menu, Overlay Maps.  This will superimpose the data points on the contour map, even if the maps have different limits.  You can then note (write down coordinates!) which areas of the contour map should be 'blanked' so that those who read your report will not become curious over patterns that have no real meaning.

There are also times when cross-sectional views - or profiles - are useful.  The Slice command works like a knife through the grid, returning the value at each point where the slice cuts a row or a column. More on 'slicing' later.

NOTE: both blanking and cross-section (slice) commands operate on the grid file. Commands are part of the GRID menu. Your grid file - the file generated by the DATA - GRID command - must be accessible. BLANK generates a new grid file, and SLICE generates a profile (X,Y,Z) file that can be used as input to Excel.  Note that the default output file name should be overwritten by a unique name you select.

For both blanking and slicing, you need to generate first a .BLN file. This is an ASCII (text) file you can write in Word, "Save As" text - type in the name of the file including the extension .BLN - put quote marks ("space1.BLN", for example) so Word does not tack an extra .txt extension to your file name.

 Format of blanking files:

Npoints,flag (Npoints is number of x,y pairs to define boundary or profile, flag 0 means blank outside boundary, 1 means inside boundary. No space after ,    !! - Use 1 for a 'slicing' .BLN file.)
X1,Y1 first coordinate pair of boundary
X2,Y2 second   "    "    "   "     "     "
(and so on - )
Xn,Yn last coordinate pair of boundary - this must be identical to first coordinate pair.
Np,Flag begin to define another polygon boundary (skip no lines in .BLN file) - repeat sequence as needed.

BLANKing: create a series of polygons by defining corners in grid (x,y) coordinates (do not forget Npoints and flag to start each polygon), run the BLANK command and write a new .GRD file. Use this new file to plot both a contour map and surface map.

A single .bln file can blank several parts of the map.  A single .bln file can slice along several legs - your profile can have jogs in it (not recommended until you are an experienced scientist, or at least until you are doing some serious thesis work and have an advisor to suggest when results look too silly to show to the public.)  The following blanking file blanks a rectangle

5,1
40,50
40,65
55,65
55,50
40,50

There is NO RETURN at the end of the final line (in this example, after the second 40,50).  If you hit 'return' Surfer will look for Npoints,flag and return an error message.  If you need to blank more than one area, you simple continue typing the blanking file:

5,1
40,50
40,65
55,65
55,50
40,50
4,1
-20,6
-10,12
-15,9
-20,6

In addition to the rectangle blanked in the first example, this blanking file also blanks a triangle with vertices at (-20,6), (-10.12) and (-15,9).  I have not encountered a limit to the number of polygons that can be blanked by using a single file but the most I have ever had to blank to date was 3 areas.

CROSS SECTIONS: although it takes only 2 points to define opposite ends of a cross section, you can "dog-leg" cross sections by using 3 or more points (I recommend against that for now - stick to simple cross-sections). A point is generated each time your profile cuts a grid line and an ASCII output file containing all of these points is generated.

By convention, always begin your profile in the west and end it in the east, as if you are viewing a standard map from the south.  A north-south profile should begin in the south and end in the north. 

The format for this output file (5 columns) is: X-coordinate, Y-coordinate, Z value, horizontal distance from beginning of cross section, number of "leg". For magnetic field or gradient as a function of distance along a profile, plot column 3 and a function of column 4. Open this output file in Excel, rearrange columns, and plot the profile.

NOTE: if you allow Surfer to use defaults for X and Y min and max and intervals, guessing at values for nodes of the grid can be a real challenge.  If, on the other hand, you have selected integer values for min and max, as an integer or single-digit (0.5 or 0.1) interval value, identifying corners of your blanking polygon or ends of your slice will be easy.

Example: to draw a cross-section from map coordinates (310,4226) to (312, 4221) the .BLN file needed looks like this:

2,1
310,4226
312,4221

Remember, this has to be "saved as" a text file with extension .BLN!!!!  You must save as text file but use quotation marks when typing the file name  -  "profile1.bln" for example.

The most common blanking file errors are:

    an extra return <enter> at the end of the final line

    a space in line, usually after the comma

    typing a period instead of a comma

Note: having nice even values for (x,y) coordinates of grid nodes makes blanking files easier to write and results more predictable.

After saving this blanking file, I delete the top line and again "Save as" a text file (this time with the usual extension .txt) called endpoints.txt - after I close Word I plot these points as a Post Map and the Overlay Maps -

310,4226
312,4221

TO DO (1): Download and save the ASCII file alldata.txt.  There are 5 columns: the first 2 represent locations where data were collected, and the second three represent the data: total magnetic field measured 80 cm from the ground, total magnetic field measured 160 cm from the ground, and the magnetic field gradient. 

These data were collected using a magnetometer to search for unmarked graves in a Toledo cemetery once used by a mental hospital.

Generate a grid for bottom sensor data, plot a contour map and overlay a post map. Examine your maps - should you set limits on the grid?

Can you see the advantage in setting grid (X,Y) limits and grid spacing as nice round numbers when trying to write a .BLN file? 

Redo the grid and contour map as you see fit.  Study your map: Which parts of the map (areas where no measurements were made) should be "blanked" out? Write a .BLN file outlining polygons to do this. Be certain to write the "blanked" grid file with a name different from the grid file upon which you operate! Plot the result - a map with selected parts blanked out! Include your name as part of title.  All images should be exported and inserted into a single Word document.  Details follow:

Use the text tool to print "Insufficient data" in the blanked part of your map. Use the line tool to show the location of your cross section. Label the ends of the cross section line: A and A' are traditional for the first cross section. A cross section should always be viewed "from the south", with west on the left. A cross section that runs due north should be plotted with south to the left.

TO DO (1 - continued): Return to Data - Grid and generate grids for the top sensor (column 4) and magnetic field gradient (column 5). NOTE: change the grid file (output) names or you will overwrite your earlier .grd files!

Note that you can use the same .bln file used above to eliminate contours from those sections of these maps that lack data points - you do not have to write new blanking files to blank the same parts from maps covering the same data distribution. Plot contour maps for top and gradient.

To Do (2): SLICE & PLOT: Use a blanking file to generate numerical values that you can take into Excel and plot a cross-sectional graph of topography from your work last week crossing from the base of the mountain across the peak and down the opposite slope.  Set up a .bln file to "SLICE" the grid for you - and plot the result (elevation as a function of distance along profile) using Excel (or Grapher, if you wish). Include your name in title to hand in.  You must output your slice as a .dat file!  Browse that button when the dialog box appears, select an appropriate location for saving the new file that will be generated.  A data point is generated each time your "cut" crosses a grid line.  The output .dat file is a text (ASCII) file that can be opened in Excel. 

The format of the output file is: x, y, Z, d, L where x and y are the coordinates of each data point, Z is the value at that point, d is the distance from the beginning of the profile, and L the identification of the line segment (it is possible to slice multiple cross sections with a single .bln file.  Plot Z as a function of d in Excel.   Do not forget any of the essential elements of a graph: axis labels, a title, your name.

Your project last week involved a volcano. Select a cross section (not due east-west or north-south, please) that reveals the topographic shape of that volcano - from the base to the summit and down the other side.  Send me the image attached to a Word document.  What kind of volcano are you looking at, a stratovolcano or a shield volcano?  Note: there is probably significant vertical exaggeration.

Summary report: Page 1: 3 contour maps (blanked) showing magnetic top, bottom and gradient data. Page 2: contour map of volcano from last week with line showing location of your 'slice'.  Page 3: Excel chart showing elevation as a function of distance along this profile.  Write a short caption telling the viewer what your Excel chart shows.  Label axes, make it pretty!  Note: I do not require surface maps or a profile of the magnetometer measurements.  Short captions are necessary!

If you complete your report by Friday (2/11/2011) noon I will do my best to grade your efforts before the week-end.

F.Y.I. (not an assignment): Surfer can handle discontinuities in contours (faults, cliffs, stream valleys) through the use of blanking files.  A blanking file is an ASCII (text) file you can write in Word, "Save As" text - type in the name of the file including the extension .BLN - put quote marks ("space1.BLN", for example) so Word does not tack an extra .txt extension to your file name.  A breakline is applied when the grid is generated (data - grid).  None of the projects you worked on last week involve this sort of issue so you will not use a .bln file for that purpose.  When you someday need to keep contours from being interpreted across a discontinuity, see me and I'll help.  There is a Surfer instruction book floating around BO 3051 (thanks, Dr. Max Brown, Retired).

Notes: Edit Grid can be used to change "Z" values of individual points on the grid. It is sometimes useful for removing spikes you know are due to noise or errors but where you can not locate the bad data point and remove it from the input to Data-Grid. 

F.Y.I. (not an assignment): A "Classed Post" map plots different symbols for different "Z" values. You can also use the "Post" map to plot "Z" values and contour them yourself! "Center" those labels (POST dialog window)!

F.Y.I. (2)(not an assignment): A Post map can also plot labels if those labels are stored in a column associated with their (x,y) coordinates.

F.Y.I. (3)(not an assignment): Our new (2006) cesium vapor magnetometer measures both top and bottom 10 times a second as I walk with the instrument at a speed of 1 meter/second, spacing measurements along a profile at 10 cm.  It usually takes longer to set up reference points for a survey (the data logger has a button that 'marks' the record each time the sensors pass a reference point) than it does to complete the magnetometer measurements!  You can learn how to plan and execute a survey, and process the data, in EEES 4610.

--------------------------------------------------------

I have a copy of "Surfer for Windows User's Guide" that gives a lot of other things Surfer can do - like overlay maps generated in other programs with the data. You can check this book out from me for use in Room 3051. Watch what advanced users are doing with various software and ask them to show you how they are doing what they do - students often discover tricks I have not yet learned!

Return to Syllabus

Hit Counter