FV3 Bundle
IodaIO.cc
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2017 UCAR
3  *
4  * This software is licensed under the terms of the Apache Licence Version 2.0
5  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6  */
7 
8 #include <string>
9 
10 #include "oops/util/Logger.h"
11 
12 #include "fileio/IodaIO.h"
13 
14 namespace ioda {
15 // -----------------------------------------------------------------------------
16 
18 
19 // -----------------------------------------------------------------------------
20 /*!
21  * \details This method returns the path to the file.
22  */
23 
24 std::string IodaIO::fname() const {
25  return fname_;
26 }
27 
28 // -----------------------------------------------------------------------------
29 /*!
30  * \details This method returns the mode (read, write, etc) for access to the file.
31  */
32 
33 std::string IodaIO::fmode() const {
34  return fmode_;
35 }
36 
37 // -----------------------------------------------------------------------------
38 /*!
39  * \details This method returns the number of unique locations in the obs data.
40  */
41 
42 std::size_t IodaIO::nlocs() {
43  return nlocs_;
44 }
45 
46 // -----------------------------------------------------------------------------
47 /*!
48  * \details This method returns the number of unique observations in the obs data.
49  */
50 
51 std::size_t IodaIO::nobs() {
52  return nobs_;
53 }
54 
55 // -----------------------------------------------------------------------------
56 /*!
57  * \details This method returns the number of unique recoreds in the obs data.
58  * A record is an atomic unit that will remain intact during distribution
59  * across multiple process elements. An example is a single sounding in
60  * radiosonde obs data.
61  */
62 
63 std::size_t IodaIO::nrecs() {
64  return nrecs_;
65 }
66 
67 // -----------------------------------------------------------------------------
68 /*!
69  * \details This method returns the number of unique variables in the obs data.
70  */
71 
72 std::size_t IodaIO::nvars() {
73  return nvars_;
74 }
75 
76 } // namespace ioda
std::size_t nobs_
number of unique observations
virtual ~IodaIO()=0
Definition: IodaIO.cc:17
std::string fname() const
Definition: IodaIO.cc:24
std::size_t nlocs_
number of unique locations
std::size_t nobs()
Definition: IodaIO.cc:51
std::string fname_
file name
std::string fmode() const
Definition: IodaIO.cc:33
std::size_t nvars()
Definition: IodaIO.cc:72
std::size_t nrecs()
Definition: IodaIO.cc:63
std::string fmode_
file mode ("r" -> read, "w" -> overwrite, "W" -> create and write)
std::size_t nlocs()
Definition: IodaIO.cc:42
std::size_t nrecs_
number of unique records
std::size_t nvars_
number of unique variables