Re: [netcdf-java] Serving NetCDF files

Hi Susan,

Have you looked at THREDDS [1]? It can serve netCDF data via OpenDAP and
various other protocols. Seems like it would meet at least some of your
needs.

Hope this helps,
Shane

[1] http://www.unidata.ucar.edu/software/thredds/current/tds/TDS.html


On Wed, Aug 20, 2014 at 2:25 PM, Susan Perkins <sperkins@xxxxxxx> wrote:

>  Hi,
>
>  I am investigating the use of the java netcdf API for serving our data.
>  We have scalar time-series data from stationary instruments, data from
> mobile platforms, and complex data stored in a db and files on an archive
> server.  I’m trying to determine if it is possible and relatively simple to
> write a service using the Java API to respond to OpenDAP requests.  I can
> write the NetCDF files easily enough; but not sure if I can simply respond
> with them, or whether I would have to write the data to a temporary
> location and have some external service serve them from there.
>
>  Could you please point me in the right direction for this investigation?
>  Other possibilities we are investigating are the use of Hyrax and the use
> of ERDDAP to serve netCDF files and tabular data.
>
>  Thanks in advance for your insights!
>
>
>
> Susan Perkins EIT   |   Software Developer - Digital Infrastructure
> Ocean Networks Canada <http://oceannetworks.ca>   |   T 250 472 5053   |
>   sperkins@xxxxxxx
> University of Victoria, PO Box 1700 STN CSC, 2300 McKenzie Avenue,
> Victoria BC, V8W 2Y2
>
>
>
>
>
>
>
>
>
>  On Aug 20, 2014, at 1:59 PM, James Adams - NOAA Affiliate <
> james.adams@xxxxxxxx> wrote:
>
>  Thanks, Brian.
>
> Those classes all contain various methods for writing to NetCDF files, but
> none appear to
> ​have a 1:1 correspondence
> to the functionality you got from the now deprecated
> FileWriter.writeToFile() method, at least from what I can tell (the JavaDoc
> is sparse
> ​,​
> at best).  From what I can tell one way to go about it
> ​ is​
> to use the FileWriter2 constructor
> ​ and​
> then
> ​its ​
> write() method,
> ​like so:​
>
>
>     ​FileWriter2 fileWriter = new FileWriter2(netcdfDataset, outFilePath,
> NetcdfFileWriter.Version.netcdf3, null);
>      NetcdfFile outNetcdfFile = fileWriter.write();​
>
> The above seems to work just fine.  ​Is this the reasonable/recommended​
> way to do things now?
>
>  --James
>
>
> On Wed, Aug 20, 2014 at 3:38 PM, Smith, Brian <brian.smith@xxxxxxxxxxxxxx>
> wrote:
>
>>  Hi James,
>>
>>
>>
>> I believe the current functions for this purpose are
>> http://www.unidata.ucar.edu/software/thredds/v4.3/netcdf-java/v4.3/javadoc/ucar/nc2/NetcdfFileWriter.html
>> or
>> http://www.unidata.ucar.edu/software/thredds/v4.3/netcdf-java/v4.3/javadoc/ucar/nc2/FileWriter2.html
>> or
>> http://www.unidata.ucar.edu/software/thredds/v4.3/netcdf-java/v4.3/javadoc/ucar/nc2/dt/grid/NetcdfCFWriter.html
>> depending on your needs, assuming you are using 4.3.
>>
>>
>>
>> Cheers,
>>
>> Brian
>>
>>
>>
>> *From:* netcdf-java-bounces@xxxxxxxxxxxxxxxx [mailto:
>> netcdf-java-bounces@xxxxxxxxxxxxxxxx] *On Behalf Of *James Adams - NOAA
>> Affiliate
>> *Sent:* Wednesday, August 20, 2014 10:58 AM
>> *To:* Java NetCDF
>> *Subject:* [netcdf-java] Deprecated class/method
>> (FileWriter.writeToFile()), any guidance as to what else I should use?
>>
>>
>>
>> The method FileWriter.writeToFile(NetcdfFile,
>>
>> ​ ​
>>
>> String
>>
>> ​,​
>>
>> boolean)
>>
>> ​ is marked as deprecated in the JavaDoc,​ and shows as such in Eclipse.
>>  I'd like to use an appropriate/non-deprecated method for this, but the
>> JavaDoc gives no guidance as to what that might be.  My use case is that I
>> have a NetcdfDataset that I want to write to file.
>>
>>
>>
>> Can anyone advise?  Thanks in advance for any suggestions.
>>
>>
>>
>> --James
>>
>> ------------------------------
>>
>> CONFIDENTIALITY NOTICE: This e-mail message is for the sole use of the
>> intended recipient(s) and may contain confidential and privileged
>> information. Any unauthorized review, use, disclosure or distribution of
>> any kind is strictly prohibited. If you are not the intended recipient,
>> please contact the sender via reply e-mail and destroy all copies of the
>> original message. Thank you.
>>
>
>  _______________________________________________
> netcdf-java mailing list
> netcdf-java@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe, visit:
> http://www.unidata.ucar.edu/mailing_lists/
>
>
>
> _______________________________________________
> netcdf-java mailing list
> netcdf-java@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe, visit:
> http://www.unidata.ucar.edu/mailing_lists/
>



-- 
Shane StClair
Software Engineer
Axiom Consulting & Design
http://www.axiomalaska.com
  • 2014 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: