|
Methods defined here:
- __init__(self, viewtype, datapath, flnm, yyyy, mm, dd, viewmode_dict={'glint': 1, 'nadir': 0}, surf_type_dict={'conifer': 1, 'desert': 4, 'ocean': 0, 'snow': 2, 'soil': 3}, fopen=<function open_err_file>, fread=<function read_err_file>, fclose=<function close_err_file>, fget=<function get_err_data>, fio_keywords={}, **keywords)
- initialization
Inputs:
------------------------------------------------------
1. viewtype:<str>: instrument type (or name)
2. datapath:<str>: file path for ERR data
3. flnm: <flnm>: file name for ERR data
4. yyyy: <int>: year
5. mm:<int>: month
6. dd:<int>: day
7. viewmode_dict:<dict>: dictionary for view modes
8. surf_type_dict:<dict>: dictionary for surface type
9. fopen:<func>: open data file
10. fread:<func>: read data into
11. fclose:<func>: close file
12. fget: <func>: get err values
13. rw_keywords:<dict>: additional parameters for ERR file read/write
14. keywords:<dict>: attributes
- get_data(self, osza, oaod, iviewmode, isurf_type, **keywords)
- get err for observation conditions (osza and oaod)
Inputs:
-------------------------------------------------------
1.osza:<array, (nob)>: solar zenith angle
2.oaod:<array, (nob)>: aerosol optical depth
3.iviewmode:<array, (nob)/integer>: view mode
4.isurf_type:<array, (nob)/integer>: surface type
5. keywords:<dict>:
---Reserved Entries
---common_ref:<str/numeric>: the reference shared by observations.
--->'err_viewmode_dict':<dict>: dictionary for view mode
--->'err_surf_type_dict': <dict>: dictionary for surface type
---> ax_colnm_lst: <list, t:str>: column name for horizontal axis
---> zname: <str>: axis name for vertical (e.g., log10(pressure)) axis
---> zval: <array, (nz,)>: vertical axis
--->'replaces': <dict>: words to be replaced when decoding line
Returns:
--------------------------------------------------
1. err: <array, (nob, nz)>: observation errors
- get_surf_type_id(self, surf_type, surf_type_dict=None)
- find ID for surface type
Inputs:
-----------------------------------------
1.viewmode:<array/obj>: viewmodes to be checked against viewmode_dict
2.viewmode_dict:<dict>: dictionary in the form of {viewmode:id}
---if surf_type_dict==None, self.surf_type_dict will be used
Returns:
------------------------------------------
vid_lst:<array/obj>: id of the given surface types
- get_viewmode_id(self, viewmode, viewmode_dict=None)
- find ID for viewmode
Inputs:
-----------------------------------------
1.viewmode:<array/obj>: viewmodes to be checked against viewmode_dict
2.viewmode_dict:<dict>: dictionary in the form of {viewmode:id}
---if viewmode_dict==None, self.viewmode will be used
Returns:
------------------------------------------
vid_lst:<array/obj>: id of the given viewmodes
- load_data(self, flnm, datapath, viewtype, viewmode, surface, yyyy, mm, dd, **keywords)
- Construct fdesc and read ERR file in
1. flnm:<str>: name of file (reserved for future use )
2. datapath:<str>: file path
3. viewtype:<str>: instrument type
4. viewmode:<str>: nadir or glint view
5. surface:<str>: surface type
6. yyyy: <int>: year
7. mm: <int>: month
8. dd:<int>: day
9. keywords:<dict>: extra inputs for file reading
----Reserved words
--->'fl_colnm_lst':<list, t:str>: names of all columns in the
--->'err_viewmode_dict':<dict>: dictionary for view mode
--->'err_surf_type_dict': <dict>: dictionary for surface type
--->'delim':<str>: splitor in averaging kernel (text) file
---> zname: <str>: axis name for vertical (e.g., log10(pressure)) axis
---> zval: <array, (nz,)>: vertical axis
--->'replaces': <dict>: words to be replaced when decoding line
Returns:
-----------------------------------------
1. is_ready:<T/F>: True when the file has been opened successfully
Notes:
1. self.fdesc will be constructed by functions self.fopen.
2. Its data memebers will be updated by self.fread.
|