def read_scat(filename, var_regex='CLB_B\d{5}', var_key='CLB_MATRIX',
**kwargs):
"""Read scattering coefficients from CSV file.
Parameters:
filename (str): Path to CSV file.
var_regex (str): Python regular expression [0] matching
the variable name of the profile.
var_key (str): Dictionary key for extracted profile.
**kwargs: Additional keyword arguments passed to `read_profile`.
[0] https://docs.python.org/3.1/library/re.html
Returns:
ndarray, ndarray: scattering coefficient, height levels
"""
output = read_profile(
filename,
var_key=var_key,
var_regex=var_regex,
**kwargs,
)
back_scat = output[var_key]
back_scat = np.ma.masked_less(back_scat, 0)
output[var_key] = back_scat
return output
评论列表
文章目录