Skip to content

Commit

Permalink
Coding norms and test references
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidNew-NOAA committed Nov 6, 2024
1 parent 9472b1e commit 086f696
Show file tree
Hide file tree
Showing 3 changed files with 173 additions and 6 deletions.
41 changes: 41 additions & 0 deletions test/atm/global-workflow/3dvar-fv3inc.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Background State:

----------------------------------------------------------------------------------------------------
State print | number of fields = 9 | cube sphere face size: C48
eastward_wind | Min:-5.5495644220059390e+01 Max:+8.4934651204487366e+01 RMS:+1.6388250288532191e+01
northward_wind | Min:-7.3712421229093422e+01 Max:+7.6984825502186652e+01 RMS:+8.1424144891567511e+00
air_temperature | Min:+1.7482158077318496e+02 Max:+3.1467235233685437e+02 RMS:+2.4978424883064508e+02
surface_pressure | Min:+5.3298485514404747e+04 Max:+1.0398027192902798e+05 RMS:+9.8897229693652524e+04
specific_humidity | Min:+1.2691624667179020e-08 Max:+2.0041369334954085e-02 RMS:+4.7792638023125686e-03
cloud_liquid_ice | Min:+0.0000000000000000e+00 Max:+1.2024392024662985e-03 RMS:+1.4396968866569995e-05
cloud_liquid_water | Min:+0.0000000000000000e+00 Max:+1.5935686618789048e-03 RMS:+4.1931345590543333e-05
ozone_mass_mixing_ratio | Min:+1.1998327271379204e-08 Max:+1.7808431790670831e-05 RMS:+4.4947917149861064e-06
surface_geopotential_height | Min:-2.7018394470214844e+01 Max:+5.2697460937500000e+03 RMS:+6.3032575784066080e+02
----------------------------------------------------------------------------------------------------
JEDI Increment:

----------------------------------------------------------------------------------------------------
Increment print | number of fields = 8 | cube sphere face size: C48
eastward_wind | Min:-4.9503077015344843e-07 Max:+7.0838511279092131e-07 RMS:+2.4490899978286723e-09
northward_wind | Min:-7.2703516684757830e-07 Max:+2.8853321110133834e-07 RMS:+2.1376104971902294e-09
air_temperature | Min:-2.1723477061641461e-07 Max:+6.5020122974601691e-07 RMS:+1.0998492962503341e-08
surface_pressure | Min:-7.8580342233181000e-10 Max:+3.2014213502407074e-10 RMS:+1.5159255545534699e-11
specific_humidity | Min:-6.7425976452941262e-04 Max:+7.2974731745455677e-04 RMS:+2.1043490698817701e-06
cloud_liquid_ice | Min:-2.7736911125384438e-06 Max:+5.0834107240617123e-07 RMS:+4.7607939912271645e-08
cloud_liquid_water | Min:-3.7332445167104997e-04 Max:+3.4355489504058373e-04 RMS:+3.0033170533500212e-06
ozone_mass_mixing_ratio | Min:+0.0000000000000000e+00 Max:+0.0000000000000000e+00 RMS:+0.0000000000000000e+00
----------------------------------------------------------------------------------------------------
FV3 Increment:

