IODA
obsspace_f.h
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 #ifndef CORE_OBSSPACE_F_H_
9 #define CORE_OBSSPACE_F_H_
10 
11 #include "ioda/ObsSpace.h"
12 #include "oops/base/Variables.h"
13 #include "oops/mpi/mpi.h"
14 #include "oops/util/DateTime.h"
15 
16 // -----------------------------------------------------------------------------
17 // These functions provide a Fortran-callable interface to ObsSpace.
18 // -----------------------------------------------------------------------------
19 
20 namespace ioda {
21 
22 extern "C" {
23  const ObsSpace * obsspace_construct_f(const eckit::Configuration *, const util::DateTime *,
24  const util::DateTime *);
25  void obsspace_destruct_f(ObsSpace *);
26  const oops::Variables * obsspace_obsvariables_f(const ObsSpace &);
27  std::size_t obsspace_get_gnlocs_f(const ObsSpace &);
28  std::size_t obsspace_get_nlocs_f(const ObsSpace &);
29  std::size_t obsspace_get_nchans_f(const ObsSpace &);
30  std::size_t obsspace_get_nrecs_f(const ObsSpace &);
31  std::size_t obsspace_get_nvars_f(const ObsSpace &);
32 
33  void obsspace_get_dim_name_f(const ObsSpace &, const int &, std::size_t &, char *);
34  std::size_t obsspace_get_dim_size_f(const ObsSpace &, const int &);
35  int obsspace_get_dim_id_f(const ObsSpace &, const char *);
36 
37  void obsspace_get_comm_f(const ObsSpace &, int &, char *);
38  void obsspace_get_recnum_f(const ObsSpace &, const std::size_t &, std::size_t *);
39  void obsspace_get_index_f(const ObsSpace &, const std::size_t &, std::size_t *);
40 
41  void obsspace_obsname_f(const ObsSpace &, size_t &, char *);
42 
43  bool obsspace_has_f(const ObsSpace &, const char *, const char *);
44 
45  void obsspace_get_int32_f(const ObsSpace &, const char *, const char *,
46  const std::size_t &, int32_t*,
47  const std::size_t &, int*);
48  void obsspace_get_int64_f(const ObsSpace &, const char *, const char *,
49  const std::size_t &, int64_t*,
50  const std::size_t &, int*);
51  void obsspace_get_real32_f(const ObsSpace &, const char *, const char *,
52  const std::size_t &, float*,
53  const std::size_t &, int*);
54  void obsspace_get_real64_f(const ObsSpace &, const char *, const char *,
55  const std::size_t &, double*,
56  const std::size_t &, int*);
57  void obsspace_get_datetime_f(const ObsSpace &, const char *, const char *,
58  const std::size_t &, int32_t*, int32_t*,
59  const std::size_t &, int*);
60 
61  void obsspace_put_int32_f(ObsSpace &, const char *, const char *,
62  const std::size_t &, int32_t*,
63  const std::size_t &, int*);
64  void obsspace_put_int64_f(ObsSpace &, const char *, const char *,
65  const std::size_t &, int64_t*,
66  const std::size_t &, int*);
67  void obsspace_put_real32_f(ObsSpace &, const char *, const char *,
68  const std::size_t &, float*,
69  const std::size_t &, int*);
70  void obsspace_put_real64_f(ObsSpace &, const char *, const char *,
71  const std::size_t &, double*,
72  const std::size_t &, int*);
73 
76 }
77 
78 } // namespace ioda
79 
80 #endif // CORE_OBSSPACE_F_H_
std::size_t obsspace_get_nvars_f(const ObsSpace &obss)
Definition: obsspace_f.cc:68
void obsspace_get_comm_f(const ObsSpace &obss, int &lcname, char *cname)
Definition: obsspace_f.cc:90
const ObsSpace * obsspace_construct_f(const eckit::Configuration *conf, const util::DateTime *begin, const util::DateTime *end)
Definition: obsspace_f.cc:24
void obsspace_get_int32_f(const ObsSpace &obss, const char *group, const char *vname, const std::size_t &length, int32_t *vec, const std::size_t &len_cs, int *chan_select)
Definition: obsspace_f.cc:118
void obsspace_put_real32_f(ObsSpace &obss, const char *group, const char *vname, const std::size_t &length, float *vec, const std::size_t &ndims, int *dim_ids)
Definition: obsspace_f.cc:244
void obsspace_put_int32_f(ObsSpace &obss, const char *group, const char *vname, const std::size_t &length, int32_t *vec, const std::size_t &ndims, int *dim_ids)
Definition: obsspace_f.cc:201
void obsspace_get_real32_f(const ObsSpace &obss, const char *group, const char *vname, const std::size_t &length, float *vec, const std::size_t &len_cs, int *chan_select)
Definition: obsspace_f.cc:144
void obsspace_destruct_f(ObsSpace *obss)
Definition: obsspace_f.cc:33
std::size_t obsspace_get_nlocs_f(const ObsSpace &obss)
Definition: obsspace_f.cc:56
const oops::Variables * obsspace_obsvariables_f(const ObsSpace &obss)
Definition: obsspace_f.cc:47
void obsspace_get_recnum_f(const ObsSpace &obss, const std::size_t &length, std::size_t *recnum)
Definition: obsspace_f.cc:96
int obsspace_get_dim_id_f(const ObsSpace &obss, const char *dim_name)
Definition: obsspace_f.cc:85
void obsspace_obsname_f(const ObsSpace &obss, size_t &lcname, char *cname)
Definition: obsspace_f.cc:39
void obsspace_get_real64_f(const ObsSpace &obss, const char *group, const char *vname, const std::size_t &length, double *vec, const std::size_t &len_cs, int *chan_select)
Definition: obsspace_f.cc:156
void obsspace_get_datetime_f(const ObsSpace &obss, const char *group, const char *vname, const std::size_t &length, int32_t *date, int32_t *time, const std::size_t &len_cs, int *chan_select)
Definition: obsspace_f.cc:170
void obsspace_get_index_f(const ObsSpace &obss, const std::size_t &length, std::size_t *index)
Definition: obsspace_f.cc:104
void obsspace_put_real64_f(ObsSpace &obss, const char *group, const char *vname, const std::size_t &length, double *vec, const std::size_t &ndims, int *dim_ids)
Definition: obsspace_f.cc:264
bool obsspace_has_f(const ObsSpace &obss, const char *group, const char *vname)
Definition: obsspace_f.cc:114
void obsspace_get_int64_f(const ObsSpace &obss, const char *group, const char *vname, const std::size_t &length, int64_t *vec, const std::size_t &len_cs, int *chan_select)
Definition: obsspace_f.cc:132
std::size_t obsspace_get_nchans_f(const ObsSpace &obss)
Definition: obsspace_f.cc:60
int obsspace_get_nchans_dim_id_f()
Definition: obsspace_f.cc:291
int obsspace_get_nlocs_dim_id_f()
Definition: obsspace_f.cc:287
void obsspace_put_int64_f(ObsSpace &obss, const char *group, const char *vname, const std::size_t &length, int64_t *vec, const std::size_t &ndims, int *dim_ids)
Definition: obsspace_f.cc:224
std::size_t obsspace_get_dim_size_f(const ObsSpace &obss, const int &dim_id)
Definition: obsspace_f.cc:81
std::size_t obsspace_get_gnlocs_f(const ObsSpace &obss)
Definition: obsspace_f.cc:52
void obsspace_get_dim_name_f(const ObsSpace &obss, const int &dim_id, std::size_t &len_dim_name, char *dim_name)
Definition: obsspace_f.cc:73
std::size_t obsspace_get_nrecs_f(const ObsSpace &obss)
Definition: obsspace_f.cc:64