Perl SeaBASS to netCDF Converter (sb2nc)

sb2nc is a Perl script designed to open and read data files that are in a SeaBASS format and convert them to netCDF4 files. Using this script, nearly CF-compliant netCDF files may be simply generated from valid SeaBASS files that have passed FCHECK. This Perl script takes care of determining and defining netCDF file dimensions, global attributes, variables, and variable sub-attributes, including _Fillvalue, valid_min, valid_max, units, etc


Table of Contents


Download

Download Date last modified
sb2nc
2016-05-13
 
This release is the first major release of the Perl sb2nc script.

Software Usage Policy

NASA Goddard Space Flight Center (GSFC) Software distribution policy for Public Domain Software
 
The readsb code is in the public domain, available without fee for educational, research, non-commercial and commercial purposes. Users may distribute this code to third parties provided that this statement appears on all copies and that no charge is made for such copies.
 
NASA GSFC MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THE SOFTWARE  FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY. NEITHER NASA GSFC NOR THE U.S. GOVERNMENT SHALL BE LIABLE FOR  ANY DAMAGE SUFFERED BY THE USER OF THIS SOFTWARE.
 

Important Notes

  • This script is designed to work with files that have been properly formatted according to SeaBASS guidelines (i.e. files that passed FCHECK). Some error checking is performed, but improperly formatted input files could cause this script to error or behave unexpectedly. Files downloaded from the SeaBASS database should already be properly formatted; however, please email seabass@seabass.gsfc.nasa dot gov and/or the contact listed in the file's metadata header if you identify problems with specific files.
  • It is always HIGHLY recommended that before performing calculations with data sets you also check for and read any metadata header comments and/or any documentation accompanying the data files. Special notes and metadata information might impact your analysis.
  • A preliminary effort has been made to make the output netCDF files CF-compliant. However, certain attributes are known to not strictly adhere to CF-compliance standards. If true CF-compliance is desired, modification should be made to some global attributes and some variable attributes, including but not limited to, as long_name and standard_name properties.
  • Compatibility: sb2nc requires Perl libraries: SeaBASS and PDL (built with netCDF support).
  • Refer to the module's header for the most up-to-date usage information.

 

How to Use

Refer to sb2nc's header for the most up-to-date and thorough information. This function always requires as input a FILENAME from the current working directory (or full filepath). Ensure that this Perl script has been placed on your system path and permissions have been set to allow it to be run as an executable.
 
command line syntax: sb2nc [filename]
 
Required arguments:
        filename = name of SeaBASS input file
Output: netCDF4 file of the same name with .nc suffix
        filename  = name of data file with original suffix replaced by .nc

Example:
sb2nc ViirsVal_pigments_2014.csv
Tags:
Last edited by Joel Scott on 2017-04-19
Created by Joel Scott on 2016-05-13