示例#1
0
void ecl_config_add_config_items(config_type * config)
{
  config_schema_item_type * item;

  item = config_add_schema_item(config, SCHEDULE_FILE_KEY, false);
  config_schema_item_set_argc_minmax(item, 1, 2);
  config_schema_item_iset_type(item, 0, CONFIG_EXISTING_PATH);
  /*
   Observe that SCHEDULE_PREDICTION_FILE - which is implemented as a
   GEN_KW is added in ensemble_config.c
   */

  item = config_add_schema_item(config, IGNORE_SCHEDULE_KEY, false);
  config_schema_item_set_argc_minmax(item, 1, 1);
  config_schema_item_iset_type(item, 0, CONFIG_BOOL);

  item = config_add_schema_item(config, ECLBASE_KEY, false);
  config_schema_item_set_argc_minmax(item, 1, 1);

  item = config_add_schema_item(config, DATA_FILE_KEY, false);
  config_schema_item_set_argc_minmax(item, 1, 1);
  config_schema_item_iset_type(item, 0, CONFIG_EXISTING_PATH);

  item = config_add_schema_item(config, STATIC_KW_KEY, false);
  config_schema_item_set_argc_minmax(item, 1, CONFIG_DEFAULT_ARG_MAX);

  item = config_add_schema_item(config, ADD_FIXED_LENGTH_SCHEDULE_KW_KEY, false);
  config_schema_item_set_argc_minmax(item, 2, 2);
  config_schema_item_iset_type(item, 1, CONFIG_INT);

  item = config_add_schema_item(config, REFCASE_KEY, false);
  config_schema_item_set_argc_minmax(item, 1, 1);
  config_schema_item_iset_type(item, 0, CONFIG_PATH);

  item = config_add_schema_item(config, REFCASE_LIST_KEY, false);
  config_schema_item_set_default_type(item, CONFIG_PATH);

  item = config_add_key_value(config, PLOT_REFCASE_LIST_KEY, false, CONFIG_STRING);
  {
    char * message = util_alloc_sprintf("Warning: the key:%s is depreceated - use %s instead", PLOT_REFCASE_LIST_KEY,
        REFCASE_LIST_KEY);
    config_install_message(config, PLOT_REFCASE_LIST_KEY, message);
    free(message);
  }

  item = config_add_schema_item(config, GRID_KEY, false);
  config_schema_item_set_argc_minmax(item, 1, 1);
  config_schema_item_iset_type(item, 0, CONFIG_EXISTING_PATH);

  item = config_add_schema_item(config, INIT_SECTION_KEY, false);
  config_schema_item_set_argc_minmax(item, 1, 1);
  config_schema_item_iset_type(item, 0, CONFIG_PATH);
  config_add_alias(config, INIT_SECTION_KEY, "EQUIL_INIT_FILE");

  item = config_add_schema_item(config, END_DATE_KEY, false);
  config_schema_item_set_argc_minmax(item, 1, 1);
}
示例#2
0
void ecl_config_add_config_items(config_parser_type * config)
{
  config_schema_item_type * item;

  item = config_add_schema_item(config, SCHEDULE_FILE_KEY, false);
  config_schema_item_set_argc_minmax(item, 1, 2);
  config_schema_item_iset_type(item, 0, CONFIG_EXISTING_PATH);
  /*
   Observe that SCHEDULE_PREDICTION_FILE - which is implemented as a
   GEN_KW is added in ensemble_config.c
   */

  item = config_add_schema_item(config, IGNORE_SCHEDULE_KEY, false);
  config_schema_item_set_argc_minmax(item, 1, 1);
  config_schema_item_iset_type(item, 0, CONFIG_BOOL);

  item = config_add_schema_item(config, ECLBASE_KEY, false);
  config_schema_item_set_argc_minmax(item, 1, 1);

  item = config_add_schema_item(config, DATA_FILE_KEY, false);
  config_schema_item_set_argc_minmax(item, 1, 1);
  config_schema_item_iset_type(item, 0, CONFIG_EXISTING_PATH);

  item = config_add_schema_item(config, STATIC_KW_KEY, false);
  config_schema_item_set_argc_minmax(item, 1, CONFIG_DEFAULT_ARG_MAX);

  item = config_add_schema_item(config, ADD_FIXED_LENGTH_SCHEDULE_KW_KEY, false);
  config_schema_item_set_argc_minmax(item, 2, 2);
  config_schema_item_iset_type(item, 1, CONFIG_INT);

  item = config_add_schema_item(config, REFCASE_KEY, false);
  config_schema_item_set_argc_minmax(item, 1, 1);
  config_schema_item_iset_type(item, 0, CONFIG_PATH);

  item = config_add_schema_item(config, REFCASE_LIST_KEY, false);
  config_schema_item_set_default_type(item, CONFIG_PATH);

  item = config_add_schema_item(config, GRID_KEY, false);
  config_schema_item_set_argc_minmax(item, 1, 1);
  config_schema_item_iset_type(item, 0, CONFIG_EXISTING_PATH);

  item = config_add_schema_item(config, INIT_SECTION_KEY, false);
  config_schema_item_set_argc_minmax(item, 1, 1);
  config_schema_item_iset_type(item, 0, CONFIG_PATH);
  config_add_alias(config, INIT_SECTION_KEY, "EQUIL_INIT_FILE");

  item = config_add_schema_item(config, END_DATE_KEY, false);
  config_schema_item_set_argc_minmax(item, 1, 1);
}