Recent Releases of VIC
VIC - VIC 5.1.0
VIC 5.1.0 (December 14, 2021)
This is a maintanence release that includes numerous bug fixes and a few model enhancements. All code changes were included in the two release candidates (5.1.0.rc1 and 5.1.0.rc2). See the notes below from the two release candidates for more details.
Announcements
- VIC is now shared under the MIT license (GH#917).
- Travis-CI was disabled folling the platform's migration to travis-ci.com. See GH#919 for more details (GH918).
VIC 5.1.0 rc2 (September 28, 2020)
Bug Fixes:
Fixed datetime handling bug in unit test module (GH#796)
Removed descriptions of forcing disaggregation options from documentation of classic driver global parameter file (GH#831)
Removed descriptions of forcing disaggregation options from documentation of image driver global parameter file (GH#833)
Fixed segmentation fault in lake model caused by incorrect passing of pointer argument to
vic_run(). (GH#826Relaxed some of the validation of lake parameters, to allow them to be null in cells containing no lakes. (GH#826
Fixed passing of lake data structures to
generate_default_lake_state(). (GH#826Separated the dimensions of arrays related to lake basin shape and of arrays related to the number of lake simulation layers. (GH#826
Added global parameter option to set the maximum number of (dynamic) lake simulation layers. (GH#826
Fixed bug causing ET to be 0 in pure bare soil tiles. (GH#823
VIC 5.1.0 rc1
Release date: (April 27, 2018)
Source code is available here:
This is a minor update from VIC 5.0.1. The VIC 5.1.0 includes new features, such as a new streamflow routing extension and extended parallelization using OpenMP. The release also includes a number of bug fixes for the CESM driver. See the VIC Github page for more details on the changes included in this release.
Model enhancement:
- Improved calculation of drainage between soil layers (GH#656)
Drainage from upper layer to adjacent lower layer is calculated according to Brook & Corey curve (where drainage rate is a function of upper-layer soil moisture). In previous versions, a simple numerical solution is applied which uses the timestep-beginning upper-layer soil moisture to calculate drainage rate, and assume this constant rate over the entire timestep. This can cause unreasonably large drainage if the curve has a steep shape and when soil moisture is high. Now, the current version uses exact integral (instead of numerical solution) for layer drainage calculation.
Fixes for the CESM driver
- Using correct fill value datatypes in MPI Gather steps
- Updated state file name time step to be period-ending rather than period-beginning
- Set the state file name to the RASM case ID
- Removed decimal point for missing values for unsigned integers
- Create dummy forcings when initializing the model (so that there is forcing data for the first time step)
- Changed pressure units from kPa to Pa
- Fixed bug that prevented using the correct local domain grid cells in `cesm_put_data.c`
- Changed reference temperature units from Celsius to Kelvin in `cesm_put_data.c`
- Fix sign for latent heat fluxes passed from VIC to the coupler
- Fix sign for longwave radiation passed from VIC to the coupler
- Changes names of CESM driver functions `trim` and `advance_time` to `trimstr` and `advance_vic_time`, respectively, to avoid conflicts with WRF functions with the same names when compiling RFR case.
- Fixes Julian day for the first timestep in the dmy struct for the CESM driver.
- Refactor the cesm_put_data.c routine in the CESM driver to use values from out_data directly, rather than computing them separately in cesm_put_data.c.
- Fixes initialization of coupler fields and calculates temperature and upwelling longwave to pass to WRF during initialization.
- Updates the cesm_put_data.c routine in the CESM driver to pass gridcell-averaged albedo to the coupler.
- Updates the cesm_put_data.c routine in the CESM driver to include the correct units for evap passed to the coupler.
- Updates the cesm_put_data.c routine in the CESM driver to include the correct units for sensible heat flux and updates the rofliq calculation to be correct (previously only OUT_BASEFLOW was being divided by global_param.dt).
- Updates the cesm_put_data.c routine in the CESM driver to include the correct signs for turbulent heat fluxes and evaporation. Previously we had switched the signs to agree with the image driver and they should instead be in accordance with the sign conventions for coupled models, which differ from those of land surface models. Also, eliminate populating the `l2x_Sl_ram1` field with aero_resist to agree with the VIC 4 implementation in RASM.
- Updates the cesm_put_data.c routine in the CESM driver to include the correct signs for the wind stresses and fixes a bug in calculating friction velocity (previously it was missing a square root).
- Updates the cesm_interface_c.c routine to include missing timers and the VIC RUN timer in the CESM driver.
- Updates the cesm_interface_c.c routine in the CESM driver to populate the nrecs, endyear, endmonth and endday fields in the global_param struct to make them available to vic_finalize for timing tables (specifically the secs/day columns).
- Updates the default namelist settings for the CESM driver to include output filenames consistent with the RASM naming conventions, default thermal nodes to 10, `FULL_ENERGY` to `TRUE`, and sets defaults for daily and monthly mean output.
- Updates the default output variables for the CESM driver. Also updates the VIC5 parameter file location to be the RASM inputdata directory and updates the name of the VIC5 parameter file to the new VIC5 parameters.
-
- Adds support to the CESM driver for 25km resolution RASM runs.
-
- Adds initial state files to default 50km and 25km builds so that these are used by other groups running RASM rather than VIC5 starting up from a clean start.
GH#880 --Adds option STATENAMECESM to the optionstruct so that statefiles in the CESM driver can be in accordance with RASM naming conventions for model components.
- Speed up NetCDF operations in the image/CESM drivers (GH#684)
These changes speed up image driver initialization, forcing reads, and history writes by only opening and closing each input netCDF file once. 4. Added two new timers to measure time in I/O operations (GH#703)
These two timers count the CPU and WALL time spent in
vic_forceandvic_write. The accumulated time from these timers is printed out at the end of each simulation in the timing table. See also GH#442. 5. Added gridcell-averaged albedo (STATEAVGALBEDO) as a state file variable (GH#712)This is for use in the CESM driver for VIC to pass to WRF, but has been implemented in the core structure of VIC (in vic_run) for consistency with the classic and image drivers. Running VIC from a cold start now also includes calculation of gridcell-averaged albedo. 6. Cleanup of the initialization sections of the
imageandcesmdrivers (GH#701)Codified behavior in the initialization of the
imageandcesmdrivers that requires the parameter variablesAreaFract,Pfactor,zone_fract, andCvmust sum exactly to 1.0. If using theSNOW_BANDoption, the area weightedelevationmust match the mean grid cell elevation (elev). VIC will print warnings if any of these criteria are violated.
7. Added thread parallelization using OPENMP (GH#712)The VIC image and CESM drivers now may be optionally compiled with OPENMP to enable shared memory thread parallelization. This option should improve the parallel scaling of these drivers by reducing the number of MPI messages and increasing message size. 8. Added streamflow routing extensions ROUTSTUB and ROUTRVIC for the VIC image driver (GH#231)
The VIC image driver can be optionally compiled with ROUTRVIC to enable routing in image mode (ROUTSTUB is the default extension which means no routing). With ROUTRVIC enabled, the output variable ``OUTDISCHARGE
is available, and there will also be an extra state variableSTATEROUTRING`` stored in the state file. 9. Moved MAXITERGRNDCANOPY, which controls the maximum number of ground-canopy iterations in CLOSEENERGY mode for vegetation types with an overstory, to the parameters struct (GH#771)Previously this was set in the surfacefluxes.c numerics routine for ground-canopy iterations, which meant that that routine had to be altered to change the maximum number of iterations. It has now been moved to the parameters struct so that it can be overriden in the constants file. 10. Updated new snow density function by adding a cap to new snow density that is set in the parameters struct by the parameter SNOWNEWSNOWDENS_MAX (GH#776)
Previously the change in cold content of the snowpack term (deltaCC in the snowdatastruct) would get unreasonably large if the Hedstrom and Pomeroy 1998 equation used to calculate snow density, which depends only on air temperature, was calculated with air temperatures above about 2 deg C. We use this term to calculate the ground flux from the snowpack and snow depth, which resulted in extremely small snow depths and unreasonably large ground fluxes from the snowpack (and thus changes in snowpack cold content). Now there is a cap on new snow density with the new parameter SNOWNEWSNOWDENSMAX as well as a snow depth below which we disregard the ground flux from the snowpack (1.e-8). 11. Added new option BULKDENSITYCOMB that enables soil bulk density (mineral and organic) to be read from the parameters file (GH#817)
The option BULKDENSITYCOMB enables soil bulk density (mineral and organic) to be read in as a parameter when the option is set to true in the global parameter file. Default is false. 12. Turns on
ORGANIC_FRACToption that previously existed in VIC 4 and enables theBULK_DENSITY_COMBoption to be used in conjunction with it (GH#837)The option
ORGANIC_FRACT, if set to True, means that the organic fraction of the soil, soil density of the organic matter, and bulk density of the organic matter (ifBULK_DENSITY_COMBis set to false) will be read in from the parameter file. IfBULK_DENSITY_COMBis set to True, the bulk density of the organic matter will not be read in separately. Default is false. 13. Added new optionMAX_SNOW_ALBEDOthat enables new snow albedo to be read in from the parameters file (GH#835)The option
MAX_SNOW_ALBEDO, if set to true in the global parameter file, means that new snow albedo will be read in from the parameter file and used in the snow routines for all vegetation types except for bare soil. 10. Miscellaneous clean-up:
- Added support for veg_hist forcings (non-climatological) in image mode
- Fixed erroneous allocation of extra veg tile in image mode
- Simplified looping over veg tiles and bands in vic_run() and prepare_full_energy()
- Replaced lengthy data structures with local pointers in vic_run()
- Simplified out_prec, out_rain, and Melt arrays
- Updated names of variables and options for LAI and FCANOPY in documentation to match their new names in the code
- Removed constants MAX_VEG and MAX_BANDS from code; all arrays that were declared with those lengths were replaced with dynamic allocations. This allowed for specification of veg libraries containing more classes without recompiling the code, and more efficient memory usage.
[GH#766](https://github.com/UW-Hydro/VIC/pull/766)
- Improved logic in computing soil evaporation (esoil), primarily in func_surf_energy_bal(), by creating explicit terms for transpiration (transp) and esoil in the layer data structure.
Bug Fixes:
NetCDF forcing files are now closed at the last timestep in stead of after the last timestep. (GH#774)
Renamed "fcov" to "fcan" in image driver to better match variable code name (GH#673)
- C
Published by jhamman over 4 years ago
VIC - VIC 5.0.1
Release date: (February 1, 2017) This release contains a number of bug fixes.
Bug Fixes:
- Fixed image driver history file name timestamp (GH#635)
After the fix, the timestamp appeared in the image driver output history filename is the beginning time of the time period in the file. 2. Fixed forceskip rounding bug (GH#639)
After the fix, the forceskip variable in the global parameter structure (i.e., the number of timesteps to skip in the forcing data for the simulatin period) is rounded correctly (before the fix, rounding error might cause 1-timestep offset in the simulation results).
3. Fixed a problem with image restarts when using multiple processors (GH#638)
After the fix, only the master node is assigned the task of validating state file dimensions and coordinate variables. Multiprocessing was also added to the VIC testing framework.
4. Ensured that the mask variable in the input domain file must be integer type; otherwise an error is raised. (GH#645)
5. Fixed a bug related to make_lastday function (GH#647)
Before the fix, the input arguments to function make_lastday are sometimes in a wrong order. The bug caused error when trying to write state file on a leap day.
6. Fixed a bug related to writing two-dimensional lat/lon variables to a state file (GH#652)
Before the bug fix, two-dimensional lat/lon variables were not populated correctly and were written as fill values to a state file. Now two-dimensional lat/lon variables are correctly populated and written.
7. Fixed a bug related to dz_node and node_depth variables in image driver output state file (GH#657)
Before the fix, dz_node and node_depth in image driver output state file were not spatially distributed, which was wrong. Now these two variables are spatially distributed in the output state file.
8. Fixed a bug related to run_cell and mask variables in image driver inputs (GH#662)
Before the fix, active cell was controlled by mask variable in the domain file in image driver, and run_cell variable in the parameter file was not actually used. Now run_cell variable in the parameter file controls active cells (run_cell must be within the mask defined by the domain file).
9. Fixed a time precision bug for long simulations (GH#668)
Before the fix, the timestamps of long VIC runs were incorrect in some cases due to precision issue in timestamp generation. This resulted in incorrect output timestamps after running for a long period of time, or output termination. Please refer to GH#668 for details on this bug fix. 10. Fixed a bug related to forcing and simulation start time (GH#671)
Before the fix, there would be an error if the simulation start time is later than the forcing start time that year AND the simulation spans multiple years. Fixed this bug.
- C
Published by yixinmao over 9 years ago
VIC - VIC.5.0.0
VIC 5.0.0 
Release date: (September 2, 2016)
Source code is available here:
This is a major update from VIC 4. The VIC 5.0.0 release aims to have nearly identical physics as VIC 4.2 while providing a clean, refactored code base supporting multiple drivers. There are a number of new features, bug fixes, and backward incompatible changes. See the VIC Github page for more details on the changes included in this release.
New Features:
- "vic_run" (GH#7)
Although the physics and model behavior of VIC 5.0.0 should be nearly identical to VIC 4.2, the source code has undergone a major cleanup and reorganization. We have separated the physical core ("vic_run") from the driver source code. This work has improved the extensibility and readability of the model. 2. Classic Driver (GH#7)
The Classic Driver provides similar functionality as VIC 4, including ASCII and binary I/O, and a time-before-space evaluation loop order. The Classic Driver is maintained for two main reasons: 1. to provide some level of backward compatibility for existing VIC users that wish to continue using VIC using a traditional approach, and, 2. to allow VIC to be run at individual grid cells, without requiring the infrastructure needed by the Image Driver. Documentation for the Classic Driver can be found here. 3. Image Driver (GH#7)
The Image Driver adds a number of features to the user interface of the VIC model. Most notably, it uses a space-before-time evaluation loop order, netCDF I/O, and parallelization using MPI. Image Driver specific documentation can be found here. 4. Constants File (GH#192)
Earlier versions of VIC included many hard-coded parameters and constants. We have consolidated these constants into a single structure and developed an input file that allows users to modify parameters at run-time. See here for more information. 5. Logging (GH#173)
A set of logging Macros have been added to all drivers and vic_run. The logging level can be set in the driver Makefile via the LOG_LVL variable. The logging Macros provide the filename and line number in the source code to aid in debugging. Additionally, when compiler support is available, a traceback is printed when VIC exits during runtime. When the LOG_DIR variable is provided in the global parameter file, VIC will write its log(s) to log files instead of printing to stdout.
6. Sub-hourly Timestep (GH#188)
Previous versions of VIC were limited to a minimum timestep of one hour. The units of the VIC timestep have been changed from hours to seconds and the minimum timestep is now one second. If you intend on running VIC at a timestep of less than one hour, we suggest extensive testing. 7. Calendar Support (GH#188)
Earlier versions of VIC used the standard Gregorian calendar. Because many modern climate models use non-standard calendars, we have implemented all CF compliant calendars. The standard Gregorian calendar remains the VIC default. See the documentation for individual drivers for how to set the calendar option (e.g. classic. 8. Sample Datasets (GH#387)
The VICsampledata repository contains the necessary input datasets (forcings and parameters) to run short simulations of the VIC model for both the classic and image driver. 9. Tests Datasets (GH#79)
See https://github.com/UW-Hydro/VIC/issues/79 for more information. A temporary location of the test data is here: ftp://ftp.hydro.washington.edu/pub/gergel/VIC5testdata/ 10. Testing and Continuous Integration (GH#190)
A comprehensive testing platform has been implemented and is available for public use along with the VIC model. A small subset of the test platform is run on [Travis-CI](https://travis-ci.org/UW-Hydro/VIC), which facilitates continuous integration of the VIC test platform. More information on the test platform is [here](http://vic.readthedocs.io).
Run-time profiling and timing (GH#442)
A timing module has been added to VIC in order to assess the computational cost and throughput of the VIC model. New output variables (
OUT_TIME_VICRUN_WALLandOUT_TIME_VICRUN_CPU) document the time spent invic_runfor each variable. Additionally, a timing table is printed toLOG_DESTat the end of each simulation.
Backwards Incompatible Changes:
The format of ASCII forcing and output files has changed in VIC 5. These changes were motivated by the desire to improve simulation metadata tracking and reproducibility of VIC simulations.
- Output files now include a header with simulation metadata and variable names. The PRT_HEADER option has been deprecated.
2. Classic Driver Global Parameter Options
A number of global parameter options have changed for the Classic Driver, relative to VIC 4.
- TIME_STEP (int, units: hours) has been changed to MODEL_STEPS_PER_DAY (int)
- SNOW_STEP (int, units: hours) has been changed to SNOW_STEPS_PER_DAY (int)
- OUT_DT (int, units: hours) has been changed to OUTPUT_STEPS_PER_DAY (int)
- FORCE_DT (int, units: hours) has been changed to FORCE_STEPS_PER_DAY (int)
- BINARY_STATE_FILE (TRUE or FALSE) has been changed to STATE_FORMAT (BINARY or ASCII)
- BINARY_OUTPUT (TRUE or FALSE) has been changed to OUT_FORMAT (BINARY or ASCII)
3. State files now include seconds (GH#464)
- There is a new global parameter option, STATESEC. This specifies the time step at the end of which state will be saved, in units of seconds. In other words, if you have an hourly time step (3600 sec) and you want to save state at the end of the final time step of the day (which is 86400 seconds long), subtract 3600 from 86400 to get a STATESEC of 82800. This corresponds to the first second of the final time step. State will be saved at the end of that time step.
- When the state save date is appended to state filenames, STATESEC will be included so that the date will have the format YYYYMMDD_SSSSS.
4. Classic Driver Output Variables (GH#352)
Computation of potential evapotranspiration (PET) has been simplified, reducing the number of output variables from 6 to 1. The following output variables have been removed:
- OUT_PET_SATSOIL (potential evapotranspiration from saturated bare soil)
- OUT_PET_H2OSURF (potential evapotranspiration from open water)
- OUT_PET_SHORT (potential evapotranspiration (transpiration only) from short reference crop (grass))
- OUT_PET_TALL (potential evapotranspiration (transpiration only) from tall reference crop (alfalfa))
- OUT_PET_NATVEG (potential evapotranspiration (transpiration only) from current vegetation and current canopy resistance)
- OUT_PET_VEGNOCR (potential evapotranspiration (transpiration only) from current vegetation and 0 canopy resistance)
These have been replaced by:
- OUT_PET (potential evapotranspiration, which = area-weighted sum of potential transpiration and potential soil evaporation; potential transpiration is computed using the Penman-Monteith equation with architectural resistance and LAI of the current veg cover)
Deprecated Features:
Previous versions of VIC used MTCLIM to generate missing forcing variables required to run VIC. This led to confusion by many users and considerably more complex code in the Classic Driver. VIC forcings are now required to be provided at the same time frequency as the model will be run at (SNOW_STEPS_PER_DAY).
As part of this change, the following options have been removed from the Classic Driver:
- LW_TYPE
- LW_CLOUD
- MTCLIM_SWE_CORR
- VP_INTERP
- VP_ITER
- OUTPUT_FORCE
As part of this change, the following output variables have been removed from the Classic Driver:
- OUT_COSZEN
- OUT_TSKC
In the future, we would like to provide a stand-alone version of MTCLIM that produces subdaily meteorological forcings. We are looking for community support for this feature (GH#17)
3. Removed LONGWAVE and SHORTWAVE forcing types (GH#379).
Previous versions of VIC allowed users to specify either LONGWAVE or LWDOWN to denote the incoming longwave radiation flux and SHORTWAVE or SWDOWN to denote the incoming shortwave radiation flux. We have removed these duplicate options, standardizing on the more descriptive LWDOWN and SWDOWN.
Similarly, output variables OUT_NET_LONG and OUT_NET_SHORT have been replaced with OUT_LWNET and OUT_SWNET, respectively.
4. Changed the name of the variable VEGCOVER to FCANOPY, since this more accurately captures the meaning of the term (i.e., the fractional area of the plant canopy within the veg tile). Similarly changed OUT_VEGCOVER to OUT_FCANOPY.
Similarly, changed the names of the following global parameter file options:
- VEGLIB_VEGCOVER --> VEGLIB_FCAN
- VEGPARAM_VEGCOVER --> VEGPARAM_FCAN
- VEGCOVER_SRC --> FCAN_SRC
Bug Fixes:
- Miscellaneous fixes to lake module (GH#425)
Several lake processes (aerodynamic resistance, albedo, latent/sensible heat fluxes, net radiation, etc) were reported incorrectly or not at all in output files. This has been fixed. In addition, in the absence of an initial state file, lake temperatures were initialized to unrealistic temperatures (the air temperature of the first simulation time step). To fix this, we now initialize the lake temperature to annual average soil temperature. 2. Fix for computation of soil layer temperatures when soil thermal nodes do not reach the bottom of the soil column. (GH#467)
Previously, if the soil thermal damping depth was shallower than the bottom of the deepest soil layer, and FROZEN_SOIL==TRUE, VIC would abort when estimating layer ice contents because it could not estimate a layer temperature if the thermal nodes did not completely span the layer. Now, a layer temperature is estimated even when thermal nodes do not completely span the layer, and the error no longer occurs.
3. Fix related to exact restart (GH#481, GH#507, GH#509)
Previously, VIC did not produce the same results (fluxes and states) if a simulation was separated into multiple shorter-period runs by saving the state variables and restarting. This was due to:
1. The MTCLIM algorithm resulted in slightly different sub-daily meteorological variable values for different lengths of forcings (MTCLIM is deprecated in the current version)
2. A few bugs resulting in inexact restart. The following bugs have been fixed:
- The prognostic state variable energy.Tfoliage (foliage temperature) is now saved to the state file
- Two flux variables energy.LongUnderOut and energy.snow_flux are now saved to the state file.
!!!Note
This is a temporary solution to ensure exact restart. A better way of handling these two flux variables needs to be done in the future (see [GH#479](https://github.com/UW-Hydro/VIC/issues/479))
- Fix for binary state file I/O (GH#487)
Fixed a bug so that the binary format state file I/O works correctly. 5. Fix for a physical constant (water heat capacity) (GH#574)
Fixed a bug where volumetric heat capacity of water should be used in func_canopy_energy_bal (previously specific heat capacity was used).
- C
Published by jhamman over 9 years ago
VIC - VIC.5.0.0.rc2
This is the second release candidate of VIC 5.0.0.
Major new features in the VIC 5 series, compared to VIC 4
- "vic_run" (GH#7)
Although the physics and model behavior of VIC 5.0.0 should be nearly identical to VIC 4.2, the source code has undergone a major cleanup and reorganization. We have separated the physical core ("vic_run") from the driver source code. This work has improved the extensibility and readability of the model. 2. Classic Driver (GH#7)
The Classic Driver provides similar functionality as VIC 4, including ASCII and binary I/O, and a time-before-space evaluation loop order. The Classic Driver is maintained for two main reasons: 1. to provide some level of backward compatibility for existing VIC users that wish to continue using VIC using a traditional approach, and, 2. to allow VIC to be run at individual grid cells, without requiring the infrastructure needed by the Image Driver. Documentation for the Classic Driver can be found here. 3. Image Driver (GH#7)
The Image Driver adds a number of features to the user interface of the VIC model. Most notably, it uses a space-before-time evaluation loop order, netCDF I/O, and parallelization using MPI. Image Driver specific documentation can be found here. 4. Constants File (GH#192)
Earlier versions of VIC included many hard-coded parameters and constants. We have consolidated these constants into a single structure and developed an input file that allows users to modify parameters at run-time. See here for more information. 5. Logging (GH#173)
A set of logging Macros have been added to all drivers and vic_run. The logging level can be set in the driver Makefile via the LOG_LVL variable. The logging Macros provide the filename and line number in the source code to aid in debugging. Additionally, when compiler support is available, a traceback is printed when VIC exits during runtime. When the LOG_DIR variable is provided in the global parameter file, VIC will write its log(s) to log files instead of printing to stdout.
6. Sub-hourly Timestep (GH#188)
Previous versions of VIC were limited to a minimum timestep of one hour. The units of the VIC timestep have been changed from hours to seconds and the minimum timestep is now one second. If you intend on running VIC at a timestep less that one hour, we suggest significant testing. 7. Calendar Support (GH#188)
Earlier versions of VIC used the standard Gregorian calendar. Because many modern climate models use non-standard calendars, we have implemented all CF compliant calendars. The standard Gregorian calendar remains the VIC default. See the documentation for individual drivers for how to set the calendar option (e.g. classic). 8. Sample Datasets (GH#387)
The VICsampledata repository contains the necessary input datasets (forcings and parameters) to run short simulations of the VIC model for both the classic and image driver. 9. Tests Datasets (GH#79)
See https://github.com/UW-Hydro/VIC/issues/79 for more information. A temporary location of the test data is here: ftp://ftp.hydro.washington.edu/pub/gergel/VIC5testdata/ 10. Testing and Continuous Integration (GH#190)
A comprehensive testing platform has been implemented and is available for public use along with the VIC model. A small subset of the test platform is run on [Travis-CI](https://travis-ci.org/UW-Hydro/VIC), which facilitates continuous integration of the VIC test platform. More information on the test platform is [here](Testing.md)
Run-time profiling and timing (GH#442)
A timing module has been added to VIC in order to assess the computational cost and throughput of the VIC model. New output variables (
OUT_TIME_VICRUN_WALLandOUT_TIME_VICRUN_CPU) document the time spent invic_runfor each variable. Additionally, a timing table is printed toLOG_DESTat the end of each simulation.
- C
Published by jhamman almost 10 years ago
VIC - VIC.5.0.0.rc1
This is the first release candidate of VIC 5.0.0.
Major new features in the VIC 5 series, compared to VIC 4
- "vic_run" (GH#7)
Although the physics and model behavior of VIC 5.0.0 should be nearly identical to VIC 4.2, the source code has undergone a major cleanup and reorganization. We have separated the physical core ("vic_run") from the driver source code. This work has improved the extensibility and readability of the model. 2. Classic Driver (GH#7)
The Classic Driver provides similar functionality as VIC 4, including ASCII and binary I/O, and a time-before-space evaluation loop order. The Classic Driver is maintained for two main reasons: 1. to provide some level of backward compatibility for existing VIC users that wish to continue using VIC using a traditional approach, and, 2. to allow VIC to be run at individual grid cells, without requiring the infrastructure needed by the Image Driver. Documentation for the Classic Driver can be found here. 3. Image Driver (GH#7)
The Image Driver adds a number of features to the user interface of the VIC model. Most notably, it uses a space-before-time evaluation loop order, netCDF I/O, and parallelization using MPI. Image Driver specific documentation can be found here. 4. Constants File (GH#192)
Earlier versions of VIC included many hard-coded parameters and constants. We have consolidated these constants into a single structure and developed an input file that allows users to modify parameters at run-time. See here for more information. 5. Logging (GH#173)
A set of logging Macros have been added to all drivers and vic_run. The logging level can be set in the driver Makefile via the LOG_LVL variable. The logging Macros provide the filename and line number in the source code to aid in debugging. Additionally, when compiler support is available, a traceback is printed when VIC exits during runtime. When the LOG_DIR variable is provided in the global parameter file, VIC will write its log(s) to log files instead of printing to stdout.
6. Sub-hourly Timestep (GH#188)
Previous versions of VIC were limited to a minimum timestep of one hour. The units of the VIC timestep have been changed from hours to seconds and the minimum timestep is now one second. If you intend on running VIC at a timestep less that one hour, we suggest significant testing. 7. Calendar Support (GH#188)
Earlier versions of VIC used the standard Gregorian calendar. Because many modern climate models use non-standard calendars, we have implemented all CF compliant calendars. The standard Gregorian calendar remains the VIC default. See the documentation for individual drivers for how to set the calendar option (e.g. classic). 8. Sample Datasets (GH#387)
The VICsampledata repository contains the necessary input datasets (forcings and parameters) to run short simulations of the VIC model for both the classic and image driver. 9. Tests Datasets (GH#79)
TODO: See https://github.com/UW-Hydro/VIC/issues/79 for more information. 10. Testing and Continuous Integration (GH#190)
A comprehensive testing platform has been implemented and is available for public use along with the VIC model. A small subset of the test platform is run on [Travis-CI](https://travis-ci.org/UW-Hydro/VIC), which facilitates continuous integration of the VIC test platform. More information on the test platform is [here](Testing.md)
- C
Published by jhamman almost 10 years ago
VIC - VIC 4.2.d
VIC 4.2.d (20 June 2016)
This release contains a number of bug fixes.
Bug Fixes
- Fixed uninitialized
dmy_structwhenOUTPUT_FORCE==TRUEandBINARY_OUTPUT==TRUE(#393) - Fixed uninitialized vegetation parameters when
VEGPARAM_LAI==FALSE(#455)
- C
Published by jhamman almost 10 years ago
VIC - VIC 4.2.c
VIC 4.2.c (12 December 2015)
This release contains a number of bug fixes.
Bug Fixes
- Fixed water balance errors in lake model (#308, #316)
- Fixed OUTPUTFORCE behavior related to veghist features (#305, #307)
- Updated bare soil evaporation behavior related to veg_hist update from 4.2 (#306, #315)
- C
Published by jhamman over 10 years ago
VIC - Release of VIC.4.2.b
** Description of changes between VIC 4.2.a and VIC 4.2.b **
Bug Fixes:
Fixed memory error in initialize atmos when OUTPUT_FORCE = TRUE.
``` Files Affected:
initialize_atmos. Makefile
Description:
Previously, access to unitialized elements of the vegcon and veghist
structure was attempted when OUTPUTFORCE = TRUE, causing a memory error
and the model to crash. This fix sets these elements inside a
`if (!options.OUTPUTFORCE)block allowing the OUTPUT_FORCE option to
work as expected.
``
- C
Published by jhamman over 11 years ago
VIC - Release of VIC.4.2
Description of changes between VIC 4.1.2 and VIC 4.2
New Features:
Added partial vegetation cover (within each tile).
``` Files Affected:
allocveghist.c calcvegparams.c displaycurrentsettings.c fullenergy.c funcsurfenergybal.c getforcetype.c getglobalparam.c global.h initializeatmos.c initializeglobal.c initializeveg.c outputlistutils.c putdata.c readatmosdata.c readforcingdata.c readveglib.c readvegparam.c solvesnow.c surfacefluxes.c vicNl_def.h vicNl.h
Description:
Added a time-varying (non-climatological) partial vegcover fraction within vegetated tiles. Previously, vegetation was assumed to cover 100% of the land surface in a vegetated tile (i.e., "big leaf" scheme). This assumption is not valid in general, and in particular becomes very inaccurate in arid environments (e.g., open shrublands), or as LAI decreases to near 0. In such cases, evaporation from bare soil between the plants becomes a major (or dominant) component of total evapotranspiration.
This partial veg cover fraction ("vegcover") is treated the same way as LAI and albedo: new options (VEGCOVERSRC and VEGPARAMVEGCOVER) tell VIC whether the veg param file contains 12 climatological vegcover values and whether to use those or the ones in the veg library. A new forcing variable ("VEGCOVER") can be included in forcing files along with LAI and albedo, and must be specified in the global parameter file in the same way. There is an additional option controlling whether VEGCOVER values appear in the veg library file: VEGLIB_VEGCOVER. FALSE by default, if TRUE it tells VIC to expect 12 monthly VEGCOVER values in each veg class, after the 12 LAI and before the 12 albedo values.
Internally, VIC uses the partial vegcover fraction to divide each veg tile into the area covered by plants and the area in between the plants. LAI and canopy moisture and snow storage are rescaled by 1/vegcover to get plant-specific values before canopy evap, transpiration, and canopy snow dynamics are computed (vegcover is not allowed to go below the value MINVEGCOVER in vicNldef.h). Bare soil evap is computed for the bare soil component of the tile. Total evapotranspiration is computed as the area-weighted sum of canopy evap and transpiration from the vegetated fraction and bare soil evap from the bare soil fraction. Finally, LAI and canopy moisture storage are rescaled back to the tile-area-average values before output. ```
Added non-climatological time-varying veg parameters.
``` Files Affected:
allocveghist.c (new) calcsurfenergybal.c canopyevap.c displaycurrentsettings.c fullenergy.c funcsurfenergybal.c getforcetype.c getglobalparam.c initializeatmos.c initializeglobal.c initializeveg.c Makefile outputlistutils.c penman.c putdata.c readatmosdata.c readforcingdata.c readveglib.c readvegparam.c snowintercept.c solvesnow.c surfacefluxes.c vicNl.c vicNldef.h vicNl.h
Description:
Added ability to read timeseries of LAI and albedo as forcing variables. In addition, climatological albedo values can now be given in the veg parameter file in a similar manner to LAI.
These changes involved adding a new veghist data structure to contain the timeseries of LAI, Wdmax, and albedo, as well as adding LAI, Wdmax, and albedo variables to the vegvar structure to store the current values of these variables.
To allow for climatological albedo values to be specified in the veg parameter file (similar to LAI), a new option has been introduced: ALBSRC. The constants LAIFROMVEGPARAM and LAIFROMVEGLIB have changed name to FROMVEGPARAM and FROM_VEGLIB so that they can be used to specify the source of either variable.
VIC now handles LAI and albedo as follows: 1. If specified as a variable in one of the forcing files, the values from the forcing file will be used in the simulation instead of the values in the veg parameter or veg library files. 2. If not specified as a variable in one of the forcing files, values will be taken from the veg parameter file if a) they are listed there and b) LAISRC (for LAI) and/or ALBSRC(for albedo) are set to FROMVEGPARAM. 3. If not supplied as a forcing and [EITHER not listed in the veg parameter file OR listed there but LAISRC or ALBSRC is set to FROMVEGLIB], values will be taken from the veg library. ```
New forcing variables for carbon cycle.
``` Files Affected:
allocatmos.c computecoszen.c (new) getforcetype.c initializeatmos.c Makefile mtclimconstantsvic.h mtclimvic.c mtclimwrapper.c outputlistutils.c putdata.c vicNldef.h vicNl.h writeforcing_file.c
Description:
Added the following new input forcing variables (used for simulations of carbon cycle processes): CATM: Atmospheric CO2 mixing ratio [ppm] FDIR: Fraction of incoming shortwave that is direct [fraction] PAR: Photosynthetically active radiation [W/m2]
These variables are optional; if not supplied as forcings, VIC will use default values for them, as follows: CATM: Value of CatmCurrent defined in vicNldef.h FDIR: Value computed by MTCLIM module PAR: SHORTWAVE*SW2PAR, with SW2PAR defined in vicNldef.h
Similarly, added the following new output variables: OUTCATM: (equals CATM) OUTCOSZEN: Cosine of the solar zenith angle, computed by MTCLIM module OUTFDIR: (equals FDIR) OUTPAR: (equals PAR) ```
Added simulation of photosynthesis.
``` Files Affected:
calcNscalefactors.c (new) calcsurfenergybal.c canopyassimilation.c (new) canopyevap.c displaycurrentsettings.c faparl.c (new) freedistprcp.c freevegcon.c fullenergy.c funccanopyenergybal.c funcsurfenergybal.c getglobalparam.c initializeglobal.c initializeveg.c Makefile makevegvar.c outputlistutils.c penman.c photosynth.c (new) putdata.c readsoilparam.c readveglib.c readvegparam.c snowintercept.c solvesnow.c surfacefluxes.c vicNl_def.h vicNl.h
Description:
Added simulation of photosynthesis. The photosynthesis formulation was taken from the BETHY model (Knorr, 2000), which in turn used the Farquhar model for C3 plants and the Collatz model for C4 plants. In addition, inhibition of photosynthesis under saturated conditions (as described by Frolking et al, 2002) is allowed for.
This feature requires several new veg parameters to be in the veg library file: Ctype: Photosynthetic pathway; can be C3 or C4 MaxCarboxRate: Maximum carboxlyation rate at 25 deg C (mol(CO2)/m2s) MaxETransport: Maximum electron transport rate at 25 deg C (mol(CO2)/m2s) (C3 plants) CO2Specificity: CO2 specificity at 25 deg C (mol(CO2)/m2s) (C4 plants) LightUseEff: Light-use efficiency (mol(CO2)/mol(photons)) NscaleFlag: TRUE = nitrogen-scaling factors are applicable to this veg class Wnppinhib: Moisture level (fraction of maximum moisture) above which photosynthesis experiencing saturation inhibition, i.e. too wet for optimal photosynthesis; only applies to top soil layer NPPfactorsat: Photosynthesis multiplier (fraction of maximum) when top soil layer is saturated
There are several new output variables associated with this feature: OUTGPP: Gross primary productivity [g C/m2d] OUTRAUT: Autotrophic respiration [g C/m2d] OUTNPP: Net primary productivity [g C/m2d] OUTAPAR: Absorbed PAR [W/m2]
By default, this feature is turned off. To turn this feature on, set CARBON to TRUE in the global parameter file.
When this feature is turned on, you can choose to compute stomatal resistance via the Jarvis formulation (the formulation used by all previous versions of VIC) or as a function of photosynthetic demand. This is determined by the setting of RCMODE in the global parameter file. A value of RCJARVIS (which is the default) selects the Jarvis formulation. A value of RC_PHOTO selects the photosynthetic demand formulation. ```
Added simulation of soil carbon storage and fluxes.
``` Files Affected:
computesoilresp.c (new) fullenergy.c initializelake.c initializesoil.c initializeveg.c LAKE.h lakes.eb.c Makefile outputlistutils.c putdata.c readinitialmodelstate.c soilcarbonbalance.c (new) surfacefluxes.c vicNldef.h vicNl.h writemodelstate.c
Description:
Added simulation of soil carbon storage and fluxes. This formulation was taken mostly from the LPJ model (Sitch, 2003), which in turn used a Lloyd-Taylor model for the dependence of soil respiration on soil temperature. The dependence of soil respiration on soil moisture was based on the formulation of Yi et al (2012) but modified to allow a small respiration rate under saturated conditions.
At this point, we do not simulate the storage of carbon in living biomass. Therefore, the flux of carbon into the soil (litterfall) is set equal to the total NPP of the previous calendar year, spread evenly over the current year. As in the LPJ model, soil carbon is stored in 3 pools: litter (fast), intermediate, and slow; with associated turnover times of 2.86 y, 33.3 y, and 1,000 y, respectively. Litterfall enters the litter pool. Carbon exits the litter pool through respiration (RhLitter). A fraction (fAir) of this respired carbon is in the form of CO2 and is vented directly to the atmosphere (RhLitter2Atm). The remainder is sent to the intermediate and slow pools in the proportions fInter and (1-fInter), respectively. These pools also respire carbon, which is assumed to be in the form of CO2 and vented directly to the atmosphere.
There are several new output variables associated with this feature: OUTRHET: Total heterotrophic respiration vented to the atmosphere (= RhLitter2Atm+RhInter+RhSlow) [g C/m2d] OUTNEE: Net Ecosystem Exchange (= NPP-RHET) [g C/m2d] OUTLITTERFALL: Flux of carbon from living biomass into litter pool [g C/m2d] OUTCLITTER: Carbon density in the litter pool [g C/m2] OUTCINTER: Carbon density in the intermediate pool [g C/m2] OUTCSLOW: Carbon density in the slow pool [g C/m2]
This feature is part of the carbon cycle, controlled by the setting of the CARBON option in the global parameter file. ```
Added soil moisture content for half-space below bottom soil layer
``` Files Affected:
soilconduction.c vicNldef.h
Description:
VIC's soil thermal profile can extend well below its soil hydrologic layers. Previously, the moisture content of these soil thermal nodes was set to that of the bottom soil layer. Now, the moisture content can be set to a user-specified value, SLABMOISTFRACT, defined in vicNl_def.h. ```
Removed the DIST_PRCP option.
``` Files Affected:
arnoevap.c calcrainonly.c calcsnowcoverage.c calcsurfenergybal.c canopyevap.c displaycurrentsettings.c distprec.c (removed) freeallvars.c (renamed from freedistprcp.c) frozensoil.c fullenergy.c funccanopyenergybal.c funcsurfenergybal.c getglobalparam.c initializeglobal.c initializemodelstate.c initializenewstorm.c (removed) LAKE.h lakes.eb.c makeallvars.c (renamed from makedistprcp.c) Makefile preparefullenergy.c putdata.c readinitialmodelstate.c readsoilparam.c redistributeduringstorm.c (removed) runoff.c snowintercept.c soilconduction.c snowintercept.c solvesnow.c surfacefluxes.c vicNl.c vicNldef.h vicNl.h writeforcingfile.c writemodel_state.c
Description:
Removed the DISTPRCP option and all functions and variables associated with it. Removed the "dist" array dimension from the cell and vegvar data structures. Renamed the "distprcp" data structure to "allvars". ```
Bug Fixes:
Fixed division by 0 and nans in output when there is no liquid water available to satisfy evaporative demand
``` Files Affected:
runoff.c
Description:
Previously, runoff() scaled estimated evaporation for each frost subarea by that subarea's portion of available liquid moisture, via summing available liquid moisture over all subareas and computing the ratio of each subarea's moisture to the sum. There was no check on whether the sum > 0, resulting in the possibility of division by 0 when no liquid moisture is available. This has been fixed (a check was added). In addition, the apportionment of evaporation to subareas originally included a check on whether all of the evaporative demand was met, with a warning statement if not. This check and warning have been removed, since the evaporation values are subsequently modified to reflect what actually evaporated (i.e. it's ok for the initial estimate to exceed available moisture without affecting the water balance). ```
Fixed negative liquid soil moisture for bare soil conditions
``` Files Affected:
runoff.c
Description:
Previously, runoff() only checked whether total (liquid+ice) soil moisture was > residual moisture, but not whether liquid soil moisture was positive. In some cases, in the bare soil tile, liquid soil moisture could occasionally go negative. This has been fixed by adding a check on liquid soil moisture to runoff(). ```
Fixed incorrect handling of case of a mix of cells with and without lakes.
``` Files Affected:
initializemodelstate.c read_lakeparam.c
Description:
VIC was neither reading the lake parameter file correctly nor initializing the lake data structures correctly for the case of a mix of cells with and without lakes within a single lake parameter file. This has been fixed. ```
Fixed use of tmp_moist array without initialization.
``` Files Affected:
initializemodelstate.c
Description:
Fixed use of tmp_moist array without initialization. ```
Fix for crash when FROZENSOIL, EXPTRANS and IMPLICIT all == TRUE
``` Files Affected:
frozensoil.c funcsurfenergybal.c vicNl.h
Description:
Extended the "cold nose" hack to the "warm nose" condition, and also extended to cover the IMPLICIT scheme.
This will be superceded by a more bug-free soil temperature scheme in the next major release of the model. ```
Fixed incorrect assignment of input forcing variables that are moisture fluxes (all forms of precipitation and channel inflow) when ALMA_INPUT is TRUE.
``` Files Affected:
initialize_atmos.c
Description:
When ALMAINPUT was TRUE, VIC was not rescaling moisture fluxes such as precipitation to an hourly time step correctly in initializeatmos. This led to incorrect assignment of these fluxes to the atmos array. This has been fixed. ```
Fixed selection of starting point in forcing file when starting in the middle of a day
``` Files Affected:
make_dmy.c
Description:
For the case of STARTHOUR not equal to 0, VIC was not finding the correct starting record in the forcing file, due to its missing a check on the hour of the forcing record. This has been fixed. ```
Fixed incorrect handling of case of a mix of cells with and without lakes.
``` Files Affected:
initializemodelstate.c read_lakeparam.c
Description:
VIC was neither reading the lake parameter file correctly nor initializing the lake data structures correctly for the case of a mix of cells with and without lakes within a single lake parameter file. This has been fixed. ```
Fixed use of tmp_moist array without initialization.
``` Files Affected:
initializemodelstate.c
Description:
Fixed use of tmp_moist array without initialization. ```
Fixed use of uninitialized soil moisture values on first time step.
``` Files Affected:
initializemodelstate.c
Description:
The tmpmoist array, used in initializemodelstate() as an input to computerunoffandasat(), was initialized within an if statement that caused it to be sent to computerunoffandasat() without initialization in some cases. This has been fixed by moving the initialization of tmpmoist outside the if statement. ```
Fixed errors in forcing disaggregation under certain input cases.
``` Files Affected:
initializeatmos.c mtclimvic.c mtclim_wrapper.c
Description:
Fixed bugs in the following cases: 1. User supplied daily incoming shortwave (not sub-daily) 2. User supplied daily specific or relative humidity without supplying average daily pressure or temperature, respectively (with which to convert these to daily vapor pressure). ```
Fixed bug in root zone calculation.
``` Files Affected:
calcrootfraction.c
Description:
Fixed infinite loop that was occurring when the total of root zone depths exceeded the total soil depth and one of the root zone boundaries coincided with a soil layer boundary. ```
Fixed error in passing SensibleHeat to funcatmosenergy_bal.
``` Files Affected:
calcatmosenergy_bal.c
Description:
Replaced (*SensibleHeat) with SensibleHeat in argument lists of rootbrent, errorprintatmosenergybal and solveatmosenergybal. ```
Fixed use of uninitialized variable in cold nose fix for frozen soil
``` Files Affected:
frozen_soil.c
Description:
Fixed use of uninitialized variable in cold nose fix for frozen soil. Code was attempting to check all nodes for a cold nose, but this check requires accessing the value of the next node, which is undefined when we check the bottom node. Now the code does not check the bottom node (which is unlikely to experience a cold nose anyway). ```
Fixed bug in converting from ALMA_INPUT moisture flux units
``` Files Affected:
initialize_atmos.c
Description:
Fixed bug in converting from ALMA_INPUT moisture flux units to traditional units (was multiplying by number of seconds in model step when should have been multiplying by number of seconds in forcing step). ```
Fixed incorrect reporting of canopy energy balance terms.
``` Files Affected:
calcatmosenergybal.c calcwaterenergybalanceerrors.c putdata.c surface_fluxes.c vicNl.h
Description:
VIC was not summing under- and over-story energy fluxes correctly for the case of a forest canopy with snow. This only affected the reporting of energy balance terms in VIC's output; internal calculations were fine.
In addition, a bug (sign error in flux summation) in VIC's calculation of the surface energy balance (for output only) was fixed. This reduces the vast majority of the energy balance errors reported during the course of a typical energy balance simulation. ```
Fixed incorrect summing of rain and snow components of precipitation over grid cell
``` Files Affected:
full_energy.c
Description:
The amounts of rainfall and snowfall over the lake (or inundated wetland) were being omitted from the grid cell totals. This has been fixed. ```
Vapor pressure incorrect if user supplies (QAIR or REL_HUMID) + PRESSURE as input forcings instead of vapor pressure.
``` Files Affected:
initialize_atmos.c
Description:
For the cases of the combination of (QAIR or REL_HUMID) plus PRESSURE supplied as input forcings instead of VP, the logic distinguishing between daily and sub-daily supplied PRESSURE was flawed, resulting in incorrect values in both cases. This has been fixed. ```
Incorrect handling of user-supplied tskc (cloud fraction) for LWCLOUD==LWCLOUD_DEARDORFF
``` Files Affected:
calclongwave.c mtclimvic.c
Description:
Previous versions of VIC (before 4.1.2) used a full-sky longwave formulation taken from two formulas in the Bras hydrology text. For the new Deardorff full-sky longwave formulation, the dependence on cloud fraction is different from the old Bras formulation. In 4.1.2 (and 4.1.2.a-b), the new Deardorff formulation did not account for the possibility of user-supplied cloud fraction; if the user supplied cloud fraction as an input forcing, the resulting longwave was wrong. This has been fixed. ```
Changed default settings of MTCLIMSWECORR and LW_TYPE to reflect best general settings
``` Files Affected:
initialize_global.c global.param.sample
Description:
In light of the findings of Bohn et al. (2012), we have changed the default setting of MTCLIMSWECORR to FALSE and of LWTYPE to LWPRATA. These settings give forcing estimates that are less biased in general. ```
Vapor pressure set to 0 if user supplies (QAIR or REL_HUMID) + PRESSURE as input forcings instead of vapor pressure.
``` Files Affected:
initialize_atmos.c
Description:
For the cases of the combination of (QAIR or RELHUMID) plus PRESSURE supplied as input forcings instead of VP, VIC was supposed to compute VP from (QAIR or RELHUMID) and PRESSURE, then transfer the computed VP to the atmos data structure. This transfer was being skipped, and vapor pressure was consequently set to 0 during the simulation. This has been fixed. ```
Computed longwave sometimes is extremely large at high latitudes.
``` Files Affected:
mtclim_vic.c
Description:
Previously (VIC 4.1.2, 4.1.2.a, and 4.1.2.b only), when SHORTWAVE and VP were supplied to VIC as input forcings (and LONGWAVE was NOT supplied as a forcing), the incoming longwave radiation computed by VIC would in rare cases become extremely large. This happens only at high latitudes in winter when the theoretical clear-sky potential solar radiation is very small. If the supplied VP was large enough, it could cause the internal variable ttmax (clear-sky transmittance) to go negative. This in turn would cause the internal variable tfmax (cloud transmittance) to go negative as well. This, finally, would cause computed LONGWAVE values to become extremely large, if the LW_CLOUD method was set to DEARDORFF. This has been fixed. ```
VIC was unnecessarily requiring WIND to be supplied as an input forcing.
``` Files Affected:
initializeatmos.c vicNldef.h
Description:
VIC was requiring WIND (or the zonal and meridional components of wind, WINDE and WINDN) to be supplied as an input forcing. Now VIC allows WIND to be omitted. If WIND is not supplied as an input forcing, VIC will supply a default wind speed, defined in vicNldef.h as DEFAULTWIND_SPEED and currently set to 3.0 m/s. ```
Cloud fraction tskc was not accounting for the case in which observed incoming shortwave is supplied as a forcing.
``` Files Affected:
mtclim_vic.c
Description:
In the absence of observations, VIC's estimate of cloud fraction, tskc, is a function of some intermediate quantities that are computed within the MTCLIM algorithm (in mtclim_vic.c). These intermediate terms can be computed from either observed daily shortwave radiation (if available) or simulated daily shortwave radiation. The computation of tskc was previously taking place in a part of the code where only the simulated daily shortwave radiation was available. Thus, tskc would not reflect the actual amount of incident shortwave, even if observed incident shortwave was supplied as a forcing.
This has been fixed. The tskc computation has been moved to another location in the code where the observed daily shortwave can be accessed (if supplied by the user as a forcing). ```
Incorrect timing of disaggregated radiation and air temperature when daily forcings are supplied and off_gmt is 0.
``` Files Affected:
initialize_atmos.c
Description:
VIC was double-shifting the timeseries of subdaily radiation and temperature in cases in which VIC was not given sub-daily incoming shortwave as an input forcing and soil parameter "off_gmt" was not set to the local time zone offset (i.e. not set to longitude*24/360). This caused incorrect timing of the diurnal cycle of radiation and air temperature.
This has been fixed. ```
Disaggregated radiation is constant throughout the day when daily incoming shortwave radiation is supplied as an input forcing.
``` Files Affected:
initializeatmos.c mtclimconstantsvic.h mtclimvic.c mtclim_wrapper.c
Description:
When VIC was supplied with daily incoming shortwave as an input forcing variable, VIC would fail to disaggregate this correctly to sub-daily time steps; it would simply repeat the daily average for every sub-daily time step. This has been fixed. Now VIC will compute a diurnal cycle whose daily average matches the supplied daily average. ```
Miscellaneous:
Better out-of-box behavior for soil temperature scheme
``` Files Affected:
getglobalparam.c global.param.sample initializeglobal.c initializemodel_state.c
Description:
Added constraints to help ensure efficient, physically reasonable simulation of the soil temperature profile:
Set default values of IMPLICIT and EXP_TRANS to TRUE.
Made "cold" (no-spinup) initial soil temperatures more consistent with air temperature and bottom boundary temperature.
Added validation of option.Nnodes for EXP_TRANS=TRUE to guarantee that, for the given soil temperature bottom boundary depth "dp" (also known as the damping depth), there are at least 3 nodes within the top 50 cm of the soil column. This is to constrain errors to a reasonable size. To satisfy this condition, the following relationship must hold: Nnodes >= 5*ln(dp+1)+1
Some examples: dp(m) minimum Nnodes 4 9 7 12 10 14 25 18 50 21
VIC will exit with an error message to this effect if Nnodes is too small for the given value of dp. ```
Cleanup of compile-time options
``` Files Affected:
arnoevap.c calcatmosenergybal.c calcforcingstats.c (removed) calclongwave.c calcsurfenergybal.c canopyevap.c checkfiles.c closefiles.c displaycurrentsettings.c frozensoil.c fullenergy.c funccanopyenergybal.c funcsurfenergybal.c getglobalparam.c icemelt.c initializeatmos.c initializeglobal.c initializelake.c initializemodelstate.c initializenewstorm.c initializesoil.c LAKE.h lakes.eb.c Makefile outputlistutils.c preparefullenergy.c putdata.c readlakeparam.c readinitialmodelstate.c readsoilparamarc.c readsoilparam.c readvegparam.c redistributeduringstorm.c runoff.c snowintercept.c soilconduction.c soilthermaleqn.c SnowPackEnergyBalance.c solvesnow.c surfacefluxes.c userdef.h (removed) vicNldef.h vicNl.c vicNl.h writedata.c writeforcingfile.c writeheader.c writelayer.c writemodelstate.c
Description:
Cleanup of userdef.h, either by removing options/settings or moving them to vicNldef.h (becoming run-time options if appropriate). user_def.h has been removed.
The following options were removed:
- NO_REWIND. All parameter files must contain the same grid cells in the same order.
- QUICK_FS.
- EXCESS_ICE.
- OUTPUTFORCESTATS.
- LWAVE_COR. If the user wishes to correct any of the forcing variables, the user can do this externally to VIC.
The following options were moved from compile-time to run-time (in the optionsstruct in vicNldef.h):
- LOWRESMOIST (renamed to LOG_MATRIC)
- OUTPUT_FORCE
- CLOSE_ENERGY
- SPATIAL_SNOW
- SPATIAL_FROST
The following terms were moved to vicNl_def.h without modification:
- VERBOSE (still a compile-time option)
- Max array dimensions such as MAXVEG, MAXLAYERS, etc.
- Constants such as MAXITFE and LAIWATER_FACTOR ```
- C
Published by jhamman over 11 years ago
VIC - Release of VIC.4.2.a
Description of changes between VIC 4.2 and VIC 4.2.a
Bug Fixes:
Fixed unitialized bare soil albedo.
``` Files Affected:
full_energy.c
Description:
Previously, barealbedo was unset for the bare soil case (iveg!=Nveg).
This fix sets the barealbedo to the global variable value of
BARE_SOIL_ALBEDO.
```
Cleanup of frozen soil option constraints.
``` Files Affected:
calcsurfenergybal.c getglobal_param.c
Description:
Removed hardcoded, behind the scenes checks for the EXP_TRANS and
NO_FLUX global parameter values for case of QUICK_SOLVE=TRUE in
calc_surf_energy_bal.
```
- C
Published by jhamman over 11 years ago
VIC - Release of VIC.4.1.2.m
** Description of changes from VIC 4.1.2.l to VIC 4.1.2.m **
Bug Fixes:
Fixed negative liquid soil moisture for bare soil conditions
Files Affected:
runoff.c
Description:
Previously, runoff() only checked whether total (liquid+ice) soil moisture was > residual moisture, but not whether liquid soil moisture was positive. In some cases, in the bare soil tile, liquid soil moisture could occasionally go negative. This has been fixed by adding a check on liquid soil moisture to runoff().
- C
Published by jhamman about 12 years ago
VIC - Release of VIC.4.1.2.l
** Description of changes from VIC 4.1.2.k to VIC 4.1.2.l **
Bug Fixes:
Fixed memory leak in vicNl()
Files Affected:
vicNl.c
Description:
Several soilcon arrays, allocated in readsoilparam(), were not being freed in vicNl() due to the "free" statements being inside the wrong OUTPUT_FORCE "if" block. This has been fixed.
Uninitialized variables in writeforcingfile().
Files Affected:
writeforcingfile.c
Description:
Placeholder variables (dummy*) in writeforcing_file() were not initialized, resulting in warnings during compilation. These are now initialized. This should not affect any model results, since these variables were never used.
Compilation errors when EXCESS_ICE = TRUE
Files Affected:
fullenergy.c initializemodel_state.c lakes.eb.c
Description:
Miscellaneous typos in the EXCESSICE code prevented compilation when EXCESSICE = TRUE in user_def.h. These have been fixed.
- C
Published by jhamman about 12 years ago
VIC - Release of VIC.4.1.2.k
** Description of changes from VIC 4.1.2.j to VIC 4.1.2.k **
Bug Fixes:
Fix for crash when FROZENSOIL, EXPTRANS and IMPLICIT all == TRUE
Files Affected:
frozensoil.c funcsurfenergybal.c vicNl.h
Description:
Extended the "cold nose" hack to the "warm nose" condition, and also extended to cover the IMPLICIT scheme.
This will be superceded by a more bug-free soil temperature scheme in the next major release of the model.
Better out-of-box behavior for soil temperature scheme
Files Affected:
getglobalparam.c global.param.sample initializeglobal.c initializemodel_state.c
Description:
Added constraints to help ensure efficient, physically reasonable simulation of the soil temperature profile: 1. Set default values of IMPLICIT and EXPTRANS to TRUE. 2. Made "cold" (no-spinup) initial soil temperatures more consistent with air temperature and bottom boundary temperature. 3. Added validation of option.Nnodes for EXPTRANS=TRUE to guarantee that, for the given soil temperature bottom boundary depth "dp" (also known as the damping depth), there are at least 3 nodes within the top 50 cm of the soil column. This is to constrain errors to a reasonable size. To satisfy this condition, the following relationship must hold: Nnodes >= 5*ln(dp+1)+1
Some examples: dp(m) minimum Nnodes 4 9 7 12 10 14 25 18 50 21
VIC will exit with an error message to this effect if Nnodes is too small for the given value of dp.
- C
Published by jhamman over 12 years ago
VIC - Release of VIC.4.1.2.j
** Description of changes from VIC 4.1.2.i to VIC 4.1.2.j **
Bug Fixes:
Fixed incorrect assignment of input forcing variables that are moisture fluxes (all forms of precipitation and channel inflow) when ALMA_INPUT is TRUE.
``` Files Affected:
initialize_atmos.c
Description:
When ALMAINPUT was TRUE, VIC was not rescaling moisture fluxes such as precipitation to an hourly time step correctly in initializeatmos. This led to incorrect assignment of these fluxes to the atmos array. This has been fixed. ```
Fixed selection of starting point in forcing file when starting in the middle of a day
``` Files Affected:
make_dmy.c
Description:
For the case of STARTHOUR not equal to 0, VIC was not finding the correct starting record in the forcing file, due to its missing a check on the hour of the forcing record. This has been fixed. ```
- C
Published by jhamman over 12 years ago
VIC - Release of VIC.4.1.2.i
** Description of changes from VIC 4.1.2.h to VIC 4.1.2.i **
Bug Fixes:
Fixed incorrect handling of case of a mix of cells with and without lakes.
``` Files Affected:
initializemodelstate.c read_lakeparam.c
Description:
VIC was neither reading the lake parameter file correctly nor initializing the lake data structures correctly for the case of a mix of cells with and without lakes within a single lake parameter file. This has been fixed. ```
Fixed use of tmp_moist array without initialization.
``` Files Affected:
initializemodelstate.c
Description:
Fixed use of tmp_moist array without initialization. ```
- C
Published by jhamman over 12 years ago
VIC - Release of VIC 4.1.2.h
** Description of changes from VIC 4.1.2.g to VIC 4.1.2.h **
Bug Fixes:
Fixed use of uninitialized soil moisture values on first time step.
``` Files Affected:
initializemodelstate.c
Description:
The tmpmoist array, used in initializemodelstate() as an input to computerunoffandasat(), was initialized within an if statement that caused it to be sent to computerunoffandasat() without initialization in some cases. This has been fixed by moving the initialization of tmpmoist outside the if statement. ```
Fixed errors in forcing disaggregation under certain input cases.
``` Files Affected:
initializeatmos.c mtclimvic.c mtclim_wrapper.c
Description:
Fixed bugs in the following cases: 1. User supplied daily incoming shortwave (not sub-daily) 2. User supplied daily specific or relative humidity without supplying average daily pressure or temperature, respectively (with which to convert these to daily vapor pressure). ```
Fixed bug in root zone calculation.
``` Files Affected:
calcrootfraction.c
Description:
Fixed infinite loop that was occurring when the total of root zone depths exceeded the total soil depth and one of the root zone boundaries coincided with a soil layer boundary. ```
- C
Published by jhamman almost 13 years ago
VIC - Release of VIC 4.1.2.g
** Description of changes from VIC 4.1.2.f to VIC 4.1.2.g **
Bug Fixes:
Fixed error in passing SensibleHeat to funcatmosenergy_bal.
``` Files Affected:
calcatmosenergy_bal.c
Description:
Replaced (*SensibleHeat) with SensibleHeat in argument lists of rootbrent, errorprintatmosenergybal and solveatmosenergybal. ```
** Description of changes from VIC 4.1.2.e to VIC 4.1.2.f **
Bug Fixes:
Fixed use of uninitialized variable in cold nose fix for frozen soil
``` Files Affected:
frozen_soil.c
Description:
Fixed use of uninitialized variable in cold nose fix for frozen soil. Code was attempting to check all nodes for a cold nose, but this check requires accessing the value of the next node, which is undefined when we check the bottom node. Now the code does not check the bottom node (which is unlikely to experience a cold nose anyway). ```
Fixed bug in converting from ALMA_INPUT moisture flux units
``` Files Affected:
initialize_atmos.c
Description:
Fixed bug in converting from ALMA_INPUT moisture flux units to traditional units (was multiplying by number of seconds in model step when should have been multiplying by number of seconds in forcing step). ```
- C
Published by jhamman almost 13 years ago
VIC - Release of VIC 4.1.2.d
** Description of changes from VIC 4.1.2.c to VIC 4.1.2.d **
Bug Fixes:
Fixed incorrect summing of rain and snow components of precipitation over grid cell
``` Files Affected:
full_energy.c
Description:
The amounts of rainfall and snowfall over the lake (or inundated wetland) were being omitted from the grid cell totals. This has been fixed. ```
Vapor pressure incorrect if user supplies (QAIR or REL_HUMID) + PRESSURE as input forcings instead of vapor pressure.
``` Files Affected:
initialize_atmos.c
Description:
For the cases of the combination of (QAIR or REL_HUMID) plus PRESSURE supplied as input forcings instead of VP, the logic distinguishing between daily and sub-daily supplied PRESSURE was flawed, resulting in incorrect values in both cases. This has been fixed. ```
** Description of changes from VIC 4.1.2.b to VIC 4.1.2.c **
Bug Fixes:
Incorrect handling of user-supplied tskc (cloud fraction) for LWCLOUD==LWCLOUD_DEARDORFF
``` Files Affected:
calclongwave.c mtclimvic.c
Description:
Previous versions of VIC (before 4.1.2) used a full-sky longwave formulation taken from two formulas in the Bras hydrology text. For the new Deardorff full-sky longwave formulation, the dependence on cloud fraction is different from the old Bras formulation. In 4.1.2 (and 4.1.2.a-b), the new Deardorff formulation did not account for the possibility of user-supplied cloud fraction; if the user supplied cloud fraction as an input forcing, the resulting longwave was wrong. This has been fixed. ```
Changed default settings of MTCLIMSWECORR and LW_TYPE to reflect best general settings
``` Files Affected:
initialize_global.c global.param.sample
Description:
In light of the findings of Bohn et al. (2012), we have changed the default setting of MTCLIMSWECORR to FALSE and of LWTYPE to LWPRATA. These settings give forcing estimates that are less biased in general. ```
Vapor pressure set to 0 if user supplies (QAIR or REL_HUMID) + PRESSURE as input forcings instead of vapor pressure.
``` Files Affected:
initialize_atmos.c
Description:
For the cases of the combination of (QAIR or RELHUMID) plus PRESSURE supplied as input forcings instead of VP, VIC was supposed to compute VP from (QAIR or RELHUMID) and PRESSURE, then transfer the computed VP to the atmos data structure. This transfer was being skipped, and vapor pressure was consequently set to 0 during the simulation. This has been fixed. ```
Computed longwave sometimes is extremely large at high latitudes.
``` Files Affected:
mtclim_vic.c
Description:
Previously (VIC 4.1.2, 4.1.2.a, and 4.1.2.b only), when SHORTWAVE and VP were supplied to VIC as input forcings (and LONGWAVE was NOT supplied as a forcing), the incoming longwave radiation computed by VIC would in rare cases become extremely large. This happens only at high latitudes in winter when the theoretical clear-sky potential solar radiation is very small. If the supplied VP was large enough, it could cause the internal variable ttmax (clear-sky transmittance) to go negative. This in turn would cause the internal variable tfmax (cloud transmittance) to go negative as well. This, finally, would cause computed LONGWAVE values to become extremely large, if the LW_CLOUD method was set to DEARDORFF. This has been fixed. ```
** Description of changes from VIC 4.1.2.a to VIC 4.1.2.b **
Bug Fixes:
VIC was unnecessarily requiring WIND to be supplied as an input forcing.
``` Files Affected:
initializeatmos.c vicNldef.h
Description:
VIC was requiring WIND (or the zonal and meridional components of wind, WINDE and WINDN) to be supplied as an input forcing. Now VIC allows WIND to be omitted. If WIND is not supplied as an input forcing, VIC will supply a default wind speed, defined in vicNldef.h as DEFAULTWIND_SPEED and currently set to 3.0 m/s. ```
Cloud fraction tskc was not accounting for the case in which observed incoming shortwave is supplied as a forcing.
``` Files Affected:
mtclim_vic.c
Description:
In the absence of observations, VIC's estimate of cloud fraction, tskc, is a function of some intermediate quantities that are computed within the MTCLIM algorithm (in mtclim_vic.c). These intermediate terms can be computed from either observed daily shortwave radiation (if available) or simulated daily shortwave radiation. The computation of tskc was previously taking place in a part of the code where only the simulated daily shortwave radiation was available. Thus, tskc would not reflect the actual amount of incident shortwave, even if observed incident shortwave was supplied as a forcing.
This has been fixed. The tskc computation has been moved to another location in the code where the observed daily shortwave can be accessed (if supplied by the user as a forcing). ```
- C
Published by jhamman almost 13 years ago
VIC - Release of VIC 4.1.2
** Description of changes from VIC 4.1.2 to VIC 4.1.2.a **
Bug Fixes:
Incorrect timing of disaggregated radiation and air temperature when daily forcings are supplied and off_gmt is 0.
``` Files Affected:
initialize_atmos.c
Description:
VIC was double-shifting the timeseries of subdaily radiation and temperature in cases in which VIC was not given sub-daily incoming shortwave as an input forcing and soil parameter "off_gmt" was not set to the local time zone offset (i.e. not set to longitude*24/360). This caused incorrect timing of the diurnal cycle of radiation and air temperature.
This has been fixed. ```
Disaggregated radiation is constant throughout the day when daily incoming shortwave radiation is supplied as an input forcing.
``` Files Affected:
initializeatmos.c mtclimconstantsvic.h mtclimvic.c mtclim_wrapper.c
Description:
When VIC was supplied with daily incoming shortwave as an input forcing variable, VIC would fail to disaggregate this correctly to sub-daily time steps; it would simply repeat the daily average for every sub-daily time step. This has been fixed. Now VIC will compute a diurnal cycle whose daily average matches the supplied daily average. ```
** Description of changes from VIC 4.1.1 to VIC 4.1.2 **
New Features:
Cleaned up the sample global parameter file
``` Files Affected:
getglobalparam.c global.param.sample initialize_global.c
Description:
The large number of options available in VIC 4.1.2 has begun to clutter the global parameter file, making it difficult for users to determine which options need to be set.
Now the sample global parameter file groups the various options into several categories, making a clear distinction between those options that need to be changed by the user for each simulation, and those that rarely need to be changed. Those options that rarely need to be changed are commented out, and VIC now sets those options to the most commonly-used default values. ```
Removal of obsolete model options
``` Files Affected:
arno_evap.c
canopy_evap.c
close_files.c
cmd_proc.c
compute_zwt.c
display_current_settings.c
dist_prec.c
frozen_soil.c
full_energy.c
func_canopy_energy_bal.c
func_surf_energy_bal.c
get_global_param.c
global.h
global.param.sample
initialize_global.c
initialize_lake.c
initialize_model_state.c
initialize_snow.c
Makefile
open_debug.c (removed)
put_data.c
read_lakeparam.c
read_soilparam_arc.c
read_soilparam.c
read_veglib.c
read_vegparam.c
runoff.c
store_moisture_for_debug.c (removed)
surface_fluxes.c
user_def.h
vicerror.c
vicNl.c
vicNl_def.h
vicNl.h
write_atmosdata.c (removed)
write_data.c
write_debug.c (removed)
Description:
We have removed some of the available model simulation options, due to their being unrealistic or rarely used. These include:
GFFULL value of GRNDFLUXTYPE option. This setting double-counted the effect of canopy attenuation of radiation. ARCOMBO value of AERORESISTCANSNOW option. This setting double- counted the effects of canopy snow on aerodynamic resistance. LINKDEBUG option. This userdef.h option would print out values of various water balance terms for debugging purposes, but was rarely used and difficult to maintain. ```
Overhaul of meteorological forcing processing
``` Files Affected:
alloc_atmos.c
CalcBlowingSnow.c
calcairtemperature.c calclongwave.c displaycurrentsettings.c getforcetype.c getglobalparam.c global.param.sample initializeatmos.c initializeglobal.c Makefile mtclimconstantsvic.h (was mtclim42vic.h) mtclimparametersvic.h (new file) mtclimwrapper.c (was mtclim42wrapper.c) mtclimvic.c (was mtclim42vic.c) outputlistutils.c putdata.c readatmosdata.c readsoilparam.c vicNldef.h vicNl.h writeforcing_file.c
Description:
Numerous bug fixes and improvements to VIC's meteorological forcing processing.
Bug fixes:
Two main bugs fixed, both primarily affecting high-latitude grid cells:
On days having only 1 hour of darkness, the diurnal cycle of temperature was incorrect, skipping that day's minimum temperature and smoothly transitioning to the next day's maximum.
The seasonal evolution of the diurnal cycle of solar radiation was always 366 days long, so that the number of daylight hours got increasingly out of phase with the time of year (by one day per non-leap year) as the simulation progressed. After 20-30 years, the diurnal cycle was substantially different from what it should be. Above 60 N, the number of days having no sunlight was substantially longer than it should be.
Also fixed inconsistencies in the timing of meteorological variables when sub-daily met variables were supplied by the user. Now, we have adopted the following convention: daily supplied forcings are assumed to start/end at midnight in local time; for these forcings, offgmt in the soil parameter file is ignored sub-daily supplied forcings are assumed to occur relative to the time zone indicated by offgmt in the soil parameter file
New features:
Updated VIC's internal version of the MTCLIM forcing disaggregation
functions from version 4.2 (Thornton and Running, 1999) to include
elements of version 4.3 (Thornton et al 2000).
This update includes 6 main changes to the forcing estimation scheme:
1. Optional correction of downward shortwave for the effect of snow.
In the presence of snow, incoming shortwave radiation has been observed to be higher than MTCLIM 4.2's estimates, due to scattering of light from the snow back into the atmosphere (and ultimately back to the ground again). This correction is optional and is controlled by the new global parameter option MTCLIMSWECORR. If this is set to TRUE, the correction is performed when snow is present on the ground (estimated by a simple degree-day model in the forcing pre-processor). If FALSE, the correction is not performed (and shortwave is estimated as in previous versions of VIC). The default value of MTCLIMSWECORR is TRUE.
2. Optional changes in the iteration between shortwave and VP
estimates. The algorithm for estimating shortwave requires observed VP as an input; the algorithm for estimating VP requires observed shortwave as an input. Therefore, when neither quantity is observed, MTCLIM 4.2 (and previous versions of VIC) used the Tdew = Tmin approximation to supply the shortwave estimate with an estimate of daily vapor pressure. Then the resulting shortwave estimate was used to compute a more accurate estimate of Tdew and vapor pressure. MTCLIM 4.3 imposes an annual aridity criterion for performing this final step; for humid environments (annual PET < 2.5 * annual precip) the scheme simply assumes daily Tdew = daily Tmin. We have found that this behavior introduces a strong positive bias into vapor pressure, and have chosen to make it optional. Therefore, we have introduced the new global parameter option VP_ITER to control the shortwave-vp iteration. It can take on the following values:
VP_ITER_NEVER = never perform the final update of Tdew and VP
VP_ITER_ALWAYS = always perform the final update of Tdew and VP
VP_ITER_ANNUAL = use the annual aridity criterion (annual PET <
2.5 * annual precip) do decide whether to perform
the final update
VP_ITER_CONVERGE = continue iterating between shortwave and vp
until the two values stabilize (this tends
to give almost identical results to
VP_ITER_ALWAYS)
The default value of VPITER is VPITER_ALWAYS.
To make the sub-daily values of VP more accurate, we have introduced another global parameter option: VPINTERP. If set to TRUE, VIC will assign the daily VP value computed by the MTCLIM functions to the time of sunrise on that day, and interpolate linearly between sunrise vapor pressure values of adjacent days. If set to FALSE, VIC will hold vapor pressure constant over the entire day as in previous versions. The default value of VPINTERP is TRUE.
Alternative clear-sky longwave algorithms. We have introduced a new global parameter option: LW_TYPE. This option determines which algorithm is used to compute clear-sky longwave radiation. Choices are:
LWTVA = algorithm of Tennessee Valley Authority (TVA, 1972) (This is what all previous versions of VIC have used. Our tests indicate that this algorithm is still the best when observed cloud fractions are unavailable and are estimated by MTCLIM, which is the current situation for VIC.) LWANDERSON = algorithm of Anderson (1964) LWBRUTSAERT = algorithm of Brutseart (1975) LWSATTERLUND = algorithm of Satterlund (1979) LWIDSO = algorithm of Idso (1981) LWPRATA = algorithm of Prata (1996) (Our tests indicate that this algorithm is best when observed cloud fractions are supplied as a forcing.)
Default is set to LW_TVA.
Alternative cloud longwave emission algorithms. We have introduced a new global parameter option: LW_CLOUD. This option determines which algorithm is used to simulate the effect of cloudiness on incoming longwave radiation. Choices are:
LWCLOUDBRAS = algorithm composed of equations 2.29 and 2.43 from the Bras textbook (Bras, R. L., "Hydrology, an introduction to hydrologic science", Addison-Wesley, Reading, Massachusetts, 1990). This was the algorithm used in all previous releases of VIC. (Our tests indicate that this algorithm introduces substantial temperature-dependent biases in longwave estimates outside of the temperate zone) LWCLOUDDEARDORFF = algorithm used in Deardorff (1978) in which cloudfraction is assumed equal to (1 - actualshortwave/theoreticalclearskyshortwave) and total sky emissivity is represented as the weighted average: cloudfraction * cloudemissivity + (1-cloudfraction) * clearskyemissivity (Our tests indicate that this algorithm is superior)
Default is set to LWCLOUDDEARDORFF.
- Optional threshold for daily precipitation to cause dimming of incoming shortwave radiation. Previously, any precipitation would cause estimated daily incoming shortwave radiation to dim by 25%. Because the smoothing/resampling methods used in creating gridded forcings can artificially "bleed" trace amounts of precipitation into neighboring grid cells, we introduced this threshold to counteract any resulting low biases in shortwave. This is controlled by the global parameter file option SWPRECTHRESH, which is the minimum amount of daily precipitation (in mm) that must be exceeded for shortwave to dim. The default value is set to 0.1 mm. ```
Added the ability to simulate organic soil.
``` Files Affected:
displaycurrentsettings.c frozensoil.c fullenergy.c funcsurfenergybal.c getglobalparam.c global.param.sample initializeglobal.c initializemodelstate.c lakes.eb.c preparefullenergy.c readsoilparamarc.c readsoilparam.c runoff.c soilconduction.c vicNl_def.h vicNl.h
Description:
Added logic to handle organic soil properties. Added a new global parameter file option, ORGANICFRACT. If ORGANICFRACT is TRUE, VIC assumes that there are 3*Nlayer extra columns in the soil parameter file, containing for each layer the organic fraction and bulk and soil densities of the organic matter. If ORGANIC_FRACT is FALSE or is omitted, VIC assumes that the soil param file does not contain these extra columns, and assumes that the soil contains 0 organic matter (as in previous versions of VIC).
The organic fraction in the soil parameter file is the fraction of soil (by volume) that is organic matter. If this fraction is > 0, then the quartz content and the original bulk and soil densities are assumed to apply only to the mineral portion of the soil. Internally, VIC will compute the aggregate bulk and soil densities of the combined mineral and organic portions of the soil and compute an aggregate soil porosity.
VIC now uses equations taken from Farouki 1986 to compute the thermal conductivity and heat capacity of the soil containing organic matter. As organic fraction approaches 0, the soil properties approach those of the mineral portion of the soil. ```
Extended computation of soil temperatures and ground heat flux to all modes of operation.
``` Files Affected:
calcsoilthermaleqn.c calcsurfenergybal.c displaycurrentsettings.c frozensoil.c fullenergy.c funcsurfenergybal.c getglobalparam.c initializeglobal.c initializemodelstate.c soilconduction.c surfacefluxes.c vicNl_def.h vicNl.h
Description:
Extended computation of soil temperatures and ground heat flux to all modes of model operation. Previously these quantities were only computed when FROZEN_SOIL was TRUE.
Now soil temperatures, ice content, and ground heat flux are computed as follows:
If FROZENSOIL is TRUE, there is no change to previous model behavior. By default, soil temperature profile is computed via the finite element method of Cherkauer and Lettenmaier (1999), taking account of the phase change of ice. (To use the Liang et al (1999) approximation, set QUICKFLUX to TRUE; however this is not recommended because it doesn't handle the phase change of ice.) If FULLENERGY is also TRUE, the surface temperature is computed via iteration over the surface energy balance; if FULLENERGY is FALSE, the surface temperature is set to air temperature. Soil layer average temperatures and ice contents are computed and available for output.
If FROZENSOIL is FALSE, the ice phase change is not accounted for and soil layer ice contents are all set to 0. Unlike previous versions, the soil layer temperatures and ice contents (=0) are now available for output. The default method of computing soil temperature profile depends on the setting of the QUICKFLUX option: a. QUICKFLUX FALSE: use approximation of Liang et al (1999). This is the default method, if QUICKFLUX is not specified in the global param file. b. QUICK_FLUX TRUE: use finite element method of Cherkauer et al. (1999).
Now that soil temperatures, ice contents, and ground heat fluxes are always computed, the GRND_FLUX option has been removed. ```
Added computation of water table position.
``` Files Affected:
computezwt.c (new) initializelake.c initializesoil.c lakes.eb.c Makefile outputlistutils.c putdata.c readsoilparam.c readsoilparamarc.c runoff.c userdef.h vicNl_def.h vicNl.c vicNl.h
Description:
Added computation of the water table position, "zwt". Units are [cm] and the position is negative below the soil surface. To monitor the water table position, we have added the following output variables:
OUTZWT - water table position [cm] computed by requiring that all layers below it are saturated, i.e. the water table will appear only in the lowest unsaturated layer. OUTZWT_LUMPED - water table position [cm] computed by combining all soil layers into a single layer and assuming the soil below is completely saturated.
The water table's position within a soil layer is computed from soil water retention curves following Letts et al. (2000):
w(z) = { ((zwt-z)/bubble)*(-1/b), z < zwt-bubble { 1.0, z >= zwt-bubble where z = depth below surface [cm] w(z) = relative moisture at depth z given by (moist(z) - residmoist) / (maxmoist - resid_moist) zwt = depth of water table below surface [cm] bubble = bubbling pressure [cm] b = 0.5(expt-3) Note that zwt-bubble = depth of the free water surface, i.e. position below which soil is completely saturated.
This assumes water in unsaturated zone above water table is always in equilibrium between gravitational and matric tension (e.g., Frolking et al, 2002).
So, to find the soil moisture value in a layer corresponding to a given water table depth zwt, we integrate w(z) over the whole layer:
w_avg = average w over whole layer = (integral of w*dz) / layer depth
Then, layer moisture = wavg * (maxmoist - residmoist) + residmoist
Instead of the zwt defined above, we actually report free water surface elevation zwt* = -(zwt-bubble). I.e. zwt* < 0 below the soil surface, and marks the point of saturation rather than pressure = 1 atm.
To store the (zwt,moisture) pairs in this relationship for each layer, two new variables have been added to the soilconstruct: zwtvmoistzwt[MAXLAYER][MAXZWTVMOIST] zwtvmoistmoist[MAXLAYER][MAXZWTVMOIST] These are computed in readsoilparam(). Then, in computezwt() VIC interpolates between these points to estimate the water table depth in each layer given the layer's current soil moisture. ```
Added channel inflow from upstream into the lake to the list of forcing variables. Added lake water balance terms to input/output variables.
``` Files Affected:
allocatmos.c fullenergy.c getforcetype.c initializeatmos.c initializelake.c initializemodelstate.c LAKE.h lakes.eb.c outputlistutils.c output.PILPS-2E.ALMA.template output.TRADITIONAL.410.template setoutputdefaults.c putdata.c readlakeparam.c vicNl.c vicNl_def.h vicNl.h
Description:
Added forcing variable CHANNELIN to allow channel flow from upstream grid cells to be an input into the lake. This variable is ignored if LAKES is set to FALSE or the lake/wetland tile has 0 area. CHANNELIN must be in units of cubic meters [m3] per forcing time step (or cubic meters per second [m3/s] if ALMA_INPUT is TRUE).
Several output variables have been added to aid in tracking the lake water budget. The complete set of lake water budget variables is (in mm over grid cell area):
OUTLAKEBFIN baseflow into lake from catchment OUTLAKEBFOUT baseflow out of lake OUTLAKECHANIN channel inflow into lake OUTLAKECHANOUT channel outflow from lake OUTLAKEDSTOR change in lake moisture storage (liquid plus ice cover) OUTLAKEDSWE change in snowpack on top of lake ice OUTLAKEEVAP (was OUTEVAPLAKE) OUTPREC (already existed) OUTLAKERCHRG recharge from lake to wetland OUTLAKEROIN runoff into lake from catchment OUTLAKEVAPFLX sublimation from lake snow These same variables exist in units of volume (m**3): OUTLAKEBFINV baseflow into lake from catchment OUTLAKEBFOUTV baseflow out of lake OUTLAKECHANINV channel inflow into lake OUTLAKECHANOUTV channel outflow from lake OUTLAKEDSTORV change in lake moisture storage (liquid plus ice cover) OUTLAKEDSWEV change in snowpack on top of lake ice OUTLAKEEVAPV evap from lake OUTLAKEPRECV (note the "LAKE" in the name) OUTLAKERCHRGV recharge from lake to wetland OUTLAKEROINV runoff into lake from catchment OUTLAKEVAPFLXV sublimation from lake snow
This change also involved changing how lake fluxes are represented internally in VIC. They are now represented as volumes (m3) per step. This allows better handling of cases in which the lake shrinks to 0 area. ```
Added the output variable OUTLAKEAREA_FRAC, the lake surface area as a fraction of the grid cell area.
``` Files Affected:
outputlistutils.c putdata.c vicNldef.h
Description:
Added the output variable OUTLAKEAREA_FRAC, which tracks the lake surface area as a fraction of the grid cell area. This allows quick comparison of VIC outputs with lake area observations (e.g. from remote sensing). ```
Added validation of b_infilt
``` Files Affected:
read_soilparam.c
Description:
VIC now checks to make sure b_infilt > 0. If the value is <= 0, VIC exits with an error message. ```
Removed MIN_LIQ option.
``` Files Affected:
arnoevap.c frozensoil.c getglobalparam.c global.param.sample initializeglobal.c initializelake.c initializemodelstate.c initializesoil.c lakes.eb.c runoff.c soilconduction.c vicNl_def.h vicNl.h
Description:
This option was intended to allow a dynamic (temperature-dependent) lower bound on liquid soil moisture, based on the principle that, even at very low temperatures, some moisture remains unfrozen. However, it ended up being unnecessary and its implementation introduced undesirable complexity into the code. In addition, it contained a bug that allowed soil moisture to fall below residual moisture level. Therefore this feature has been removed. ```
Bug Fixes:
Users can inadvertently choose an unstable soil temperature scheme
``` Files Affected:
getglobalparam.c initializeglobal.c initializemodelstate.c newtraphfuncfast.c
Description:
Previously VIC's default soil temperature scheme when FROZEN_SOIL=TRUE was an explicit scheme whose stability was not guaranteed. VIC has had an optional implicit scheme but this was not turned on unless the user chose it. This led to users inadvertently running VIC with an unstable temperature scheme under certain combinations of model time step and thermal node spacing.
This has been fixed. Now the implicit scheme is turned on by default (IMPLICIT=TRUE by default when FROZEN_SOIL is TRUE). The implicit scheme is stable for all combinations of model time step and thermal node spacing. Because this can slow down VIC simulations in some cases, this option can still be overridden by setting IMPLICIT to FALSE in the global parameter file. However, if the user does this, VIC now checks to see if the simulation's model time step and thermal node spacing are in the stable region; if not, VIC aborts with an error message. ```
Clarified description and variable names in SPATIAL_SNOW option
``` Files Affected:
calcsnowcoverage.c calcsurfenergybal.c icemelt.c initializelake.c initializesnow.c readsoilparamarc.c readsoilparam.c solvesnow.c vicNldef.h writesnow_data.c
Description:
The parameter for the snow pack depth distribution was previously named "depthfullsnowcover". However, this parameter's function was actually to represent the slope of the snow pack depth distribution. If we define "depththresh" to be the minimum snow pack depth below which the coverage < 1, then depthfullsnowcover MUST = 2*depththresh This was very misleading and caused users some confusion. Therefore we have changed the name of the parameter to "maxsnowdistribslope". In addition, other associated variables in the snowdata structure have been renamed accordingly (maxswq became maxsnowdepth and swqslope became snowdistribslope). ```
Fixed incorrect diurnal radiation cycle at high latitudes
``` Files Affected:
See "Overhaul of meteorological forcing processing" under new features
Description:
See "Overhaul of meteorological forcing processing" under new features. Two main bugs fixed, both primarily affecting high-latitude grid cells: 1. On days having only 1 hour of darkness, the diurnal cycle of temperature was incorrect, skipping that day's minimum temperature and smoothly transitioning to the next day's maximum. 2. The seasonal evolution of the diurnal cycle of solar radiation was always 366 days long, so that the number of daylight hours got increasingly out of phase with the time of year (by one day per non-leap year) as the simulation progressed. After 20-30 years, the diurnal cycle was substantially different from what it should be. Above 60 N, the number of days having no sunlight was substantially longer than it should be. ```
Fixed incorrect computation of snow cover fraction over lake/wetland
``` Files Affected:
lakes.eb.c
Description:
Previously VIC didn't compute snow cover fraction correctly over the lake/wetland tile. This has been fixed. ```
Fixed VIC's inability to handle the case where some cells have lakes and others don't.
``` Files Affected:
fullenergy.c readinitialmodelstate.c readlakeparam.c vicNldef.h writemodelstate.c
Description:
VIC 4.1.1 and previous versions of 4.1.2 were unable to handle the case in which some cells contain lakes and others don't. If options.LAKES was TRUE, all cells were required to have a valid value of lake_idx to indicate which veg tile contained a lake, even if no lakes existed in the cell.
This has been fixed. Now, users can specify a cell that has no lakes by setting lake_idx to -1 in the lake parameter file. In this case, VIC will ignore all other lake parameters for the cell and set the cell's lake area permanently to 0. ```
Fixed bugs in declarations of frostfract for SPATIALFROST TRUE
``` Files Affected:
lakes.eb.c put_data.c vicNl.h
Description:
Declarations for frost_fract were wrong or missing. This has
been fixed.
```
Fixed various lake water balance errors.
``` Files Affected:
initializelake.c initializemodelstate.c initializesoil.c LAKE.h lakes.eb.c runoff.c vicNl.h
Description:
Now calls to get_depth() are all consistent, using liquid water
volume instead of total volume (thus ldepth is always the liquid water
depth). Lake ice area is not allowed to increase if ice area > liquid
area. Ice cover is now treated like a "skin" on top of the liquid
(regardless of its thickness). Ice is assumed to be completely buoyant,
i.e. none of the ice is below the water line. If ice completely covers
the lake and the liquid part of the lake shrinks, the ice is assumed to
bend like a blanket, so that the outer edges now rest on land but the
center rests on top of the liquid. The lake "area" is still considered
to be the ice cover in this case. Baseflow out of the lake is only
allowed in the area of the lake containing liquid. The edges of the ice
sheet are assumed to be vertical, i.e. the surface area of the top of the
ice sheet is equal to the surface area of the bottom of the ice sheet.
This fixes water balance errors arising from inconsistent estimates of
lake ice area. Also fixed bugs in computation of lake->recharge.
```
Fixed incorrect snow albedo decay for southern hemisphere.
``` Files Affected:
LAKE.h lakes.eb.c solve_snow.c
Description:
Previously the computation of the USACE snow albedo decay would only switch from accumulation to melt curves for dates between March 1 and October 1. These dates are only appropriate for the northern hemisphere. This has been fixed so that the reverse condition must be met in the southern hemisphere. ```
Saturated area fraction incorrect for SPATIAL_FROST = TRUE.
``` Files Affected:
runoff.c
Description:
Previously the computation of cell.Asat occurred in the wrong place in runoff.c so that it was only correct for SPATIAL_FROST = FALSE. This has been fixed. ```
State file handles are never closed.
``` Files Affected:
vicNl.c
Description:
Previously VIC was not closing the intial and final state files. This has been fixed. ```
VIC aborts with soil temperature node moisture > max moisture.
``` Files Affected:
soil_conduction.c
Description:
Previously VIC would abort the simulation if soil temperature node moisture ever became greater than the maximum allowable moisture. This behavior has been replaced with a resetting of node moisture to the maximum. This is not intended to be a permanent fix; it simply allows simulations to continue with minimal errors. A more robust fix is planned. ```
Initial lake depth < mindepth is reset to mindepth.
``` Files Affected:
read_lakeparam.c
Description:
The validation of initial lake depth was incorrectly resetting depth to mindepth if initial depth < mindepth. This has been fixed. ```
Soil moisture falls below residual moisture level in some cases.
``` Files Affected:
(see "Removed MIN_LIQ option" under "New Features")
Description:
The MINLIQ option contained a bug that allowed soil moisture to fall below residual moisture level in some cases. This feature has been removed (see "Removed MINLIQ option" under "New Features"). ```
Incorrect calculation of grndflux, deltaH, and fusion for EXPTRANS=TRUE.
``` Files Affected:
arnoevap.c calcsurfenergybal.c frozensoil.c funcsurfenergybal.c getglobalparam.c initializemodelstate.c modifyKsat.c solvesnow.c surface_fluxes.c vicNl.h
Description:
In 4.1.1, the calculation of grndflux, deltaH, and fusion involved the assumption that soil thermal nodes 1 and 2 were at depths of 1*soilcon->depth[0] and 2*soilcon->depth[0], respectively. This is not true for exponential node spacing (EXPTRANS=TRUE) or any other node spacing scheme in general. This has been fixed to allow aribitrary node spacing.
The temperature profile given by the exponential node spacing is now interpolated to find the temperatures at the same depths as for the linear node spacing, i.e. the boundary between the first and second soil hydrologic layers. This makes the computation of grndflux, deltaH, and fusion consistent across all modes of operation (linear and exponential node spacing AND the QUICKFLUX approximation), since now they all apply to the same control volume (first soil layer). ```
Simulation log messages appear out of order.
``` Files Affected:
displaycurrentsettings.c put_data.c
Description:
In 4.1.1, some messages sent to the screen would appear out of order when saved to a log file. This has been fixed by redirecting messages from stdout to stderr. ```
Fixed typo in setting of fallback T value for the soil T profile.
``` Files Affected:
frozen_soil.c
Description:
In 4.1.1, the fallback temperature was erroneously set to "oldT", which is the T value of the previous iteration, but not the value from the beginning of the time step (except on the first iteration). Now, "oldT" has been replaced by "T0". ```
Fixed typo in initialization of fallback counts for the soil T profile.
``` Files Affected:
frozen_soil.c
Description:
In 4.1.1, only the fallback counts for nodes 1 to Nnodes-2 were initialized (to 0). Now initialization is done for nodes 0 to Nnodes-1. ```
Fixed various water balance errors in the lake model and added logic to handle the case when lake area goes to 0.
``` Files Affected:
fullenergy.c lakes.eb.c putdata.c vicNl_def.h
Description:
In 4.1.1, the lake model would generate small water balance errors when lake area would change, particularly in the presence of lake ice. In addition, lake water balance terms would become NaN when lake fraction went to 0. These errors have been fixed. ```
Replaced "assert" statements with "if" statements.
``` Files Affected:
calcatmosenergybal.c calcsurfenergybal.c icemelt.c snowintercept.c snowmelt.c waterenergybalance.c waterunder_ice.c
Description:
Previous versions of these files contain "assert" statements, which cause the model to abort if the assertions are not true. These have been replaced by "if" statements, so that the offending conditions can be remedied and the simulation can continue. ```
Removed savedata structure initialization from initializemodel_state().
``` Files Affected:
initializemodelstate.c put_data.c vicNl.c vicNl.h
Description:
For each time step, the initial values of the major moisture storage terms are stored in the savedata structure, so that the difference between final and initial states can be computed and written to output. In earlier versions, these variables needed to be initialized in initializemodelstate() so that they contained valid values before the first call to putdata(). This is no longer necessary, as the model now initializes all output variables with an initial call to putdata() before the simulation begins. Thus, the initialization has been removed from initializemodel_state(). ```
Fixed typo in condition for reading Wdew values.
``` Files Affected:
readinitialmodel_state.c
Description:
In 4.1.1, Wdew values were expected for even the bare soil veg tile, despite the fact that these values are not saved for bare soil in the function writemodelstate(). This has been fixed; Wdew is no longer expected for the bare soil tile. ```
Fixed bug in runoff computation when soil column is completely saturated.
``` Files Affected:
runoff.c
Description:
runoff() first computes total runoff for the timestep, and then computes hourly vertical water movement through the soil column. During the hourly computations, if the entire soil column becomes saturated, some downward-moving water may be "regurgitated" back up to the surface, where it is added to the total runoff for the time step.
In 4.1.1, the hourly infiltration into the soil column is computed using runoff[frostarea]. However, in the case of complete saturation, the regurgitated excess water is added to runoff[frostarea] within the hourly loop, so that the next hour's infiltration is computed using a larger value of runoff[frostarea]. This leads to water balance errors. This has been fixed in 4.1.2. Now, hourly infiltration is only computed relative to the original estimate of runoff[frostarea], before any regurgitated excess water is added to it. ```
Fixed typo in writing of number of lake active nodes to ASCII-format state file.
``` Files Affected:
writemodelstate.c
Description:
Fixed a typo in the writing of the number of lake active nodes to the statefile, for ASCII format. The error involved omitting a space that would separate the active node number from the temperature of the deepest soil thermal node, preventing the state file from being read correctly in subsequent VIC runs. ```
Added TFALLBACK logic to soil thermal profile solution for case in which max iterations are exceeded.
``` Files Affected:
frozen_soil.c
Description:
In 4.1.1, errors due to exceeding the maximum number of iterations in the soil temperature profile computation in calcsoilthermal_fluxes() were not handled by the TFALLBACK option. Logic to handle this case has now been added. ```
Fixed bugs in initialization of various TFallback counts and flags.
``` Files Affected:
initializesnow.c frozensoil.c
Description:
In 4.1.1, the number of Tfallbacks reported to the screen sometimes came out negative; this has been fixed for fallbacks in snow surface temperature and soil temperature profile. ```
Misc fixes to handling of aerodynamic resistance.
``` Files Affected:
funcsurfenergybal.c surfacefluxes.c
Description:
Replaced raunder with Raused[0] in funcsurfenergy_bal.c - this should not change behavior; it simply cleans up the code a tad.
Added logic to surfacefluxes.c to handle cases when aerocond and aero_resist are 0 or very large. ```
Added hack to prevent runaway cold nose in soil temperature profile. This is only enabled when options.TFALLBACK = TRUE.
``` Files Affected:
frozen_soil.c
Description:
In 4.1.1, the soil temprature computation could sometimes encounter a runaway "cold nose", in which one node was colder than its neighbors and continued to grow colder than its neighbors over time, due to instabilities in the soil heat equation (in the presence of ice in the soil). A rigorous numerical solution to this problem has not yet been implemented, but this hack causes the offending node to be reset to the average of its neighbors' temperatures as soon as the runaway behavior is detected. We hope to implement a more rigorous solution to this problem in future releases. ```
Simplified arguments lists of various functions.
``` Files Affected:
arnoevap.c funcsurfenergybal.c initializeatmos.c snowintercept.c solvesnow.c surfacefluxes.c vicNl.c vicNl.h
Description:
Replaced individual forcing and date/time variables in argument lists of solvesnow() and snowintercept() with the dmy and atmos data structures. Removed several unused variables from the arg list of arnoevap(). Replaced individual soilcon variables in arg list of initializeatmos() with the soilcon structure. ```
Replaced GLOBALLAI option with 2 options: VEGPARAMLAI and LAI_SRC.
``` Files Affected:
displaycurrentsettings.c getglobalparam.c global.param.sample initializeglobal.c readveglib.c readvegparam.c vicNldef.h
Description:
In previous versions, the GLOBALLAI option caused some confusion. GLOBALLAI=TRUE indicated that LAI values should be read from the veg parameter file (usually because they vary globally), and FALSE indicated that LAI values should be read from the veg library (meaning they were constant across the globe). But the natural interpretation of "GLOBALLAI=TRUE" is that LAI values are globally constant. In addition, the presence of LAI values in the veg param file was dictated by the setting of GLOBALLAI. If the user wanted to have VIC read LAI values from the veg library, GLOBAL_LAI would need to be FALSE, and the veg param file would need to have its LAI values removed. This linkage of veg param file format and where VIC was looking for LAI values seemed unnecesary.
There are now 2 options controlling these 2 separate aspects of LAI. VEGPARAMLAI controls the format of the veg param file. Independent of this, LAISRC controls where VIC looks for LAI values. This way, 1) the user can switch between the two sources of LAI values without having to change the veg param file, and 2) the meanings of these options are more clear than the old GLOBAL_LAI option.
The old GLOBALLAI setting has been maintained for backwards- compatibility, i.e. if VIC encounters GLOBALLAI in the global param file, it will set VEGPARAMLAI and LAISRC appropriately. ```
Changed default number of soil layers from 2 to 3 (the most common configuration).
``` Files Affected:
initialize_global.c
Description:
The default number of soil layers has been changed from 2 to 3 (the most common configuration). This will only affect users who have omitted this setting from their global parameter files. ```
- C
Published by jhamman almost 13 years ago
VIC - Release of VIC 4.1.0
** Description of changes from VIC 4.1.0 beta r4 to VIC 4.1.0 beta r5 **
New Features:
Updated lake model.
``` Files Affected:
fullenergy.c getdist.c (new) icemelt.c initializelake.c lakes.eb.c LAKE.h Makefile outputlistutils.c putdata.c readinitialmodelstate.c readlakeparam.c readsoilparamarc.c readsoilparam.c vicNldef.h vicNl.c vicNl.h waterenergybalance.c waterunderice.c wetlandenergy.c writemodelstate.c
Description:
Merged Laura Bowling's latest lake model code into UW version. Changes include: * Fixed lake snow physics to be consistent with land snow pack * Lake ice formation now takes into account availability of liquid water * Lake ice now explicitly tracked in water balance * Drainage now depends only on liquid water content, not total water+ice * Drainage now modeled as flow over broad-crested wier * New lake parameter file format - see readlakeparam.c for details * Fixes for crashes in extreme cases; fixes for water balance errors * New output variable OUTSOILTNODEWL, the soil thermal node temperatures in the wetland tile LCB via TJB ```
New optional snow density computation.
``` Files Affected:
displaycurrentsettings.c getglobalparam.c initializeglobal.c snow.h snowutility.c solvesnow.c userdef.h vicNl_def.h vicNl.h
Description:
In addition to the previous algorithm (as a function of day of year, based on a plot of seasonal variation of typical snow densities found in Bras, figure 6.10, p 258), added a new algorithm that computes the snow density based on swe and snow metamorphism. The new algorithm is taken from SNTHERM89, adjusted for an essentially single-layer model. Introduced a new global parameter file option, SNOWDENSITY, to choose which of these density algorithms will be used. If SNOWDENSITY is set to DENSBRAS, the original algorithm is used. If SNOWDENSITY is set to DENSSNTHRM, the new algorithm is used. The default value (i.e. if SNOWDENSITY is omitted) is DENSBRAS. Also moved snow-related constants from userdef.h to snow.h, for consistency. KMA via TJB ```
New optional snow albedo algorithm.
``` Files Affected:
displaycurrentsettings.c getglobalparam.c initializeglobal.c LAKE.h lakes.eb.c snowutility.c solvesnow.c vicNldef.h vicNl.h
Description:
In addition to the previous algorithm (based on US Army Corps of Engineers empirical snow albedo decay curves), added a new algorithm based on Sun et al., 1999. Introduced a new global parameter file option, SNOWALBEDO, to choose which of these density algorithms will be used. If SNOWALBEDO is set to USACE, the original algorithm is used. If SNOWALBEDO is set to SUN1999, the new algorithm is used. The default value (i.e. if SNOWALBEDO is omitted) is DENS_BRAS. KAC via TJB ```
Bug Fixes:
Allow lakes to be empty or very shallow.
``` Files Affected:
initializelake.c initializemodelstate.c LAKE.h lakes.eb.c readlakeparam.c wetland_energy.c
Description:
Previously, lakes could not be initialized to be empty or with volume below the minimum volume of 1 lake node. This modification removes that constraint. In addition, the lake-specific get_* functions were modified to return ErrorFlag values instead of aborting on error, making them more consistent with the CONTINUEONERROR option. KAC via TJB ```
Miscellaneous fixes to lake model
``` Files Affected:
lakes.eb.c readlakeparam.c wetlandenergy.c
Description:
Fixes for swe accounting errors and incorrect parsing of lake parameter file. LCB via TJB ```
Lake snow and ice fixes
``` Files Affected:
LAKE.h lakes.eb.c vicNl_def.h
Description:
Modified to set lake ice fraction to 0 if new lake fraction is 0. Previously lake ice was always adjusted by dividing old by new fractions, which causes nans when the new fraction is 0. Modified redistribution of snow variables between wetland and lake ice. Surface water is now stored as a lake variable and used to reestablish surf_water at the start of a new time step. KAC via TJB ```
Better validation of global parameter file options
``` Files Affected: getglobalparam.c makeinandoutfiles.c parseoutputinfo.c readsoilparamarc.c readvegparam.c
Description: Now, all options in the global parameter file involving input and output files are checked to ensure that the filenames have been specified. In addition, SOILDIR and RESULTDIR no longer require a trailing "/"; a "/" is automatically appended when constructing the soil parameter filename or results filename. Also, makes sure that N_OUTFILES matches number of output files actually defined in the global param file. TJB ```
Incorrect soil ice fractions for the case when FROZENSOIL = TRUE and options.SNOWBAND > 1.
``` Files Affected:
fullenergy.c preparefullenergy.c surfacefluxes.c
Description:
Changed initial total and frozen moistures from scalars (moist and ice0) to arrays (moist0 and ice0). Previously, when options.SNOW_BAND > 1, the values of moist and ice0 computed for earlier bands were always overwritten by the values of moist and ice0 computed for the final band (even if the final band had 0 area). JS and KAC via TJB ```
Bad results when SNOW_STEP = 24 hours
``` Files Affected:
getglobalparam.c initialize_atmos.c
Description:
Fixed the criterion for deciding whether to store NET longwave or INCOMING longwave in atmos[rec].longwave[NR]. Previously, VIC stored NET lw if SNOWSTEP != global.dt, under the assumption that this condition was equivalent to running in 24 h water balance mode. However, this caused problems for users who unwittingly ran 24 h water balance mode with SNOWSTEP = 24. The new criterion is that both FULLENERGY and FROZENSOIL must be FALSE. TJB ```
Incorrect setting for NOFLUX option in calcsurfenergy_bal()
``` Files Affected:
calcsurfenergy_bal.c
Description:
Modified code to reset NOFLUX boundary to global option value before computing final soil column temperatures. Previously NOFLUX was set to FALSE for initial QUICK_SOLVE estimates, but never reset to reflect actual bottom boundary conditions for final pass through solver. KAC ```
Removed -g from normal compiling options.
``` Files Affected:
Makefile
Description:
At some point, "-g" was added to the normal compiling options. This has been removed. To use the -g option, users should uncomment the "debug" section of the makefile. TJB ```
Changed "vicInterp" to "vicDisagg".
``` Files Affected:
Makefile
Description:
Changed the name of the makefile option to compile vic with the OUTPUT_FORCE option set to TRUE. The term "disaggregate" is more correct than the term "interpolate", so "vicDisagg" seems more appropriate. The usage of this option is as follows:
At command prompt, type make disagg
This will create the executable vicDisagg, which is simply vicNl compiled with OUTPUTFORCE set to TRUE in userdef.h. TJB ```
Added end-of-file check to read_lakeparam.c
``` Files Affected:
read_lakeparam.c
Description:
Added check on !feof(lakeparam) to loop over lake param file, to avoid infinite loop when current grid cell has no lakes and is not mentioned in the lake param file. TJB ```
Compilation problems for QUICKFS userdef.h option
``` Files Affected:
funcsurfenergybal.c getglobalparam.c initializemodelstate.c readlakeparam.c waterenergybalance.c wetland_energy.c
Description:
Previous updates for the EXCESSICE option had inadvertently introduced bugs into the logic for the QUICKFS option. These included removal of the logic that modifies calls to distributenodemoistureproperties() and estimatelayericecontent(). TJB ```
OUTSUBBLOWING, OUTSUBSURFACE, and OUTSUBSNOW missing from default snow_* output files.
``` Files Affected:
setoutputdefaults.c
Description:
Added OUTSUBBLOWING, OUTSUBSURFACE, and OUTSUBSNOW to default snow output file for case of options.BLOWING == TRUE. This makes it almost the same as previous versions of 4.1.0, (r3 and earlier) with the exception that previous versions of 4.1.0 multiplied these terms by 100 when saving to the snow file. TJB ```
Error in computation of initial water storage for DIST_PRCP = TRUE
``` Files Affected:
vicNl.c
Description:
Added distprcp fraction (mu) to the computation of initial water storage terms. Otherwise, when DISTPRCP = TRUE, the water storage terms for wet and dry fractions were added together with no weighting, resulting in twice the storage as actually present. TJB ```
Fixed various issues with uninitialized variables, un-freed arrays, NaN's, etc.
``` Files Affected:
distprec.c putdata.c readvegparam.c runoff.c surfacefluxes.c vicNl.h
Description:
putdata() was attempting to return an ErrorFlag but it was defined as type int. Therefore, changed the type of putdata() and changed the call to putdata() in distprec.c. readvegparam() allocated but never freed a temporary array vegarr[]. This was fixed. In runoff(), topmoist could sometimes exceed topmaxmoist due to rounding errors, leading to NaN's in i0 and A0. surface_fluxes() was sending incorrectly-indexed displacement and roughness values to CalcBlowingSnow(). These have all been fixed. LCB via TJB ```
** Description of changes from VIC 4.1.0 beta r3 to VIC 4.1.0 beta r4 **
New Features:
Flexible output configuration & aggregation of output variables
``` Files Affected:
Makefile
allocatmos.c calcwaterenergybalanceerrors.c (new) closefiles.c convforcevic2alma.c (removed) convresultsvic2alma.c (removed) displaycurrentsettings.c distprec.c fullenergy.c getglobalparam.c global.h global.param.sample IceEnergyBalance.c initializeatmos.c initializeglobal.c initializemodelstate.c makeinandoutfiles.c output.LDASOUTPUT.template (new) output.OPTIMIZE.template (new) output.OUTPUTFORCE.ALMA.template (new) output.OUTPUTFORCE.template (new) output.PILPS-2E.ALMA.template (new) output.TRADITIONAL.410.template (new) output.TRADITIONAL.template (new) outputlistutils.c (new) parseoutputinfo.c (new) putdata.c readatmosdata.c setoutputdefaults.c (new) SnowPackEnergyBalance.c solvesnow.c surfacefluxes.c userdef.h vicNl.c vicNl.h vicNldef.h vicerror.c waterenergybalance.c wetlandenergy.c writedata.c writeforcing_file.c
Description:
In earlier versions of VIC, the set of output files and their contents
were hard-coded. A few settings in user_def.h (OPTIMIZE and
LDASOUTPUT) allowed the user to change the contents of the output files, but this has not been enough to accomodate the various needs of users. Users inevitably have had to modify writedata.c to produce the type of output they want, and when VIC is updated, they must merge their changes into the new version of the code.
VIC 4.1.0 now allows the user to specify exactly which output files to
create and which variables to store in each file. This way, users can
save space by only writing those variables that are useful, and will
be less likely to need to maintain a private version of the code to do this.
In addition, VIC 4.1.0 can now aggregate the output variables to a user-defined output interval, via the OUT_STEP setting in the global parameter file. Currently, the largest output interval allowed is 24 hours, so this option is only useful for simulations running at sub- daily time steps.
Main points:
1. Output file names and contents can be specified in the global param
file (see below).
2. If you do not specify file names and contents in the global param
file, VIC will produce the same set of output files that it has
produced in earlier versions, namely "fluxes" and "snow" files,
plus "fdepth" files if FROZENSOIL is TRUE and "snowband" files if PRTSNOW_BAND is TRUE. These files will have the same contents and format as in earlier versions.
3. The OPTIMIZE and LDAS_OUTPUT options have been removed. These
output configurations can be selected with the proper set of
instructions in the global param file. (see the output.*.template
files included in this distribution for more information.)
4. If you do specify the file names and contents in the global param
file, PRTSNOWBAND will have no effect.
To specify file names and contents in the global param file, one
should use the following format:
(typical global param file contents here...)
# Output File Contents
N_OUTFILES <n_outfiles>
OUTFILE <prefix> <nvars>
OUTVAR <varname> [<format> <type> <multiplier>]
OUTVAR <varname> [<format> <type> <multiplier>]
OUTVAR <varname> [<format> <type> <multiplier>]
OUTFILE <prefix> <nvars>
OUTVAR <varname> [<format> <type> <multiplier>]
OUTVAR <varname> [<format> <type> <multiplier>]
OUTVAR <varname> [<format> <type> <multiplier>]
where
<n_outfiles> = number of output files
<prefix> = name of the output file, NOT including latitude
and longitude
<nvars> = number of variables in the output file
<varname> = name of the variable (this must be one of the
output variable names listed in vicNl_def.h.)
<format>, <type>, and <multiplier> are optional. For a given
variable, you can specify either NONE of these, or ALL of
these. If these are omitted, the default values will be used.
<format> = (for ascii output files) fprintf format string,
e.g.
%.4f = floating point with 4 decimal places
%.7e = scientific notation w/ 7 decimal
%places
* = use the default format for this
* variable
<type> = (for binary output files) data type code.
Must be one of:
OUT_TYPE_DOUBLE = double-precision floating
point
OUT_TYPE_FLOAT = single-precision floating
point
OUT_TYPE_INT = integer
OUT_TYPE_USINT = unsigned short integer
OUT_TYPE_SINT = short integer
OUT_TYPE_CHAR = char
* = use the default type
<multiplier> = (for binary output files) factor to multiply
the data by before writing, to increase
precision.
* = use the default multiplier for this
* variable
Here's an example. To specify 2 output files, named "wbal" and
"ebal", and containing water balance and energy balance terms,
respectively, you could do something like this:
N_OUTFILES 2
OUTFILE wbal 6
OUTVAR OUT_PREC
OUTVAR OUT_EVAP
OUTVAR OUT_RUNOFF
OUTVAR OUT_BASEFLOW
OUTVAR OUT_SWE
OUTVAR OUT_SOIL_MOIST
OUTFILE ebal 7
OUTVAR OUT_NET_SHORT
OUTVAR OUT_NET_LONG
OUTVAR OUT_LATENT
OUTVAR OUT_SENSIBLE
OUTVAR OUT_GRND_FLUX
OUTVAR OUT_SNOW_FLUX
OUTVAR OUT_ALBEDO
Since no format, type, or multiplier were specified for any variables,
VIC will use the default format, type, and multiplier for the variables.
If you wanted scientific notation with 10 significant digits for
ALBEDO, you could do the following:
OUTVAR OUT_ALBEDO %.9e * *
Note that even if you only want to specify the format, you must supply
a value in the type and multiplier columns as well. This can be "*" to indicate the default value. Similarly, if you only want to specify the type (e.g. as a double), you would need to do something like:
OUTVAR OUT_ALBEDO * OUT_TYPE_DOUBLE *
Date variables:
For typical output files, the date is always written at the beginning
of each record. This will consist of the following columns: year month day hour For daily output timestep, "hour" is not written.
If BINARY_OUTPUT is TRUE, these will all be written as type int
(OUTTYPEINT).
If OUTPUT_FORCE is TRUE, the date will NOT be written.
Multiple-valued variables:
Since variables like SOIL_MOIST have 1 value per soil layer, these
variables will be written to multiple columns in the output file, one column per soil layer. Other multiple-valued variables are treated similarly.
Snow band output:
To specify writing the values of variables in each snow band, append
"_BAND" to the variable name (this only works for some variables - see
the list in vicNl_def.h). If you specify these variables, the value
of the variable in each band will be written, one band per column. For example, for a cell having 2 snow bands:
OUTVAR OUT_SWE_BAND
OUTVAR OUT_ALBEDO_BAND
will result in an output file containing:
year month day (hour) swe[0] swe[1] albedo[0] albedo[1]
TJB
```
Cleanup of structures holding filenames and file pointers
``` Files Affected:
checkfiles.c checkstatefile.c closefiles.c displaycurrentsettings.c distprec.c getglobalparam.c initializemodelstate.c makeinandoutfiles.c openstatefile.c readinitialmodelstate.c vicerror.c vicNl.c vicNldef.h vicNl.h writemodelstate.c
Description:
- Merged infiles and outfiles structs into filep_struct.
- Merged builtnames into filenames struct.
- Renamed infiles.statefile to filep.init_state
- Moved global.statename to filenames.statefile.
- Added fpathpfx[] to the filenames_struct, to store the path and prefix of forcing files. Now, forcing[] only stores the full forcing file names. TJB ```
Soil thermal node temperature is now an output variable
``` Files Affected:
outputlistutils.c putdata.c vicNldef.h
Description:
Soil thermal node temperature can now be selected for output, via the key "OUTSOILTNODE". If selected, the temperatures at all valid soil thermal nodes will be output. TJB ```
Removed LAKE_MODEL compile-time option
``` Files Affected:
checkfiles.c displaycurrentsettings.c distprec.c fullenergy.c getglobalparam.c IceEnergyBalance.c icemelt.c initializelake.c initializemodelstate.c initializesoil.c LAKE.h lakes.eb.c makedistprcp.c putdata.c readinitialmodelstate.c readlakeparam.c userdef.h vicNl.c vicNldef.h vicNl.h waterenergybalance.c waterunderice.c wetlandenergy.c writemodelstate.c
Description:
From a functional standpoint, the LAKEMODEL compile-time option was redundant with the options.LAKE switch. Meanwhile, the difference in the size of the executable between when the LAKEMODEL switch was on or off was deemed insignificant. Therefore, this switch was removed in the interest of making the code easier to maintain and reducing user confusion. Now, to turn off lake functionality, simply set LAKE to FALSE in the global parameter file (or omit the "LAKE" line completely). TJB ```
More complete set of supported input variables
``` Files Affected:
display_current_settings.c
get_force_type.c
get_force_type_pilps.c (removed)
get_global_param.c
initialize_atmos.c
initialize_atmos_pilps.c (removed)
initialize_global.c
vicNl_def.h
Description:
Added REL_HUMID (relative humidity, as a fraction) to the list of
supported met input variables. Added the ALMA_INPUT option, which
causes temperatures to be interpreted as Kelvin, pressures as kPa,
and moisture fluxes as rates (mm/s) instead of accumulated fluxes
(mm/timestep). This allowed us to remove TAIR and PSURF from the
list of supported met input variables, since AIR_TEMP and PRESSURE
provide this ability when ALMA_INPUT is TRUE. This also makes
input variable specification more consistent with output variable
specification.
Since now the forcing files from PILPS can be read via the
appropriate specification of input variables and ALMA_INPUT option
in the global parameter file, the file initialize_atmos_pilps.c
has been removed. TJB
```
Optional headers for output and input files
``` Files Affected:
display_current_settings.c
get_global_param.c
global.param.sample
initialize_global.c
Makefile
read_atmos_data.c
vicNl.c
vicNl_def.h
vicNl.h
write_header.c (new)
Description:
Added the PRT_HEADER option to the global parameter file. If
this is set to TRUE, VIC will insert a short header into its
output files, describing the time step, start date/time,
variables and units included in the file.
For ascii files, the output header has the following format:
# NRECS: (nrecs)
# DT: (dt)
# STARTDATE: yyyy-mm-dd hh:00:00
# ALMA_OUTPUT: (0 or 1)
# NVARS: (Nvars)
# VARNAME VARNAME VARNAME ...
where
nrecs = Number of records in the file
dt = Time step length in hours
start date = Date and time of first record of file
ALMA_OUTPUT = Indicates units of the variables; 0 = standard VIC
units; 1 = ALMA units
Nvars = Number of variables in the file, including date
fields
For binary files, the output header has the following format:
// Data Stored As Comment
//
// Identifier (unsigned short)*4 0xFFFF, repeated 4 times
// Nbytes (unsigned short)*1 Number of bytes in the header,
// INCLUDING THE IDENTIFIER
//
// Part 1: Global Attributes
// Nbytes1 (unsigned short)*1 Number of bytes in part 1
// nrecs (int)*1 Number of records in the file
// dt (int)*1 Time step length in hours
// startyear (int)*1 Year of first record
// startmonth (int)*1 Month of first record
// startday (int)*1 Day of first record
// starthour (int)*1 Hour of first record
// ALMA_OUTPUT (char)*1 0 = standard VIC units; 1 = ALMA units
// Nvars (char)*1 Number of variables in the file,
// including date fields
//
// Part 2: Variables
// Nbytes2 (unsigned short)*1 Number of bytes in part 2
// For each variable, the following fields: { len varname type mult }
// len (char)*1 Number of characters in varname
// varname (char)*len Variable name
// type (char)*1 Code identifying variable type
// mult (float)*1 Multiplier for variable
To accomodate input forcing files that might have been produced via
VIC's OUTPUT_FORCE option, and therefore could contain a header,
read_atmos_data.c has been modified to detect and skip headers that
follow the formats outlined above. TJB
```
Variable TYPE specifications for binary-format output files in the global parameter file must match the strings listed in vicNl_def.h.
``` Files Affected:
parseoutputinfo.c
Description:
When listing output variables in the global parameter file, if the output file format is binary, the variable data TYPE must match the string from vicNldef.h exactly, e.g. "OUTTYPE_INT" rather than just "INT". TJB ```
Added global option CONTINUEONERROR allowing simulation to continue on cell error.
``` Files Affected:
arnoevap.c CalcAerodynamic.c calcatmosenergybal.c CalcBlowingSnow.c calcrainonly.c calcsurfenergybal.c displaycurrentsettings.c distprec.c frozensoil.c fullenergy.c funcsurfenergybal.c getglobalparam.c icemelt.c initializenewstorm.c lakes.eb.c redistributeduringstorm.c rootbrent.c runoff.c snowintercept.c snowmelt.c soilconduction.c solvesnow.c surfacefluxes.c vicNl.c waterenergybalance.c waterunderice.c wetlandenergy.c global.param.sample LAKE.h vicNl_def.h vicNl.h
Description:
If the global option CONTINUEONERROR is set to TRUE then the simulation continues to run even if a cell fails and produces partial output. Default is is for CONTINUEONERROR to be FALSE, as in previous versions of model. The return value of some modules was changed from void to an int numeric return value. The ERROR value is defined in vicNl_def.h. KAC via GCT ```
Exponential grid transformation option for soil thermal nodes in finite difference heat equation
``` Files Affected:
calcsurfenergybal.c displaycurrentsettings.c frozensoil.c funcsurfenergybal.c getglobalparam.c initializeglobal.c initializemodelstate.c soilconduction.c soilthermaleqn.c vicNldef.h
Description:
New option is now EXP_TRANS to have an exponential distribution of the thermal node depths in the vertical dimension. This allows for closer thermal nodes near the surface of soil where the variance is greatest. The transformation allows for the solution to be solved in linear-space, wherein the nodes are distributed linearly with depth, but the physical system exists in exponential space. This change also involves a rearranging of the terms in the finite-difference equaton (equation 8 of Cherkauer et al. 1999). Therefore the constants (A-E) are calculated in a new way. These constants are equal to the constants in each of the terms in equation 8 multiplied by alpha^2*deltat. JCA ```
Implicit solution option for finite difference frozen soils algorithm
``` Files Affected:
calcsurfenergybal.c displaycurrentsettings.c frozensoil.c funcsurfenergybal.c getglobalparam.c initializeglobal.c Makefile surfacefluxes.c vicNldef.h vicNl.h
Description:
The implicit solution uses Newton Raphson to solve the system of non- linear equations. Therefore there is a new option, IMPLICIT. If the implicit solution fails (which can sometimes occur at the initial formation of ice in the soil column), the model will use the original explicit solver to solve for the thermal temperatures for that time step only. The implicit option is unconditionally stable and therefore the Courant-Friedrichs-Lewy condition does not need to be checked (as it should be for the explicit solver). JCA ```
Zsumnode calculated once and passed in soilcon to other subroutines
``` Files Affected:
calcsurfenergybal.c funcsurfenergybal.c initializemodelstate.c lakes.eb.c readinitialmodelstate.c runoff.c soilconduction.c vicNldef.h writedebug.c writemodelstate.c
Description:
Zsumnode is the depth of each of the thermal nodes needed for the finite difference frozen soils algorithm. Rather than re- calculating this value in various places, this vector is now passed in the soilcon structure to the various subroutines where it is needed. The one exception is setnodeparameters, because this is a slightly different definition of Zsum. JCA ```
Patch for "cold nose" problem
``` Files Affected:
frozensoil.c soilthermal_eqn.c
Description:
This is an inelegant fix for "cold nose" problem that may occur in the finite different frozen soil algorithm in each mode of operation. This involves a thermal node that is of a lower temperature than the upper and lower thermal nodes. Due to the first term of the heat conduction term (the term that accounts for a change in the thermal conductivity in space), the first term can become more negative than the second term. This causes this cold node to become much colder and thus breaks the second law of thermodynamics (because fluxterm1 exceeds fluxterm2 in absolute magnitude). Therefore, a check is now made to set the first term to zero when this begins to happen. This only seems to happen in the first and second near-surface nodes. JCA ```
Added EXCESSICE option (set in userdef.h)
``` Files Affected:
calcsurfenergybal.c calcwaterenergybalanceerrors.c displaycurrentsettings.c frozensoil.c fullenergy.c funcsurfenergybal.c getglobalparam.c initializemodelstate.c initializesoil.c LAKE.h lakes.eb.c outputlistutils.c preparefullenergy.c putdata.c readinitialmodelstate.c readsoilparamarc.c readsoilparam.c runoff.c soilconduction.c soilthermaleqn.c surfacefluxes.c userdef.h vicNl.c vicNldef.h vicNl.h wetlandenergy.c writemodel_state.c
Description:
If TRUE, VIC allows for excess ground ice, i.e. an expanded porosity to account for an initial volumetric ice fraction larger than soil porosity. The ground subsides (therefore soil depth is no longer static) and the porosity decreases as the excess ice melts. Once porosity reaches the soil porosity (1-bulk density/soil density), it does not change. The initial volumetric ice fraction for each soil layer must be defined in the soil file. The maximum value for this initial ice fraction is set by MAXICEINIT in vicNldef.h. Another new parameter is ICEATSUBSIDENCE, also set in vicNldef.h. This parameter controls the rate of subsidence as the ground warms. Setting a larger value will cause the ground to subside sooner and faster. The physical bounds of this parameter are 0.0 and 1.0, although setting this to a value of 1.0 will result in the ground continually subsiding despite very cold soil temperatures because there is always a small amount of unfrozen water in each soil layer due to the function used in maximumunfrozenwater. The recommended value is 0.8. JCA ```
Bare soil evap for LAI=0
``` Files Affected:
funcsurfenergy_bal.c
Description:
Modified to use arnoevap rather than canopyevap if LAI is 0, e.g. winter cropland. KAC via TJB ```
Drop canopy snow if thin
``` Files Affected:
snow_intercept.c
Description:
Modified to drop canopy snow if it is especially thin (< MINSWQEB_THRES), which should improve the numeric stability of the canopy energy balance solution. KAC via TJB ```
Bug Fixes:
Various bugs in output variables
``` Files Affected:
global.param.sample outputlistutils.c output.PILPS-2E.ALMA.template output.TRADITIONAL.410.template output.TRADITIONAL.template putdata.c setoutputdefaults.c vicNldef.h
Description:
- Shortened the names of variables whose names were too long
- Fixed typos in other names
- Added OUTINLONG TJB ```
Uninitialized value of ice[] in transpiration()
``` Files Affected:
canopy_evap.c
Description:
Modified to initialize ice[] for all soil layers before computing available moisture (to avoid using uninitialized values later on). TJB ```
Uninitialized value of mixdepth in solve_lake()
``` Files Affected:
lakes.eb.c
Description:
Now set mixdepth=0 for case of complete ice cover; this guarantees that it is initialized for all cases. TJB ```
Incorrect sub-daily temperature interpolation when referencing GMT instead of local time
``` Files Affected:
calcairtemperature.c
Description:
Temperature interpolation didn't account for case in which min or max temperature could cross the boundary of the current day. This can happen when referencing GMT instead of local time, for cells far away from 0 E longitude. This has been fixed. TJB ```
Water budget errors in snow pack on top of lake ice
``` Files Affected:
lakes.eb.c
Description:
Convert swq and surfwater from mm over lake to mm over ice fraction at beginning of solvelake(). This was needed to avoid a water budget error since swq and surfwater were being converted to mm over lake at end of solvelake(). TJB ```
Incorrect filenames in Makefile for variable output list functions
``` Files Affected:
Makefile
Description:
Changed ".c" to ".o" for outputlistutils.o, parseoutputinfo.o, setoutputdefaults.o TJB ```
Output variable OUT_DELSURFSTOR not functioning
``` Files Affected:
outputlistutils.c put_data.c
Description:
Default properties for OUTDELSURFSTOR were not set in outputlistutils.c, and OUTDELSURFSTOR was not assigned a value in put_data.c. These problems have been fixed. TJB ```
Pressure and vapor pressure output in wrong units
``` Files Affected:
putdata.c writeforcing_file.c
Description:
The output variables pressure and vapor pressure were output in Pa instead of kPa. This has been fixed. TJB ```
Changed OUTSURFTEMP from the average of T[0] and T[1] to exactly equal to T[0].
``` Files Affected:
put_data.c
Description:
Previously, OUTSURFTEMP had been set to the average of node temperatures T[0] and T[1]. This has been changed to just T[0], since OUTSURFTEMP represents the surface skin temperature. TJB ```
Added case of SPATIALFROST = TRUE in fullenergy.c
``` Files Affected:
full_energy.c
Description:
This module needed to handle the case of SPATIAL_FROST = TRUE. GCT ```
Fixed fread statements
``` Files Affected:
readinitialmodel_state.c
Description:
Fixed fread checks to make sure correct number of items were read in rather than the size of the item read in. JCA ```
Read in order incorrect in errorprintsurfenergybal
Files Affected:
calc_surf_energy_bal.c
GCT
Removed (1.-snow_coverage) from three equations where it did not belong
``` Files Affected:
funcsurfenergy_bal.c GCT ```
setupfrozensoil subroutine removed as it is never called
``` Files Affected:
frozen_soil.c GCT ```
Bug fix for previous bug fix to dt_baseflow calculation.
``` Files Affected:
runoff.c
Description:
Fixed bug arising from earlier fix to dt_baseflow calculation. Earlier fix took residual moisture into account in the linear part of the baseflow eqn, but not in the non-linear part. Now we take residual moisture into account correctly throughout the whole equation. TJB ```
Sub-daily snow step for 24h wb mode not aggregating correctly
``` Files Affected:
snowmelt.c solvesnow.c surface_fluxes.c
Description:
The implementation of the canopy iteration in surfacefluxes() caused the data structures containing the results for the sub-daily snow steps to be reset at the beginning of every sub-daily step, resulting in large water balance errors and incorrect daily results. This has been fixed by creating distinct data structures to store results for iterations (iter) and steps (step_). In addition, the units of snow melt were corrected to be consistent (mm) across functions. TJB ```
Moved Implicit error counting above call for solveTprofile.
``` Files Affected:
funcsurfenergy_bal.c GCT ```
Moved ARNO/NIJSSEN conversion after calculation of max_moist.
``` Files Affected:
readsoilparamarc.c GCT ```
Added ErrorFlag return value from initialize_prcp.
``` Files Affected:
lakes.eb.c LAKE.h GCT ```
Trap cases of T-errors matching variable ERROR for root_brent.
``` Files Affected:
calcatmosenergybal.c calcsurfenergybal.c frozensoil.c icemelt.c rootbrent.c snowintercept.c snow_melt.c
Description:
Basically, what was happening was that when rootbrent was called from calcsurfenergybal with funcsurfenergybal as Function, then funcsurfenergybal was ocasionally returning a value of ERROR to rootbrent, and rootbrent was then (in some cases) interpreting this as an actual surface temperature and continuing merrily on its way. So, there was an error in the model that was never caught. So, now rootbrent checks for this and returns a value of ERROR if there is a problem. Because of this change, all of the routines that call rootbrent had to be changed since they checked against an error of -9998 - now they check for values less than -998, since ERROR = -999. JCA ```
Trap cases of negative soil moisture.
``` Files Affected:
full_energy.c
Description:
No longer resets ice content to previous time-step ice content if subsidence has occurred. JCA ```
Fixed bug for read-in during EXCESS_ICE option.
``` Files Affected:
readinitialmodel_state.c
Description:
Fixed bug for read-in during EXCESS_ICE option. JCA ```
Memory errors for ARCSOIL=TRUE and OUTPUTFORCE=TRUE
``` Files Affected:
getforcetype.c getglobalparam.c initializeglobal.c readsoilparam.c readsoilparamarc.c vicNl.c
Description:
Memory errors would occur when ARCSOIL=TRUE and OUTPUTFORCE=TRUE. In addition, the output files would not contain sufficient contents due to not closing properly. These have been fixed. TJB ```
Handling of cells missing from snowband file
``` Files Affected:
read_snowband.c
Description:
Previously, if SNOW_BAND = TRUE and a particular cell was not listed in the snowband file, VIC would abort. Now, when VIC encounters cells with no information in the snowband file, VIC issues a warning and sets the cells to have 1 band, with Tfactor = 0 and Pfactor = 1. KAC via TJB ```
Moved check for soil moisture > max to initializemodelstate.c
``` Files Affected:
readinitialmodelstate.c initializemodel_state.c
Description:
For initializing the model state the check for soil moist > max moist was moved from readinitialmodelstate.c to initializemodelstate.c. The check is performed on all veg types even if the area fraction = 0. There was a situation with EXCESSICE = TRUE when the model was trying to distribute moisture values that exceeded max moist to each thermal node in the wetland area when Cl = 0. JCA ```
Incorrect limits on soil layer evap in runoff() for SPATIAL_FROST = TRUE
``` Files Affected:
runoff.c
Description:
Modified to correctly handle evaporation from spatially distributed soil frost. Original version could produce negative soil moisture in fractions with high ice content since only total evaporation was checked versus total liquid water content, not versus available liquid water in each frost subsection. KAC via TJB ```
Bug fixes in EXCESS_ICE calculations
``` Files Affected:
fullenergy.c vicNldef.h
Description:
Added MAXSUBSIDENCE parameter to EXCESSICE option. Fixed bug in subsidence calculation. JCA ```
Return ERROR instead of exiting in ice_melt.c module
``` Files Affected:
ice_melt.c
Description:
Return ERROR instead of exiting, if icemelt could not converge to a solution in rootbrent. JCA ```
Force runoff() to use user-specified resid_moist
``` Files Affected:
runoff.c
Description:
Removed logic that reset residmoist[i]. Previously, residmoist[i] was reset to 0 for i > 0 when resid_moist[0] == 0. Such resetting of soil properties was deemed unnecessary and confusing, since VIC would end up using different residual moisture values than those specified by the user. If a user truly wants to specify residual moisture in all layers to be 0, the user should set these explicitly in the soil parameter file. Also fixed typo in fprintf() on line 289. TJB ```
Fixed error in EXP_TRANS formulation
``` Files Affected:
frozensoil.c soilthermal_eqn.c
Description:
Fixed error in EXP_TRANS formulation. JCA ```
Updated default output file variable lists to match traditional 4.1.0 output files
``` Files Affected:
setoutputdefaults.c
Description:
Updated to reflect variables present in traditional 4.1.0 output files. Previously the defaults matched the traditional 4.0.6 output files. TJB ```
Model aborts when TIME_STEP = 24 and STARTHOUR is not specified.
``` Files Affected:
getglobalparam.c
Description:
Added validation of dt, start date, end date, and nrecs. TJB ```
Miscellaneous bugs in frozen soils.
``` Files Affected:
frozensoil.c soilconduction.c
Description:
Fixed miscellaneous bugs (typos) in frozen soil equations. JCA ```
Output file headers contain "hour" field despite output dt == 24 hours.
``` Files Affected:
write_header.c
Description:
Replaced all instances of global.dt with global.outdt, since outdt is the time interval used in the output files. TJB ```
Liquid soil moisture sometimes falls below residual.
``` Files Affected:
runoff.c
Description:
Fixed the checks on the lower bound of soil moisture. Previously, the condition was (moist[lindex]+ice[lindex]) < residmoist[lindex] which led to liquid soil moisture falling below residual during winter conditions. This has been changed to moist[lindex] < residmoist[lindex] to eliminate these errors and make the logic consistent with the rest of the code. TJB ```
Variable "moist" in runoff() has different meaning than in other functions.
``` Files Affected:
runoff.c
Description:
Renamed all moist variables to liq if they only refer to liquid soil moisture. This makes the logic much easier to understand. TJB ```
Soil moisture drops below residual for sub-daily time step interval and FULLENERGY or FROZENSOIL = TRUE.
``` Files Affected:
runoff.c
Description:
Fixed the checks on the lower bound of soil moisture. Previously, the lower bound on soil moisture was (liquid + ice >= residual moisture) and the way this bound was enforced was to reduce baseflow to bring total liquid + ice content back up to residual, but this compensation was limited so that the compensation would never be larger than baseflow (i.e. the compensation would never create negative baseflow).
However, this condition had two main problems: 1. it allowed liquid moisture to fall to very low values (due to evap being over-estimated in arno_evap() and transpiration(), and/or Q12 being over-estimated earlier in runoff() due to bad numerics) in the presence of ice, and 2. it had limited ability to recover from these low values because baseflow (already small) wasn't allowed to be reduced below 0.
This behavior has been replaced with the following conditions: For unfrozen soil, the new lower bound is (liquid >= residmoist) while for frozen soil, the new error condition is (liquid >= minliqfraction * residmoist) where minliqfraction = the value returned by maximumunfrozenwater() for a unit maximum moisture content.
If overestimates of evap or drainage do occur, baseflow is allowed to be reduced below 0 to bring liquid water back up to the lower limit. Then, further down in the code, if baseflow is negative, bottom-layer evap is reduced by (-baseflow) and baseflow is set to 0. TJB ```
** Description of changes from VIC 4.1.0 beta r2 to VIC 4.1.0 beta r3 **
New Features:
Improved lake model
``` Files Affected: CalcBlowingSnow.c, LAKE.h, IceEnergyBalance.c, icemelt.c, initializeatmos.c, initializelake.c, lakes.eb.c, readlakeparam.c, solvesnow.c, surfacefluxes.c, vicNl.h, vicNldef.h, waterenergybalance.c, waterunder_ice.c
Description: This fixes the following bugs:
Lake model crashes when lakes fill up
Lake model crashes when lakes dry out
And introduces the following new features:
Blowing snow sublimation computed over lakes
Tuning of default lake profile (parabolic to square)
The new parameter BETA in LAKE.h can be used to control the shape of the automatic lake profile (when the global option LAKE_PROFILE is FALSE). BETA=0.5 is strongly parabolic, while BETA=0.001 is almost square (vertical walls).
If LAKEPROFILE=FALSE, the lake parameter file from VIC 4.1.0 beta 2 can be used without any changes. However, if LAKEPROFILE=TRUE, the lake parameter file must now contain a (depth,area) pair for each lake node. See read_lakeparam.c for details. ```
VIC now supports ALMA input and output variables.
``` Files Affected: Makefile, convforcevic2alma.c, convresultsvic2alma.c, closefiles.c, displaycurrentsettings.c, distprec.c, getforcetype.c, getglobalparam.c, initializeatmos.c, initializeglobal.c, makeinandoutfiles.c, putdata.c, readatmosdata.c, vicNl.h, vicNldef.h, writedata.c, writeforcingfile.c
Description: VIC now supports ALMA input and output variables. To have VIC read ALMA input (forcing) variables, all that is required is to identify them by the appropriate names in the forcing section of the global parameter file. The appropriate names are listed in vicNldef.h. To have VIC write ALMA output variables, it is necessary to include the option ALMAOUTPUT in the global parameter file and set it to TRUE. This option does not affect model physics. ```
State file is now written at the END of the final timestep of the date indicated in the global parameter file.
``` Files Affected: dist_prec.c
Description: Previous versions of VIC wrote the state file at the beginnning of the date indicated (via STATEYEAR, STATEMONTH, and STATEDAY) in the global parameter file. For sub-daily model time steps, this meant that the simulation's end could not be aligned exactly with the writing of the state file, since the model would continue simluating for the remainder of the final day after writing the state file. This created difficulties when running VIC in real-time simulations, in which the forcings are broken up into short time periods and the previous state file must be used as the initial condition for the next time period.
Now that the state file is written at the end of the final timestep of the date indicated in the global parameter file, it is possible for the end of a forcing file, the end of the simulation, and the timing of the state file all to align on the same time. This simplifies re-starting the model for a forcing file that begins immediately after the previous forcing file ended, since the state file now is equivalent to the initial condition at the beginning of the new forcing file. ```
EQUAL_AREA global parameter option
``` Files Affected: displaycurrentsettings.c, getglobalparam.c, initializeglobal.c, readlakeparam.c, vicNl_def.h
Description: New global parameter option. When EQUALAREA is TRUE, all grid cells are assumed to have the same area, and the global parameter RESOLUTION is interpreted to store the grid cell area in km^2. When EQUALAREA is FALSE, grid cells are assumed to have the same side length in degrees, and RESOLUTION is interpreted to store the grid cell side length in degrees, as before. ```
New vicInterp executable
``` Files Affected: Makefile, checkfiles.c, closefiles.c, getglobalparam.c, read_soilparam.c, vicNl.c
Description: Now users can create a stand-alone executable called "vicInterp" by typing "make interp". This executable is a stripped-down version of VIC that reads a set of forcing files and outputs diurnally-varying sub-daily forcings. The interpolation scheme, based on the Thornton and Running (mtclim) algorithm, can convert from from daily Prec, Tmin, Tmax, and Wind to sub-daily Prec, AirTemp, Shortwave and Longwave radiation, Wind, Pressure, and air Density. The interpolated forms of Prec, Wind, Pressure, and Density do not vary diurnally but are assumed constant during each day.
vicInterp is vicNl, compiled with the OUTPUTFORCE option set to TRUE. As such, vicInterp can read a standard VIC global parameter file. While it will ignore many of the options, it understands (and requires) the following: TIMESTEP STARTYEAR STARTMONTH STARTDAY STARTHOUR ENDYEAR ENDMONTH ENDDAY GRIDDECIMAL FORCING1 NTYPES FORCETYPE FORCEFORMAT FORCEENDIAN FORCEDT FORCEYEAR FORCEMONTH FORCEDAY FORCEHOUR SOIL RESULTDIR In addition, the following options are optional: BINARYOUTPUT ALMAOUTPUT
For example, if FORCEDT is 24 and TIMESTEP is 3, vicInterp will interpolate the input daily forcings to a 3-hour time step. If ALMAOUTPUT is TRUE, these output forcings will be standard ALMA variables.
This new feature also involves an update to the OUTPUT_FORCE option that fixes a bug in which output files were not properly closed before exiting. This prevented all of the output data from being completely written. ```
Bug Fixes:
Large water balance errors in daily water balance mode when snow is present
``` Files Affected: surface_fluxes.c
Description: Fixed broken snow step in surface_fluxes.c. Per-snow-step snow quantities were being reset at the beginning of each canopy-surface energy balance iteration, preventing snow characteristics from being accumulated over all snow steps, and resulting in large water balance errors. Now per-iteration snow quantities are stored separately from per-snow-step quantities. ```
Aerodynamic resistance incorrect in output fluxes file
``` Files Affected: IceEnergyBalance.c, LAKE.h, SnowPackEnergyBalance.c, calcsurfenergybal.c, fullenergy.c, funccanopyenergybal.c, funcsurfenergybal.c, icemelt.c, lakes.eb.c, putdata.c, snowintercept.c, snowmelt.c, solvesnow.c, surfacefluxes.c, vicNl.h, vicNldef.h, wetlandenergy.c
Description:
In 4.1.0 beta r2 and earlier, the aerodynamic resistance written to the
output fluxes file rarely reflected the value actually used in flux
computations. This has been fixed.
VIC actually computes an array of 3 different aerodynamic resistances,
as follows:
aero_resist[0] : over vegetation or bare soil
aero_resist[1] : over snow-filled overstory
aero_resist[2] : over snow pack
VIC determines which element of the array to use depending on the
current vegetation type and whether snow is present. In addition, in most cases, VIC applies a stability correction to this aerodynamic resistance before using it in flux computations. Furthermore, when the current vegetation tile contains overstory and snow is present on the ground, aeroresist[2] is used for snow pack flux computations and either aeroresist[1] or aero_resist[0] is used for canopy flux computations, meaning that two different aerodynamic resistances are in use in the same time step.
However, VIC 4.1.0 beta r2 always wrote the uncorrected value of
aero_resist[0] to the fluxes file.
In 4.1.0 beta r3 and later, the value written to the fluxes file is the
actual value used in flux computations, including any corrections that
were applied. In the case mentioned above in which two different
aerodynamic resistances are in use at the same time, the one used for
the snow pack is written. In addition, the aerodynamic resistance of
the canopy air/surrounding atmosphere interface is not tracked.
```
Aerodynamic resistance not correctly aggregated for output
``` Files Affected: convresultsvic2alma.c, putdata.c, vicNldef.h
Description: In previous releases, aerodynamic resistance (outdata->aeroresist) was aggregated by a simple area-weighted average over veg tiles. This led to an aggregate value that was not the true effective resistance of the entire grid cell. Since evaporation is proportional to 1/aeroresist, it is (1/aeroresist), or the aerodynamic conductivity, that should be averaged over the grid cell. Therefore, a new variable, outdata.aerocond, was created for the purposes of aggregation. After aggregation, outdata.aeroresist is computed as 1/outdata.aerocond.
The effect of the change is most pronounced when there is a large range of values of aerodynamic resistance among the veg tiles in a grid cell. The effective aerodynamic resistance, computed the new way, will tend to be smaller than the old way when the values cover a wide range. However, the effective aerodynamic resistance will never be smaller than the smallest value among the various veg tiles in the cell. ```
State variables for SPATIALFROST and LAKEMODEL options not stored in state file.
``` Files Affected: distprec.c, initializemodelstate.c, readinitialmodelstate.c, vicNl.h, writemodelstate.c
Description: State variables for SPATIALFROST and LAKEMODEL options were not stored in state files, causing these variables to be reset to default values when reading from an initial state file. This has been fixed.
NOTE: this fix involves a change in the format of state files which makes state files used with 4.1.0 beta 3 incompatible with earlier releases (and vice versa). ```
ARNO_PARAMS global parameter option changed to BASEFLOW
``` Files Affected: displaycurrentsettings.c getglobalparam.c global.param.sample initializeglobal.c readsoilparam.c readsoilparamarc.c vicNl_def.h
Changed the name of the ARNO_PARAMS global parameter option to
BASEFLOW. The meaning of the ARNO_PARAMS option was actually
opposite to its name: when ARNO_PARAMS was FALSE, VIC would
interpret the first four parameters in the soil parameter file
to be the standard ARNO soil parameters Ds, Dsmax, Ws, and c,
while when ARNO_PARAMS was TRUE, VIC would interpret the first
four parameters to be d1, d2, d3, and d4, the soil parameters
used in Nijssen et al. (2001). The new option now can take
values of "ARNO" and "NIJSSEN2001". When BASEFLOW == NIJSSEN2001,
VIC assumes the soil parameter file contains d1, d2, d3, and d4.
When BASEFLOW == ARNO, VIC assumes the soil parameter file
contains Ds, Dsmax, Ws, and c.
```
Removed some snowband output
``` Files Affected: write_data.c
Description: Removed net sw radiation, net lw, albedo, latent heat flux, sensible heat flux, ground heat flux ```
STATE file option is now specified in global file, not in user_def.h at compile time
``` Files Affected:
display_current_settings.c
dist_prec.c
get_global_param.c
initialize_global.c
open_state_file.c
user_def.h
vicNl.c
vicNl.h
vicNl_def.h
write_model_state.c
Previously, to be able to read/write state files, VIC required
users to define SAVE_STATE to be TRUE in user_def.h and
recompile VIC, in addition to having the correct settings of
INIT_STATE, STATENAME, STATEYEAR, STATEMONTH, and STATEDAY in
the global parameter file.
This was both unnecessary and confusing. Setting SAVE_STATE
to FALSE did not improve VIC performance noticeably, and
having both a SAVE_STATE compile option and state file
information in the global parameter file only led to mistakes
in which the user made a change in one place without realizing
a change needed to be made elsewhere.
Now VIC behaves as follows:
1. To read an initial state file, the following line
must be in the global parameter file:
INIT_STATE init_state_filename
where init_state_filename is the name of the initial state
file. If this line is absent or commented out (preceded by a
"#"), VIC will start from default initial conditions.
2. To write a state file during the simulation, the
following lines must be in the global parameter file:
STATENAME state_file_name
STATEYEAR state_year
STATEMONTH state_month
STATEDAY state_day
where state_file_name is the path and prefix of the file to
save the state information in (the simulation date on which
the state file is saved will be appended to the state file
name), and state_year, state_month, and state_day are the
year, month, and day of the simulation on which to save state.
The state will be saved AFTER the FINAL time step of that
date. If all of these lines are absent or commented out, VIC
will not save a state file. If some (but not all) of these
lines are present, VIC will give an error.
```
Now reads extra_veg from state file
Files Affected:
read_initial_model_state.c
Reverting from version 5.10 to 5.9 in surface_fluxes.c
``` Files Affected: surface_fluxes.c
Energy balance errors had been introduced in the changes from 5.9 to 5.10.
This is an intermittent problem that appears to depend on versions of FreeBSD
when compiling with the optimization flag. This temporary reversion should
be okay as long as the time steps are sub-daily. GCT
```
Skip reading/writing of snow band for areafract <= 0
``` Files Affected: readinitialmodelstate.c writemodel_state.c
This will reduce the size of the statefile. GCT
```
Lake model energy terms NaN for southern hemisphere lakes
``` Files Affected: lakes.eb.c
The computation of ks in the eddy() function was attempting to compute
ks=6.6pow(sin((double)latPI/180.),0.5)pow(wind,-1.84); however, in the southern hemisphere, lat is negative and ks evaluates to NaN, causing lake temperatures to all become NaN. This line has been replaced by ks=6.6pow(sin((double)fabs(lat)PI/180.),0.5)pow(wind,-1.84); This appears to fix the problem. TJB ```
Miscellaneous fixes for memory leaks and uninitialized variables.
``` Files Affected:
free_dist_prcp.c
get_global_param.c
initialize_lake.c
initialize_model_state.c
lakes.eb.c
make_dmy.c
mtclim42_vic.c
output_list_utils.c
parse_output_info.c
put_data.c
read_veglib.c
solve_snow.c
vicNl.c
vicNl.h
Description:
Miscellaneous fixes for memory leaks and uninitialized variables.
Also changed comments in vicNl.h to reflect type changes introduced
in 4.1.0._r4h TJB
```
** Description of changes from VIC 4.1.0 beta r1 to VIC 4.1.0 beta r2 **
New Features:
"-v" and "-o" command-line options and display of run/compile-time options
``` Files Affected: cmdproc.c, displaycurrentsettings.c, getglobalparam.c, global.h, vicNl.c, vicNl.h, vicNldef.h
Description:
In VIC 4.1.0 beta r2, if VERBOSE is TRUE, all compile-time options (from
user_def.h) and run-time options (from your global parameter file) are
displayed for you at the beginning of a model run. If you are saving
your model output to a log file, this information will be stored with
your log, so you will have a record of the option settings that produced
the results of that particular model run.
The new "-v" option will display the release number of your vicNl executable. For example, typing: vicNl -v gives ***** VIC Version 4.1.0 Beta Release 2 *****
Meanwhile, the new "-o" option displays the current compile-time
options. One benefit of this option is that you can see what the
options in user_def.h were set to when vicNl was compiled, without
having to start a model run. Since your version of user_def.h may have
changed since you compiled vicNl, this is the most reliable way to see
what these options are set to. For example:
gen.hydro.washington.edu 175: vicNl -o
***** VIC Version 4.1.0 Beta Release 2 - Current Model Settings *****
COMPILE-TIME OPTIONS (set in user_def.h)
Output to Screen: OUTPUTFORCESTATS FALSE VERBOSE TRUE
Input Files: NO_REWIND TRUE
Output Files: LDASOUTPUT FALSE LINKDEBUG FALSE OPTIMIZE FALSE OUTPUTFORCE FALSE SAVESTATE FALSE
Simulation Parameters: CLOSEENERGY FALSE COMPUTETREELINE FALSE LAKEMODEL FALSE LOWRESMOIST FALSE QUICKFS FALSE SPATIALFROST FALSE SPATIALSNOW FALSE
Maximum Array Sizes: MAXBANDS 10 MAXFRONTS 3 MAXLAKENODES 20 MAXLAYERS 3 MAXNODES 18 MAX_VEG 12
Snow Constants: NEWSNOWALB 0.850000 SNOWALBACCUMA 0.940000 SNOWALBACCUMB 0.580000 SNOWALBTHAWA 0.820000 SNOWALBTHAWB 0.460000 TraceSnow 0.030000
Other Constants: LAIWATERFACTOR 0.200000 LWAVECOR 1.000000 MAXITFE 25 ```
Automatic recompilation on updates to *.h
``` Files Affected: Makefile
Description:
In VIC 4.1.0 beta r1, updating a .h file and recompiling VIC would not
result in recompilation of files that depend on the .h file, unless a "make clean" command was issued first. Now, if any .h files are updated, all dependent .c files are recompiled on the next "make". ```
NEWARNOTYPE global option is now ARNO_PARAMS
``` Files Affected: getglobalparam.c, readsoilparam.c, vicNldef.h
Description: Changed the name of the global option NEWARNOTYPE to be ARNOPARAMS. "NEWARNO_TYPE" is confusing, since this option will not be new forever, and doesn't refer to a "type" but rather a set of parameters.
NOTE: This change requires the user to replace all occurrences of "NEWARNOTYPE" in their global control files with "ARNO_PARAMS". ```
Bug Fixes:
Spurious condensation at low temperatures
``` Files Affected: arno_evap.c
Description:
Changed logic of evap limit check to avoid creating spurious
condensation. In VIC 4.1.0 beta r1, whenever evaporation > (liquid
moisture - residual moisture), evaporation would be set to (liquid
moisture - residual moisture). However, at low temperatures, when most
or all soil moisture is frozen, liquid moisture < residual moisture,
causing (liquid moisture - residual moisture) to be negative. Any non-
negative evap would be greater than this, resulting in evap getting set
to (liquid moisture - residual moisture), which would be negative (i.e.
condensation). This artificially created condensation in whatever
amount necessary to bring liquid moisture up to residual, causing 1)
large latent heat flux, 2) incorrect surface temperatures, 3) occasional
inability for calc_surf_energy_bal to converge in root_brent, and 4)
spuriously high runoff and baseflow. Now there is an added condition
that liquid moisture > residual moisture for evap to be capped at
(liquid moisture - residual moisture).
NOTE: This fix results in lower runoff and baseflow in unvegetated areas
with frozen soils, and may require recalibration of soil parameters.
```
Incorrect baseflow limits
``` Files Affected: runoff.c
Description:
In 4.1.0 beta r1, runoff.c checked for the wrong bounds on baseflow,
allowing baseflow to become negative when liquid soil moisture < residual
moisture. These bounds have been fixed in 4.1.0 beta r2, as follows:
baseflow is not allowed to exceed (liquid soil moisture - residual moisture);
when baseflow < 0, baseflow is set to 0; when baseflow > 0 and the resulting
soil moisture < residual moisture, water is taken out of baseflow and
given to the soil as follows:
if baseflow > (residual moisture - soil moisture), then
baseflow -= (residual moisture - soil moisture);
soil moisture += (residual moisture - soil moisture);
else
soil moisture += baseflow;
baseflow = 0;
NOTE: This fix may result in small changes in baseflow and evaporation.
```
Runs using initial state files starting at state file date rather than global start date
``` Files Affected: checkstatefile.c
Description:
In 4.1.0 beta r1, check_state_file.c would increment the index of the
forcing data array until it reached the record corresponding to the date
stored in the state file. This caused the simulation to start at the
date at which the state file was saved rather than the start date
specified in the global parameter file. If the state file's date was
earlier than the start date in the global parameter file, the index
would be incremented until a segmentation fault occurred. This has
been fixed in 4.1.0 beta r2 so that the start date in the global parameter
file is always the start date of the simulation. The date stored in
the initial state file is ignored.
NOTE: If you have been relying on the state file to dictate when your
simulations start, this fix may require you to change your global
parameter file so that STARTYEAR, STARTMONTH, etc. reflect the start
date/time you want.
```
Incorrect sublimation values for BLOWING option
``` Files Affected: CalcBlowingSnow.c, IceEnergyBalance.c, SnowPackEnergyBalance.c, calcsurfenergybal.c, funcsurfenergybal.c, icemelt.c, lakes.eb.c, latentheatfromsnow.c, putdata.c, snowmelt.c, solvesnow.c, surfacefluxes.c, vicNl.h, vicNl_def.h
Description: Fixed 3 bugs in the sublimation terms: 1) subsurface was wrong when snow step was not 1 hour, 2) subblowing was wrong under certain conditions, and 3) subblowing and subsurface did not contain the contribution from lakes, even though subtotal did. The fix establishes the convention that the internal variables VaporMassFlux, BlowingMassFlux, and SurfaceMassFlux always have units of kg/m2s; and that internal variables vaporflux, blowingflux, and surfaceflux always have units of m/timestep. Unnecessary terms were removed from the parameter lists of several functions.
NOTE: The effects of this fix on major water balance terms such as runoff, baseflow, evaporation, etc. should be very small.
NOTE 2: The lake contribution to sub_blowing is currently set to 0. ```
Negative incoming shortwave radiation at high latitudes
``` Files Affected: mtclim42_vic.c
Description:
In 4.1.0 beta r1, when sub-daily shortwave radiation is estimated from
daily min/max temperatures, negative values occasionally are calculated
in coastal areas above the Arctic Circle in winter. Now, if estimated
sub-daily incident shortwave is negative, it is set to 0.0.
```
Undefined daily precipitation for deserts
``` Files Affected: mtclim42_vic.c
Description:
In 4.1.0 beta r1, if a grid cell's annual precipitation (specified in
the soil parameter file) is 0, then the adjusted daily precipitation
calculated in mtclim42_vic.c ends up being undefined. In 4.1.0 beta r2
this has been fixed.
More specifically, the MTCLIM 4.2 algorithm (which VIC uses for
estimating sub-daily forcing values) was originally set up to expect a
base precipitation as an input, and to translate this base precip into
a site-specific precip via an adjustment function. The adjustment
function multiplies the base precip by the ratio of site_isohyet to
base_isohyet to get site precipitation. In calling the MTCLIM 4.2
functions, VIC sets site_isohyet and base_isohyet to the grid cell's
annual precipitation. So this ratio should always = 1. However,
when annual precipitation is 0.0, this ratio is undefined. So, the
fix is to set the ratio to 1 when both site_isohyet and base_isohyet
are 0 (or very small). (found by Liz Clark)
```
Snow_flux incorrectly set to Tcanopy in fluxes output file
``` Files Affected: put_data.c
Description: In 4.1.0 beta r1, the snow_flux output variable was incorrectly set to Tcanopy. This has been corrected. ```
Incorrect value for sub_snow in fluxes output file
``` Files Affected: write_data.c
Description: Replaced output of subsnow[0] in fluxes file with subtotal. ```
Special case in Penman equation
``` Files Affected: penman.c
Description:
Changed
if (vpd > 0.0 && evap < 0.0)
to
if (vpd >= 0.0 && evap < 0.0)
to correctly handle evap when vpd == 0.0. (found by Justin Sheffield
at Princeton)
```
Rint() function not supported on all platforms
``` Files Affected: computedz.c, initializeatmos.c, readsoilparam.c, readsoilparam_arc.c
Description:
Replaced rint(something) with (float)(int)(something + 0.5) to
handle rounding without resorting to rint(), which isn't supported
on all platforms. (found by Justin Sheffield at Princeton)
```
Global parameter initialization
``` Files Affected: initialize_global.c
Description:
Initialize ARC_SOIL, COMPRESS, and ARNO_PARAMS to FALSE. Also changed
limit on loop over forcing types from hard-coded 17 to variable
N_FORCING_TYPES. (found by Justin Sheffield at Princeton)
```
Bottom soil node thickness initialization
``` Files Affected: initializemodelstate.c
Description:
Initialize soil_con->dz_node[Nnodes] to 0.0, since it is accessed in
set_node_parameters(). (found by Justin Sheffield at Princeton)
```
Canopy evaporation and distributed precipitation
``` Files Affected: surface_fluxes.c
Description:
Fixed initialization of canopyevap to initialize for every value of
dist, rather than just dist 0. (found by Justin Sheffield at Princeton)
```
Output debug file error
``` Files Affected: write_atmosdata.c
Description:
No longer close the debug file, since the next cell must write to it.
(found by Justin Sheffield at Princeton)
```
Calculation of deltaH when FS_ACTIVE is FALSE
``` Files Affected: funcsurfenergy_bal.c
Description:
Added check that both FS_ACTIVE and FROZEN_SOIL are true before
adjusting *deltaH. This is just a safety measure; ice and ice0 should
both be 0 when FS_ACTIVE is FALSE. (found by Justin Sheffield at
Princeton)
```
Root_brent error message clarification
``` Files Affected: calcatmosenergybal.c, calcsurfenergybal.c, frozensoil.c, icemelt.c, rootbrent.c, snowintercept.c, snow_melt.c, vicNl.h
Description:
Instead of printing warning or error messages, root_brent.c now
passes descriptions of the errors to the functions that called it, leaving it to them to describe the specific error and its consequences. In 4.0.4, root_brent's messages sometimes were wrong. ```
Display current grid cell number for arc/info soil files
``` Files Affected: readsoilparamarc.c
Description:
In 4.1.0 beta r1, for arc/info-format soil files, the current grid
cell is not displayed (for regular-format soil files, it is displayed).
Now the current grid cell number is always displayed.
```
Inconsistent format in state file
``` Files Affected: writemodelstate.c
Description: Removed initial space on veg/band info line in ASCII file. ```
Pending Issues:
Lake model crashes when lake level gets too high
Lake model crashes when lake level gets too low
COMPUTE_TREELINE option non-functional
Description:
This issue is waiting for completion of a treeline-computation scheme
that allows landcover fractions to be stated explicitly as a function
of elevation band.
Lakes smeared across multiple elevation bands
Description:
Currently, VIC assumes that the percentage of grid cell area covered by
lakes is constant throughout the grid cell, and therefore when multiple
elevation bands are specified for a grid cell, the lake percentage is
distributed evenly across all elevations. However, when modeling large
lakes, this assumption does not hold; the bulk of the lake coverage may
be due to a single large lake, which by definition cannot exist in
multiple elevation bands. Therefore, we need a way of explicitly
specifying lake coverage as a function of elevation.
Updates 7-30-2003: VIC 4.1.0 r1
(1) Added support for ASCII as well as Binary state files (NOTE: ASCII
state files were added for easier editing when trying to start the
model from observed state - Only Binary state files will produce
identical runs if used to store and restart from the model state).
Added BINARY_STATE_FILE to the global file, if TRUE state file I/O
is in binary, if FALSE it is ASCII.
(2) Made certain that local NOFLUX flag is set in calc_surf_energy_bal.c
every time the routine is executed.
(3) write_data.c: Corrected output of sub_snow variable to item [0]
rather than a point - will need to decide what parts of this array
are important to output.
(4) Modified runoff.c so that only the top two layers are used when
computing infiltration. Previously, all but the bottom layer was
used. Therefore this only affects you if you tried running with
more than three layers. This change was made as it makes more sense
for a situation where you are trying to improve the representation
of the soil column by increasing the resolution (and perhaps depth)
of the soil column.
(5) snow_utility.c (snow_density): Added check to keep compression from
aging from exceeding the actual depth of the snowpack.
(6) solve_snow.c: Added check so that MELTING flag is only TRUE if melt
occurs in the melt season - currently this is defined between March 1
and October 1. Otherwise the MELTING flag can trigger rapid very
early season melt.
Updates 4-21-2003: Mering codes to form VIC 4.1.0 r0
``` From comparison of LatestAdminSource and LatestTestSource
Dynamic allocation of as many arrays and structures as are currently
used by the VIC model cause electric fence (a memory debugging tool)
to bog down/fail in the allocation process. As the allocation of
memory is unlikely to be the cause of new memory errors, hard wired
memory can be used instead, letting eleectric fence penetrate further
into the code.
allocatmos.c: (KAC) MEMORYDEBUG update
Modified so that dynamic allocation of the atmospheric data arrays
does not occur when the debugging code is linked to the model.
This makes it possible to use electric fence to debug memory errors
without changing the model code. Previously, dynamic allocation
of the atmospheric arrays was only skipped if VIC was configured
for optimization work.
vicNldef.h: (KAC) MEMORYDEBUG update
See alloc_atmos.c.
Newest version of the model had water balance errors when using
distributed precipitation. Model crashes were also witnessed. Fixed
errors introduced by other model updates.
arnoevap.c: (KAC) DISTPRCP fix
Moved unit conversion of moistresid outside of the distributed
precipitation loop. This prevents it from being multiplied by
D1 * 1000 twice for the DRY fraction of the grid cell.
initializemodelstate.c: (KAC) DISTPRCP fix
Modified to initialize soil and vegetation parameters for the dry
grid cell fraction, if distributed precipitation is activated.
snowintercept.c: (KAC) DISTPRCP fix
Added check of intercepted before mass balance error calculation.
Since interception quantity can be greater than Wdmax when snow
is present, the routine could return dew values higher than maximum
in a time step when intercepted snow melted. If there is no other
snow, and distributed precipitation is active this could cause the
model to crash in redistributeduring_storm as it will be unable to
conserve water when too much water is in the canopy.
** Make sure that all updates from surface_fluxes.c are accounted for after merge with 4.0.4beta ** ```
``` From comparison of LatestAdminSource (updated above) and LaurasNewestSource
IceEnergyBalance.c: (LCB) LAKEWETLAND updates
SnowFlux variable renamed to qf to match the lake-ice model
documentation.
LAKE.h: (LCB) LAKEWETLAND updates
Modified some model parameters (need to check with Laura as to their
applicability outside dissertation basins). Also updated profiles
for several subroutines.
SnowPackEnergyBalance.c: (KAC) OTHER
Certain constant definitions have been moved to vicNldef.h to
standardize the location of model constants. This is especially
useful for eliminating redundant and unused constant definitions.
SnowPackEnergyBalance.c: (LCB) BLOWINGSNOW update
New variables are passed to the routine and along to
latentheatfromsnow to add the effects of blowing snow to the
accumulation and ablation of the snowpack.
calcsurfenergybal.c: (LCB) BLOWINGSNOW update
Modified to include the effects of blowing snow in the surface
energy balance calulations.
closefiles.c: (LCB) LAKEWETLAND updates
Now closes the lake and wetland debugging file.
fullenergy.c: (LCB) BLOWINGSNOW updates
Modified to handle blowing snow.
fullenergy.c: (LCB) LAKEWETLAND updates
Modified to output lake model variables during debugging.
funcsurfenergybal.c: (LCB) BLOWINGSNOW updates
Modified to handle blowing snow.
funcsurfenergybal.c: (KAC) OTHER
Modified so that the calculation of sensible heat flux so that
occurs in all model versions. This eliminates a problem in
WB mode where sensible heat flux was not set to 0, instead it
showed the cumulative sensible heat flux from the snowpack.
getglobalparam.c: (LCB) BLOWINGSNOW update
Added BLOWINGSNOW parameter
getglobalparam.c: (Jenny?) NEWARNOTYPE
Added parameter for reading Bart's new Arno parameters
getglobalparam.c: (LCB) LAKEWETLAND updates
Added PRTLAKE parameter to output lake variables during debugging.
icemelt.c: (LCB) LAKEWETLAND updates
Modified method by which lake coverage fraction and ice height
are updated? ** Check with Laura **
initializeglobal.c: (LCB) LAKEWETLAND updates
Added the initialization of PRTLAKE to the list of debugging flags.
initializeglobal.c: (LCB) BLOWINGSNOW update
Added initialization of BLOWINGSNOW to the list of global parameters.
initializelake.c: (LCB) LAKEWETLAND updates
Made improvements to the initialization process for lakes.
** Check with Laura **
initializemodelstate.c: (LCB) LAKEWETLAND updates
Modified to initialize lake variables.
initializesnow.c: (LCB) BLOWINGSNOW update
Modified to initalize blowingsnow variable.
initializesoil.c: (LCB) LAKEWETLAND updates
Modified to initialize wetland soil moisture.
initializeveg.c: (LCB) LAKEWETLAND updates
Modified to get the maximum number of vegetation types passed to
it. This allows the maximum number of vegetation types to include
the wetland vegetation fraction when the lake model is active.
lakes.eb.c: (LCB) LAKEWETLAND updates
Modifications were made to improve handling of snow and ice and to
make the lake algorithm interact with the wetland algorithm.
latentheatfromsnow.c: (LCB) BLOWINGSNOW update
Modified to handle the effects of blowing snow.
makedistprcp.c: (LCB) LAKEWETLAND updates
Modified to allocate vegetation variables for the wetland
vegetation class.
makeinandoutfiles.c: (LCB) OTHER
Modified to print notification that the output fluxes file will be
in a binary format.
opendebug.c: (LCB) LAKEWETLAND updates
Modified to open lake model debugging file.
putdata.c: (LCB) LAKEWETLAND updates
Updated output of lake variables to reflect algorithm changes.
putdata.c: (LCB) BLOWINGSNOW update
Added output variables for blowing snow algorithm.
readlakeparam.c: (LCB) LAKEWETLAND updates
Modified to reflect updates to the lake and wetland algorithms.
readsoilparam.c: (JA) OTHER
Modified to convert from Bart's new Arno parameters into the
standard parameters (Dsmax, Ds, Ws, and c).
readvegparam.c: (LCB) BLOWINGSNOW update
Added code to read in blowing snow parameters.
snowmelt.c: (LCB) BLOWINGSNOW update
Modified to handle blowing snow.
soilconduction.c (setnodeparameters): (KAC) OTHER
Modified to correct differences between calculations to determine
maximum node moisture and node moisture, so that nodes on the
boundary between soil layers are computed the same way for both.
soilconduction.c (distributenodemoistureproperties): (KAC) OTHER
Modified to check that node soil moisture is less than or equal
to maximum node soil moisture, otherwise an error is printed to
the screen and the model exits.
solvesnow.c: (LCB) BLOWINGSNOW update
Modified to handle the effects of blowing snow.
surfacefluxes.c: (LCB) BLOWINGSNOW update
Modified to add the effects of blowing snow.
userdef.h: (KAC) SPATIALSNOW
Added TraceSnow to indicate the minimum depth of new snow required
to reset the snow surface albedo from the ablation to the
accumulation curve.
vicNl.c: (LCB) LAKEWETLAND updates
Updated storage of lake water for water balance calculations.
vicNl.h: (LCB,KAC,JA)
Updated to reflect model changes.
vicNldef.h: (LCB,KAC,JA)
Updated to reflect model changes.
waterenergybalance.c: (LCB) LAKEWETLAND updates
Updated to reflect changes in algorithm structure.
waterunderice.c: (LCB) LAKEWETLAND updates
Updated to reflect changes in algorithm structure.
writedata.c: (LCB) LAKEWETLAND updates
Updated output of model for lakes and wetlands algorithm.
** No lake variables are output when using LDAS format. **
writedata.c: (KAC) BLOWING_SNOW update
Added additional sublimation terms to LDAS and standard snow
output files.
Added: CalcBlowingSnow.c: (LCB) BLOWINGSNOW update Subroutine to compute the effects of blowing snow on snowpack sublimation. wetlandenergy.c: (LCB) LAKE_WETLAND updates Subroutine computes the surface energy balance for exposed wetland vegetation. ```
``` From comparison of LatestAdminSource (updated above) and SOURCE_4.0.4beta
CalcAerodynamic.c: (KAC) CANOPYENERGYBALANCE update
This routine was modified to store wind speed, aerodynamics
resistance, reference height, roughness lengh and displacement
height for three conditions: (1) snow-free, (2) snow-covered and
(3) canopy wind speed.
SnowPackEnergyBalance.c: No Changes Needed
StabilityCorrection.c: (KAC) OTHER
Moved definition of G (gravity) to vicNldef.h to provide a
consistant location for all model constants.
allocatmos.c: No Changes Needed
arnoevap.c: No Changes Needed
calclongwave.c: No Changes Needed
calcrainonly.c:
Why does version 4.0.4 check to see if MAXSNOWTEMP <= MINRAINTEMP,
rather than justt less than as the new version does? Was this a bug
or personal preference? ** Check This **
calcsurfenergybal.c: (KAC) CANOPYENERGYBALANCE update
Modified to work with the canopy energy balance updates.
calcsurfenergybal.c: (KAC) SPATIALFROST update
Modified to work with the spatial frost updates.
calcsurfenergybal.c: (KAC) QUICKSOLVE update
Modified determine the minimum number of soil thermal nodes to
capture the maximum amount of the surface energy flux exchange.
This reduces solution time with frozen soil significantly, but
increases energy balance errors.
canopyenergybal.c: (KAC)
This include changes for spatial snow and frost plus the new
canopy energy balance. No notes indicate fixes made to v4.0.4
that need to be incorporated.
- converted internal time step accounting to seconds from hours
- added check to further restrict evaporative losses if ice content
is less than wilting point, otherwise dry soils can evaporate too
much if ice is present.
checkfiles:
Added lines for lake file
checkstatefile.c: (KAC) STATEFILE updates
Modified to work with new binary state file, fixed in version 4.0.4.
closefiles:
Added lines for lake file
compressfiles.c: No changes made
Modified to nice the backgrounded file compression processes.
distprcp.c: (KAC) DISTPRCP, TREELINE and STATEFILE updates
This will have to be carefully merged, as there are several fixes
and improvements which should be maintained. Some of these include
fixes to the accounting storms, updates for spatial frost and snow,
updates for the state file, updates to account for the treeline.
** This will involve some extra effort, especially since distributed
precipitation variables are now account for in several locations. **
--> DRYTIME and STILLSTORM are now computed separatly for vegetation
types, this needs to be incorporated into state file.
frozensoil.c: (KAC)
Modified so that soil layer ice content is only calculated if the
frozen soil algorithm is implemented and active in the current grid
cell.
fullenergy.c: (KAC)
Added lake algorithm, and canopy energy balance updates. Nothing
appears to be needed from v4.0.4.
funcsurfenergybal.c: (KAC)
updated for spatial snow and frost as well as the canopy energy
balance. No important changes in v4.0.4 found.
getglobalparam.c: (KAC)
Nothing new in v4.0.4, all additions are in the admin code.
initializeatmos.c: (KAC)
Modified to initialize atmospheric pressues in Pa rather than kPa,
all calculations now use Pa eliminating internal conversions. Added
treeline calculations. Added output of forcing file statistics (this
is in addition to the output of forcing files which was in v4.0.3).
initializeglobal.c: (KAC)
Added initialization of lake variables, blowing snow variables and
QUICKSOLVE for frozen soil energy fluxes.
initializemodelstate.c: (KAC)
Updated for canopy energy balance, new model state file, and lakes
and wetlands algorithm.
initializenewstorm.c: (KAC)
Modified to work with spatial frozen soil.
initializesnow.c: (KAC)
Modified to initialize blowing snow and spatial snow algorithm
variables.
makedistprcp.c: (LCB)
Modified to include wetland variables in the new structures.
makedmy.c:
Only white space changes
makeinandoutfiles.c: (KAC)
Lake model file control was added
mtclim42vic.c: (KAC)
Modified to compute all pressures in Pa rather than kPa.
mtclim42vic.h: (KAC)
Definition of EPS constant moved to vicNldef.h
mtclim42wrapper.c: (KAC)
Changed calls to vicrerror to calls to nrerror. Now handles
pressure in Pa, rather than kPa.
openstatefile.c: (KAC)
Updated to handle binary state file.
penman.c: (KAC)
Now handles pressure in Pa, rather than kPa.
preparefullenergy.c: (KAC)
modified so that ice content is set to zero unless the frozen soil
algorithm is implemented and active in the current grid cell.
putdata.c: (KAC)
modified to incorporate the effects of treeline calculations, the
lake and wetland algorithm, spatial snow and frost algorithms, and
the canopy energy balance.
readatmosdata.c: (KAC)
v4.0.4 multiplies nrecs by NF to check for a long enough file,
v.4.1.0 multiples by dt. I think new version is probably correct.
readinitialmodelstate.c: (KAC)
Updated to handle binary state file. Need to address storm state
variables!
readsnowband.c: (KAC)
Modified to allocate treeline variable. Will need to update to fix
lake model/snow band problem!
readsoilparam.c: (KAC, JA)
Modified to read in spatial snow and frost parameters and to read in
Bart's new Arno parameter set.
readsoilparamarc.c: (KAC)
Modified to read in spatial snow and frost parameters and to read in
Bart's new Arno parameter set.
readvegparam.c: (DP,KAC)
Modified code to update Wdmax based on LAI values read in for the
current grid cell. If LAI is not obtained from this function, then
the values cacluated in readveglib.c are left unchanged.
redistributeduringstorm.c: (KAC)
Modified to work with distributed snow and frozen soil.
runoff.c: (KAC)
Modified to handle spatial snow and soil frost.
snow.h: (KAC)
Added minimum SWQ for computing snow pack energy balance. Added
coefficients of shortwave attenuation through the snowpack.
Removed minimum SWQ for full coverage, now included in the soil
files.
snowintercept.c: (KAC)
Modified to handle new variables required to close the canopy
energy balance.
snowmelt.c: (KAC)
Modified to handle partial snow cover. Modified to assure that
ground heat flux is used properly in the snow surface energy
balance as well as imporving the handling of energy fluxes for
partial snow cover. Modified to handle blowing snow.
snowutility.c: (KAC)
Moved definition of G to vicNldef.h.
soilconduction.c: (KAC)
setnodeparameters:
Modified to correct differences between calculations to determine
maximum node moisture and node moisture, so that nodes on the
boundary between soil layers are computed the same way for both.
distributenodemoisturepropertes:
Modified to check that node soil moisture is less than or equal to
maximum node soil moisture, otherwise an error is printed to the
screen and the model exits.
estimatelayericecontent:
Modified to find ice content in spatial frost bands.
solvesnow.c: (KAC)
- Added partial snow cover and advection of sensible heat from local
bare patches.
- Modified to pass the minimum depth of full snow cover as a variable
in soilcon rather than a globally defined constant.
- Fixed check of new snow accumulation for setting understory flag to
use snowfall[WET] not snowfall.
- Set MELTING flag to maintain melting albedo curve even during brief
periods of refreezing, until a snowfall exceeds SnowThres.
- Modified to handle the effects of blowing snow.
- Modified to handle closed canopy energy balance.
surfacefluxes.c: (KAC)
- Modified to handle partial snow cover.
- Modified to iterate a solution for the exchange of energy between
the snowpack and the ground surface.
- Modified to add the effects of blowing snow.
- Fixed indexing problem for sub-daily snow model within daily water
balance VIC: hour (now hidx) is incremented by 1 rather than the
sub-daily time step, so the atmospheric forcing data is now properly
indexed.
- Indexing fix sent SNOWSTEP to calcsurfenergybal rather than the
model time step, meaning that without snow the evaporation was
computed for SNOWSTEP hours rather than a full day. This was fixed
by introducing stepinc to index the arrays, while stepdt keeps
track of the correct time step.
svp.c: (KAC)
Modified internal calculations to use kPa rather than Pa for
consistancy
userdef.h: (KAC)
Added options for lake model, closing the canopy energy balance,
computing the treeline, computing statistics from the input
forcings, and controls for spatial snow and frost.
vicNl.c: (KAC)
- Added controls for lake model.
- Updated storage of lake water for water balance calculations.
- Modifed to add AboveTreeLine to soilconstruct so that the model
can make use of the computed treeline.
- Modified to initialize storm parameters using the state file.
- Modified to start the model by skipping records until the state
file date is found. This replaces the previous method of modifying
the global file start date, which can change the interpolation of
atmospheric forcing data.
- Modified to store wet and dry fractions when intializing water
balance storage. This accounts for changes in model state
initialization, which now stores wet and dry fractions rather than
just averaged values.
vicNl.h: (KAC)
Added definitions for treeline and forcing stats subroutines and
made some needed modifications to subroutine definitions due to
other changes, however, other changes still need to be made.
vicNldef.h: (KAC)
Modified to handle lake algorithm, blowing snow, spatial snow and
frost, and treeline calculations.
writedata.c: (KAC)
- Made hour a variable in all output data file formats even if the
model is run at a daily time step. Also modified all output files
to account for new variables introduced by the spatial frost and
snow algorithms, the lake algorithm and the PILPS 2e study.
- Added energy fluxes to snow band output files.
- Updated output of model for lakes and wetlands algorithm. Added
output of blowing snow sublimation to LDAS and standard snow output
files. ** No Lake Variables are included in the LDAS output format.
**
- Modified LDAS SWQ output, so that it is multiplied by 10 instead
of 100 before being converted to a short integer. This reduces
stored value precision to 0.1, but increases the maximum storable
SWQ, which was exceeded in previous LDAS simulations.
- Eliminated different formats between energy balance and water
balance model output.
writedebug.c: (KAC)
Modified to work with closed canopy energy balance.
writeforcingfile.c: (KAC)
Modified to output pressures, which are handled internally in kPa,
as Pa for backward compatability.
writelayer.c: (KAC)
Modified to handle spatial soil frost.
writemodelstate.c: (KAC)
- Rewritten to handle updates to vicNldef.h and to write the file
as binary to minimize write time and differences with simulations
started with the state file.
- Model is now restarted with the correct values for mu and
LASTSTORM.
** Still need to account for differences with distributed
precipitation flags, which now differ with vegetation - also need
to check storage of lake variables, blowing snow variables and
MELTING flag.
```
- C
Published by jhamman almost 13 years ago
VIC - Release of VIC 4.1.1
** Description of changes from VIC 4.1.0 beta r5 to VIC 4.1.1 **
New Features:
Modified reporting of aerodynamic resistance in output files.
``` Files Affected:
fullenergy.c funccanopyenergybal.c funcsurfenergybal.c outputlistutils.c putdata.c surfacefluxes.c vicNldef.h wetland_energy.c
Description:
Replaced the existing variables aeroresistused and Ra_used with arrays of two elements each; [0] corresponds to surface values (bare soil or non-overstory veg; with snow or snow-free) and [1] corresponds to overstory or non-overstory veg. For non-overstory veg, elements [0] and [1] are the same.
Added the following output variables to store the average aerodynamic conductance and resistance of the grid cell corresponding to elements [0] and [1], respectively: OUTAEROCOND1, OUTAEROCOND2, OUTAERORESIST1, and OUTAERORESIST2. Changed the computation of OUTAEROCOND and OUTAERORESIST to be "scene" values, i.e. veg tiles containing overstory contribute their overstory (element [1]) values, and non-overstory veg tiles contribute their surface (element [0]) values. Earlier versions of VIC simply output the values of AEROCOND and AERORESIST computed latest during the time step (whether from surface or overstory). ```
Added AERORESISTCANSNOW option.
``` Files Affected:
displaycurrentsettings.c funccanopyenergybal.c getglobalparam.c global.param.sample initializeglobal.c vicNl_def.h
Description:
This option allows the user to control how aerodynamic resistances in the overstory are corrected for the presence of snow in the canopy.
Possible values are: AR406: Multiply aerodynamic resistance by 10 for latent heat calculation but NOT for sensible heat, and do NOT apply stability correction, as in VIC 4.0.6 and earlier. Additionally, use surface aeroresist for ET when no no snow in canopy. AR406LS: Multiply aerodynamic resistance by 10 for both latent and sensible calculations, but do NOT apply stability correction. Additionally, use surface aeroresist for ET when no no snow in canopy. AR406FULL: Multiply aerodynamic resistance by 10 for both latent and sensible calculations, but do NOT apply stability correction. Always use canopy aeroresist for ET. AR410: Apply stability correction but do not multiply by 10, as in VIC 4.1.0. Always use canopy aeroresist for ET. ARCOMBO: Apply stability correction and multiply resulting resistance by 10. Always use canopy aeroresist for ET.
VIC 4.1.0 differed from VIC 4.0.6 (and earlier) in the computation of aerodynamic resistances in snow-filled canopy. This new option allows backwards-compatibility with both of these model versions, as well as the new "AR406LS", "406FULL" and "ARCOMBO" options, for comparison. The default is set to AR_410. ```
Reinstated the COMPUTE_TREELINE option, with option to supply the average July air temperature.
``` Files Affected:
computetreeline.c displaycurrentsettings.c getglobalparam.c global.param.sample initializeatmos.c initializeglobal.c readsnowband.c readsoilparamarc.c readsoilparam.c readvegparam.c userdef.h vicNl.c vicNl.h vicNldef.h
Description:
COMPUTE_TREELINE:
This option revives the treeline elevation computation that is a current feature of VIC 4.0.x. If set to TRUE this flag will force the VIC model to compute the elevation of the tree line, based on elevation at which the average annual July air temperature is at or below 10C. All snowbands above this evelation are then assumed to be above the treeline, and vegetation types with overstory are removed from the snow band average variables. If no non-overstory vegetation types exist in an above-treeline band, the band will be treated as if it consists of a default vegetation type, specified by the user.
To use this option, insert the following line into the global parameter file: COMPUTE_TREELINE n where n is the id number of the desired default vegetation type to use when no non-overstory vegetation types exist in the band. To specify bare soil, set n to a negative number.
To deactivate treeline calculation, change the line in the global parameter file to COMPUTE_TREELINE FALSE or remove the line from the global control file.
WARNING #1: Since the model does not store default root zone distributions, the default vegetation type will use the values from the last defined vegetation type for the current grid cell (i.e. veg type N-1, prior to the addition of the new vegetation type).
WARNING #2: If you are using GLOBAL_LAI, than the LAI and dew storage terms for the default vegetation type will be set to the values used by the last occurrence of the default vegetation type.
JULYTAVGSUPPLIED:
The default behavior of VIC is to compute the average July temperature from the meteorological input forcings, over the time span of the simulation. One drawback to this behavior is that, for short simulations over different periods of time, the average July temperature can vary enough to change which elevation bands are considered to be above the treeline.
Therefore, if desired, the user can specify the average July temperature for each grid cell by taking the following 2 steps: 1. Add each grid cell's average July air temperature to the soil parameter file, as the final field on each line. 2. Set JULYAVGTSUPPLIED = TRUE in the global parameter file
The JULYAVGSUPPLIED option is ignored if COMPUTE_TREELINE is FALSE. ```
Added OUT_VPD output variable.
``` Files Affected:
outputlistutils.c putdata.c vicNldef.h writeforcingfile.c
Description:
Added the output variable OUT_VPD to track vapor pressure deficit. ```
Added OUT_ASAT output variable.
``` Files Affected:
fullenergy.c outputlistutils.c putdata.c runoff.c surfacefluxes.c vicNldef.h vicNl.h wetland_energy.c
Description:
Added the output variable OUT_ASAT to track saturated area. ```
New MINLIQ option, with fixes to minliq formulation.
``` Files Affected:
arnoevap.c displaycurrentsettings.c frozensoil.c getglobalparam.c global.param.sample initializeglobal.c initializemodelstate.c initializesoil.c lakes.eb.c runoff.c soilconduction.c vicNldef.h vicNl.h
Description:
Made use of minliq (instead of residual moisture) optional, via options.MINLIQ. If MINLIQ is FALSE (or omitted) in global parameter file, all equations that depend on liquid soil moisture use residual moisture as their absolute minimum liquid water content. If MINLIQ is TRUE, all of these equations use minliq as their absolute minimum liquid water content. Minliq is computed in soilconduction.c as residual moisture multiplied by the maxunfrozen_water content at the current temperature.
Made minliq formulation more consistent across the model code. Added minliq to the layer_struct so that this temperature-dependent quantity can be computed once per time step and communicated to all functions that look at soil moisture. TJB ```
New PLAPSE option, which lapses air pressure (and density) by grid cell average elevation.
``` Files Affected:
displaycurrentsettings.c global.param.sample initializeatmos.c initializeglobal.c vicNl_def.h
Description:
Previously, when air pressure was not supplied in the input forcings, VIC would set it equal to a constant 95.5 kPa. Now, if options.PLAPSE is TRUE, and if air pressure is not supplied, VIC computes it by lapsing sea level pressure by grid cell average elevation. Air density is handled the same way. TJB ```
New GRNDFLUXTYPE option, with fixes to deltaH and fusion equations.
``` Files Affected:
displaycurrentsettings.c funcsurfenergybal.c getglobalparam.c global.param.sample initializeglobal.c surfacefluxes.c vicNldef.h
Description:
Corrected deltaH and fusion terms of surface energy balance, by taking surfatten into account, as in Liang et al 1999. Added GRNDFLUX_TYPE option, to allow backwards compatibility with versions 4.0.6 and 4.1.0.
Possible values are: GF406: use (flawed) formulas for ground flux, deltaH, and fusion from VIC 4.0.6 and earlier GF410: use formulas from VIC 4.1.0 (ground flux is correct, but deltaH and fusion ignore surfatten) GFFULL: use correct ground flux formula from VIC 4.1.0 and also take surfatten into account in deltaH and fusion GFFULL is the default value. ```
Added validation of Campbell's expt and bubble pressure.
``` Files Affected:
read_soilparam.c
Description:
Previously, VIC did not check to see if "nodata" values such as -9999 were supplied in the soil parameter file for the Campbell's expt and bubble pressure parameters. These values would produce "nan" in computations of soil hydraulic conductivity and soil ice content. This is especially insidious in the case of bubble pressure, as it is not needed for the water balance mode, and therefore users often set it to "nodata" values for water balance mode runs. Subsequently using such a soil parameter file for a full-energy balance or frozen soil simulation would cause the model to crash without the cause being clear. Now, the validation in read_soilparam() prevents this case.
Note: readsoilparamarc() computes these quantities internally and already validates their values. ```
Added TFALLBACK option, to continue with previous temperature when energy balance iteration fails to converge.
``` Files Affected:
calcatmosenergybal.c calcsurfenergybal.c distprec.c displaycurrentsettings.c frozensoil.c funcsurfenergybal.c getglobalparam.c global.param.sample icemelt.c initializeglobal.c initializelake.c initializemodelstate.c lakes.eb.c outputlistutils.c putdata.c rootbrent.c snowintercept.c snowmelt.c solvesnow.c surfacefluxes.c vicNl_def.h vicNl.h
Description:
Added options.TFALLBACK, which can take the following values: TRUE: If energy balance solution fails to converge, use previous T value and continue FALSE: If energy balance solution fails to converge, report an error Default = TRUE.
Currently, the following temperature variables are affected by the TFALLBACK option: snow.surf_temp : snow pack surface temperature energy.T[] : soil T profile nodes energy.Tsurf : surface temperature energy.Tcanopy : temperature of canopy air energy.Tfoliage : temperature of canopy snow
For each grid cell, for each of the above variables, VIC will count
the number of instances when the previous step's T was used. These totals will be reported at the end of the grid cell's simulation.
In addition, VIC tracks occurrences of T fallbacks through time via "flag" variables. For each T variable, there is a corresponding T fallback flag, which is set to 1 if, in a given time step, the previous step's T was used in that time step, and 0 otherwise. This holds for each veg tile / elevation band combination in the grid cell.
These time series of occurrences of T fallbacks can be reported in output files via the following 4 new output variables: OUTSOILTFLAG = array of flags, one for each soil T node OUTSURFTFLAG = flag for Tsurf OUTSNOWTFLAG = flag for snow.surftemp OUTTCANFLAG = flag for Tcanopy OUTTFOL_FLAG = flag for Tfoliage Each of these contain the AVERAGE over the entire grid cell and over the output time interval (if aggregating temporally) of the flag values. Thus, these are NOT integers but fractions ranging from 0 to 1.
Additionally modified root_brent to continue attempting to bracket root if one bound encounters undefined values/ERROR code from target function. ```
Added computation of 6 types of potential evaporation.
``` Files Affected:
arnoevap.c CalcAerodynamic.c canopyevap.c computepotevap.c (new) fullenergy.c global.h initializelake.c initializemodelstate.c lakes.eb.c Makefile outputlistutils.c penman.c putdata.c readsoilparamarc.c readsoilparam.c readveglib.c readvegparam.c surfacefluxes.c vicNl.c vicNldef.h vicNl.h wetland_energy.c
Description:
Added computation of potential evaporation for 6 different reference land cover types, along with new output variables for reporting them: OUTPETSATSOIL = pot evap from saturated soil OUTPETH2OSURF = pot evap from open water surface OUTPETSHORT = pot evap from short reference crop (clipped grass) OUTPETTALL = pot evap from tall reference crop (alfalfa) OUTPETNATVEG = pot evap from current vegetation with canopy resistance computed in the usual manner except for the absence of water limitation OUTPETVEGNOCR = pot evap from current vegetation with canopy resistance set to 0
Four "default" veg library classes were created (defined in global.h) so that veg characteristics for these landcover types (such as roughness length, etc) are present regardless of the contents of the externally-supplied vegetation library. As a result, bare soil no longer is treated as an exception within the code, but as a legitimate class having its own area fraction Cv, etc. This simplifies some of the loops in the code.
In order to compute potential evaporation for these different cases, several different aerodynamic resistances also needed to be computed. Rather than store all of these in the celldata structure, the "aeroresist" array of the celldata structure was removed and the previously-named "aeroresistused" array was renamed to "aeroresist". Now, the pre-stability-correction values of aero_resist are stored in a temporary internal array and not reported.
Finally, computation of canopy resistance was moved out of penman() and into a separate function calc_rc() within the same file. ```
Simplified argument lists of runoff() and surface_fluxes().
``` Files Affected:
fullenergy.c runoff.c surfacefluxes.c vicNl.h wetland_energy.c
Description:
Simplified the argument lists of runoff() and surfacefluxes() by replacing explicit references to individual celldata variables by a single reference to the cell_data structure. ```
Wetland portion of lake/wetland tile is now simulated in full_energy().
``` Files Affected:
freedistprcp.c frozensoil.c fullenergy.c initializelake.c initializemodelstate.c initializesoil.c LAKE.h lakes.eb.c makedistprcp.c Makefile putdata.c readinitialmodelstate.c readlakeparam.c readsoilparam.c readsoilparamarc.c readvegparam.c soilconduction.c vicNl.c vicNldef.h vicNl.h wetlandenergy.c (removed) writemodelstate.c
Description:
In previous versions of 4.1.x, the wetland portion of the lake/wetland tile was stored in the (N+1)st vegetation tile, and processed in the ```
` function wetlandenergy(), which was an almost exact duplicate of fullenergy(). This created several difficulties, including a) potential conflicts with the COMPUTE_TREELINE option, b) conflicts with the new implementation of bare soil and potential evap, c) hard-coding of wetland vegetation to be equal to the grid cell's first listed cover type, and d) general complexities in maintaining the code/adding new features.
``` Now, the wetland portion of the lake/wetland tile must be listed in the vegetation parameter file in the same was as all other veg cover types. Similarly, the wetland portion of the lake/wetland tile is processed in fullenergy() in the exact same way as all other tiles. Wetlandenergy() has been removed. Lakemain() has also been removed, as the calls to lake-specific functions are now executed directly from full_energy(). To make all of this happen, the index of the veg tile containing the lake/wetland must be indicated in the lake parameter file (thus, the lake parameter file must contain an additional value for each grid cell).
Users may now specify any type of desired vegetation to fill the wetland portion of the lake/wetland tile, simply by listing the desired veg cover in the veg param file and placing the index of this tile in the lake parameter file. The user is also free now to create a new wetland vegetation class in the vegetation library. ```
State files now contain data for 0-area bands.
``` Files Affected:
readinitialmodelstate.c writemodel_state.c
Description:
In order to ensure that the value of Nbands saved in the state file accurately accounted for the number of bands whose states are stored in the state file, changed VIC to read/write data for all bands, whether or not their area is 0. ```
Bug Fixes:
Fixed conflict between PRTSNOWBAND option and flexible output configuration.
``` Files Affected:
global.param.sample parseoutputinfo.c putdata.c vicNldef.h
Description:
The PRTSNOWBAND option exists for backwards-compatibility with older versions of VIC. If the user is using the default output cofiguration, and PRTSNOWBAND is set to TRUE, it creates "snowband" output files. However, this was not made clear in the documentation; it is possible to specify output files containing the snow-band-specific values of variables without setting PRTSNOWBAND to TRUE. However, putdata() contained logic that only allowed it to record snow-band-specific quantities if PRTSNOW_BAND is TRUE, even if the user had specified snow-band-specific output variables in the output files.
Therefore, the logic checking the value of PRTSNOWBAND was removed from putdata(). Additionally, if the user has specified NOUTFILES in the global parameter file, PRTSNOWBAND will now be set to FALSE by parseoutputinfo(), just to make sure that PRTSNOWBAND only applies to the default output case. Documentation in global.param.sample and vicNl_def.h has been updated to reflect this behavior. TJB ```
Fixed problems in soil temperature solution due to use of dz_node.
``` Files Affected:
calcsurfenergybal.c frozensoil.c funcsurfenergybal.c initializemodelstate.c lakes.eb.c soilconduction.c vicNl.h wetland_energy.c
Description:
The addition of the EXCESSICE option introduced a new variable, Zsumnode, to the soil thermal solution code. This conflicted with the existing variable dzsum. Therefore, dzsum has been replaced by Zsum_node in several functions. KAC via TJB ```
Fixed problem of errors from put_data() not being caught.
``` Files Affected:
dist_prec.c
Description:
Modified routine to store put_data() error in ErrorFlag2 and return a single ERROR value if an error occurs. KAC via TJB ```
Fixed uninitialized value errors in parseoutputinfo.c.
``` Files Affected:
parseoutputinfo.c
Description:
Added default values for format, typestr, and multstr, so that they can be omitted from global param file. TJB ```
Fixed inability to read tabs in soil/veg parameter files.
``` Files Affected:
readsoilparam.c readvegparam.c
Description:
At some point in earlier versions, the functions that read soil/veg parameter files were modified to use the "strtok" function, and as a result, VIC lost the ability to understand tabs as field separators in these files. This ability has now been restored. TJB ```
Fixed bugs in snow bands implementation.
``` Files Affected:
outputlistutils.c readsnowband.c readvegparam.c vicNl.c vicNl.h vicNl_def.h
Description:
Some snowband-specific output variables had an incorrect number of elements allocated in outputlistutils.c. This has been fixed. In addition, added BandElev[] array to soilconstruct. Also added logic to ensure that grid-cell-average elevation (from soil parameter file) matches the average of the band elevations. Also added allocation of extra veg tile for the case of a band being above the treeline in the COMPUTE_TREELINE case. TJB ```
Removed special logic for longwave in water balance mode
``` Files Affected:
funcsurfenergybal.c intializeatmos.c initializemodelstate.c
Description:
In the 4.0.x branch of VIC, net longwave radiation was stored in the atmos.longwave variable for the case of water balance mode. This required that special logic be inserted into various parts of the code wherever the longwave variable was used. In 4.1.x, new features were added and several different types of longwave flux were added. None of these new fluxes took the water-balance case into account, and as a result, the water balance case was handled incorrectly. Now the special handling of the water balance case has been removed; atmos.longwave always contains incoming longwave. This also simplifies the code. TJB ```
VIC now can understand indented comment lines in the global parameter file
``` Files Affected:
getglobalparam.c
Description:
Previously, VIC only understood a line to be a comment if it began with a '#' character at the very beginning of the line, i.e. no leading white space such as spaces or tabs. Now, any line whose first non-whitespace character is '#' is considered to be a comment. ```
Miscellaneous fixes to snow albedo aging scheme
``` Files Affected:
initializesnow.c SnowPackEnergyBalance.c snowmelt.c solve_snow.c
Description:
Previously, VIC's last_snow counter, which keeps track of the number of time steps since the last fresh snowfall, and which is used to compute the snow albedo, was not reset to 0 at the proper times. This has been fixed, along with its initialization. ```
Fixed errors in summing output variables
``` Files Affected:
distprec.c fullenergy.c initializelake.c initializemodelstate.c initializesnow.c LAKE.h lakes.eb.c putdata.c readinitialmodelstate.c readsnowband.c readsoilparamarc.c readsoilparam.c vicNl.c vicNldef.h vicNl.h writemodel_state.c
Description:
Previously, many lake water and energy budget terms were lumped into the wetland soil, snow, and energy structures. This often led to water/energy balance errors both internally and in summing these terms for output. To solve this problem, new cell, snow, and energy structures were added to the lake_var structure. These structures allow all lake water and energy budget terms to be tracked independently of the wetland.
In addition, previously, the initial computation of water/energy storages for use in the water/energy balance checks was done in vicNl(). This logic was not in sync with the computations in putdata(). Therefore the logic was replaced with an initial call to putdata() (using rec= -Nrecs). Within putdata(), two new functions were created to help ensure that summing was consistent among upland veg tiles, wetland, and lake: collectwbterms() and collecteb_terms().
Finally, another source of errors arose from the allocation and initialization of snowband parameters in readsnowband(). These terms were only initialized in readsnowband(), but were in some cases used in putdata() for the non-snowband case. Therefore, we have moved the allocation/initialization of these terms to readsoilparam() and readsoilparamarc(). These parameters are further modified in read_snowband(), as necessary. ```
Added error messages for case when LAI==0 and overstory==1.
``` Files Affected:
readveglib.c readvegparam.c
Description:
Added error messages for case when LAI==0 and overstory==1. Without this check, a user could specify LAI of 0 for an overstory type (e.g. a deciduous tree). Unforutunately, the model code assumes that the overstory itself always contains some minimum LAI (perhaps assuming that the LAI contains stem area as well?), and in some cases divides by the LAI. If LAI ever is 0 for an overstory type, this will lead to nan values in evap, soil moisture, canopy storage, etc. ```
- C
Published by jhamman almost 13 years ago
VIC - Release of VIC 4.0.4
June 4, 2003: VIC release 4.0.4beta r2
This covers bugs found during tests with the snow algorithm.
solve_snow.c: Bug found by KAC
Counter for number of days since last snowfall was
incremented twice in the MELTING update. This has been
fixed.
solve_snow.c: modification by KAC
Added check so that MELTING flag is only TRUE if melt
occurs in the melt season - currently this is defined
between March 1 and October 1. Otherwise the MELTING
flag can trigger rapid very early season melt
write_model_state.c, read_initial_model_state.c, open_state_file.c,
check_state_file.c: Modification by KAC
Modified to handle both ASCII and BINARY state files.
NOTE: ASCII mode is designed to make it easier to create
a state file for initializing a point model. It includes
all features of the Binary state file, but values are
truncated so the resulting restart will not be identical.
If you need an exact restart, use the Binary files. Also
removed ice content from the state file as it is computed
at the beginning of each time step, so storing its value
is unnecessary.
April 23, 2003: VIC release 4.0.4beta r1
This covers bug fixes found by beta testers and fixed in the version of the code bundled with this file.
surface_fluxes.c: (found by Ingjerd Haddeland)
Indexing fix sent SNOW_STEP to calc_surf_energy_bal rather
than the model time step, meaning that without snow the
evaporation was computed for SNOW_STEP hours rather than a
full day. This was fixed by introducing step_inc to
index the arrays, while step_dt keeps track of the correct
time step.
March 27, 2003: VIC release 4.0.4beta
This release covers patches for several bugs found in 4.0.3, which were never formally released (i.e. the downloadable source code was modified, but no major announcement was made). It also includes other fixes and modifications that have been identified as being needed prior to releasing version 4.1.0, which will involve several significant changes (including lakes & wetlands, spatial snow & frost, and a closed canopy energy balance).
Modifications:
Snow albedo update: (found by Keith)
In previous releases, the snow albedo function has been hyper
sensitive to trace amounts of snowfall during the melt period.
Whenever new snow falls or the cold content falls below 0, the
albedo is switched from the ablation curve to the accumulation
curve. This curve is then followed until the cold content
exceeds 0, indicating it is in the spring melt season. This is
fine when accounting for thin early season snowpacks or mid-
season melt events, however, a cold snap or light dusting of
snow should not reset the snowpack albedo to much higher winter
values for days or weeks at a time. This release of the model
monitors the state of pack with the variable MELTING. This
flag keeps the snowpack on the ablation curve unless new snow-
fall exceeds a threshold (TraceSnow in user_def.h) indicating
that the top of the snowpack should be represented by the albedo
of the new snow.
Model initialization: (found by Ulysses and Keith)
In previous releases, the initialization of soil layer moist[]
and ice[] was within a second set of loops for band and
vegetation, using the same counters. Because of the dual use
of counters, initialization was not completed correctly. The
primary effect of this was that thermal node values beyond the
first vegetation type were not correctly initialized, which
caused the model to crash during some simulations with full
energy or frozen soils active. Without frozen soil, most
simulations would compensate for the problem within their
spin-up time, so it is unlikely that this bug impacts any
simulations not employing frozen soil.
Snow time step: (found by Andy, et al.)
The snow algorithm needs to run sub-daily for the energy balance
components to function properly. This means that for daily
simulations, the snow model must be solved at a finer (sub-daily)
time step. In the previous release, initialize_atmos.c stored
sub-daily met data in each days variable using positions (e.g.
0,1,..8 for 3 hour data). In surface_fluxes.c the model indexed
the sub-daily time steps used by the snow algorithm with hours
(e.g. 0,3,6,...21 for three hour data). This means the arrays
were incorrectly indexed and the resulting model simulations
would be wrong. The fix implemented here has been tested under
several model configurations and is deemed the official version.
WARNING: There are several versions of this fix circulating,
please update your code to this version - the previous fixes
may not work in all circumstances!
FROZEN_SOIL active flag: (found by Ed and Justin)
The cause of the problem is a bug in the code that occurs when
the global frozen soils flag (FROZEN_SOILS) is set to true but
the individual cell frozen soil flag (FS_ACTIVE) is set to
false. This causes the change in soil heat storage to be
calculated incorrectly. This was fixed by adding additional
conditions within frozen_soil.c and initialize_model_state.c,
which verify the FS_ACTIVE is TRUE before running
estimate_layer_ice_content. This avoids the problem of the
soil layer ice content being set to a positive value, ignored
by the rest of the model.
Vapor pressure: (Keith)
All internal vapor pressure calculations are now done in
Pascals. Previous release versions, switched between Pa
and kPa, so this simply removes the extra step. The input
file format is unchanged, so there should be no change to
model output (model might run slightly faster, but it is
also unlikely that this will be witnessed by a normal user).
Constant dew despite changing LAI: (Dave Peterson)
The modification of read_vegparam.c to update LAI based on
a grid cell specific value did not change the values of Wdmax.
Wdmax values were computed in read_veglib.c based on the
default LAI values, so they did not necessarily reflect the
actually LAI values used for the grid cell. Values for Wdmax
are now computed in read_vegparam.c whenever GLOBAL_LAI are
provided. The effects of this change will change in magnitude
based on how different the cell LAI values are from those in
the default library file.
DRY_TIME error: (Reinur Schnur)
DRY_TIME in dist_prcp.c was incremented by the time step in
hours. Then to see if the current rain was part of the same
storm or the start of a new one, DRY_TIME was checked to see
if it was greater than or equal to 24/dt. This compares
DRY_TIME in hours to the model time step. The "/dt" has been
removed, so now DRY_TIME is checked versus the hours since the
last storm.
State file: (KAC)
*** WARNING: This may require modifications to your global file ***
The state file has been modified to account for model updates.
It has also been converted to write binary files - this makes
them less convenient to edit, but means that model starts using
the same forcing, soil and vegetation files will produce the
exact same results. There has also been a slight change in how
the global file is set up to restart the model. The global
file should now have the same year, month, day and hour as the
original global file - the VIC model will compute the number of
records to skip at the beginning to reach the point where the
model state was saved. This means that calculations to yield
sub-daily metrological forcings from daily forcings will produce
the exact same forcing values -> this also means that restarted
simulations will be exactly the same as the original run. Slight
variations in the model results were also introduced because the
method for storing soil node depths led to the possibility of
very small differences in dz_node for the restarted model.
Previous versions also did not store the snowpack cold content,
this meant that for restarts during winter, the snowpack albedo
might start on the ablation curve (as cold content was initialized
to 0 and not to a value less than 0) rather than the accumulation
curve. This could lead to slight differences in the snowpack
if no new snow fell and the snowpack was not melting - but
after 10 years of simulations the differences were minor. As
noted above the new version of the state file should allow the
model to be restarted and to produce exactly the same results as
the original complete result. If there are cases where this is
not true, please report. If you edit the read/write model state
functions - BE VERY CAREFUL to edit Nbytes to reflect any changes.
COMPUTE_TREELINE: (KAC and LCB)
This is an added feature which computes the treeline elevation
in the current grid cell and does not include vegetation
fractions with overstory in the grid cell averages for snow bands
that exceed the treeline elevation. This feature was added
to the model to reduce the appearance of "glaciers" in high
elevation snow bands. It computes average annual July air
temperatures using the temperature data from the atmospheric
forcing files (WARNING - elevation of treeline may change if
the period of forcing data used changes). It then lapses the
average annual July air temperature to locate the elevation
at which it equals 10C. This is assumed to be the treeline,
so vegetation types with overstory in snow bands with average
elevations higher than this, are excluded from the grid cell
average variables in put_data.c. For the time being full
energy and water balances are still computed for these
vegetation fractions, and no attempt is made to verify that
a snow band has a non-overstory vegetation type that can be
expanded to represent the coverage area lost due to the
exclusion of the overstory fraction.
- C
Published by jhamman almost 13 years ago
VIC - Release of VIC 4.0.3
August 15, 2000: VIC release 4.0.3
This release fixes a problem with the implementation of vaarg that causes run time errors on some systems. Previous releases of the code worked correctly on the LINUX and freeBSD systems where it was tested. However on some systems (including Sun Ultra-2s) character variables passed with vaarg are changed into integers so reading a character from the argument list does not produce the value sent to the routine. The character flags used by VIC to indicate if there is snow present and if the frozen soil algorithm has been activated have now been converted to integers, which should make the va_arg call work on all systems.
Also fixed in this release was a check in dist_prec.c to see if it is still raining which actually used the memory address of the precipitation variable rather than the daily value in the check.
MODIFIED FILES: readatmosdata.c - Fixed input file time step check writeforcingfiles.c - Added free statements for pointers calcsurfenergybal.c - Converted char flags to int distprec.c - Fixed logical statement error frozensoil.c - Converted char flags to int funcsurfenergybal.c - Converted char flags to int initializeatmos.c - Added flag for output forcing vicNl.h - Converted char flags to int vicNldef.h - Converted char flags to int
- C
Published by jhamman almost 13 years ago
VIC - Release of VIC 4.0.2
July 19, 2000: VIC release 4.0.2
Two new pre-processor options have been added to VIC as well as minor modifications to two subroutines.
If set to TRUE the NO_REWIND pre-processor option stops the VIC model from rewinding the soil and vegetation parameter input files for each new grid cell. This reduces run times but requires that all input files are in the same order as the soil parameter file.
If set TRUE the OUTPUTFORCE pre-processor option blocks off the main model and only reads the provided forcing files. Once VIC has estimated the missing forcing parameters the full forcing data set for the defined simulation period is output to a series of gridded forcing files. The gridded forcing files are written to the RESULTS directory defined in the global control file with the prefix "fulldata". The new files are in Binary or ASCII depending on the setting of BINARYOUTPUT.
The error messages in getglobalparam.c have been modified so that the correct file is referenced when telling the user to change values found in the model source code.
In readsoilparam.c, the soil parameters are defined only if the current grid cell is run, otherwise the line in the file is skipped and soilcon is returned without new data values.
- C
Published by jhamman almost 13 years ago
VIC - Release of VIC 4.0.1
May 30, 2000: VIC release 4.0.1
Increased use of the released VIC model code has lead to the discovery of a couple of minor bugs. This release fixes those bugs as well as introducing a improved precipitation correction algorithm based on Yang et al. 1998. Unless you have encountered these problems or are trying to correct precipitation undercatch due to wind, in the VIC model, your results will not be impacted by these fixes.
MODIFIED FILES: correctprecip.c - changed to WMO correction equation for NWS 8" standard gauge. fullenergy.c - modified to handle WMO correction. initializeatmos.c - modified to handle WMO correction. fixed error in estimating minimum daily temperature from sub-daily temperatures. makeinandoutfiles.c - removed line that opened the state file again for each new grid cell. openstatefile.c - modified comments. putdata.c - modified to handle WMO correction. snowutility.c - cleaned source code. solvesnow.c - modified to handle WMO correction. surfacefluxes.c - modified to handle WMO correction. vicNl.h - modified to handle WMO correction. vicNl_def.h - modified to handle WMO correction.
REFERENCE:
Yang, D., B. E. Goodison, J. R. Metcalfe, V. S. Golubev, R.
Bates, T. Pangburn, and C. L. Hanson, Accuracy of NWS 8" Standard
Nonrecording Precipitation Gauge: Results and Application of WMO
Intercomparison, J. Atmos. Oceanic Tech., 15, 54-68, 1998.
- C
Published by jhamman almost 13 years ago
VIC - Release of VIC 4.0.0
Date: May 16, 2000
From: Keith Cherkauer
Topic: Release of VIC 4.0.0
The code for VIC release 4.0.0 has undergone several months of tests (as VIC release 3.3.0 Beta) and has now been deemed ready for release to the general public. This document is designed to provide information concerning changes in the model between the last release version (3.2.1) and the current version.
There is no formal users manual, information about how to use the current
version can be found at
http://www.hydro.washington.edu/Lettenmaier/Models/VIC/VIChome.html.
Information about the basic model design can be found in Liang, et al.
(1994), while the rewrite of the source code as well as the addition of
cold season processes is described in Cherkauer and Lettenmaier (1999).
The VIC macroscale hydrologic model was developed as a research tool. As such it is the users responsibility to verify that it is working correctly when applied to new situations. When using the VIC model reference should be made to Liang, et al. (1994) and Cherkauer and Lettenmaier (1999) as well as an acknowledgment that the code was received from the University of Washington. Other important papers relating to the development of the VIC model are included on the home page and in the source code.
Possible bugs in the code should be reported to
vicadmin@hydro.washington.edu. ALWAYS CHECK YOUR INPUT FILES! Most
"bugs" are actually caused by trying to run the model with bad parameters
or forcing data. The VIC model will run limited checks to find common
major errors but in most cases it will attempt to run with the bad values.
If after checking all of your input data you still believe you have found
a bug in the model, send an e-mail including the complete output from the
model as well as a description of the problem and the files necessary to
run the model to recreate the code (if files are large please put a
compressed tar file in
ftp://ftp.ce.washington.edu/pub/HYDRO/vicadmin/TEMP). Outdated and
modified versions of the code are the responsibility of the user to debug.
Modifications made to the code, which may improve the general model
performance, may be submitted to vicadmin@hydro.washington.edu for
possible inclusion in future versions of the code.
VIC release 4.0.0 represents a major change to the source code from version 3.2.1. It is strongly recommended that if you were using version 3.2.1 or earlier versions that you update with a complete copy of the new code.
Major changes from release version 3.2.1 to 4.0.0:
- Radiation Estimation Update: The routines to estimate shortwave and
longwave radiation as well as vapor pressure from daily minimum and
maximum temperature and precipitation have been updated to correspond to
the algorithm described by Thornton and Running (1999). These routines
provide significantly improved radiation estimates especially in regions
outside the continental United States.
- Model Core Update: The core of the VIC model was rewritten so that all
modes of the model (water balance, energy balance, etc.) make use of the
same model code. This makes it easier to modify the model and have
modifications apply to sll modes, it also allows the model to run with new
combinations of algorithms (i.e. full energy balance mode with the finite
difference ground heat flux solution).
- Soil Moisture Transport Update: The frozen and thawed sub-layers added
to the model for the original frozen soil algorithm have been removed.
This makes the soil drainage routine cleaner and faster. Frozen soils now
estimate full layer ice contents from the ice content at each soil thermal
node. Without being confined by sub-layers, the frozen soil algorithm can
now be applied to regions of permafrost.
- Forcing File Control Added: Version 4.0.0 moves controls of the forcing
file format and data types into the global control file. The model can
now handle most ASCII column and short int Binary files without writing
new subroutines and recompiling the source code.
- Pre-processor Options Added: There are now more option flags in the
source code headers to control which parts of the model are in fact
compiled. This allows the model functionality to be adjusted without the
addition of computationally intensive conditional switching statements.
- Model State File: With the release of version 4.0.0 separate snow and
soil initialization files have been combined into a single model state
file. The state file can be created outside the model for starting
simulations with prescribed initial conditions, or the model state can be
saved by VIC at a specified date. Note that currently there will be small
differences between a full and a warm started simulation because radiation
and vapor pressure are estimated using forcing data from the simulation
period, not from the full dataset included in the forcing file. It also
does not store wet and dry fraction information, when running with
distributed precipitation the model is restarted using average soil
conditions.
References:
Liang, X., D. P. Lettenmaier, E. F. Wood, and S. J. Burges, A simple hydrologically based model of land surface water and energy fluxes for GSMs, J. Geophys. Res., 99(D7), 14,415-14,428, 1994.
Cherkauer, K. A., and D. P. Lettenmaier, Hydrologic effects of frozen soils in the upper Mississippi River basin, J. Geophys. Res., 104(D16), 19,599-19,610, 1999.
Thornton, P.E. and S.W. Running, An improved algorithm for estimating incident daily solar radiation from measurements of temperature, humidity, and precipitation, Ag. For. Met., 93, 211-228, 1999.
- C
Published by jhamman almost 13 years ago