----------------------------------------------------------------------------------------------------
Increment print | number of fields = 9 | cube sphere face size: C48
eastward_wind | Min:-4.9503077015344843e-07 Max:+7.0838511279092131e-07 RMS:+2.4490899978286723e-09
northward_wind | Min:-7.2703516684757830e-07 Max:+2.8853321110133834e-07 RMS:+2.1376104971902294e-09
air_temperature | Min:-2.1723477061641461e-07 Max:+6.5020122974601691e-07 RMS:+1.0998492962503341e-08
specific_humidity | Min:-6.7425976452941262e-04 Max:+7.2974731745455677e-04 RMS:+2.1043490698817701e-06
cloud_liquid_ice | Min:-2.7736911125384438e-06 Max:+5.0834107240617123e-07 RMS:+4.7607939912271645e-08
cloud_liquid_water | Min:-3.7332445167104997e-04 Max:+3.4355489504058373e-04 RMS:+3.0033170533500212e-06
ozone_mass_mixing_ratio | Min:+0.0000000000000000e+00 Max:+0.0000000000000000e+00 RMS:+0.0000000000000000e+00
air_pressure_thickness | Min:-2.9103830456733704e-11 Max:+2.9103830456733704e-11 RMS:+3.3056019160193798e-13
layer_thickness | Min:-1.0638235174337751e-01 Max:+1.0329449278924585e-01 RMS:+2.8485086711777381e-04
----------------------------------------------------------------------------------------------------
123 changes: 123 additions & 0 deletions test/atm/global-workflow/lgetkf-fv3inc.ref
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
Background State for member 0:

----------------------------------------------------------------------------------------------------
State print | number of fields = 9 | cube sphere face size: C48
eastward_wind | Min:-5.1619864857418477e+01 Max:+8.6812084442971653e+01 RMS:+1.5983411875766325e+01
northward_wind | Min:-7.3094846805319690e+01 Max:+7.0353817207582651e+01 RMS:+7.7265473774262041e+00
air_temperature | Min:+1.7646396818493386e+02 Max:+3.1441817730817547e+02 RMS:+2.4989439192167012e+02
surface_pressure | Min:+5.3259705655314101e+04 Max:+1.0392378167916714e+05 RMS:+9.8893465602866549e+04
specific_humidity | Min:+9.5164908108891825e-09 Max:+2.0222136340880194e-02 RMS:+4.8552459174929334e-03
cloud_liquid_ice | Min:-1.3545705512023003e-20 Max:+6.7304686933261399e-04 RMS:+1.0726563909939355e-05
cloud_liquid_water | Min:-5.4244251425755909e-20 Max:+1.2879383569881558e-03 RMS:+3.8382491358281577e-05
ozone_mass_mixing_ratio | Min:+2.9375003505643131e-08 Max:+1.8014885502109894e-05 RMS:+4.4946424525503736e-06
surface_geopotential_height | Min:-2.7018394470214844e+01 Max:+5.2697460937500000e+03 RMS:+6.3032575784066080e+02
----------------------------------------------------------------------------------------------------
JEDI Increment for member 0:

----------------------------------------------------------------------------------------------------
Increment print | number of fields = 8 | cube sphere face size: C48
eastward_wind | Min:-1.7416909136434541e+01 Max:+1.8325867271120192e+01 RMS:+7.2689113073983769e-01
northward_wind | Min:-1.5335235321425948e+01 Max:+2.1574447615122054e+01 RMS:+7.1328003377466020e-01
air_temperature | Min:-8.6048230478038406e+00 Max:+8.1497937417599609e+00 RMS:+3.1081395800884187e-01
surface_pressure | Min:-4.9202937637815580e-04 Max:+8.7924188102306289e-04 RMS:+5.8051418356002832e-05
specific_humidity | Min:-6.6741214369962698e-03 Max:+9.0731153226882751e-03 RMS:+1.4380776566867527e-04
cloud_liquid_ice | Min:-4.9931336523754066e-04 Max:+2.6181751401796260e-04 RMS:+3.2747284981508197e-06
cloud_liquid_water | Min:-1.0141458910771410e-03 Max:+1.1396207487973308e-03 RMS:+1.0447469223790289e-05
ozone_mass_mixing_ratio | Min:-2.9909193396824413e-06 Max:+3.4967162777667096e-06 RMS:+5.0924831319987802e-08
----------------------------------------------------------------------------------------------------
FV3 Increment for member 0:

