NADCON5-ng
0.0.2
NADCON5 Next Generation Documentation
|
Programs which perform the generation of GMT
batch scripts and the creation of output files using NADCON5 Core Library and helpers.
More...
Directories | |
directory | src |
Folder containing the NADCON5 Build Programs and subfolders Code/Subs and Code/BinSource. | |
Programs, Functions, and Subroutines | |
program | checkgrid |
Part of the NADCON5 build process, generates gmtbat04 More... | |
program | makeplotfiles01 |
Part of the NADCON5 process, generates gmtbat01. More... | |
program | makeplotfiles02 |
Part of the NADCON5 process, generates gmtbat03 More... | |
program | makeplotfiles03 |
Part of the NADCON5 process, generates gmtbat06 More... | |
program | makework |
Program to create a work file which will serve as the primary information needed to analyze and create NADCON v5.0 grids. More... | |
program | mymedian5 |
Program to filter Map Data for GMT Plotting. More... | |
program | myrms |
Part of the NADCON5 build process, generates gmtbat05 More... | |
Programs which perform the generation of GMT
batch scripts and the creation of output files using NADCON5 Core Library and helpers.
The elements described here are the "doers", programs that construct the output using elements of NADCON5 Core Library
program checkgrid | ( | ) |
Part of the NADCON5 build process, generates gmtbat04
Creates a batch file called
gmtbat04.(olddtm).(newdtm).(region).(igridsec)
This Program:
1) Compare grids of dlat, dlon and deht to vectors of dlat, dlon and deht. 2) Spit out interpolated (from grid) vectors 3) Spit out differential (interpolated minus original) vectors. 4) Create a GMT batch file to plot said vectors.
The input vectors:
Represent *all* (outlier removed) vectors of dlat/dlon/deht for the olddatum/newdatum/region combination
However, for the sake of understanding, the vectors will be read in from their "thinned" and "dropped" files, so that we can generate statistics of:
thinned-versus-gridded dropped-versus-gridded all-versus-gridded
This is important, since ONLY the thinned vectors went into the grid and it seems that their statistics should be better against the grid than the dropped vectors. Additionally, one might argue that the only independent check on the grid is the dropped agreement. We'll see.
The input grids:
dlat/dlon/deht grids based on thinning all of the vectors (see above) using a median thinning at some block spacing in arcseconds, and gridding to that same block spacing.
Arguments are newline terminated and read from standard input
They are enumerated here
oldtm | Source Datum |
newdtm | Target Datum,region |
region | Conversion Region |
agridsec | Grid Spacing in arcsec |
Example:
olddatum = 'ussd' newdatum = 'nad27' region = 'conus' agridsec = '900'
Changed "getmapbounds" to bring in a better way of computing the reference vector location and added a new variable for its label
Also changing the call to "getmapbounds" to give it "olddatum" and "newdatum" to aide in filtering out things like the Saint regions in Alaska for unsupported transformations.
Scrapped personal placement of vectors and just let them sit outside/below the map
Added code to allow for optional placement of reference vectors, coming from "map.parameters" as read in subroutine "getmapbounds"
Added HOR output in M and S for Lat/Lon to both "gi" and "dd" vector output.
Combined: v(m/s)(a/t/d)(gi/dd)lat... v(m/s)(a/t/d)(gi/dd)lon... into : v(m/s)(a/t/d)(gi/dd)hor...
Initial Release For use in creating NADCON5 Built by Dru Smith
Definition at line 100 of file checkgrid.f.
References bicubic(), bilin(), biquad(), bwplotvc(), getgridbounds(), getmapbounds(), nlines(), and onzd2().
program makeplotfiles01 | ( | ) |
Part of the NADCON5 process, generates gmtbat01.
Program to take a "work" file and create a variety of GMT-ready data files of the following
It furthermore will create batch file to run the GMT scripts:
gmtbat01.(olddtm).(newdtm).(region).(mapflag)
Arguments are newline terminated and read from standard input
They are enumerated here
oldtm | Source Datum |
newdtm | Target Datum,region |
region | Conversion Region |
mapflag | Map Detail Level |
Example:
olddatum = 'ussd' newdatum = 'nad27' region = 'conus' mapflag = 0
Added new code to do reference vectors consistently See DRU-12, p. 56-57 Also changing the call to "getmapbounds" to give it "olddatum" and "newdatum" to aide in filtering out things like the Saint regions in Alaska for unsupported transformations.
Scrapped the code for personalized reference vector location. Just put all ref vectors outside/below plot.
Added code to allow for optional placement of reference vectors, coming from "map.parameters" as read in subroutine "getmapbounds"
Definition at line 58 of file makeplotfiles01.f.
References bwplotcv(), bwplotvc(), getmapbounds(), and onzd2().
program makeplotfiles02 | ( | ) |
Part of the NADCON5 process, generates gmtbat03
Built upon the skeleton of "makeplotem.f" for GEOCON v2.0 But built specifically for NADCON v5.0. So different in file names and expanded plot creation that it was given the new name "makeplotfiles02.f" to align with another NADCON5 program "makeplotfiles01.f"
Creates a batch file called
gmtbat03.(olddtm).(newdtm).(region).(igridsec)
That batch file will create JPGs of:
Arguments are newline terminated and read from standard input
They are enumerated here
oldtm | Source Datum |
newdtm | Target Datum,region |
region | Conversion Region |
agridsec | Grid Spacing in arcsec |
Example:
olddatum = 'ussd' newdatum = 'nad27' region = 'conus' agridsec = '900'
Added new code to do reference vectors consistently See DRU-12, p. 56-57 Also fixed a typo in reference vector length for vmtcdeht plots Also changing the call to getmapbounds to give it olddatum
and newdatum
to aide in filtering out things like the Saint regions in Alaska for unsupported transformations.
Scrapped code about personalized reference vectors. Just put all reference vectors outside/below plot Also moved gridstats and vecstats out into the /Subs
directory to be used by other programs (like makeplotfiles03.f)
Changed code to build the color palette of the d3
grids around the median, and not ave or std. See DRU-12, p. 48
Added code to allow for optional placement of reference vectors, coming from map.parameters
as read in subroutine getmapbounds
Updated to get the CPT values fixed in d3
grids, so that (cpthi - cptlo) is exactly divisible by cptin
at (2 x csm)
Updated to work with the new naming scheme (see DRU-11, p. 150)
Updated to work with the new naming scheme (see DRU-11, p. 139)
Definition at line 78 of file makeplotfiles02.f.
References bwplotcv(), bwplotvc(), coplot(), coplotwcv(), cpt(), cpt2(), getmapbounds(), gridstats(), onzd2(), and vecstats().
program makeplotfiles03 | ( | ) |
Part of the NADCON5 process, generates gmtbat06
Creates a batch file called
gmtbat06.(olddtm).(newdtm).(region).(igridsec).(mapflag)
That batch file will create JPGs of:
Arguments are newline terminated and read from standard input
They are enumerated here
oldtm | Source Datum |
newdtm | Target Datum,region |
region | Conversion Region |
agridsec | Grid Spacing in arcsec |
mapflag | Map Generation Level |
Example:
olddatum = 'ussd' newdatum = 'nad27' region = 'conus' agridsec = '900' mapflag = '0'
FIX for the HARN/FBN transformation. As it stood, the "gridstats" was returning "0.0" as the median of the post-masked "ete" grid (which is true, but unfortunate.) I've changed the call to "gridstats" to send it the "PREMASKED" version of the "ete" grid, so the median won't be zero.
Added new code to do reference vectors consistently See DRU-12, p. 56-57
Fixed an error where "lorvogehtm" was declared real*8 but past 72 column, so defaulting to integer*4 and coming out as "0.000" on plots
Also changing the call to "getmapbounds" to give it "olddatum" and "newdatum" to aide in filtering out things like the Saint regions in Alaska for unsupported transformations.
Changed the color palette for "09" grids from 2xMedian to 3xMedian
Dropped code about personalized reference vectors and just let them be below/outside map
Moved "gridstats" to subroutines Also, completely removed the in-program computations of the color palette, and instead relied on "cpt" and "cpt2" as per "makeplotfiles02"
Added code to allow for optional placement of reference vectors, coming from map.parameters
as read in subroutine getmapbounds
Updated to fix the CPT for the "09" (data noise) grids so that (cpthi - cptin) is exactly divisible by cptin
Updated to adopt new naming scheme (yes, again) (See DRU-11, p. 150), as well as creating plots of the total error grid.
Latest Version which had new naming scheme and dual-computations of arcseconds and meters for lat/lon See DRU-11, pl. 139.
Definition at line 88 of file makeplotfiles03.f.
References bwplotcv(), bwplotvc(), coplot(), cpt2(), getmapbounds(), gridstats(), and onzd2().
program makework | ( | ) |
Program to create a work file which will serve as the primary information needed to analyze and create NADCON v5.0 grids.
This program is based on previous programs that were created by Dru Smith during the GEOCON v2.0 process. It has been modified specifically to be a tool for NADCON v5.0.
Rather than have multiple programs (1, 2, 3, 4 as was the case for GEOCON v2.0), It was decided make ONE working "makework.f" program (this one) and have it feed off of an input file which can be modified.
The input file will reflect all that is necessary to create a work file.
Arguments are newline terminated and read from standard input
They are enumerated here
oldtm | Source Datum |
newdtm | Target Datum,region |
region | Conversion Region |
A control file in directory Control/
, the name is generated from input arguments
Known control file names are:
cfname = control.ussd.nad27.conus cfname = control.nad27.nad83_1986.conus
workedits
in directory Work/
If the input file controlling the creation of the work file is:
Control/control.ussd.nad27.conus
then the output data file is:
Work/work.ussd.nad27.conus
The work file has the following format:
Cols Format Description 1- 6 a6 PID 7 1x - blank - 8- 9 a2 State 10 a1 Reject code for missing latitude pair (blank for good) 11 a1 Reject code for missing longitude pair (blank for good) 12 a1 Reject code for missing ellip ht pair (blank for good) 13 1x - blank - 14- 27 f14.10 Latitude (Old Datum), decimal degrees (-90 to +90) 28 1x - blank - 29- 42 f14.10 Lonitude (Old Datum), decimal degrees (0 to 360) 43 1x - blank - 44- 51 f8.3 Ellipsoid Height (Old datum), meters 52 1x - blank - 53- 61 f9.5 Delta Lat (New Datum minus Old Datum), arcseconds 62 1x - blank - 63- 71 f9.5 Delta Lon (New Datum minus Old Datum), arcseconds 72 1x - blank - 73- 81 f9.3 Delta Ell Ht (New Datum minus Old Datum), meters 82 1x - blank - 83- 91 f9.3 Delta Horizontal (absolute value), arcseconds 92 1x - blank - 93-101 f9.5 Azimuth of Delta Horizontal (0-360), degrees 102 1x - blank - 103-111 f9.3 Delta Lat (New Datum minus Old Datum), meters 112 1x - blank - 113-121 f9.3 Delta Lon (New Datum minus Old Datum), meters 122 1x - blank - 123-131 f9.3 Delta Horizontal (absolute value), meters 132 1x - blank - 133-142 a10 Old Datum Name 143 1x - blank - 144-153 a10 New Datum Name format(a6,1x,a2,a1,a1,a1,1x,f14.10,1x,f14.10,1x,f8.3,1x, *f9.5,1x,f9.5,1x,f9.3,1x,f9.3,1x,f9.5,1x,f9.3,1x,f9.3,1x,f9.3, 1x,a10,1x,a10)
This differs from Dennis's GEOCON v1.0 in that:
See:
See:
Formated Comments to be compatible with Doxygen Due to deprecation of various arguments for GMT tools, invocation of xyz2grd
and grd2xyz
have arguments options changed in generated files
-bos
-> -bo3f
with equivalent meaning of a 3 column single precision output-bis
-> -bi3f
with equivalent meaning of a 3 column single precision inputDue to some complications in mymedian5.f which happen if data is in the work file that is not to be sorted and used, I've decided to put the out of grid point removal code here, so that such points will go into the work file but will all get a 111
set of reject codes so they don't go forward in the processing.
Fixed a bug that sends an incoming 0
reject flag as a zero. All later programs expect a BLANK for a "good" reject code. The incoming 0
is from the workedits
file and is fine to come in, but must go OUT as a BLANK.
Also, put in code to correct situations where an entry is in workedits
, but the PID for that entry isn't actually in the incoming data. This relies on a new vector EditTracker
Change (see: DRU-12, p. 18) to reflect the decision that "manual edits" should ONLY edit data OUT and not add data back in.
Changed to split "Relevant Edits" into three counts: lat, lon and eht
Definition at line 150 of file makework.f.
References getgridbounds().
program mymedian5 | ( | ) |
Program to filter Map Data for GMT Plotting.
unlike mymedian.f
, this program is set up to filter/process all data at once in one run. Also, significant philosophical changes occurred, including:
Arguments are newline terminated and read from standard input
They are enumerated here
oldtm | Source Datum |
newdtm | Target Datum,region |
region | Conversion Region |
agridsec | Grid Spacing in Arc Seconds |
Bug found when running Hawaii with points outside grid – some mixup between "ikt" and "ipid". Changed this program as follows: It now REQUIRES that the incoming data has NO points outside the grid boundary. This has been forced by giving such points a "444" reject code in "makework" when creating the work file. By going through "makeplotfiles01" with a "444" reject, those points won't even make it into the "all" file, which is our input for median filtering here...
Updated to insert masking commands for the "...04.b" (transformation grid) into gmtbat02 when working ONLY in the HARN/FBN/CONUS combination.
For use in creating NADCON5 Built by Dru Smith Built from scratch, scrapping all previous "mymedian" programs used in making GEOCON
Definition at line 71 of file mymedian5.f.
References getgridbounds(), getmedian(), and indexxi().
program myrms | ( | ) |
Part of the NADCON5 build process, generates gmtbat05
Creates a batch file called
gmtbat05.(olddtm).(newdtm).(region).(igridsec)
Program to
Unlike "mymedian5.f", this program is set up to compute the RMS of vector differences in a cell-by-cell basis (aka NOT a median filter at all, but a true RMS representation of of disagreements)
A "value" is the differential vector of:
interpolated-from-grid minus true
For any cell with at least ONE point with a value, the following is done:
The output vector will then reflect these three values.
For latitude and ellipsoid height, the azimuth of the vector will ALWAYS be 0.0 (pointing up) while for longitude it will always be 90.0 (pointing right). However, these are mere conventions as they are not directional vectors anyway, but rather quanta which will be gridded and it is the grid which is of utmost importance.
No PIDS will be in the output files, as the output RMS vectors are not reflective of any one point, but rather a cell-wide conglomeration of information.
See DRU-11, p. 130
Arguments are newline terminated and read from standard input
They are enumerated here
oldtm | Source Datum |
newdtm | Target Datum,region |
region | Conversion Region |
agridsec | Grid Spacing in arcsec |
Example:
olddatum = 'ussd' newdatum = 'nad27' region = 'conus' agridsec = '900'
Updated to RETURN to an old way of registering RMS vectors at AVE lat/lon rather than center of cell.
Updated to work with new naming scheme (see DRU-11, p. 150) and to adopt the central lat/lon for the RMS vectors, rather than ave lat/ave lon (see DRU-11, p.145), and to also set up the gridding of RMS vectors at the T=0.9 level (see DRU-11, p. 148)
Also added "donzd" functionality to help control the magnitude of the Length of Reference Vector on Ground variables.
Also, added a section at the end to create the TOTAL error grids. by RMS-combining the "method noise grid" (the "d3" grid) with the "data noise grid" (the "rdd...09" grid) into one single "transformation error grid"
For reasons that are difficult to describe, "donzd" is now "onzd2.f" in /home/dru/Subs. Change and recompile...
Updated to add HOR vectors
Updated
Initial Release, For use in creating NADCON5 Built by Dru Smith
Definition at line 101 of file myrms.f.
References getgridbounds(), getrms(), indexxi(), and onzd2().