Skip to content

Commit

Permalink
Feature/rtofs in situ (#1138)
Browse files Browse the repository at this point in the history
Created 2 converters with corresponding tests, for temperature and
salinity.
2 different files are created.
For temperature the file includes
tmp, tmp_err, lon, lat, depth
and metadata sal_typ and flg
Similarly, for salinity..
  • Loading branch information
givelberg committed Jun 10, 2024
1 parent 4e49741 commit 9645e0d
Show file tree
Hide file tree
Showing 28 changed files with 1,081 additions and 601 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/norms.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ jobs:
- name: Run C++ linter on utils
run: |
cd $GITHUB_WORKSPACE/GDASApp/utils/test/
./cpplint.py --quiet --recursive $GITHUB_WORKSPACE/GDASApp/utils
./cpplint.py --quiet --recursive --exclude=$GITHUB_WORKSPACE/GDASApp/utils/obsproc/rtofs/*.cc $GITHUB_WORKSPACE/GDASApp/utils
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ cmake_minimum_required( VERSION 3.20 FATAL_ERROR )
find_package(ecbuild 3.5 REQUIRED HINTS ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/../ecbuild)

project(GDASApp VERSION 1.0.0 LANGUAGES C CXX Fortran )
# include_directories(${CMAKE_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR})

include(GNUInstallDirs)
enable_testing()
Expand Down
2 changes: 1 addition & 1 deletion sorc/fv3
Submodule fv3 updated 1 files
+3 −1 CMakeLists.txt
2 changes: 1 addition & 1 deletion sorc/gsw
2 changes: 1 addition & 1 deletion sorc/land-imsproc
2 changes: 1 addition & 1 deletion sorc/land-jediincr
2 changes: 1 addition & 1 deletion utils/obsproc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# add_subdirectory(rtofs)
add_subdirectory(rtofs)
add_subdirectory(applications)
8 changes: 8 additions & 0 deletions utils/obsproc/NetCDFToIodaConverter.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ namespace gdasapp {
oops::Log::trace() << "NetCDFToIodaConverter::NetCDFToIodaConverter created." << std::endl;
}




// Method to write out a IODA file (writter called in destructor)
void writeToIoda() {
// Extract ioda variables from the provider's files
Expand All @@ -60,6 +63,8 @@ namespace gdasapp {

// Read the provider's netcdf file
gdasapp::obsproc::iodavars::IodaVars iodaVars = providerToIodaVars(inputFilenames_[myrank]);


for (int i = myrank + comm_.size(); i < inputFilenames_.size(); i += comm_.size()) {
iodaVars.append(providerToIodaVars(inputFilenames_[i]));
oops::Log::info() << " appending: " << inputFilenames_[i] << std::endl;
Expand Down Expand Up @@ -200,6 +205,9 @@ namespace gdasapp {
}
}




private:
// Virtual method that reads the provider's netcdf file and store the relevant
// info in a IodaVars struct
Expand Down
Loading

0 comments on commit 9645e0d

Please sign in to comment.