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 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_DB_H
34#define WOSS_SEDIMENT_DECK41_MARSDEN_DB_H
35
36
37#ifdef WOSS_NETCDF_SUPPORT
38
39#include <string>
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
55
56 public:
57
62 SedimDeck41MarsdenDb( const std::string& name = DB_NAME_NOT_SET );
63
64#if defined (WOSS_NETCDF4_SUPPORT)
70 SedimDeck41MarsdenDb( const std::string& name, DECK41DbType db_type );
71#endif // defined (WOSS_NETCDF4_SUPPORT)
72
73 virtual ~SedimDeck41MarsdenDb() override = default;
74
80 Deck41Types getSeaFloorType( const Marsden& marsden_square ) const;
81
86 virtual bool isValid() const override { return( WossNetcdfDb::isValid()
87 && db_name != DB_NAME_NOT_SET
89
94 virtual bool finalizeConnection() override;
95
96#if defined (WOSS_NETCDF4_SUPPORT)
101 void setDeck41DbType( DECK41DbType db_type ) { deck41_db_type = db_type; }
102#endif // defined (WOSS_NETCDF4_SUPPORT)
103
109
110
111 protected:
112
113
117#if defined (WOSS_NETCDF4_SUPPORT)
119#else
121#endif // defined (WOSS_NETCDF4_SUPPORT)
122
126#if defined (WOSS_NETCDF4_SUPPORT)
128#else
130#endif // defined (WOSS_NETCDF4_SUPPORT)
134#if defined(WOSS_NETCDF4_SUPPORT)
135 netCDF::NcVar marsden_square_var;
136#else
138#endif // defined(WOSS_NETCDF4_SUPPORT)
139
144
145 };
146
147}
148
149#endif // WOSS_NETCDF_SUPPORT
150
151#endif /* WOSS_SEDIMENT_DECK41_MARSDEN_DB_H */
WossDb for custom made NetCDF marsden square DECK41 Sediment database.
Definition sediment-deck41-marsden-db.h:54
NcVar * main_sedim_var_marsden
Definition sediment-deck41-marsden-db.h:120
NcVar * sec_sedim_var_marsden
Definition sediment-deck41-marsden-db.h:129
virtual bool isValid() const override
Definition sediment-deck41-marsden-db.h:86
Deck41Types getSeaFloorType(const Marsden &marsden_square) const
Definition sediment-deck41-marsden-db.cpp:96
NcVar * marsden_square_var
Definition sediment-deck41-marsden-db.h:137
netCDF::NcVar sec_sedim_var_marsden
Definition sediment-deck41-marsden-db.h:127
virtual bool finalizeConnection() override
Definition sediment-deck41-marsden-db.cpp:68
virtual ~SedimDeck41MarsdenDb() override=default
DECK41DbType deck41_db_type
Definition sediment-deck41-marsden-db.h:143
void setDeck41DbType(DECK41DbType db_type)
Definition sediment-deck41-marsden-db.h:101
netCDF::NcVar main_sedim_var_marsden
Definition sediment-deck41-marsden-db.h:118
netCDF::NcVar marsden_square_var
Definition sediment-deck41-marsden-db.h:135
DECK41DbType getDeck41DbType() const
Definition sediment-deck41-marsden-db.h:108
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
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
int Marsden
Definition coordinates-definitions.h:63
Provides the interface for woss::SedimDeck41CoordDb class.
Definitions and library for woss::Sediment class.
Provides the interface for woss::WossDb class.