Closed hanase closed 5 years ago
This should take care of it: https://github.com/psrc/urbansim2/commit/a0a31cb40281a1d3cc032307c51cb111b22915d9
@stefancoe - I'm not able to pass the year value. I get this error:
$ python cache_to_hdf5.py //modelsrv8/d$/opusgit/urbansim_data/data/psrc_parcel/base_year_2014_inputs/urbansim2_estimation_cache test.h5 ["2000", "2009", "2014"] --is-estimation usage: cache_to_hdf5.py [-h] [--is-estimation] [--no-compress] base_dir hdf_name year cache_to_hdf5.py: error: unrecognized arguments: 2009, 2014]
@hanase the code worked when I had the arguments in a list in Main(), but clearly its not working when passing them in the command prompt. I wonder if it would be easier to just have some variables like year and path at the top of the script instead of using argparse? It starts to get a little messy with the different years for the estimation data.
Sure. Make it simple for now - we can revisit later.
In the cache2h5 conversion script make it possible to set the year as an argument, instead of hard-coded in the YEAR object. E.g. via an option '-y'. It can use 2014 as default.
In an estimation mode, the -y option could be given as a sequence, e.g.
-y 2000,2009,2014
with these three values as default.