MOBY (Marine Optical BuoY) radiometry data are regularly used by the NASA OBPG as part of ocean color validation and vicarious calibration activities. MOBY is an autonomous buoy moored off of the island of Lanai in Hawaii. Each day it is deployed it collects several measurements of upwelling radiance from sensors on its underwater arms (at approximately 1, 5 and 9 m depth) and downwelling irradiance from sensors on its underwater arms as well as at the surface. More information about MOBY can be found on the MLML site and NOAA site.
This article was written to provide a few Perl tips and examples that can help you quickly edit single or batch data files from a command line.
Perl is a general-purpose language that is very powerful at manipulating data files containing text and numbers. Often it is necessary for SeaBASS data submitters or users to search and replace patterns found throughout many text files, which can be very time consuming if you manually open, change and resave each file individually. If you've ever accidentally misformatted a header, or need to get rid of extra spaces at the beginning of every line, or faced some other repetitive task involving search-and-replace, then don't fret; continue reading to learn some simple ways to fix those issues in a single command.
Perl is free and is even installed by default on several operating systems (e.g. most Macs). If you don't already have it, it can be downloaded from www.perl.org for most flavors of Windows, Mac and Linux operating systems. Of the options available, Windows users might wish to try Strawberry Perl (though we do not officially endorse any particular version.) Many Perl guides and tutorials already exist on the Internet so the content on this page will focus only on a few tips that are relevant to SeaBASS data. You can accomplish extremely complex tasks by writing longer amounts of code in Perl, but those are beyond the scope of this article. If Perl is new to you then you might also want to read a more comprehensive introduction such as the one found on the official Perl site, but you should be able to get started with the examples below.
SeaBASS contains several special datasets that are not indexed in the file search engine. These datasets either contain files with atypical formats, unusual measurement types, or other special considerations that do not quite conform to the standardized SeaBASS format. This page provides a centralized listing of such datasets, as those files can still be accessed and manually downloaded from the archive. Please refer to individual pages for more information.
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