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 2025 Federico Guerra
4 * and regents of the SIGNET lab, University of Padova
5 *
6 * Author: Federico Guerra - WOSS@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
33#ifndef WOSS_SEDIMENT_DECK41_MARSDEN_ONE_DB_H
34#define WOSS_SEDIMENT_DECK41_MARSDEN_ONE_DB_H
35
36
37#ifdef WOSS_NETCDF_SUPPORT
38
39
41#include "woss-db.h"
43#if defined (WOSS_NETCDF4_SUPPORT)
44#include <ncVar.h>
45#endif // defined (WOSS_NETCDF4_SUPPORT)
46
47namespace woss {
48
49
56
57 public:
58
64 SedimDeck41MarsdenOneDb( const std::string& name = DB_NAME_NOT_SET );
65
66#if defined (WOSS_NETCDF4_SUPPORT)
72 SedimDeck41MarsdenOneDb( const std::string& name, DECK41DbType db_type );
73#endif // defined (WOSS_NETCDF4_SUPPORT)
74
75 virtual ~SedimDeck41MarsdenOneDb() override = default;
76
77
83 Deck41Types getSeaFloorType( const MarsdenCoord& marsden_coord ) const;
84
89 virtual bool isValid() const override { return( WossNetcdfDb::isValid()
90 && db_name != DB_NAME_NOT_SET
92
93
98 virtual bool finalizeConnection() override;
99
100#if defined (WOSS_NETCDF4_SUPPORT)
105 void setDeck41DbType( DECK41DbType db_type ) { deck41_db_type = db_type; }
106#endif // defined (WOSS_NETCDF4_SUPPORT)
107
113
114
115 protected:
116
117
121#if defined (WOSS_NETCDF4_SUPPORT)
123#else
125#endif // defined (WOSS_NETCDF4_SUPPORT)
126
130#if defined (WOSS_NETCDF4_SUPPORT)
132#else
134#endif // defined (WOSS_NETCDF4_SUPPORT)
138#if defined(WOSS_NETCDF4_SUPPORT)
139 netCDF::NcVar marsden_square_var;
140#else
142#endif // defined(WOSS_NETCDF4_SUPPORT)
146#if defined(WOSS_NETCDF4_SUPPORT)
148#else
150#endif // defined(WOSS_NETCDF4_SUPPORT)
151
156
157 };
158
159}
160
161#endif // WOSS_NETCDF_SUPPORT
162
163#endif /* WOSS_SEDIMENT_DECK41_MARSDEN_ONE_DB_H */
WossDb for custom made NetCDF marsden coordinates DECK41 Sediment database.
Definition sediment-deck41-marsden-one-db.h:55
netCDF::NcVar marsden_one_square_var
Definition sediment-deck41-marsden-one-db.h:147
netCDF::NcVar marsden_square_var
Definition sediment-deck41-marsden-one-db.h:139
void setDeck41DbType(DECK41DbType db_type)
Definition sediment-deck41-marsden-one-db.h:105
NcVar * main_sedim_var_marsden_one
Definition sediment-deck41-marsden-one-db.h:124
NcVar * marsden_one_square_var
Definition sediment-deck41-marsden-one-db.h:149
NcVar * marsden_square_var
Definition sediment-deck41-marsden-one-db.h:141
NcVar * sec_sedim_var_marsden_one
Definition sediment-deck41-marsden-one-db.h:133
virtual bool finalizeConnection() override
Definition sediment-deck41-marsden-one-db.cpp:71
netCDF::NcVar main_sedim_var_marsden_one
Definition sediment-deck41-marsden-one-db.h:122
DECK41DbType getDeck41DbType() const
Definition sediment-deck41-marsden-one-db.h:112
DECK41DbType deck41_db_type
Definition sediment-deck41-marsden-one-db.h:155
virtual ~SedimDeck41MarsdenOneDb() override=default
Deck41Types getSeaFloorType(const MarsdenCoord &marsden_coord) const
Definition sediment-deck41-marsden-one-db.cpp:104
virtual bool isValid() const override
Definition sediment-deck41-marsden-one-db.h:89
netCDF::NcVar sec_sedim_var_marsden_one
Definition sediment-deck41-marsden-one-db.h:131
std::string db_name
Definition woss-db.h:152
virtual bool isValid() const
Definition woss-db.h:124
NetCDF implementation of WossDb.
Definition woss-db.h:178
Definition ac-toolbox-arr-asc-reader.h:44
std::pair< int, int > MarsdenCoord
Definition coordinates-definitions.h:70
DECK41DbType
Definition sediment-deck41-coord-db.h:75
@ DECK41_DB_INVALID_TYPE
INVALID, must be last.
std::pair< int, int > Deck41Types
Definition sediment-definitions.h:46
Provides the interface for woss::SedimDeck41CoordDb class.
Definitions and library for woss::Sediment class.
Provides the interface for woss::WossDb class.