Skip to content

Commit

Permalink
Merge pull request #676 from UW-Hydro/hotfix/5.0.1
Browse files Browse the repository at this point in the history
Merge hotfix/5.0.1 into master
  • Loading branch information
Joe Hamman committed Feb 1, 2017
2 parents 3f377e9 + fb01c45 commit ebd2ba3
Show file tree
Hide file tree
Showing 33 changed files with 1,071 additions and 744 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions ci/requirements.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
name: vic_test_env
channels:
- conda-forge
dependencies:
- python=3.5
- numpy
Expand Down
46 changes: 46 additions & 0 deletions docs/Development/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,52 @@ To check which release of VIC you are running:
- For VIC 4, type `vicNl -v`
- For VIC 5 and later, type `vic_{classic,image}.exe -v`

------------------------------
## VIC 5.0.1

**Release date: (February 1, 2017)**

#### Bug Fixes:

1. Fixed image driver history file name timestamp ([GH#635](https://github.com/UW-Hydro/VIC/pull/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](https://github.com/UW-Hydro/VIC/pull/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](https://github.com/UW-Hydro/VIC/pull/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](https://github.com/UW-Hydro/VIC/pull/645))

5. Fixed a bug related to `make_lastday` function ([GH#647](https://github.com/UW-Hydro/VIC/pull/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](https://github.com/UW-Hydro/VIC/pull/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](https://github.com/UW-Hydro/VIC/pull/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](https://github.com/UW-Hydro/VIC/pull/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](https://github.com/UW-Hydro/VIC/pull/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](https://github.com/UW-Hydro/VIC/pull/668) for details on this bug fix.

10. Fixed a bug related to forcing and simulation start time ([GH#671](https://github.com/UW-Hydro/VIC/pull/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.


------------------------------

## VIC 5.0.0 [![DOI](https://zenodo.org/badge/7766/UW-Hydro/VIC.svg)](https://zenodo.org/badge/latestdoi/7766/UW-Hydro/VIC)
Expand Down
2 changes: 1 addition & 1 deletion docs/Documentation/Drivers/Classic/ForcingData.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# VIC Forcings Files

The VIC Classic Driver requires subdaily forcings (meteorological or other). The required forcing variables vary depending options set in the global parameter file.
The VIC Classic Driver requires subdaily forcings (meteorological or other). Forcing timestep must be the same as snow model timestep, which is specified by the `SNOW_STEPS_PER_DAY` parameter in the [Global Parameter File](GlobalParam.md). The required forcing variables and units are listed below and must also be specified in the [Global Parameter File](GlobalParam.md)

#### Meteorological Forcings, Required in all simulations:

Expand Down
4 changes: 1 addition & 3 deletions docs/Documentation/Drivers/Classic/GlobalParam.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ Generally these default values do not need to be overridden.
| BLOWING_SPATIAL_WIND | string | TRUE or FALSE | If TRUE, multiple wind speed ranges, calculated according to a probability distribution, are used to determine the sublimation flux from blowing snow. If FALSE, then a single wind speed is used. See Lu and Pomeroy (1997) for details. <br><br>Default: TRUE. |
| COMPUTE_TREELINE | string or integer | FALSE or veg class id | Options for handling above-treeline vegetation:FALSE = Do not compute treeline or replace vegetation above the treeline.CLASS_ID = Compute the treeline elevation based on average July temperatures; for those elevation bands with elevations above the treeline (or the entire grid cell if SNOW_BAND == 1 and the grid cell elevation is above the tree line), if they contain vegetation tiles having overstory, replace that vegetation with the vegetation having id CLASS_ID in the vegetation library. NOTE 1: You MUST supply VIC with a July average air temperature, in the optional July_Tavg field, AND set theJULY_TAVG_SUPPLIED option to TRUE so that VIC can read the soil parameter file correctly. NOTE 2: If LAKES=TRUE, COMPUTE_TREELINE MUST be FALSE.Default = FALSE. |
| CORRPREC | string | TRUE or FALSE | If TRUE correct precipitation for gauge undercatch. NOTE: This option is not supported when using snow/elevation bands. Default = FALSE. |
| MAX_SNOW_TEMP | float | deg C | Maximum temperature at which snow can fall. Default = 0.5 C. |
| MIN_RAIN_TEMP | float | deg C | Minimum temperature at which rain can fall. Default = -0.5 C. |
| SPATIAL_SNOW | string | TRUE or FALSE | Option to allow spatial heterogeneity in snow water equivalent (yielding partial snow coverage) when the snow pack is melting:FALSE = Assume snow water equivalent is constant across grid cell.TRUE = Assume snow water equivalent is distributed horizontally with a uniform (linear) distribution, so that some portion of the grid cell has 0 snow pack. This requires specifying the max_snow_distrib_slope value as an extra field in the soil parameter file. NOTE: max_snow_distrib_slope should be set to twice the desired minimum spatial average snow pack depth [m]. I.e., if we define depth_thresh to be the minimum spatial average snow depth below which coverage < 1.0, then max_snow_distrib_slope = 2*depth_thresh. NOTE: Partial snow coverage is only computed when the snow pack has started melting and the spatial average snow pack depth <= max_snow_distrib_slope/2. During the accumulation season, coverage is 1.0. Even after the pack has started melting and depth <= max_snow_distrib_slope/2, new snowfall resets coverage to 1.0, and the previous partial coverage is stored. Coverage remains at 1.0 until the new snow has melted away, at which point the previous partial coverage is recovered. Default = FALSE. |

## Turbulent Flux Parameters
Expand Down Expand Up @@ -152,7 +150,7 @@ All FORCING filenames are actually the pathname, and prefix for gridded data typ
| FORCE_ENDIAN | string | BIG or LITTLE | Identifies the architecture of the machine on which the binary forcing files were created:BIG = big-endian (e.g. SUN).LITTLE = little-endian (e.g. PC/linux). Model will identify the endian of the current machine, and swap bytes if necessary. Required for binary forcing file, not used for ASCII forcing file. |
| N_TYPES | int | N/A | Number of columns in the current data file, with the following exception: for the vegetation history variables ALBEDO, LAI_IN, and FCANOPY, there must be multiple columns for these variables, one per vegetation tile. In this case, ALBEDO, LAI_IN, and FCANOPY each count as only 1 variable despite covering multiple columns. |
| FORCE_TYPE | stringstringfloat | VarName(un)signedmultiplier | Defines what forcing types are read from the file, and in what order. For ASCII file only the forcing type needs to be defined, but for Binary file each line must also define whether the column is SIGNED or UNSIGNED short int and by what factor values are multiplied before being written to output. Note: Unlike other variables, ALBEDO, LAI_IN, and FCANOPY, each span multiple columns, one column per veg tile. This will generally vary from one grid cell to the next as the number of veg tiles varies. However, ALBEDO, LAI_IN, and FCANOPY should each have only one FORCE_TYPE entry. [Click here for details](ForcingData.md). |
| FORCE_STEPS_PER_DAY | integer | steps | Number of timesteps per day in forcing file (must be >= 1) |
| FORCE_STEPS_PER_DAY | integer | steps | Number of timesteps per day in forcing file (must be = SNOW_STPES_PER_DAY) |
| FORCEYEAR | integer | year | Year meteorological forcing files start |
| FORCEMONTH | integer | month | Month meteorological forcing files start |
| FORCEDAY | integer | day | Day meteorological forcing files start |
Expand Down
4 changes: 2 additions & 2 deletions docs/Documentation/Drivers/Classic/RunVIC.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
- Clang (`clang` version 3+)

VIC has also been compiled using these compilers:

- Intel (`icc`)
- PGI (`pgcc`)

Expand All @@ -28,7 +28,7 @@

At the command prompt, type:

vic_classic.exe -g global_parameter_filename
./vic_classic.exe -g global_parameter_filename

where `global_parameter_filename` = name of the global parameter file corresponding to your project.

Expand Down
51 changes: 51 additions & 0 deletions docs/Documentation/Drivers/Image/Domain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# VIC Domain file

The Image Driver uses the [NetCDF](http://www.unidata.ucar.edu/software/netcdf/) file format to define model running domain.

Below is a list of variables in the domain netCDF file. The dimensions of the netCDF file are `lat` and `lon`. Note that here only the type of variables (i.e., MASK, AREA, FRAC, LAT and LON) is listed; corresponding variable names in the input netCDF file are specified by user in the [Global Parameter File](GlobalParam.md). All the listed variables are required.

| Variable | Dimension | Units | Type | Description |
|------------|-------------|----------|--------|-------------|
| LAT | [lat] | degree | double | Latitudes |
| LON | [lon] | degree | double | Longitues |
| MASK | [lat, lon] | N/A | integer | Mask of domain. 1 for grid cells inside considered domain; 0 for grid cells outside of domain. Cells outside of domain will not be run. Use run_cell variable in the parameter file to turn on/off active cells inside domain. |
| AREA | [lat, lon] | m2 | double | Area of grid cells. |
| FRAC | [lat, lon] | N/A | double | Fraction of grid cells that is land. |

# Example netCDF format VIC 5 image driver domain file

```shell
ncdump -h /ArkRed.domain.nc
netcdf ArkRed.domain {
dimensions:
lat = 66 ;
lon = 125 ;
variables:
int mask(lat, lon) ;
mask:comment = "0 indicates grid cell outside of domain" ;
mask:long_name = "domain mask" ;
double lon(lon) ;
lon:long_name = "longitude coordinate" ;
lon:units = "degrees_east" ;
double lat(lat) ;
lat:long_name = "latitude coordinate" ;
lat:units = "degrees_north" ;
double frac(lat, lon) ;
frac:long_name = "fraction of grid cell that is active" ;
frac:units = "1" ;
double area(lat, lon) ;
area:standard_name = "area" ;
area:long_name = "area of grid cell" ;
area:units = "m2" ;

// global attributes:
:title = "VIC domain data" ;
:Conventions = "CF-1.6" ;
:history = "Wed Oct 12 15:48:42 2016: ncap2 -s mask=int(mask) ArkRed.domain.nc.float_mask ArkRed.domain.nc\n",
"created by ymao, 2016-09-23 18:17:58.761256" ;
:user_comment = "VIC domain data" ;
:source = "generated from VIC CONUS 1.8 deg model parameters, see Maurer et al. (2002) for more information" ;
:nco_openmp_thread_number = 1 ;
}
```

Loading

0 comments on commit ebd2ba3

Please sign in to comment.