| |
- add_ems_cfg_data(fdesc, ref, **keywords)
- add table for ensemble configurations to data_lst in fdesc
Inputs:
=====================================
1. fdesc:<grdfile_io_cl>: class for file access
2. ref:<str/numeric>: reference for data sets read from file
3. keywords:<dict>: extra parameters
Returns:
=====================================
1. idx:<int>: index of the data set with reference =ref.
- close_ens_cfg_file(fdesc)
- Close fdesc file
Inputs:
--------------------------------------------------
1. fdesc:<file_desc_cl>: class for file access
Returns:
1. None
- get_ems_cfg_data(fdesc, oyyyy, omm, odd, **keywords)
- read enr_cfg data at given point
Inputs:
---------------------------------------
1. fdesc:<grdfile_io_cl>: file access
2. oyyyy:<int>: year
3. omm: <int>: month
4. odd:<int>: day (for future use)
6. keywords:<dict>: extra inputs
---Reserved Entries
Returns:
================================================
1. cur_ems_cfg:<recarray>: data for configuations
- get_ems_cfg_file_ref(yyyy, mm, dd, **keywords)
- check file reference
for emsemble configuration. By default
the reference number is year
Inputs:
----------------------------------------------------
1. yyyy:<array, (ntime,)>: year
2. mm: <array, (ntime,)>: month
3. dd:<array, (ntime,)>: dd
4. keywords:<dict>: extra information
Returns:
------------------------------------------------------
1. ref:<int>: reference number
--- by default, the reference number is year
- open_ems_cfg_file(flnm, datapath, yyyy, mm, dd, **fio_keywords)
- construct fdesc to read ensemble configurations data
Inputs:
==============================================
1. flnm:<str>: filename (reserved)
2. datapath:<str>: file path
3. yyyy:<array, (ntime,)>: year
4. mm: <array, (ntime,)>: month
5. dd:<array, (ntime,)>: dd
6. fio_keywords:<dict>: extra inputs
---Reserved keywords:
--->fl_colnm_lst: <list>: list of all column names in the file
--->sel_colnm_lst: <list>: list of the names for column to be read
--->colnm_dict:<dict>: dictionary for translating column names
--->delim: <str>: separator.
--->data_start:<int>: starting line number of the data section
--->header_start:<int>: line number of header section
Returns:
=============================================
1. fdesc:<file_desc_cl>: class for file access
- read_ems_cfg_file(fdesc, **fio_keywords)
- Read ensemble configurations as table into fdesc.data_lst
Inputs:
--------------------------------------------------
1. fdesc:<file_desc_cl>: class for file access
2. fio_keywords:<dict>: extra inputs for file read write
---Reserved words:
--->fl_colnm_lst: list of all column names in the file
--->sel_colnm_lst: list of the names for column to be read
--->colnm_dict:<dict>: dictionary for translating column names
Returns:
-------------------------------------
1. ndata:<int>: length of fdesc.dtable
Notes:
-------------------------------------
1. data will be stored as recarray by fdesc.dtable
- translate_column_names(colnm_lst, **keywords)
- translate column names to the names used to access data
Inputs:
-------------------------------
1. colnm_lst:<list, t:str>: list of column names
2. keywords:<dict>: extra inputs:
---reversed keywords:
---colnm_dict:<dict>: column name dictionary
Returns:
--------------------
1. new_column_lst: <list, t:str>:New column names:
|