----------------------------------------------------------------------------------------------------
Increment print | number of fields = 9 | cube sphere face size: C48
eastward_wind | Min:-1.7416909136434541e+01 Max:+1.8325867271120192e+01 RMS:+7.2689113073983769e-01
northward_wind | Min:-1.5335235321425948e+01 Max:+2.1574447615122054e+01 RMS:+7.1328003377466020e-01
air_temperature | Min:-8.6048230478038406e+00 Max:+8.1497937417599609e+00 RMS:+3.1081395800884187e-01
specific_humidity | Min:-6.6741214369962698e-03 Max:+9.0731153226882751e-03 RMS:+1.4380776566867527e-04
cloud_liquid_ice | Min:-4.9931336523754066e-04 Max:+2.6181751401796260e-04 RMS:+3.2747284981508197e-06
cloud_liquid_water | Min:-1.0141458910771410e-03 Max:+1.1396207487973308e-03 RMS:+1.0447469223790289e-05
ozone_mass_mixing_ratio | Min:-2.9909193396824413e-06 Max:+3.4967162777667096e-06 RMS:+5.0924831319987802e-08
air_pressure_thickness | Min:-1.1013638868462294e-05 Max:+1.9681036064866930e-05 RMS:+6.5512588707706875e-07
layer_thickness | Min:-2.8045559103640699e+01 Max:+2.1697786412500136e+01 RMS:+6.5544095172004369e-01
----------------------------------------------------------------------------------------------------
Background State for member 1:

----------------------------------------------------------------------------------------------------
State print | number of fields = 9 | cube sphere face size: C48
eastward_wind | Min:-5.2853490758012072e+01 Max:+8.7248708527964936e+01 RMS:+1.5955809745480765e+01
northward_wind | Min:-7.2178651628585953e+01 Max:+7.2568167230757609e+01 RMS:+7.7335061167195889e+00
air_temperature | Min:+1.7660670217895057e+02 Max:+3.1526174222386965e+02 RMS:+2.4989392943476341e+02
surface_pressure | Min:+5.3317702550070273e+04 Max:+1.0394629485957995e+05 RMS:+9.8892949759388735e+04
specific_humidity | Min:+2.1514597275760548e-08 Max:+1.9663168048133908e-02 RMS:+4.8569105861498299e-03
cloud_liquid_ice | Min:-1.3544569699620215e-20 Max:+7.9557019872326799e-04 RMS:+1.0816147029169270e-05
cloud_liquid_water | Min:-5.4200711162051571e-20 Max:+1.2298889446687945e-03 RMS:+3.8689917911663205e-05
ozone_mass_mixing_ratio | Min:+1.6238717942558199e-08 Max:+1.8031521448783218e-05 RMS:+4.4947640660308833e-06
surface_geopotential_height | Min:-2.7018394470214844e+01 Max:+5.2697460937500000e+03 RMS:+6.3032575784066080e+02
----------------------------------------------------------------------------------------------------
JEDI Increment for member 1:

----------------------------------------------------------------------------------------------------
Increment print | number of fields = 8 | cube sphere face size: C48
eastward_wind | Min:-1.7542991285853031e+01 Max:+2.0968845531775742e+01 RMS:+7.2825863145362402e-01
northward_wind | Min:-1.5283258164430123e+01 Max:+2.0478626874987171e+01 RMS:+7.1562489129210427e-01
air_temperature | Min:-1.0374519800275246e+01 Max:+9.3297652767893524e+00 RMS:+3.1237829519350230e-01
surface_pressure | Min:-4.8986046327570421e-04 Max:+9.0817638056250871e-04 RMS:+5.9230402548777353e-05
specific_humidity | Min:-6.9184909302780918e-03 Max:+8.2127508558306646e-03 RMS:+1.4099077159566875e-04
cloud_liquid_ice | Min:-5.2537411650465499e-04 Max:+3.1949478810012653e-04 RMS:+3.2097080991341253e-06
cloud_liquid_water | Min:-1.0684141562485590e-03 Max:+1.1931964279486475e-03 RMS:+1.0416514064617798e-05
ozone_mass_mixing_ratio | Min:-3.1852115564505394e-06 Max:+3.2851197161513411e-06 RMS:+5.1928484225101225e-08
----------------------------------------------------------------------------------------------------
FV3 Increment for member 1:

