1
- #ifndef GDAS_POSTPROCINCR_H
2
- #define GDAS_POSTPROCINCR_H
1
+ #pragma once
3
2
4
- #include < iostream>
5
3
#include < filesystem>
6
4
5
+ #include < iostream>
6
+ #include < string>
7
+
7
8
#include " eckit/config/LocalConfiguration.h"
8
9
9
10
#include " atlas/field.h"
22
23
namespace gdasapp {
23
24
24
25
class PostProcIncr {
25
- public:
26
+ public:
26
27
// Constructor
27
28
PostProcIncr (const eckit::Configuration & fullConfig, const soca::Geometry& geom,
28
29
const eckit::mpi::Comm & comm)
@@ -33,7 +34,7 @@ class PostProcIncr {
33
34
xTraj_(getTraj(fullConfig, geom)),
34
35
comm_(comm),
35
36
ensSize_(1 ),
36
- pattern_(){
37
+ pattern_() {
37
38
38
39
oops::Log::info () << " Date: " << std::endl << dt_ << std::endl;
39
40
@@ -73,18 +74,18 @@ class PostProcIncr {
73
74
}
74
75
75
76
// Append layer thicknesses to increment
76
- // TODO: There's got to be a better way to append a variable.
77
- soca::Increment appendLayer (const int n){
77
+ // TODO(guillaume) : There's got to be a better way to append a variable.
78
+ soca::Increment appendLayer (const int n) {
78
79
oops::Log::info () << " ==========================================" << std::endl;
79
80
oops::Log::info () << " ====== Append Layers" << std::endl;
80
81
81
82
// initialize the soca increment
82
83
soca::Increment socaIncr (geom_, socaIncrVar_, dt_);
83
- eckit::LocalConfiguration memberConfig; // inputIncrConfig_);
84
+ eckit::LocalConfiguration memberConfig; // inputIncrConfig_);
84
85
memberConfig = inputIncrConfig_;
85
86
86
87
// replace templated string if necessary
87
- if (not pattern_.empty ()) {
88
+ if (! pattern_.empty ()) {
88
89
util::seekAndReplace (memberConfig, pattern_, std::to_string (n));
89
90
oops::Log::info () << " oooooooooooooooooooooooooooooooooooo" << memberConfig << std::endl;
90
91
}
@@ -124,7 +125,7 @@ class PostProcIncr {
124
125
// Set specified variables to 0
125
126
soca::Increment setToZero (soca::Increment socaIncr) {
126
127
oops::Log::info () << " ==========================================" << std::endl;
127
- if (not this ->setToZero_ ) {
128
+ if (! this ->setToZero_ ) {
128
129
oops::Log::info () << " ====== no variables to set to 0.0" << std::endl;
129
130
return socaIncr;
130
131
}
@@ -154,7 +155,7 @@ class PostProcIncr {
154
155
// Apply linear variable changes
155
156
soca::Increment applyLinVarChange (soca::Increment socaIncr) {
156
157
oops::Log::info () << " ==========================================" << std::endl;
157
- if (not this ->doLVC_ ) {
158
+ if (! this ->doLVC_ ) {
158
159
return socaIncr;
159
160
}
160
161
oops::Log::info () << " ====== applying specified change of variables" << std::endl;
@@ -252,8 +253,8 @@ class PostProcIncr {
252
253
// Utility functions
253
254
// -----------------------------------------------------------------------------
254
255
// Recreate the soca filename from the configuration
255
- // TODO: Change this in soca?
256
- // TODO: Hard-coded for ocean, implement for seaice as well
256
+ // TODO(guillaume) : Change this in soca?
257
+ // TODO(guillaume) : Hard-coded for ocean, implement for seaice as well
257
258
std::string socaFname () {
258
259
std::string datadir;
259
260
outputIncrConfig_.get (" datadir" , datadir);
@@ -284,7 +285,7 @@ class PostProcIncr {
284
285
}
285
286
286
287
287
- public:
288
+ public:
288
289
util::DateTime dt_; // valid date of increment
289
290
oops::Variables layerVar_; // layer variable
290
291
const soca::Increment Layers_; // layer thicknesses
@@ -303,6 +304,4 @@ class PostProcIncr {
303
304
int ensSize_;
304
305
std::string pattern_;
305
306
};
306
- } // namespace gdasapp
307
-
308
- #endif // GDAS_POSTPROCINCR_H
307
+ } // namespace gdasapp
0 commit comments