.. highlight:: rest .. _config: Configuration File ================== Create a file that will hold configuration values for the various scripts that are needed for the inversion. This file is made up of key = value lines, with comments available using '#' as the beginning of the comment. The default name of the configuration file is 'config.ini'. Example ------- .. literalinclude:: config.ini :language: python .. warning:: For the current version of the software, there are restrictions on the value of the 'hrsperstep' value in the configuration. It must be <= 24 and evenly divide into 24, that is, allowed values are 1,2,3,4,6,8,12,24. This restriction may be removed in future versions of the software. The configuration values are contained in a python dict called 'config'. There are additional entries calculated in addition to the ones specified in the configuration file. A complete config dict from the above configuration file would contain:: bound_name : flux east : -50 edate : 2012-09-01 00:00:00 end_date : 2012-8-31 h_tmp_dir : tmpH hdir : H hqdir : HQ hrsperstep : 3 hsensitivity_name : Hsensitivity hsigdir : Hsigma isbound : 0 landmask_file : landmask_na.npy lat_resolution : 1 latmax : 169 latmin : 100 lats : [ 10.5 10.5 10.5 ..., 79.5 79.5 79.5] locations : 3470 lon_resolution : 1 lonmax : 129 lonmin : 10 lons : [-85.5 -84.5 -83.5 ..., -81.5 -80.5 -75.5] ncells : 8400 ndays : 92 nlandcells : 3470 nlatgrids : 70 nlongrids : 120 north : 80 ntimesteps : 736 oneday : 1 day, 0:00:00 sdate : 2012-06-01 00:00:00 south : 10 sp_cov_file : spcov.npy spatial_corr_length : 1000 start_date : 2012-6-1 steps_per_day : 8 temporal_corr_length : 7.0 timestep : 3:00:00 vshat_dates : ['2012-6-1', '2012-7-1', '2012-8-1', '2012-9-1'] west : -170 workdir : /data/inversions/summer2012v1.1 .. note:: Starting with version 0.15, the 'numprocs' setting is no longer used. It is now an option to the :ref:`hq` script. TODO ---- Getting the config dictionary values from the config file using the *getConfig()* method in **utils.py**. Explain what all the config dict entries mean