----------------------------------------------------------------------------------------------------
Increment print | number of fields = 9 | cube sphere face size: C48
eastward_wind | Min:-1.7542991285853031e+01 Max:+2.0968845531775742e+01 RMS:+7.2825863145362402e-01
northward_wind | Min:-1.5283258164430123e+01 Max:+2.0478626874987171e+01 RMS:+7.1562489129210427e-01
air_temperature | Min:-1.0374519800275246e+01 Max:+9.3297652767893524e+00 RMS:+3.1237829519350230e-01
specific_humidity | Min:-6.9184909302780918e-03 Max:+8.2127508558306646e-03 RMS:+1.4099077159566875e-04
cloud_liquid_ice | Min:-5.2537411650465499e-04 Max:+3.1949478810012653e-04 RMS:+3.2097080991341253e-06
cloud_liquid_water | Min:-1.0684141562485590e-03 Max:+1.1931964279486475e-03 RMS:+1.0416514064617798e-05
ozone_mass_mixing_ratio | Min:-3.1852115564505394e-06 Max:+3.2851197161513411e-06 RMS:+5.1928484225101225e-08
air_pressure_thickness | Min:-1.0965086403302848e-05 Max:+2.0328705431893468e-05 RMS:+6.6843104175422882e-07
layer_thickness | Min:-3.2106148452359776e+01 Max:+2.5923789087046316e+01 RMS:+6.6540710201306896e-01
----------------------------------------------------------------------------------------------------
Background State for member 2:

----------------------------------------------------------------------------------------------------
State print | number of fields = 9 | cube sphere face size: C48
eastward_wind | Min:-5.3776366655868109e+01 Max:+8.6331467223030344e+01 RMS:+1.5960680883840784e+01
northward_wind | Min:-7.0176400159320124e+01 Max:+6.9531049915936578e+01 RMS:+7.7410680097841684e+00
air_temperature | Min:+1.7648447482434227e+02 Max:+3.1491330999751426e+02 RMS:+2.4989313307279673e+02
surface_pressure | Min:+5.3350124363319999e+04 Max:+1.0389818047809265e+05 RMS:+9.8892179510558097e+04
specific_humidity | Min:+2.1846447498856659e-08 Max:+2.0007929878326374e-02 RMS:+4.8392192734415156e-03
cloud_liquid_ice | Min:-6.7740196346531239e-21 Max:+6.2473018245821010e-04 RMS:+1.0889666282638220e-05
cloud_liquid_water | Min:-5.4107584399974539e-20 Max:+1.2132298501853738e-03 RMS:+3.8405804865664137e-05
ozone_mass_mixing_ratio | Min:+1.2289325508931378e-08 Max:+1.8036413152177077e-05 RMS:+4.4950884931704925e-06
surface_geopotential_height | Min:-2.7018394470214844e+01 Max:+5.2697460937500000e+03 RMS:+6.3032575784066080e+02
----------------------------------------------------------------------------------------------------
JEDI Increment for member 2:

