Open lizaclark opened 7 years ago
I am also facing the same issue. Any updates/workaround this issue? @lizaclark
I am facing this issue! did anyone solve this issue? this is how I am running it vic_utils grid_params Stehekin_soil.txt and this gives the same information as vic_utils -h I am also trying to convert the vic parameters to netcdf using tonic api using the example in https://vic.readthedocs.io/en/master/Documentation/Drivers/Image/Ascii_to_NetCDF_params/#option-2-using-the-tonic-api
if I am right i did this in python as (file name =file.py)
from tonic.models.vic.grid_params import soil, snow, veg, veg_class, Cols, Desc, calc_grid, grid_params n_veg_classes = 11 root_zones = 3
soil_dict = soil('/mnt/c/global_para/parameters/Stehekin_soil.txt', c=Cols(nlayers=3))
snow_dict = snow('/mnt/c/PostDoc/VIC-Model/global_data_sets/global_para/parameters/Stehekin_snowbands.txt', soil_dict, c=Cols(snow_bands=5))
veg_dict = veg('/mnt/c/global_para/parameters/Stehekin_vegparam.txt', soil_dict, lai_index=False, veg_classes=n_veg_classes)
veg_lib = veg_class('/mnt/c/global_para/parameters/Stehekin_veglib.txt', skiprows=1)
target_grid, target_attrs = calc_grid(soil_dict['lats'], soil_dict['lons'])
grid_dict = grid_params(soil_dict, target_grid, version=version, veg_dict=veg_dict, veglib_dict=veg_lib, snow_dict=snow_dict)
write_netcdf('/mnt/c/global_para/parameters/global_sol_params_vic5.nc', target_attrs, target_grid=target_grid, soil_grid=grid_dict['soil_dict'], snow_grid=grid_dict['snow_dict'], veglib_dict=veg_lib, veg_grid=grid_dict['veg_dict'], version='5.0.dev')
after running this as "python file.py" I am getting are:
I am also facing same issue.
When I run
vic_utils grid_params --help
, I get the usage, like I would expect, but if I runvic_utils grid_params soil_file.txt
, I get the same usage that I would get fromvic_utils --help
. According to thegrid_params
help, the soil file is the only required input. the others are not optional? grid_params() doesn't seem to need these parameters. Either way, I would think that thevic_utils grid_params
usage would print to the screen instead of thevic_utils
usage.