Scripting .GRD -> .RwGrd batch conversions

The format of grid models changed in RockWorks16, to include coordinate projection information and other changes. One quick way to update your old grids to the new format is via the RockWorks16 Utilities | Map | Grid-Based Map program:

1. Choose Use Existing Grid and browse for the old-version .GRD file name.
2. Turn off the 2D and 3D output, requesting only “Create Grid Statistics Report”.
3. Click Process.
4. Click OK to confirm the coordinate information, which will default to your current project’s output units.
5. Click OK to confirm the new file name.
Voila.

If you have a Level 5 license of RockWorks16, you can use an RCL script to automate this process. Just port your RockWorks15 project into RockWorks16 as described in the Help messages, copy all of your .GRD files over to the new project folder, and use the script shown below. Copy everything between the divider lines into Notepad (including the comment lines – just be sure to include the “:” characters), save with an “.RCL” file name extension in your project folder, and use Window | Compile RCL to run the script.

————————————————————————-

: this script will convert the listed .grd files in the current project folder to .rwgrd files
: a summary report for each .rwgrd file will be created in the project folder.
: it will require clicking OK in the confirmation windows

: this setting suppresses the display of the text reports

DEFINE: GENERAL REPORT_DISPLAY False

: this group defines the existing .grd file name and the stat report name
: it also turns off 2D and 3D maps

: you will replace the .grd and .txt file names

DEFINE: GRIDMAP DATAGRID_BASED True
DEFINE: GRIDMAP CREATE_NEW_GRID False
DEFINE: GRIDMAP OLD_GRID_NAME A_Top.grd
DEFINE: GRIDMAP 2D False
DEFINE: GRIDMAP 3D False
DEFINE: GRIDMAP REPORT True
DEFINE: GENERAL REPORT_OUTPUT gridstats-A_Top.txt

EXECUTE: gridmap

: this defines the next existing .grd file to be converted and its report
: you will replace the .grd and .txt file names

DEFINE: GRIDMAP OLD_GRID_NAME A_Base.grd
DEFINE: GRIDMAP REPORT True
DEFINE: GENERAL REPORT_OUTPUT gridstats-A_Base.txt
EXECUTE: gridmap

: this defines the next existing .grd file to be converted and its report
: you will replace the .grd and .txt file names

DEFINE: GRIDMAP OLD_GRID_NAME B_Top.grd
DEFINE: GRIDMAP REPORT True
DEFINE: GENERAL REPORT_OUTPUT gridstats-B_Top.txt
EXECUTE: gridmap

: this defines the next existing .grd file to be converted and its report
: you will replace the .grd and .txt file names
: you can continue adding these blocks as necessary to convert your .GRD files

DEFINE: GRIDMAP OLD_GRID_NAME B_Base.grd
DEFINE: GRIDMAP REPORT True
DEFINE: GENERAL REPORT_OUTPUT gridstats-B_Base.txt
EXECUTE: gridmap

————————————————————————-

If you need more info on RCL scripting, check out one of our videos:
http://www.youtube.com/watch?v=zw4toqhqlUU