----------------------------------------------------------------------------------------------------
Increment print | number of fields = 8 | cube sphere face size: C48
eastward_wind | Min:-1.8014062913663103e+01 Max:+1.8516732485049666e+01 RMS:+7.3383694849572323e-01
northward_wind | Min:-1.5579280119728031e+01 Max:+2.2762102719398591e+01 RMS:+7.2377717441299694e-01
air_temperature | Min:-1.0570848751737598e+01 Max:+8.3564092475959129e+00 RMS:+3.1645038788954982e-01
surface_pressure | Min:-4.7656900311210393e-04 Max:+9.1220166839889316e-04 RMS:+5.8396146445486219e-05
specific_humidity | Min:-5.2439197475218757e-03 Max:+8.2607880293262357e-03 RMS:+1.4211303446855155e-04
cloud_liquid_ice | Min:-5.2671607196952148e-04 Max:+2.7498589550193714e-04 RMS:+3.2193226262458792e-06
cloud_liquid_water | Min:-1.0851123947058787e-03 Max:+1.2045791096627974e-03 RMS:+1.0548571598067807e-05
ozone_mass_mixing_ratio | Min:-3.2510682480215228e-06 Max:+3.3849184382668304e-06 RMS:+5.2379967545874409e-08
----------------------------------------------------------------------------------------------------
FV3 Increment for member 2:

----------------------------------------------------------------------------------------------------
Increment print | number of fields = 9 | cube sphere face size: C48
eastward_wind | Min:-1.8014062913663103e+01 Max:+1.8516732485049666e+01 RMS:+7.3383694849572323e-01
northward_wind | Min:-1.5579280119728031e+01 Max:+2.2762102719398591e+01 RMS:+7.2377717441299694e-01
air_temperature | Min:-1.0570848751737598e+01 Max:+8.3564092475959129e+00 RMS:+3.1645038788954982e-01
specific_humidity | Min:-5.2439197475218757e-03 Max:+8.2607880293262357e-03 RMS:+1.4211303446855155e-04
cloud_liquid_ice | Min:-5.2671607196952148e-04 Max:+2.7498589550193714e-04 RMS:+3.2193226262458792e-06
cloud_liquid_water | Min:-1.0851123947058787e-03 Max:+1.2045791096627974e-03 RMS:+1.0548571598067807e-05
ozone_mass_mixing_ratio | Min:-3.2510682480215228e-06 Max:+3.3849184382668304e-06 RMS:+5.2379967545874409e-08
air_pressure_thickness | Min:-1.0667572496458888e-05 Max:+2.0418810890987515e-05 RMS:+6.5901623607235396e-07
layer_thickness | Min:-2.8377559817174188e+01 Max:+2.5490176089209854e+01 RMS:+6.7263739596740091e-01
----------------------------------------------------------------------------------------------------
15 changes: 9 additions & 6 deletions utils/fv3jedi/fv3jedi_fv3inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,13 @@ namespace gdasapp {

// Testing output for inputs
if ( nmem == 1 ) {
oops::Log::test() << "Background State: " << std::endl << xxBkg << std::endl;
oops::Log::test() << "JEDI Increment: " << std::endl << dxJEDI << std::endl;
oops::Log::test() << "Background State:" << std::endl << xxBkg << std::endl;
oops::Log::test() << "JEDI Increment:" << std::endl << dxJEDI << std::endl;
} else {
oops::Log::test() << "Background State for member " << imem << ":" << std::endl << xxBkg << std::endl;
oops::Log::test() << "JEDI Increment for member " << imem << ":" << std::endl << dxJEDI << std::endl;
oops::Log::test() << "Background State for member " << imem << ":" << std::endl \
<< xxBkg << std::endl;
oops::Log::test() << "JEDI Increment for member " << imem << ":" << std::endl \
<< dxJEDI << std::endl;
}

// Increment conversion
Expand Down Expand Up @@ -166,9 +168,10 @@ namespace gdasapp {

// Test output for outputs
if ( nmem == 1 ) {
oops::Log::test() << "FV3 Increment: " << std::endl << dxFV3 << std::endl;
oops::Log::test() << "FV3 Increment:" << std::endl << dxFV3 << std::endl;
} else {
oops::Log::test() << "FV3 Increment for member " << imem << ":" << std::endl << dxFV3 << std::endl;
oops::Log::test() << "FV3 Increment for member " << imem << ":" << std::endl \
<< dxFV3 << std::endl;
}

// Write FV3 increment
Expand Down

0 comments on commit 086f696

Please sign in to comment.