World Ocean Simulation System (WOSS) library
sediment-deck41-marsden-one-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_ONE_DB_H
41#define WOSS_SEDIMENT_DECK41_MARSDEN_ONE_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
72 SedimDeck41MarsdenOneDb( const ::std::string& name = DB_NAME_NOT_SET );
73
74#if defined (WOSS_NETCDF4_SUPPORT)
80 SedimDeck41MarsdenOneDb( const ::std::string& name, DECK41DbType db_type );
81#endif // defined (WOSS_NETCDF4_SUPPORT)
82
83 virtual ~SedimDeck41MarsdenOneDb() { }
84
85
91 Deck41Types getSeaFloorType( const MarsdenCoord& marsden_coord ) const;
92
93
98 virtual bool isValid() { return( WossNetcdfDb::isValid()
99 && db_name != DB_NAME_NOT_SET
101
102
107 virtual bool finalizeConnection();
108
109#if defined (WOSS_NETCDF4_SUPPORT)
114 void setDeck41DbType( DECK41DbType db_type ) { deck41_db_type = db_type; }
115#endif // defined (WOSS_NETCDF4_SUPPORT)
116
122
123
124 protected:
125
126
130#if defined (WOSS_NETCDF4_SUPPORT)
132#else
134#endif // defined (WOSS_NETCDF4_SUPPORT)
135
139#if defined (WOSS_NETCDF4_SUPPORT)
141#else
143#endif // defined (WOSS_NETCDF4_SUPPORT)
147#if defined(WOSS_NETCDF4_SUPPORT)
148 netCDF::NcVar marsden_square_var;
149#else
150 NcVar* marsden_square_var;
151#endif // defined(WOSS_NETCDF4_SUPPORT)
155#if defined(WOSS_NETCDF4_SUPPORT)
157#else
159#endif // defined(WOSS_NETCDF4_SUPPORT)
160
165
166 };
167
168
169}
170
171#endif // WOSS_NETCDF_SUPPORT
172
173#endif /* WOSS_SEDIMENT_DECK41_MARSDEN_ONE_DB_H */
174
175
176
WossDb for custom made NetCDF marsden coordinates DECK41 Sediment database.
Definition sediment-deck41-marsden-one-db.h:62
netCDF::NcVar marsden_one_square_var
Definition sediment-deck41-marsden-one-db.h:156
netCDF::NcVar marsden_square_var
Definition sediment-deck41-marsden-one-db.h:148
void setDeck41DbType(DECK41DbType db_type)
Definition sediment-deck41-marsden-one-db.h:114
virtual bool isValid()
Definition sediment-deck41-marsden-one-db.h:98
netCDF::NcVar main_sedim_var_marsden_one
Definition sediment-deck41-marsden-one-db.h:131
DECK41DbType getDeck41DbType() const
Definition sediment-deck41-marsden-one-db.h:121
virtual bool finalizeConnection()
Definition sediment-deck41-marsden-one-db.cpp:78
DECK41DbType deck41_db_type
Definition sediment-deck41-marsden-one-db.h:164
Deck41Types getSeaFloorType(const MarsdenCoord &marsden_coord) const
Definition sediment-deck41-marsden-one-db.cpp:111
netCDF::NcVar sec_sedim_var_marsden_one
Definition sediment-deck41-marsden-one-db.h:140
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
::std::pair< int, int > MarsdenCoord
Definition coordinates-definitions.h:76
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.