SURFER NOTES

Ctyoung/public_html/ge3900/Surfernotes2005.docCTY 11/03/04

Even if you are a big fan of Matlab, it is sensible for you to learn how to use Surfer because lots of nonprogrammers use it. The data files most commonly (easily) used in Surfer are XYZ files, such as those generated by MagMapper96 MagMapper2000? and WinGem. In general, these programs are so easy to use that it is not worth typing out the directions.

Data file notes: Surfer expects data files in X Y Z format, with the top row containing column headings. The big deal about Surfer is that it can accept data that have random locations, which it then converts by gridding into a uniform grid of values. The software that comes with equipment like the Geometrics 858 gradiometer and the GEM-2 electromagnetics instrument creates data files that look almost gridded but have to be gridded anyway. If you have gridded data, see my notes at the end of this handout. My best success has been using Surfer with X Y Z data files that come directly from WinGem* (from the GEM-2), which produces XXX_loc.csv (comma separated values) text data files. I have had some problems with MagMap which produces tab separated .dat text files. I have found that sometimes the values end up in the wrong columns.

*IF you are running the Gem-2 with three frequencies, WinGem produces A LOT of columns. Fortunately, the columns are labelled. One column contains asterisks (AKA "stars" ... *. If this gives Surfer a problem, you may have to replace the asterisks with zeros using a simple text editing program or MSWord. If you use MSWord, be sure to resave the file as a text file.

Be VERY CAREFUL with your data files to make sure that the data are in the right columns. If you work with files created by WinGem or MagMap2000 you will probably have no problems, but if you manipulated the data with Excel, you will have to 1. be sure to generate a textfile of either comma separated or tab separated values. Then check that file carefully. Excel is a bit flakey in generating tab separated data tables. You may have to examine the file several times to be sure that no data have strayed from their proper columns. I have spent about an hour working over my data file to be able to plot it in Surfer. Even so, I can see in my Surfer plot that there there are some bad values in the file.

We want to run Surfer 8.0. Log in to a Sun computer in room 709 or onto a PC. If you are using a Sun. click anywhere on the screen background, the click on PC/ Windows tools, Then click on Windows Terminal Server. This creates a window which essentially turns the Sun into a PC.

If you are on a PC, you can start Golden Software Surfer directly from the All Programs tab.

TO RUN SURFER ON OUR SUN COMPUTERS:

Type or select wts (windows terminal server)

You will need to enter your user id and password again. When the Windows screen is displayed, you may click on the icon for Surfer 8 or, you may click on

Start, All Programs, Golden Software Surfer 8

You need to create gridded data from your xyz file to make a map. Click on Grid, Data, and select an xyz file. Also, you need to enter a name for the output file you are creating (in the bottom of the window). There is a default generic name, but you should change it to something that reminds you of the particular map you want to create. You can view the column headings and select the columns you want. The gridding method of Kriging is OK. Click Grid report off. You don't need it. Click OK. There will be a noticable delay, gridding is computer intensive.

FOR COLORED IMAGE MAPS (Your instructor prefers these.)

I like to print two maps side by side on the page. I reset the direction the page rund in File, Page Setup, click on Landscape Mode.

To create a colored image map, I clicked on Map, Image Map, and selected the grid file. My data file still has some bad points, so I need to reset my max and min values for the colorization. I access the colorization controls by clicking on the image icon on the left sidebar. I set the limits of -5000 and 5000 directly on the panel showing the color scale. I chose vivid colors (strong red and blue) for the max and min values, and turned on the color scale. I label the axes by clicking on the individual axes, which brings up a window, and I filled in the blanks.

To set the color scale to a spectrum, create a colored image map and access the colorization control as described above, then add additional colors to the scale. You do this by control-click to insert new index markers and pick appropriate colors to give you a spectrum. I set the right most (lowest numerical value?) to red and progressed through the spectral colors of orange, yellow, green, blue and violet. Then, of course, you click on OK and Apply.

Please feel free to experiment with the other kinds of map such as shaded relief and wire frame. These can be used to impress managers, clients and members of the general public who are not familiar with contour maps ("The red peaks show you where to dig. "). In fact, these displays are mainly eye-catching and are really not more infomative than line contour or simple colorized maps.

FOR CONTOUR MAPS (old fashioned!):

Click on Map, New Contour Map. You are asked to select a grid file. Surfer immediately draws a contour map. To adjust the contour labels, click on the contour map icon in the sidebar on the lefthand side of the screen.

Click on the Contour Label column head and you can set the max, min and contour increment. I set the min to --5000, max to 5000 and contour interval to 500.

To force Surfer to label EVERY contour, I clicked on Label column header, and set Affected Level Skip to zero.

TO PLOT POSITIONS:

To plot positions of orginal data on your map make a "post map" from the map pull down. To overlay it on your contour map use the Map, Overlay Map option. There is a problem with the symbol type and size. For magnetics or GEM-2 data, there are so many points that the map is just about solid black when you use the default symbol. The symbol can be changed. In the sidebar to the left is called the Object Manager. In it, RIGHT click on the Post symbol. You can then reset the default symbol to a dot, and resize it to the minumum size ( .01 inch). Then the Post map is more attractive. You can also post the individual values for each location if you want, say for the resistivity map, but it becomes too crowded for magnetics or GEM-2 data. .

UNIX NOTES: HOW TO PRINT ANY TEXT FILE FROM THE SUN COMPUTERS

from the prompt, enter enscript (filename)

for example: enscript res2.grd

This will send the file to the default printer.

UNIX NOTES: TO GET A LISTING TO THE SCREEN OF THE CONTENTS OF THE CURRENT DIRECTORY

ls

To get a listing of all the files with .grd extension:

ls *.grd

UNIX NOTES: UNIX is case sensitive. ls *.grd and ls *.GRD are not the same. PCs are case insensitive.

IF YOU ARE WORKING WITH GRIDDED DATA:

Fix your gridded data file so that

1. the extension is .grd

2. (no column headers or annotation, no d= [ or ]).

3. See the documentation within Surfer and the example below for other info on making a file of gridded data.

You need the number of rows and columns, the location of the first and last points in each direction, and the max and min values in the array. A sample file of gridded data is given below.

THE .GRD FILE FOR SURFER FOR 2003 RESISTIVITY

DATA LOOKS LIKE THIS: See the help file in surfer for the meanings of the header values.

DSAA

10 21

2.0 6.5

0 10.5

351 1182

354 467 466 604 727 451 535 620 556 496

361 769 386 598 518 744 574 446 517 622

428 486 758 716 778 761 438 596 537 642

375 759 721 700 619 724 433 777 624 760

355 383 704 794 777 772 975 933 963 877

351 437 542 616 661 715 709 774 881 516

351 441 481 541 660 722 625 866 642 600

351 409 448 531 598 655 720 783 668 530

351 393 469 498 667 688 715 481 375 449

351 446 485 444 687 586 728 582 526 578

351 424 490 485 561 673 602 542 546 497

351 433 492 487 547 492 640 591 491 562

459 466 499 535 623 581 549 556 540 530

518 556 555 537 511 559 477 552 534 550

585 490 508 533 527 501 462 480 444 409

535 582 582 529 564 524 472 443 429 454

483 617 636 578 500 488 473 432 443 407

515 498 984 1182 1039 1037 1058 443 406 428

428 548 992 887 614 591 584 447 478 509

519 819 839 717 477 546 485 468 514 581

484 923 1127 724 549 610 481 495 541 542