World Ocean Simulation System (WOSS) library
sediment-deck41-marsden-db.h
Go to the documentation of this file.
1/* WOSS - World Ocean Simulation System -
2 *
3 * Copyright (C) 2009 Federico Guerra
4 * and regents of the SIGNET lab, University of Padova
5 *
6 * Author: Federico Guerra - federico@guerra-tlc.com
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation;
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21
22/*
23 * This software has been developed by Federico Guerra and SIGNET lab,
24 * University of Padova, in collaboration with the NATO Centre for
25 * Maritime Research and Experimentation (http://www.cmre.nato.int ;
26 * E-mail: pao@cmre.nato.int), whose support is gratefully acknowledged.
27 */
28
29
40#ifndef WOSS_SEDIMENT_DECK41_MARSDEN_DB_H
41#define WOSS_SEDIMENT_DECK41_MARSDEN_DB_H
42
43
44#ifdef WOSS_NETCDF_SUPPORT
45
46
48#include "woss-db.h"
50#if defined (WOSS_NETCDF4_SUPPORT)
51#include <ncVar.h>
52#endif // defined (WOSS_NETCDF4_SUPPORT)
53
54namespace woss {
55
56
63
64
65 public:
66
71 SedimDeck41MarsdenDb( const ::std::string& name = DB_NAME_NOT_SET );
72
73#if defined (WOSS_NETCDF4_SUPPORT)
79 SedimDeck41MarsdenDb( const ::std::string& name, DECK41DbType db_type );
80#endif // defined (WOSS_NETCDF4_SUPPORT)
81
82 virtual ~SedimDeck41MarsdenDb() { }
83
84
90 Deck41Types getSeaFloorType( const Marsden& marsden_square ) const;
91
92
97 virtual bool isValid() { return( WossNetcdfDb::isValid()
98 && db_name != DB_NAME_NOT_SET
100
101
106 virtual bool finalizeConnection();
107
108#if defined (WOSS_NETCDF4_SUPPORT)
113 void setDeck41DbType( DECK41DbType db_type ) { deck41_db_type = db_type; }
114#endif // defined (WOSS_NETCDF4_SUPPORT)
115
121
122
123 protected:
124
125
129#if defined (WOSS_NETCDF4_SUPPORT)
131#else
133#endif // defined (WOSS_NETCDF4_SUPPORT)
134
138#if defined (WOSS_NETCDF4_SUPPORT)
140#else
142#endif // defined (WOSS_NETCDF4_SUPPORT)
146#if defined(WOSS_NETCDF4_SUPPORT)
147 netCDF::NcVar marsden_square_var;
148#else
149 NcVar* marsden_square_var;
150#endif // defined(WOSS_NETCDF4_SUPPORT)
151
156
157 };
158
159
160}
161
162#endif // WOSS_NETCDF_SUPPORT
163
164#endif /* WOSS_SEDIMENT_DECK41_MARSDEN_DB_H */
165
166
167
WossDb for custom made NetCDF marsden square DECK41 Sediment database.
Definition sediment-deck41-marsden-db.h:62
Deck41Types getSeaFloorType(const Marsden &marsden_square) const
Definition sediment-deck41-marsden-db.cpp:129
netCDF::NcVar sec_sedim_var_marsden
Definition sediment-deck41-marsden-db.h:139
virtual bool isValid()
Definition sediment-deck41-marsden-db.h:97
DECK41DbType deck41_db_type
Definition sediment-deck41-marsden-db.h:155
void setDeck41DbType(DECK41DbType db_type)
Definition sediment-deck41-marsden-db.h:113
netCDF::NcVar main_sedim_var_marsden
Definition sediment-deck41-marsden-db.h:130
virtual bool finalizeConnection()
Definition sediment-deck41-marsden-db.cpp:101
netCDF::NcVar marsden_square_var
Definition sediment-deck41-marsden-db.h:147
DECK41DbType getDeck41DbType() const
Definition sediment-deck41-marsden-db.h:120
virtual bool isValid()
Definition woss-db.h:134
::std::string db_name
Definition woss-db.h:164
NetCDF implementation of WossDb.
Definition woss-db.h:193
int Marsden
Definition coordinates-definitions.h:69
Provides the interface for woss::SedimDeck41CoordDb class.
DECK41DbType
Definition sediment-deck41-coord-db.h:82
@ DECK41_DB_INVALID_TYPE
INVALID, must be last.
Definition sediment-deck41-coord-db.h:85
Definitions and library for woss::Sediment class.
Provides the interface for woss::WossDb class.