Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Reading NetCDF files


From   Andrew Dyck <tempmail@andrewdyck.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Reading NetCDF files
Date   Wed, 15 Feb 2012 10:26:57 -0600

Hi Gordon,

I'm not familiar with NetCDF, but I do recall a colleague of mine
working with these files. He telling me that it's common for
researchers in the oceanographic/climate fields to use python to work
with NetCDF. I found this python module for reading and working with
NetCDF files.

http://code.google.com/p/netcdf4-python/

Once you have the data in python it should be straight-forward to
convert to a text file (tab or comma delimted) which could then be
read into Stata easily with -insheet-.

I also found this document which outlines a few methods for converting
NetCDF to text. This one seems like a good place to start.

http://www.unidata.ucar.edu/software/netcdf/docs/faq.html#converttotext

Good luck!

Andrew

On Tue, Feb 14, 2012 at 12:42 PM, Gordon Hughes <G.A.Hughes@ed.ac.uk> wrote:
>
> Dear Statalist,
>
> Is anyone aware of a Stata user-written routine or other method of importing data stored in NetCDF files into Stata?
>
> As background, NetCDF denotes the Network Common Data Form, a binary file format which is widely used for climate data and other data compiled by geophysicists, earth scientists, etc.
>
> There are libraries written in C, Fortran & Java which can be used to read NetCDF files but I was trying to avoid the need to special purpose routines to extract the data.  In addition, I believe that there are R modules which can read NetCDF files, but this means a struggle to remember the details of R data structures.
>
> I would be very grateful for any suggestions.
>
> Gordon Hughes
> g.a.hughes@ed.ac.uk
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index