Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

improve floating point comparisons in vic_init.c #701

Merged
merged 13 commits into from
Aug 8, 2017
13 changes: 8 additions & 5 deletions docs/Development/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ To check which release of VIC you are running:

[GH#710] (https://github.com/UW-Hydro/VIC/pull/710)

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.
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.

[GH#716] (https://github.com/UW-Hydro/VIC/pull/716)

Fixes initialization of coupler fields and calculates temperature and upwelling longwave to pass to WRF during initialization.
Fixes initialization of coupler fields and calculates temperature and upwelling longwave to pass to WRF during initialization.

[GH#718] (https://github.com/UW-Hydro/VIC/pull/718)

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 pass gridcell-averaged albedo to the coupler.


3. Speed up NetCDF operations in the image/CESM drivers ([GH#684](https://github.com/UW-Hydro/VIC/pull/684))
Expand All @@ -76,6 +76,10 @@ To check which release of VIC you are running:

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 ``image`` and ``cesm`` drivers ([GH#701](https://github.com/UW-Hydro/VIC/pull/701))

Codified behavior in the initialization of the ``image`` and `cesm` drivers that requires the parameter variables `AreaFract`, `Pfactor`, `zone_fract`, and `Cv` must sum exactly to 1.0. If using the `SNOW_BAND` option, the area weighted `elevation` must match the mean grid cell elevation (`elev`). VIC will print *warnings* if any of these criteria are violated.

## VIC 5.0.1

**Release date: (February 1, 2017)**
Expand All @@ -88,7 +92,7 @@ To check which release of VIC you are running:

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).
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 simulation 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))

Expand Down Expand Up @@ -297,7 +301,6 @@ This is a major update from VIC 4. The VIC 5.0.0 release aims to have nearly ide

Fixed a bug where volumetric heat capacity of water should be used in `func_canopy_energy_bal` (previously specific heat capacity was used).


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

## VIC 4.2.d [![DOI](https://zenodo.org/badge/doi/10.5281/zenodo.56058.svg)](http://dx.doi.org/10.5281/zenodo.56058)
Expand Down
3 changes: 3 additions & 0 deletions docs/Documentation/Drivers/Image/Params.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

The Image Driver uses the [NetCDF](http://www.unidata.ucar.edu/software/netcdf/) file format for its input model parameters. It is possible to convert the VIC ASCII style parameters to this format. We have put together an example ([Tutorial](Ascii_to_NetCDF_params.md) and [Ipython Notebook](https://github.com/UW-Hydro/VIC/blob/develop/samples/notebooks/example_reformat_vic4_parameters_to_vic5image.ipynb)) that provide examples of how to do this conversion. Our example uses the `tonic` [Python](https://www.python.org/) Package.

!!! Note
It is the user's responsibility to ensure that parameter files are formatted appropriately. Notably, the variables `AreaFract`, `Pfactor`, `zone_fract`, and `Cv` must sum exactly to 1.0. If using the `SNOW_BAND` option, the area weighted `elevation` must match the mean grid cell elevation (`elev`). VIC will print *** warnings *** if any of these criteria are violated.

# Soil Parameters

The Soil Parameters serve three main purposes:
Expand Down
2 changes: 2 additions & 0 deletions vic/drivers/shared_all/include/vic_driver_shared_all.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@
// Default snow band setting
#define SNOW_BAND_TRUE_BUT_UNSET 99999

// Max counter for root distribution iteration
#define MAX_ROOT_ITER 9999
/******************************************************************************
* @brief File formats
*****************************************************************************/
Expand Down
11 changes: 11 additions & 0 deletions vic/drivers/shared_all/src/calc_root_fraction.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ calc_root_fractions(veg_con_struct *veg_con,
size_t layer;
size_t zone;
size_t i;
size_t n_iter;
double sum_fract;
double dum;
double Zstep;
Expand All @@ -62,7 +63,16 @@ calc_root_fractions(veg_con_struct *veg_con,
Zsum = 0;
zone = 0;

n_iter = 0;
while (zone < options.ROOT_ZONES) {
n_iter++;
if (n_iter > MAX_ROOT_ITER) {
log_warn("veg=%d of Nveg=%d", veg, Nveg);
log_warn("zone %zu of %zu ROOT_ZONES", zone,
options.ROOT_ZONES);
log_err("stuck in an infinite loop");
}

Zstep = veg_con[veg].zone_depth[zone];
if ((Zsum + Zstep) <= Lsum && Zsum >= Lsum - Lstep) {
/** CASE 1: Root Zone Completely in Soil Layer **/
Expand Down Expand Up @@ -124,6 +134,7 @@ calc_root_fractions(veg_con_struct *veg_con,
}
}
else if (Zsum + Zstep > Lsum) {
zone++;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tbohn - can you look at the changes in this file, specifically this line?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I'm assuming you've tested this to ensure that the root fractions come out the same as before?

I wonder if there's a simpler algorithm for this function. Something to look into some day.

if (layer < options.Nlayer) {
veg_con[veg].root[layer] = sum_fract;
sum_fract = 0.;
Expand Down
2 changes: 1 addition & 1 deletion vic/drivers/shared_all/src/initialize_global.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ initialize_global()
global_param.endyear = 0;
global_param.endmonth = 0;
global_param.endday = 0;
global_param.resolution = 0;
global_param.resolution = MISSING;
global_param.wind_h = 10.0;
for (i = 0; i < 2; i++) {
global_param.forceyear[i] = 0;
Expand Down
6 changes: 6 additions & 0 deletions vic/drivers/shared_all/src/input_tools.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ str_to_out_type(char typestr[])
else if (strcasecmp("OUT_TYPE_SINT", typestr) == 0) {
return OUT_TYPE_SINT;
}
else if (strcasecmp("OUT_TYPE_INT", typestr) == 0) {
return OUT_TYPE_INT;
}
else if (strcasecmp("OUT_TYPE_CHAR", typestr) == 0) {
return OUT_TYPE_CHAR;
}
else if (strcasecmp("OUT_TYPE_FLOAT", typestr) == 0) {
return OUT_TYPE_FLOAT;
}
Expand Down
145 changes: 90 additions & 55 deletions vic/drivers/shared_all/src/print_library_shared.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,14 +265,15 @@ print_global_param(global_param_struct *gp)
fprintf(LOG_DEST, "\tendmonth : %hu\n", gp->endmonth);
fprintf(LOG_DEST, "\tendyear : %hu\n", gp->endyear);
for (i = 0; i < 2; i++) {
fprintf(LOG_DEST, "\tforceday[%zd] : %hu\n", i, gp->forceday[i]);
fprintf(LOG_DEST, "\tforcesec[%zd] : %u\n", i, gp->forcesec[i]);
fprintf(LOG_DEST, "\tforcemonth[%zd] : %hu\n", i,
fprintf(LOG_DEST, "\tforceday[%zd] : %hu\n", i, gp->forceday[i]);
fprintf(LOG_DEST, "\tforcesec[%zd] : %u\n", i, gp->forcesec[i]);
fprintf(LOG_DEST, "\tforcemonth[%zd] : %hu\n", i,
gp->forcemonth[i]);
fprintf(LOG_DEST, "\tforceoffset[%zd] : %hu\n", i,
fprintf(LOG_DEST, "\tforceoffset[%zd] : %hu\n", i,
gp->forceoffset[i]);
fprintf(LOG_DEST, "\tforceskip[%zd] : %u\n", i, gp->forceskip[i]);
fprintf(LOG_DEST, "\tforceyear[%zd] : %hu\n", i, gp->forceyear[i]);
fprintf(LOG_DEST, "\tforceskip[%zd] : %u\n", i, gp->forceskip[i]);
fprintf(LOG_DEST, "\tforceyear[%zd] : %hu\n", i,
gp->forceyear[i]);
}
fprintf(LOG_DEST, "\tnrecs : %zu\n", gp->nrecs);
fprintf(LOG_DEST, "\tstartday : %hu\n", gp->startday);
Expand Down Expand Up @@ -434,64 +435,91 @@ print_option(option_struct *option)
option->AboveTreelineVeg);
fprintf(LOG_DEST, "\tAERO_RESIST_CANSNOW : %d\n",
option->AERO_RESIST_CANSNOW);
fprintf(LOG_DEST, "\tBLOWING : %d\n", option->BLOWING);
fprintf(LOG_DEST, "\tBLOWING_VAR_THRESHOLD: %d\n",
option->BLOWING_VAR_THRESHOLD);
fprintf(LOG_DEST, "\tBLOWING_CALC_PROB : %d\n",
option->BLOWING_CALC_PROB);
fprintf(LOG_DEST, "\tBLOWING_SIMPLE : %d\n", option->BLOWING_SIMPLE);
fprintf(LOG_DEST, "\tBLOWING_FETCH : %d\n", option->BLOWING_FETCH);
fprintf(LOG_DEST, "\tBLOWING_SPATIAL_WIND : %d\n",
option->BLOWING_SPATIAL_WIND);
fprintf(LOG_DEST, "\tCARBON : %d\n", option->CARBON);
fprintf(LOG_DEST, "\tCLOSE_ENERGY : %d\n", option->CLOSE_ENERGY);
fprintf(LOG_DEST, "\tCOMPUTE_TREELINE : %d\n",
option->COMPUTE_TREELINE);
fprintf(LOG_DEST, "\tCONTINUEONERROR : %d\n", option->CONTINUEONERROR);
fprintf(LOG_DEST, "\tCORRPREC : %d\n", option->CORRPREC);
fprintf(LOG_DEST, "\tEQUAL_AREA : %d\n", option->EQUAL_AREA);
fprintf(LOG_DEST, "\tEXP_TRANS : %d\n", option->EXP_TRANS);
fprintf(LOG_DEST, "\tFROZEN_SOIL : %d\n", option->FROZEN_SOIL);
fprintf(LOG_DEST, "\tFULL_ENERGY : %d\n", option->FULL_ENERGY);
fprintf(LOG_DEST, "\tBLOWING : %s\n",
option->BLOWING ? "true" : "false");
fprintf(LOG_DEST, "\tBLOWING_VAR_THRESHOLD: %s\n",
option->BLOWING_VAR_THRESHOLD ? "true" : "false");
fprintf(LOG_DEST, "\tBLOWING_CALC_PROB : %s\n",
option->BLOWING_CALC_PROB ? "true" : "false");
fprintf(LOG_DEST, "\tBLOWING_SIMPLE : %s\n",
option->BLOWING_SIMPLE ? "true" : "false");
fprintf(LOG_DEST, "\tBLOWING_FETCH : %s\n",
option->BLOWING_FETCH ? "true" : "false");
fprintf(LOG_DEST, "\tBLOWING_SPATIAL_WIND : %s\n",
option->BLOWING_SPATIAL_WIND ? "true" : "false");
fprintf(LOG_DEST, "\tCARBON : %s\n",
option->CARBON ? "true" : "false");
fprintf(LOG_DEST, "\tCLOSE_ENERGY : %s\n",
option->CLOSE_ENERGY ? "true" : "false");
fprintf(LOG_DEST, "\tCOMPUTE_TREELINE : %s\n",
option->COMPUTE_TREELINE ? "true" : "false");
fprintf(LOG_DEST, "\tCONTINUEONERROR : %s\n",
option->CONTINUEONERROR ? "true" : "false");
fprintf(LOG_DEST, "\tCORRPREC : %s\n",
option->CORRPREC ? "true" : "false");
fprintf(LOG_DEST, "\tEQUAL_AREA : %s\n",
option->EQUAL_AREA ? "true" : "false");
fprintf(LOG_DEST, "\tEXP_TRANS : %s\n",
option->EXP_TRANS ? "true" : "false");
fprintf(LOG_DEST, "\tFROZEN_SOIL : %s\n",
option->FROZEN_SOIL ? "true" : "false");
fprintf(LOG_DEST, "\tFULL_ENERGY : %s\n",
option->FULL_ENERGY ? "true" : "false");
fprintf(LOG_DEST, "\tGRND_FLUX_TYPE : %d\n", option->GRND_FLUX_TYPE);
fprintf(LOG_DEST, "\tIMPLICIT : %d\n", option->IMPLICIT);
fprintf(LOG_DEST, "\tJULY_TAVG_SUPPLIED : %d\n",
option->JULY_TAVG_SUPPLIED);
fprintf(LOG_DEST, "\tLAKES : %d\n", option->LAKES);
fprintf(LOG_DEST, "\tIMPLICIT : %s\n",
option->IMPLICIT ? "true" : "false");
fprintf(LOG_DEST, "\tJULY_TAVG_SUPPLIED : %s\n",
option->JULY_TAVG_SUPPLIED ? "true" : "false");
fprintf(LOG_DEST, "\tLAKES : %s\n",
option->LAKES ? "true" : "false");
fprintf(LOG_DEST, "\tNcanopy : %zu\n", option->Ncanopy);
fprintf(LOG_DEST, "\tNfrost : %zu\n", option->Nfrost);
fprintf(LOG_DEST, "\tNlakenode : %zu\n", option->Nlakenode);
fprintf(LOG_DEST, "\tNlayer : %zu\n", option->Nlayer);
fprintf(LOG_DEST, "\tNnode : %zu\n", option->Nnode);
fprintf(LOG_DEST, "\tNOFLUX : %d\n", option->NOFLUX);
fprintf(LOG_DEST, "\tNOFLUX : %s\n",
option->NOFLUX ? "true" : "false");
fprintf(LOG_DEST, "\tNVEGTYPES : %zu\n", option->NVEGTYPES);
fprintf(LOG_DEST, "\tRC_MODE : %d\n", option->RC_MODE);
fprintf(LOG_DEST, "\tROOT_ZONES : %zu\n", option->ROOT_ZONES);
fprintf(LOG_DEST, "\tQUICK_FLUX : %d\n", option->QUICK_FLUX);
fprintf(LOG_DEST, "\tQUICK_SOLVE : %d\n", option->QUICK_SOLVE);
fprintf(LOG_DEST, "\tSHARE_LAYER_MOIST : %d\n",
option->SHARE_LAYER_MOIST);
fprintf(LOG_DEST, "\tQUICK_FLUX : %s\n",
option->QUICK_FLUX ? "true" : "false");
fprintf(LOG_DEST, "\tQUICK_SOLVE : %s\n",
option->QUICK_SOLVE ? "true" : "false");
fprintf(LOG_DEST, "\tSHARE_LAYER_MOIST : %s\n",
option->SHARE_LAYER_MOIST ? "true" : "false");
fprintf(LOG_DEST, "\tSNOW_DENSITY : %d\n", option->SNOW_DENSITY);
fprintf(LOG_DEST, "\tSNOW_BAND : %zu\n", option->SNOW_BAND);
fprintf(LOG_DEST, "\tSPATIAL_FROST : %d\n", option->SPATIAL_FROST);
fprintf(LOG_DEST, "\tSPATIAL_SNOW : %d\n", option->SPATIAL_SNOW);
fprintf(LOG_DEST, "\tTFALLBACK : %d\n", option->TFALLBACK);
fprintf(LOG_DEST, "\tSPATIAL_FROST : %s\n",
option->SPATIAL_FROST ? "true" : "false");
fprintf(LOG_DEST, "\tSPATIAL_SNOW : %s\n",
option->SPATIAL_SNOW ? "true" : "false");
fprintf(LOG_DEST, "\tTFALLBACK : %s\n",
option->TFALLBACK ? "true" : "false");
fprintf(LOG_DEST, "\tBASEFLOW : %d\n", option->BASEFLOW);
fprintf(LOG_DEST, "\tGRID_DECIMAL : %d\n", option->GRID_DECIMAL);
fprintf(LOG_DEST, "\tVEGLIB_PHOTO : %d\n", option->VEGLIB_PHOTO);
fprintf(LOG_DEST, "\tVEGLIB_FCAN : %d\n", option->VEGLIB_FCAN);
fprintf(LOG_DEST, "\tVEGPARAM_ALB : %d\n", option->VEGPARAM_ALB);
fprintf(LOG_DEST, "\tVEGPARAM_LAI : %d\n", option->VEGPARAM_LAI);
fprintf(LOG_DEST, "\tVEGPARAM_FCAN : %d\n",
option->VEGPARAM_FCAN);
fprintf(LOG_DEST, "\tVEGLIB_PHOTO : %s\n",
option->VEGLIB_PHOTO ? "true" : "false");
fprintf(LOG_DEST, "\tVEGLIB_FCAN : %s\n",
option->VEGLIB_FCAN ? "true" : "false");
fprintf(LOG_DEST, "\tVEGPARAM_ALB : %s\n",
option->VEGPARAM_ALB ? "true" : "false");
fprintf(LOG_DEST, "\tVEGPARAM_LAI : %s\n",
option->VEGPARAM_LAI ? "true" : "false");
fprintf(LOG_DEST, "\tVEGPARAM_FCAN : %s\n",
option->VEGPARAM_FCAN ? "true" : "false");
fprintf(LOG_DEST, "\tALB_SRC : %d\n", option->ALB_SRC);
fprintf(LOG_DEST, "\tLAI_SRC : %d\n", option->LAI_SRC);
fprintf(LOG_DEST, "\tFCAN_SRC : %d\n", option->FCAN_SRC);
fprintf(LOG_DEST, "\tLAKE_PROFILE : %d\n", option->LAKE_PROFILE);
fprintf(LOG_DEST, "\tORGANIC_FRACT : %d\n", option->ORGANIC_FRACT);
fprintf(LOG_DEST, "\tLAKE_PROFILE : %s\n",
option->LAKE_PROFILE ? "true" : "false");
fprintf(LOG_DEST, "\tORGANIC_FRACT : %s\n",
option->ORGANIC_FRACT ? "true" : "false");
fprintf(LOG_DEST, "\tSTATE_FORMAT : %d\n", option->STATE_FORMAT);
fprintf(LOG_DEST, "\tINIT_STATE : %d\n", option->INIT_STATE);
fprintf(LOG_DEST, "\tSAVE_STATE : %d\n", option->SAVE_STATE);
fprintf(LOG_DEST, "\tINIT_STATE : %s\n",
option->INIT_STATE ? "true" : "false");
fprintf(LOG_DEST, "\tSAVE_STATE : %s\n",
option->SAVE_STATE ? "true" : "false");
fprintf(LOG_DEST, "\tNoutstreams : %zu\n", option->Noutstreams);
}

Expand Down Expand Up @@ -817,17 +845,21 @@ print_snow_data(snow_data_struct *snow)
fprintf(LOG_DEST, "\tdepth : %f\n", snow->depth);
fprintf(LOG_DEST, "\tlast_snow : %d\n", snow->last_snow);
fprintf(LOG_DEST, "\tmax_snow_depth : %f\n", snow->max_snow_depth);
fprintf(LOG_DEST, "\tMELTING : %d\n", snow->MELTING);
fprintf(LOG_DEST, "\tMELTING : %s\n",
snow->MELTING ? "true" : "false");
fprintf(LOG_DEST, "\tpack_temp : %f\n", snow->pack_temp);
fprintf(LOG_DEST, "\tpack_water : %f\n", snow->pack_water);
fprintf(LOG_DEST, "\tsnow : %d\n", snow->snow);
fprintf(LOG_DEST, "\tsnow : %s\n",
snow->snow ? "true" : "false");
fprintf(LOG_DEST, "\tsnow_canopy : %f\n", snow->snow_canopy);
fprintf(LOG_DEST, "\tstore_coverage : %f\n", snow->store_coverage);
fprintf(LOG_DEST, "\tstore_snow : %d\n", snow->store_snow);
fprintf(LOG_DEST, "\tstore_snow : %s\n",
snow->store_snow ? "true" : "false");
fprintf(LOG_DEST, "\tstore_swq : %f\n", snow->store_swq);
fprintf(LOG_DEST, "\tsurf_temp : %f\n", snow->surf_temp);
fprintf(LOG_DEST, "\tsurf_temp_fbcount : %u\n", snow->surf_temp_fbcount);
fprintf(LOG_DEST, "\tsurf_temp_fbflag : %d\n", snow->surf_temp_fbflag);
fprintf(LOG_DEST, "\tsurf_temp_fbflag : %s\n",
snow->surf_temp_fbflag ? "true" : "false");
fprintf(LOG_DEST, "\tsurf_water : %f\n", snow->surf_water);
fprintf(LOG_DEST, "\tswq : %f\n", snow->swq);
fprintf(LOG_DEST, "\tsnow_distrib_slope: %f\n",
Expand Down Expand Up @@ -861,7 +893,8 @@ print_soil_con(soil_con_struct *scon,
size_t j;

fprintf(LOG_DEST, "soil_con:\n");
fprintf(LOG_DEST, "\tFS_ACTIVE : %d\n", scon->FS_ACTIVE);
fprintf(LOG_DEST, "\tFS_ACTIVE : %s\n",
scon->FS_ACTIVE ? "true" : "false");
fprintf(LOG_DEST, "\tDs : %f\n", scon->Ds);
fprintf(LOG_DEST, "\tDsmax : %f\n", scon->Dsmax);
fprintf(LOG_DEST, "\tKsat :");
Expand Down Expand Up @@ -1041,7 +1074,7 @@ print_soil_con(soil_con_struct *scon,
fprintf(LOG_DEST, "\n");
fprintf(LOG_DEST, "AboveTreeLine :");
for (i = 0; i < nbands; i++) {
fprintf(LOG_DEST, "\t%d", scon->AboveTreeLine[i]);
fprintf(LOG_DEST, "\t%s", scon->AboveTreeLine[i] ? "true" : "false");
}
fprintf(LOG_DEST, "\n");
fprintf(LOG_DEST, "\televation : %f\n", scon->elevation);
Expand Down Expand Up @@ -1130,7 +1163,8 @@ print_veg_lib(veg_lib_struct *vlib,
size_t i;

fprintf(LOG_DEST, "veg_lib:\n");
fprintf(LOG_DEST, "\toverstory : %d\n", vlib->overstory);
fprintf(LOG_DEST, "\toverstory : %s\n",
vlib->overstory ? "true" : "false");
fprintf(LOG_DEST, "\tLAI :");
for (i = 0; i < MONTHS_PER_YEAR; i++) {
fprintf(LOG_DEST, "\t%.2f", vlib->LAI[i]);
Expand Down Expand Up @@ -1181,7 +1215,8 @@ print_veg_lib(veg_lib_struct *vlib,
fprintf(LOG_DEST, "\tMaxETransport : %.4f\n", vlib->MaxETransport);
fprintf(LOG_DEST, "\tCO2Specificity: %.4f\n", vlib->CO2Specificity);
fprintf(LOG_DEST, "\tLightUseEff : %.4f\n", vlib->LightUseEff);
fprintf(LOG_DEST, "\tNscaleFlag : %d\n", vlib->NscaleFlag);
fprintf(LOG_DEST, "\tNscaleFlag : %s\n",
vlib->NscaleFlag ? "true" : "false");
fprintf(LOG_DEST, "\tWnpp_inhib : %.4f\n", vlib->Wnpp_inhib);
fprintf(LOG_DEST, "\tNPPfactor_sat : %.4f\n", vlib->NPPfactor_sat);
}
Expand Down
1 change: 1 addition & 0 deletions vic/drivers/shared_image/include/vic_driver_shared_image.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <netcdf.h>

#define MAXDIMS 10
#define AREA_SUM_ERROR_THRESH 1e-20

/******************************************************************************
* @brief NetCDF file types
Expand Down
2 changes: 1 addition & 1 deletion vic/drivers/shared_image/src/print_library_shared_image.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ sprint_location(char *str,
"\tlongitude : %.4f\n"
"\tarea : %.4f\n"
"\tfrac : %.4f\n"
"\nveg : %zd\n"
"\tnveg : %zd\n"
"\tglobal_idx : %zd\n"
"\tio_idx : %zd\n"
"\tlocal_idx : %zd\n",
Expand Down
Loading