Re: [netcdfgroup] Need help to convert .csv files to netCDF files

Folks,

Filipe Fernandes added another solution to the csv2netcdf problem
here, using the Iris package (led by the British Met Office).    As he
says, it's cool because it checks and enforces CF conventions:
http://stackoverflow.com/questions/22933855/convert-csv-to-netcdf/28914767#28914767

@Dumindu, it doesn't matter how many files or attributes you have.
Just modify to read/write in a loop and add your extra attributes to
variables or global as appropriate!

-Rich


On Mon, Mar 9, 2015 at 5:33 PM, Dumindu Jayasekera
<d.jayasekera@xxxxxxxxxxxxxxxxx> wrote:
> Thanks Rich. I need to include the attributes/conventions listing according
> to the .nc file attached. Also, I have 3000 .csv files in one folder.
>
> How can I modify that to include these aspects?
>
> Dumindu.
>
>
>
> On Sat, Mar 7, 2015 at 4:20 AM, Signell, Richard <rsignell@xxxxxxxx> wrote:
>>
>> Folks,
>> It occurred to me it would be great to get all these answers on
>> stackoverflow, and then when I looked, there is already a "csv to
>> netcdf question" at
>>
>> http://stackoverflow.com/questions/22933855/convert-csv-to-netcdf/28914767#28914767
>> and I think all the answers so far are good additions.
>> I just added my answer.  Feel free to vote it up!  ;-)
>>
>> -Rich
>>
>> On Fri, Mar 6, 2015 at 10:09 PM, Sean Arms <sarms@xxxxxxxx> wrote:
>> > Greetings Dumindu!
>> >
>> > We at Unidata have been working on a tool called Rosetta that may be of
>> > interest:
>> >
>> > http://www.unidata.ucar.edu/software/rosetta/
>> >
>> > Rosetta is a web based data translator. Currently there is a wizard
>> > based
>> > interface which guides users through the process of parsing a sample
>> > data
>> > file as well as guiding users through the process of supplying CF
>> > metadata.
>> > Once this information is collected, Rosetta produces a CF 1.6 complient
>> > netCDF file and a Rosetta template. The template can then be used to
>> > batch
>> > process other csv files with the same structure and metadata.
>> >
>> > If this interests you, I invite you to check out some of the
>> > presentations
>> > available on the Rosetta page (link above). Rosetta is currently in a
>> > limited testing period, but your use case would be perfect to kicking
>> > the
>> > tires on a large scale. If you're interested, please contact us at
>> > support-rosetta@xxxxxxxxxxxxxxxx.
>> >
>> > Cheers!
>> >
>> > Sean
>> >
>> > On Thursday, March 5, 2015, Dumindu Jayasekera
>> > <d.jayasekera@xxxxxxxxxxxxxxxxx> wrote:
>> >>
>> >> Hi,
>> >>
>> >> I need to convert .csv file (see the attached file) which has lat,
>> >> long,
>> >> precip to netCDF? I have over two thousands of these .csv files in 15
>> >> folders.
>> >>
>> >> Can somebody help to do the conversion?
>> >>
>> >> I saw the following posting to use in Ferret I new to Ferret. Can
>> >> somebody
>> >> guide me how to use the script in Ferret. Also, I could not found the
>> >> script
>> >> mention in the website. Can I use a similar approach for the attached
>> >> .csv
>> >> file.
>> >>
>> >> http://permalink.gmane.org/gmane.comp.lib.netcdf/1136
>> >>
>> >> Any help is appreciated.
>> >>
>> >> Thanks,
>> >>
>> >> Dumindu.
>> >
>> >
>> > _______________________________________________
>> > netcdfgroup mailing list
>> > netcdfgroup@xxxxxxxxxxxxxxxx
>> > For list information or to unsubscribe,  visit:
>> > http://www.unidata.ucar.edu/mailing_lists/
>>
>>
>>
>> --
>> Dr. Richard P. Signell   (508) 457-2229
>> USGS, 384 Woods Hole Rd.
>> Woods Hole, MA 02543-1598
>
>



-- 
Dr. Richard P. Signell   (508) 457-2229
USGS, 384 Woods Hole Rd.
Woods Hole, MA 02543-1598



  • 2015 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: