Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: Reading NetCDF files


From   Andrew Dyck <[email protected]>
To   [email protected]
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 <[email protected]> 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
> [email protected]
> *
> *   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index