Follow

How can I grid my data in Surfer using date/times?

Surfer supports dates and times as valid data! This means you can use dates and times as a data variable for gridding, for creating post maps, and for labeling. You can also format data in the worksheet in multiple date/time formats.
 

Surfer will automatically recognize the date/time data as long as one of these conditions is true:

  1. The data is in an Excel file format (XLS, XLSM or XLSX) and the cells are formatted as dates or times.
  2. The data is in TXT, CSV, DAT, ASCII, or another text format, and the data is in one of the standard U.S. Excel date/time formats, such as mm/dd/yy.

 

As long as one of the above conditions are met, then you can use the date/time data as any regular data. You can create a post map of the data or grid the data and create a contour map from the grid. The dates and times in the data file are internally converted to a number to grid and create maps from. To convert the numbers back into dates, format the axis labels with the Type set to Date/time and specify the desired date and time format.

 

If the data is not saved as dates or times in an Excel file, or the format of the data in the text file is not a U.S. Excel date/time standard format, the data will be imported into Surfer as text, not as date/time.

 

For example, please see Axes.srf and Temperature_Samples.xlsx in the \Samples\ directory in the Surfer installation folder.

 

For more information, please see: Working with Date/Time Data in Surfer

 


 

Surfer 11 and previous versions do not support alphanumeric or date/time data. All data to be gridded in Surfer must be numeric. You can work around this by converting your data to Julian dates, plotting the Julian dates, then labeling the axis with the actual date/time data. 

 

Convert your date/time data to Julian dates

The first step is to convert the dates/times to Julian dates. Julian dates are a system of time measurement for scientific use. You can do the conversion easily in Excel:

  1. Open your data file in Excel.
  2. Select your date/time column and choose to format the cells as Number. That will convert the dates/times to Julian dates. You may want to increase the Decimal places if you have time data in addition to dates.
  3. Save and close the data file.
  4. You can now grid this data file in Surfer and create a map from the data. Now your axes will show the Julian date labels.

 

Label the axes with the actual date/time data

If you created a non-3D map (contour, image, shaded relief, etc) you can replace the axis labels with the actual date/times by following these steps:

  1. Select the Bottom Axis in the Object Manager for the map (or whatever axis shows the Julian date values).
  2. In the Property Manager, click the General tab and uncheck the Show checkbox.
  3. Click the Ticks tab and set the Major Ticks and Minor Ticks styles both to None.
  4. Now you can either click Draw | Text to draw in the date labels, or you can create a post map to plot dates along the X axis as data point labels.
  5. To create a post map, select the Map in the Object Manager, and in the Property Manager, click the Limits tab, and note the yMin value for the map.
  6. Open the Surfer worksheet, or an Excel worksheet, and create a data file with 3 columns of data for all the tick marks and labels you would like to see on the axis:
    1. X (Julian dates/times)
    2. Y (minimum Y value of map), this will all be the same Y value for all points
    3. label (regular dates or time format, ie. 5/15/05) corresponding to the Julian dates on the same row
  7. Select the map and click Map | Add | Post Layer, select the data file and click Open. If you are asked if you want to adjust the map limits, click No.
  8. Select the post map and in the Property Manager, make sure the post map uses the first two columns of data for the X and Y columns and uses the "+" symbol.
  9. Click the Labels tab and set the Worksheet column to be the column containing the label data, and set Position relative to symbol to Below.
  10. If you want to make adjustments to the date labels, select the post map, and in the Property Manager click the Labels tab, and make font adjustments or placement changes here.

 

For an example of the final output, please see attached S8_DateTimeAxis.srf.

 

See also: How can I label the axes on my Surfer map with dates (or other text)?

 

Updated February 8, 2017

Attachments:

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.