This repository is a software product and is not official communication of the National Oceanic and Atmospheric Administration (NOAA), or the United States Department of Commerce (DOC). All NOAA GitHub project code is provided on an 'as is' basis and the user assumes responsibility for its use. Any claims against the DOC or DOC bureaus stemming from the use of this GitHub project will be governed by all applicable Federal law. Any reference to specific commercial products, processes, or services by service mark, trademark, manufacturer, or otherwise, does not constitute or imply their endorsement, recommendation, or favoring by the DOC. The DOC seal and logo, or the seal and logo of a DOC bureau, shall not be used in any manner to imply endorsement of any commercial product or activity by the DOC or the United States Government.
Adding header information to fastcat data files for EPIC processing via the MasterCOD database while at sea.
This is a modification of Dave Kachel's proc_new.pl and editheader routines.
Purpose: Using information maintained in the FOCI at sea MASTERCOD database, headers are automatically updated to include deployment specific meta information for each bongo tow.
Author: Shaun Bell (shaun.bell@noaa.gov)
Four files/folders will be placed on your computer:
a MasterCOD2EPIC
folder which includes the executable and other necessary programs for windows
a MasterCOD2EPIC_source
folder with the original python program
a MasterCOD_config.pyini
file
a proc_new_mcod
file
- Copy the folder called
MasterCOD2EPIC
to thec:\data\fastcat\
directory. This contains a number of files of which the most important is theMasterCOD2EPIC.exe
program, however, all files are needed for this routine to operate without python installed on the source computer. - Copy the
MasterCOD_config.pyini
file to thec:\data\fastcat\current\
directory. TheMasterCOD_config.pyini
is a json formatted file as follows:
{
"MasterCOD_filename": "DY14-08_DY1408L1_masterCOD_ecoDAAT.db3",
"path2COD_db": "C:\Users\pmelctd\Desktop\MasterCOD_test\DY14-08_MasterCOD\",
"path2bongo_data": "C:\data\fastcat\current\"
}
it needs to be in the c:\data\fastcat\current\
directory with the seabird .hex files to be converted.
-
Using your favorite text editor (like notepad), open the
MasterCOD_config.pyini
file.
Change the "MasterCOD_filename" to the name of the current masterCOD.db3 file you are working with.
Change the "path2COD_db" to the path of the the where you are saving the mastercod files (most likely it is "C:\Master_COD\DY1408" where the cruise identifier may be unique to your cruise.
The "path2bongo_data" entry will probably not need to be changed if this computer has been used previously to process fastcat data using the proc_new script.
Note: It is important that a "double back-slash" is used in the paths mentioned above. See the example .pyini file in section 2 -
Copy the
proc_new_mCOD.pl
script to thec:\data\fastcat\current\
directory
- Enter all updated BONGO/fastcat forms into your working version of mastercod.
- Open a command prompt window and type
cd c:\data\fastcat\current\
as previously done when processing fastcat data - type
proc_new_mCOD
- this program will communicate with the mastercod database and automatically update the header files for the bongos/fastcats. It will return to the screen, the information it is appending to the files.
If the information returned to the screen is not consistent with the MasterCOD forms, than an error has been entered into the COD database. Once you have updated this field in the database you can rerun this routine. You will need to delete the respective .cnv
file from the c:\data\fastcat\current\
folder in order for it to reprocess the fastcat file.
The routine is a drop in replacement for the original proc_new
perl routine created by Dave Kachel. All original dependancies still exist (such as his perl packages or
the seabird data processing software) and you will still need to use his assumed file structure (c:data\fastcat\current\
). Install or setup the original software if the computer has not been used for fastcat processing and then add this utility.
It is possible you will have to rebuild the executable from the sourcecode if for some reason there is an error that gets corrected or a feature that gets added. To do this you will need a development version of python (for testing) - suggested is Python XY (a scientific python package for Windows) or anaconda python (which does not have netcdf support on windows yet as of fall 2014).
Once you have modified and tested the source (MasterCOD2EPIC.py - included in the zip file under the MasterCOD2EPIC_source folder) use pyinstaller to create the executable (this will need to be installed as it is not part of any python package).
pyinstaller MasterCOD2EPIC.py
Python XY - https://code.google.com/p/pythonxy/ Anaconda Python - https://store.continuum.io/cshop/anaconda/ Pyinstaller - https://github.com/pyinstaller/pyinstaller/wiki