Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature v800 for rSOILWAT2 #401

Merged
merged 1 commit into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions include/SW_Output_outarray.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ extern "C" {
#if defined(SWNETCDF)
#undef iOUT
#undef iOUT2
#else
#undef iOUTnc
#endif


Expand Down
19 changes: 17 additions & 2 deletions src/SW_Control.c
Original file line number Diff line number Diff line change
Expand Up @@ -657,6 +657,17 @@
int debug = 0;
#endif

#ifdef SWDEBUG
if (debug) {
swprintf(

Check warning on line 662 in src/SW_Control.c

View check run for this annotation

Codecov / codecov/patch

src/SW_Control.c#L662

Added line #L662 was not covered by tests
"'SW_CTL_run_spinup': "
"mode = %d, duration = %d (# years), "
"scope = %d [# calendar years out of %d-%d]\n",
mode, duration, scope, sw->Model.startyr, finalyr
);
}
#endif

switch ( mode ) {
case 2:
// initialize structured array
Expand Down Expand Up @@ -705,7 +716,11 @@
*cur_yr = years[ yrIdx ];

#ifdef SWDEBUG
if (debug) swprintf("\n'SW_CTL_run_spinup': simulate year = %d\n", *cur_yr);
if (debug) {
swprintf(

Check warning on line 720 in src/SW_Control.c

View check run for this annotation

Codecov / codecov/patch

src/SW_Control.c#L720

Added line #L720 was not covered by tests
"'SW_CTL_run_spinup': simulate year = %d | %d\n", yrIdx + 1, *cur_yr
);
}
#endif

SW_CTL_run_current_year(sw, NULL, LogInfo);
Expand Down Expand Up @@ -914,7 +929,7 @@

SW_CTL_main(&local_sw, SW_OutputPtrs, LogInfo);
if(LogInfo->stopRun) {
return; // Exit function prematurely due to error
goto freeMem; // Free memory and exit function prematurely due to error

Check warning on line 932 in src/SW_Control.c

View check run for this annotation

Codecov / codecov/patch

src/SW_Control.c#L932

Added line #L932 was not covered by tests
}

#if defined(SWNETCDF)
Expand Down
9 changes: 0 additions & 9 deletions src/SW_Output_get_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,6 @@

#include "include/SW_Output.h"

#ifdef RSOILWAT
#include <R.h>
#include <Rdefines.h>
#include <Rinternals.h>
#endif

#ifdef STEPWAT
#include <math.h>
#endif

#if defined(SWNETCDF)
#include <netcdf.h> // defines NC_FILL_DOUBLE
Expand Down
Loading