ARTS  2.0.49
nc_io.h
Go to the documentation of this file.
1 /* Copyright (C) 2008 Oliver Lemke <olemke@core-dump.info>
2 
3  This program is free software; you can redistribute it and/or modify it
4  under the terms of the GNU General Public License as published by the
5  Free Software Foundation; either version 2, or (at your option) any
6  later version.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; if not, write to the Free Software
15  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16  USA. */
17 
18 
20 // File description
22 
30 #include "arts.h"
31 
32 #ifdef ENABLE_NETCDF
33 
34 #ifndef nc_io_h
35 #define nc_io_h
36 
37 #include <netcdf.h>
38 #include "mystring.h"
39 #include "exceptions.h"
40 #include "messages.h"
41 
42 
44 // Default file names
46 
47 void
48 filename_nc ( String& filename,
49  const String& varname);
50 
51 void
52 filename_nc_with_index ( String& filename,
53  const Index& file_index,
54  const String& varname );
55 
56 
58 // Generic IO routines for XML files
60 
61 template<typename T> void
62 nc_read_from_file (const String& filename,
63  T& type,
64  const Verbosity& verbosity);
65 
66 
67 template<typename T> void
68 nc_write_to_file (const String& filename,
69  const T& type,
70  const Verbosity& verbosity);
71 
72 
73 /*void nc_read_var (const int ncf, const int **ncvar,
74  const Index dims, const String& name);*/
75 
76 void nc_get_data_int (const int ncid, const String &name, int *data);
77 
78 void nc_get_data_long (const int ncid, const String &name, long *data);
79 
80 void nc_get_data_double (const int ncid, const String &name, Numeric *data);
81 
82 void nc_get_dataa_double (const int ncid, const String &name,
83  size_t start, size_t count, Numeric *data);
84 
85 Index nc_get_dim (const int ncid, const String &name);
86 
87 void ncerror (const int err, const String msg);
88 
89 #endif /* nc_io_h */
90 
91 #endif /* ENABLE_NETCDF */
92 
exceptions.h
The declarations of all the exception classes.
messages.h
Declarations having to do with the four output streams.
my_basic_string
The implementation for String, the ARTS string class.
Definition: mystring.h:62
Numeric
NUMERIC Numeric
The type to use for all floating point numbers.
Definition: matpack.h:33
Verbosity
Definition: messages.h:50
Index
INDEX Index
The type to use for all integer numbers and indices.
Definition: matpack.h:39
mystring.h
This file contains the definition of String, the ARTS string class.
arts.h
The global header file for ARTS.