netCDF2CSV

Extract userdefined ranges from multidimensional netCDF-files to CSV.

What is netCDF2CSV?

This is the homepage of the netCDF2CSV program (c) 2006 by Stefan Krüger. netCDF2CSV is free software licenced under the GPL. If you don't know what the netCDF data format is, then this program is probably not right for you. netCDF2CSV enables you to extract any information saved in a .nc file as simple CSV data. CSV is easy to import into spreadsheet and statistical software like OOCal, Excel, SPSS or GNU-R.
You can only download it as a JAR-file that also includes the source-code. This JAR will run on Linux and Windows and MAC if you have installed a recent Java Runtime Environment (JRE).
Any comments, ideas, suggestions etc. are very welcome. Just send me a mail.

Requirements

Installation

Documentation

Most options of netCDF2CSV can only be set by editing the configuration-file. The options should be well explained in the configuration-file.

netcdf2csv.XML

<?XML version="1.0" encoding="UTF-8"?>
<!-- 
    This file configures netCDF2CSV. The file is expected in the same directory, that 
    netCDF2CSV is stared.     

    Copyright 2006 Stefan Krüger 
    This file is part of netCDF2CSV.

    netCDF2CSV is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

	netCDF2CSV is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with netCDF2CSV; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-->
 <!DOCTYPE preferences SYSTEM 'http://java.sun.com/dtd/preferences.dtd'>
    <preferences EXTERNAL_XML_VERSION="1.0">
      <root type="user">
        <map />
        <node name="skrueger">
          <map/>
          <node name="netcdf2csv">
            <map>

<!-- 

 Where the nc-file-selection GUI starts. A slash at the end of the path is optional.
 This entry is optional, the default is the directory where the porgram was started.
 Example :  <entry key="datadir" value="/home" />
-->
<entry key="datadir" value="/home/stefan" />


<!-- 
 Which delimiter to use in the .CSV-files. 
 This entry is optional, the default is ";"
 Example :  <entry key="delimiter" value=";" />
-->
<entry key="delimiter" value=";" />
              
              
<!-- 
 Defines where to save the .csv files.  A slash at the end of the path is optional.
 Attention: If the directory is given here and exists, than
 the user will not be asked for a directory anymore.
 This entry is optional, the default is to ask the user.
 Example : <entry key="exportdir" value="/home/stefan/export" />
-->
<entry key="exportdir" value="/home/stefan/export/" />


              
              
<!-- 
 Defines the numer of digits for any counting number in the filename. 
 The rest will be filled with leading zeros.
 This entry is optional, the default is 3
 Example : <entry key="digits" value="4" />
-->
<entry key="digits" value="4" />
              
              
<!-- 
If set to true, .csv files will be overwritten without user-interaction.
 This entry is optional, the default is false (of course)
 Possibel values are "true" and "false".
 Example : <entry key="overwrite_always" value="true" />
-->
<entry key="overwrite_always" value="true" />
              
              
<!-- 
Defines the way the values are shown in the CSV. 
Always user the . as the decimal-delimiter here!
For help have a look at: http://javaalmanac.com/egs/java.text/FormatNum.html
This entry is optional, the default is "#.0"
Example : <entry key="numberformat" value="000.##" />
-->
<entry key="numberformat" value="#.0" />
              
              
<!-- 
The locale defines how the exported numbers will be formatted. 
To switch between , and . as the decimal-seperator, use de_DE or en_US
This entry is optional, the default is "de_DE"
Example : <entry key="locale" value="de_DE" />
 -->              
<entry key="locale" value="de_DE" />              


<!-- 
Set this to false, if you don't want to see 
the information-message when starting the program.
 -->              
<entry key="showinfo" value="false" />


<!-- 
Append a prefix to all CSV-filenames.
This entry is optional, the default is "".
Example : <entry key="prefix" value="Projekt2003__" />
 -->
<entry key="prefix" value="Projekt2003__" />


<!-- 
Include a static header in the CSV-files
This entry is optional, the default is ""
"" means that there will be no headerline at all.
"filename" means, that the filename will be used as a header-line
Example : <entry key="prefix" value="A;B;C;D;E" />
Example : <entry key="prefix" value="filename" />
 -->
<entry key="header" value="" />

            </map>
          </node>
        </node>
      </root>
    </preferences>

This page is hosted by wiki². If you are interested in publishing geoinformation, check out www.geopublishing.org.