-
Notifications
You must be signed in to change notification settings - Fork 415
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
Spring cleaning #169
Merged
Merged
Spring cleaning #169
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Conflicts: ChangeLog Makefile drivers/classic/src/initialize_model_state.c vic_run/include/LAKE.h vic_run/include/global.h vic_run/include/vicNl.h vic_run/src/full_energy.c vic_run/src/lakes.eb.c
global.h defined a number of global variables and was only included in vicNl.c. There is not much of an advantage to this and is likely to lead to confusion, since all the variables are already declared as externs in the individual files where they are used or vicNl_def.h.
Reorganized the header files to support a clean split between the driver and the physical core of VIC. In doing this I also separated the header files, so that they do not include other header files.
We'll keep only one header file for all the functions declarations that are part VIC's physical core (vic_run).
I combined all the constants into a single vic_def.h file. Mainly to avoid the problem that the same constants are defined differently in different parts of the code. As is, there is a risk of "out of sight, out of mind". Still need to split vic_def.h into a vic_run_def.h and a vic_driver_def.h
Note that write_layer should NOT be part of vic_run. Instead, if data is to be written out it should be passed to the driver.
Note that these functions need to be replaced. We need uniform logging and within vic_run errors need to be handled in a generic manner.
Needs to be moved back to driver at some point
A few files still have dependencies on the driver that need to be removed: * vic_driver_classic.h - dist_prec.c - put_data.c - vicerror.c * mtclim_constants.h - CalcBlowingSnow.c - compute_coszen.c
Main change in this commit is the removal of dist_prec Conflicts: ChangeLog drivers/classic/src/initialize_model_state.c src/LAKE.h src/Makefile src/global.h src/vicNl.h vic_run/src/full_energy.c vic_run/src/lakes.eb.c
Conflicts: drivers/classic/src/initialize_atmos.c drivers/classic/src/vic_classic.c src/Makefile src/global.h src/vicNl.h vic_run/include/vic_def.h vic_run/src/calc_surf_energy_bal.c vic_run/src/canopy_evap.c vic_run/src/func_surf_energy_bal.c vic_run/src/runoff.c vic_run/src/solve_snow.c vic_run/src/surface_fluxes.c vic_run/src/vic_run.c Note that this commit will break drivers/image since there have been changes in vic_run
… is used. This is required for the code to work in image mode, where a time array of veg_hist is not available in the calling routine.
Conflicts: src/global.h
variables in Variable Argument Lists will be removed in a second commit
…resses almost all warnings and errors generated when using the -Wextra comiler flag
…ted by all drivers
This commit includes the following changes: - new header file for physical constants - new structure for global model parameters - new input file to allow for runtime definition of model parameters - new initialization functions for options, global parameters, and model parameters - removal of most, but not all, hard coded literals. - new physics.c file in vic_run/src to handle frequently used physical computations - new shared print library - new global parameter options for blowing snow - removal of model parameters from global parameter file Uncrustify was run at the end of the changes. The following commit will address a memory error in the model.
This was referenced Dec 8, 2014
Closed
Closed
Closed
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes all of @bartnijssen's feature/reorg and feature/image changes including my feature/cleanup changes that address issue #162 .
Both drivers are compiling without errors or warnings (with one small exception in
CalcBlowingSnow.c
) with all gcc warning flags on (-Wall -Wextra
).Testing performed on this branch has confirmed that we are getting results in the "ballpark" of VIC 4.2 for the classic driver in both
FULL_ENERGY
andWATER_BALANCE
modes. Below are two plots showing hourly output from a full energy run using the Rosemont example setup. Units are deg. C and mm respectively.More testing is underway but I think we've met the minimum threshold to establish the develop branch as the VIC 5 threshold. Merging this now would be useful in the development of other drivers in the near future.
closes #162.