Retrieval¶
The following functions are methods from the class
ProfilesData
Aerosol Extinction¶
This module is used to calculate extinction profiles from single attenuated backscatter profiles using an a priori.
backward_inversion(data, iref, apriori, rayleigh)
¶
Backward (Klett [Klett1985]_ ) inversion method.
.. [Klett1985] Klett, J. D. (1985). Lidar inversion with variable backscatter/extinction ratios. Applied optics, 24(11), 1638-1643.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
array_like
|
1D array of a single profile of the attenuated backscatter coefficient. |
required |
iref
|
float
|
Index of the reference altitude returned by :func: |
required |
apriori
|
dict
|
A priori values used to constrain the inversion. Valid keys include: - lr (float): Lidar Ratio (in sr). - aod (float): AOD (unitless). |
required |
rayleigh
|
class: |
required |
Raises:
Type | Description |
---|---|
NotImplementedError
|
AOD apriori is not implemented yet. |
Returns:
Type | Description |
---|---|
array_like
|
Extinction coefficient (in m⁻¹). |
Source code in aprofiles/retrieval/extinction.py
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
|
forward_inversion(data, iref, apriori, rayleigh)
¶
Forward iterative inversion method [#]_.
.. [#] Li, D., Wu, Y., Gross, B., & Moshary, F. (2021). Capabilities of an Automatic Lidar Ceilometer to Retrieve Aerosol Characteristics within the Planetary Boundary Layer. Remote Sensing, 13(18), 3626.
Method principle:
At z0, the aerosol transmission is assumed as being close to 1. We evaluate the aerosol extinction based on this assumption. This evaluation gives a refined aerosol extinction that is used to calculate a second time the aerosol transmission. The aerosol extinction retrieval will converge after a certain number iterations. After the convergence, the aerosol extinction is retrieved in the next upper layer.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data
|
array_like
|
1D Array of single profile of attenuated backscatter coefficient, in m-1.sr-1. |
required |
iref
|
float
|
index of the reference altitude returned by :func: |
required |
apriori
|
dict
|
A priori value to be used to constrain the inversion. Valid keys: ‘lr’ (Lidar Ratio, in sr) and ‘aod’ (unitless). |
required |
rayleigh
|
aprofiles.rayleigh.RayleighData). Instance of the
|
class: |
required |
Raises:
Type | Description |
---|---|
NotImplementedError
|
AOD apriori is not implemented yet. |
Returns:
Type | Description |
---|---|
array_like
|
Extinction coefficient (in m⁻¹). |
Source code in aprofiles/retrieval/extinction.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
|
inversion(profiles, time_avg=1, zmin=4000.0, zmax=6000.0, min_snr=0.0, under_clouds=False, method='forward', apriori={'lr': 50.0}, remove_outliers=False, verbose=False)
¶
Aerosol inversion of the attenuated backscatter profiles using an apriori.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
profiles
|
ProfilesData
|
|
required |
time_avg
|
int
|
in minutes, the time during which we aggregate the profiles before inverting the profiles. |
1
|
zmin
|
float
|
minimum altitude AGL, in m, for looking for the initialization altitude. |
4000.0
|
zmax
|
float
|
maximum altitude AGL, in m, for looking for the initialization altitude. |
6000.0
|
min_snr
|
float
|
Minimum SNR required at the reference altitude to be valid. |
0.0
|
under_clouds
|
bool
|
If True, and if the |
False
|
method
|
str
|
must be in [‘backward’, ‘forward’]. |
'forward'
|
apriori
|
dict
|
A priori value to be used to constrain the inversion. Valid keys: ‘lr’ (Lidar Ratio, in sr), ‘aod’ (unitless), 'cfg' (path of config file). |
{'lr': 50.0}
|
remove_outliers
|
bool
|
Remove profiles considered as outliers based on aod calculation (AOD<0, or AOD>2). |
False
|
verbose
|
bool
|
verbose mode. |
False
|
Raises:
Type | Description |
---|---|
NotImplementedError
|
AOD apriori is not implemented yet. |
Returns:
Type | Description |
---|---|
ProfilesData
|
object with additional (xarray.DataArray):
|
Example
Profiles preparation
import aprofiles as apro
#read example file
path = "examples/data/L2_0-20000-001492_A20210909.nc"
reader = apro.reader.ReadProfiles(path)
profiles = reader.read()
#extrapolate lowest layers
profiles.extrapolate_below(z=150, inplace=True)
Backward inversion
#aerosol inversion
profiles.inversion(zmin=4000, zmax=6000, remove_outliers=False, method='backward')
#plot extinction profiles
profiles.plot(var='extinction', zmax=6000, vmin=0, vmax=5e-2)
Forward inversion
#aerosol inversion
profiles.inversion(zmin=4000, zmax=6000, remove_outliers=False, method='forward')
#plot extinction profiles
profiles.plot(var='extinction', zmax=6000, vmin=0, vmax=5e-2)
Source code in aprofiles/retrieval/extinction.py
148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 |
|
Mass Concentration¶
This module is used to calculate mass concentration profiles from extinction profiles for given aerosol types.
concentration_profiles(profiles, method, apriori)
¶
Calculates Mass concentration profiles for different aerosol types
Parameters:
Name | Type | Description | Default |
---|---|---|---|
profiles
|
ProfilesData
|
|
required |
method
|
str
|
Method for calculating MEC. Must be one of {"mortier_2013", "literature"}. |
required |
apriori
|
dict
|
Apriori mec value (m2.g-1). |
required |
Returns:
Type | Description |
---|---|
ProfilesData
|
object with additional (xarray.Dataset):
|
Example
Profiles preparation
import aprofiles as apro
# read example file
path = "examples/data/L2_0-20000-001492_A20210909.nc"
reader = apro.reader.ReadProfiles(path)
profiles = reader.read()
# extrapolate lowest layers
profiles.extrapolate_below(z=150, inplace=True)
Forward inversion
# aerosol inversion
profiles.inversion(
zmin=4000, zmax=6000, remove_outliers=False, method='forward',
method_mass_conc='mortier_2013'
)
# plot mass concentration profiles for urban particles
profiles.plot(var='mass_concentration:urban', zmax=6000, vmin=0, vmax=100)
Source code in aprofiles/retrieval/mass_conc.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 |
|