DrylandEcology / SOILWAT2

An ecosystem water balance simulation model
GNU General Public License v3.0
5 stars 2 forks source link

Create a "Progress" netCDF #388

Closed N1ckP3rsl3y closed 8 months ago

N1ckP3rsl3y commented 9 months ago
codecov[bot] commented 9 months ago

Codecov Report

Attention: 28 lines in your changes are missing coverage. Please review.

Comparison is base (8e3adf3) 70.68% compared to head (84dbffc) 70.51%.

Files Patch % Lines
src/SW_Control.c 9.09% 20 Missing :warning:
src/Times.c 0.00% 4 Missing :warning:
src/filefuncs.c 0.00% 3 Missing :warning:
src/SW_Main_lib.c 66.66% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## release/devel_v8.0.0 #388 +/- ## ======================================================== - Coverage 70.68% 70.51% -0.17% ======================================================== Files 21 21 Lines 5631 5650 +19 ======================================================== + Hits 3980 3984 +4 - Misses 1651 1666 +15 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

dschlaep commented 8 months ago

@N1ckP3rsl3y Do you have ideas how best to deal with our C++ test program not being very happy about some of the new functionality? e.g.,

CPPFLAGS=-DSWNETCDF make clean test_run

tells me

src/SW_netCDF.c:455:38: warning: ISO C++11 does not allow conversion from string literal to 'char ' [-Wwritable-strings] static char wgs84_synonyms[] = {"WGS84", "WGS 84", "EPSG:4326", ^ ... src/SW_netCDF.c:661:25: warning: temporary whose address is used as value of local variable 'start' will be destroyed at the end of the full-expression [-Wdangling] (size_t[1]){0} : (size_t[2]){0, 0}; ^~~~~~ ... src/SW_netCDF.c:1544:27: error: non-constant-expression cannot be narrowed from type 'unsigned long' to 'int' in initializer list [-Wc++11-narrowing] int timeVertVals[] = {timeSize, vertSize}, numTimeVertVals = 2; ^~~~ src/SW_netCDF.c:1544:27: note: insert an explicit cast to silence this issue int timeVertVals[] = {timeSize, vertSize}, numTimeVertVals = 2; ^~~~ static_cast( ) src/SW_netCDF.c:1608:11: error: cannot initialize a variable of type 'char ' with an rvalue of type 'const char ' char impliedDomType = (dimExists("site", ncFileID)) ? "s" : "xy"; ^ ~~~~~~~~~~ src/SW_netCDF.c:1654:24: warning: ISO C++11 does not allow conversion from string literal to 'char ' [-Wwritable-strings] char attFailMsg = "The attribute '%s' of the variable '%s' " ^ src/SW_netCDF.c:1674:31: warning: ISO C++11 does not allow conversion from string literal to 'char ' [-Wwritable-strings] get_dim_val(ncFileID, "site", &SDimVal, LogInfo); ^ src/SW_netCDF.c:1679:31: error: assigning to 'Bool' from incompatible type 'bool' dimMismatch = SDimVal != SW_Domain->nDimS;


...
src/SW_netCDF.c:1705:53: error: assigning to 'Bool' from incompatible type 'bool'
dimMismatch = latDimVal != SW_Domain->nDimY ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
src/SW_netCDF.c:1979:10: error: cannot initialize a variable of type 'Bool' with an rvalue of type 'bool'
Bool domTypeIsS = strcmp(SW_Domain->DomainType, "s") == 0;
^            ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...
src/SW_netCDF.c:2088:51: warning: temporary whose address is used as value of local variable 'count' will be destroyed at the end of the full-expression [-Wdangling]
size_t *count = (strcmp(domType, "s") == 0) ? (size_t[1]){1} : (size_t[2]){1, 1};
^~~~~~~~~~~~~~
...
src/SW_netCDF.c:2129:57: warning: ISO C++11 does not allow conversion from string literal to 'char *' [-Wwritable-strings]
Bool domTypeS = Str_CompareI(SW_Domain->DomainType, "s") == 0;
^
src/SW_netCDF.c:2129:10: error: cannot initialize a variable of type 'Bool' with an rvalue of type 'bool'
Bool domTypeS = Str_CompareI(SW_Domain->DomainType, "s") == 0;
^          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 warnings and 8 errors generated.