| |
- ctm_slice_cl
class ctm_slice_cl |
|
general container for set of profiles for
tracers (or geo-physical variables) at set of locations.
Members:
------------------------------------------------------------------------------
1. name: <str>: name (container name etc)
2. lon:<array, nob>: longitude
3. lat:<array, nob>: latitude
4. pressure:<array, (nob, nz)>: pressure level at ob locations
5. is_in_log:<T/F>: if pressure given in log space
6. do_reverse:<T/F>: T, if pressure is given in decending order
7. mask_val:<float>: filling value for missing and bad data
8. data_lst:<list, t:ctm_prof>: list of profiles
9. attr_dict:<dict>: dictionary for name and ndim etc
10. ndata: <integer>: length of the data set
11. time_tag:<numerical/string>: tag for time step
Functions:
---------------------------------------
1. __init__: initialization
# member retrieve
2. find_profile_cl: search data matching selection criteria of name, tracer_id, tracer_name, category, group and time range etc
3. __getitem__: over-riding index
# member manage
4. add_data: add data to the list
5. del_data: delete data from the list
6. update_data: update data
# grid configuration
7. set_pressure: set up pressure levels
8. set_lon: set longitude
9. set_lat: set latitude
# attribute
10. add_attr: add attribute
11. get_attr: get attribute |
|
Methods defined here:
- __delitem__(self, index)
- del item given at index
Inputs:
1. index: <integer/string>: index or name of the data to be deleted
Returns:
1. ndel:<integer>: number of the data have been deleted
- __getitem__(self, index)
- retrieve data given at index
Inputs:
1. index: <integer/string>: index or name of the data to be retrieve
Returns:
1.data_lst:<list, t:ctm_profile_cl>: list of profiles with index and name
- __init__(self, name, data_lst, lon=None, lat=None, pressure=None, is_in_log=False, do_reverse=False, time_tag='', mask_val=-999.0, extra_axis=None, **keywords)
- Initialize
Inputs:
---------------------------------------------
1. name:<str>: Name of the object
2. data_lst<list, t:array>: list of (ctm_profile_cl ) profiles
3. lon: <array, (nob,)>: longitude
4. lat: <array, (nob,)>: latitude
5. pressure:<array, (nob, nlvl)>: pressure
6. is_in_log:<T/F>: Ture if pressure is given as log10(pressure)
7. do_reverse:<T/F>: True if pressure is given in decending order
8. time_tag:<str/float>: time
9. mask_val:<float>: filling values for missing and bad data
10. extra_axis:<gp_axis>: extra axis for time or ensemble etc
11. keywords:<dict>: attributes
- add_attr(self, name, val)
- add or replace attributes
Inputs
---------------------------------
1. name:<str>: attribute name
2. val: <obj>: value of the attribute
- add_data(self, data)
- Add data (ctm_field_cl) into the class
Inputs:
------------------------------
1. data:<ctm_field_cl>: class for ctm data
- find_profile_cl(self, **keywords)
- find the data meeting the requirements
Inputs:
----------------------------------------
1. keywords:<dict>: list of criteria
Returns:
------------------------------------------
1. found_data:<list, t:ctm_field_cl>: datasets meeting the criteria
- get_attr(self, name)
- check attribute
Inputs:
---------------------------------------------
1. name:<str>: attribute name
Returns:
----------------------------------------------
1. val:<obj>: value of the attribute
- get_lat(self)
- get lat
Returns:
----------------------------------------------------------------------------------
1. lat:<array, (nob,)>: latitude
- get_lon(self)
- get lon
Returns:
1. lon:<array, (nob,)>: longitude
- get_pressure(self)
- get pressure
Returns:
-------------------------------------------------------------------------------------------------
1. pressure:<array, (nob, nz)>: longitude
- init_veritcal_interp(self, opres, is_in_log, do_ob_reverse)
- initialize vertical interpolation
Inputs
----------------------------------------------------------------------------------------------------
1. opres:<array, (nlon, ob_nz)>: ob pressure grid to be projected.
2. is_in_log:<T/F>: optional. Ture if opres is given in log10 space
3. do_ob_reverse:<T/F>: optional. True of opres is given at descending order
- is_data_in_list(self, data, keys)
- check whether a data is already in the self.data_lst
Inputs:
-----------------------------------------------------------------------------
1. data:<ctm_profile_cl>: profile fileds
2. keys:<list, t:string>: a list of key should be checked.
Returns:
----------------------------------------------------------------------------------------
1. is_found:<integer>: if a data set with the same attributes of data input
is found in the list, its index will be given;
Otherwise, oob.fill_val_int will be given
- set_lat(self, olat)
- set_lon(self, olon)
- set_pressure(self, pressure, is_in_log, do_reverse, mask_val)
- define the grid pressure level
Inputs:
1.pressure:<array, (nob,nz)>: pressure at each level
2. is_in_log:<T/F>: True when pressure is given in log10
3. do_reverse:<T/F>: True when pressure is given at decending order
| |