-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleanup of the of the ioda converter (#634)
* wip * code tidy, simplified nc reader * added empty example * addressed rmclaren s review * override to final
- Loading branch information
1 parent
a028e29
commit 945c359
Showing
9 changed files
with
162 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
list( APPEND gdasapp_rads2ioda_src_files | ||
gdas_rads2ioda.cc | ||
gdas_rads2ioda.h | ||
gdas_obsprovider2ioda.cc | ||
gdas_obsprovider2ioda.h | ||
) | ||
ecbuild_add_executable( TARGET gdas_rads2ioda.x | ||
ecbuild_add_executable( TARGET gdas_obsprovider2ioda.x | ||
SOURCES ${gdasapp_rads2ioda_src_files} ) | ||
|
||
target_compile_features( gdas_rads2ioda.x PUBLIC cxx_std_17) | ||
target_link_libraries( gdas_rads2ioda.x PUBLIC oops ioda NetCDF::NetCDF_CXX) | ||
target_compile_features( gdas_obsprovider2ioda.x PUBLIC cxx_std_17) | ||
target_link_libraries( gdas_obsprovider2ioda.x PUBLIC oops ioda NetCDF::NetCDF_CXX) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#include "gdas_obsprovider2ioda.h" | ||
#include "oops/runs/Run.h" | ||
|
||
int main(int argc, char ** argv) { | ||
oops::Run run(argc, argv); | ||
gdasapp::ObsProvider2IodaApp obsprovider2ioda; | ||
return run.execute(obsprovider2ioda); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#pragma once | ||
|
||
#include <string> | ||
|
||
#include "eckit/config/LocalConfiguration.h" | ||
#include "oops/mpi/mpi.h" | ||
#include "oops/runs/Application.h" | ||
|
||
#include "../Rads2Ioda.h" | ||
|
||
namespace gdasapp { | ||
class ObsProvider2IodaApp : public oops::Application { | ||
public: | ||
explicit ObsProvider2IodaApp(const eckit::mpi::Comm & comm = oops::mpi::world()) | ||
: Application(comm) {} | ||
static const std::string classname() {return "gdasapp::ObsProvider2IodaApp";} | ||
|
||
int execute(const eckit::Configuration & fullConfig, bool /*validate*/) const { | ||
// Get the file provider string identifier from the config | ||
std::string provider; | ||
fullConfig.get("provider", provider); | ||
|
||
if (provider == "RADS") { | ||
Rads2Ioda conv2ioda(fullConfig); | ||
conv2ioda.writeToIoda(); | ||
} else if (provider == "GHRSST") { | ||
oops::Log::info() << "Comming soon!" << std::endl; | ||
} else { | ||
oops::Log::info() << "Provider not implemented" << std::endl; | ||
return 1; | ||
} | ||
return 0; | ||
} | ||
// ----------------------------------------------------------------------------- | ||
private: | ||
std::string appname() const { | ||
return "gdasapp::ObsProvider2IodaApp"; | ||
} | ||
// ----------------------------------------------------------------------------- | ||
}; | ||
} // namespace gdasapp |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
provider: RADS | ||
window begin: 2018-04-15T06:00:00Z | ||
window end: 2018-04-15T12:00:00Z | ||
variable: absoluteDynamicTopography | ||
output file: rads_adt_j3_2021182.ioda.nc | ||
input files: | ||
- rads_adt_j3_2021182.nc4 |