Skip to content

Commit

Permalink
Merge branch 'restructure_xr' into tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollas authored Feb 5, 2024
2 parents ba63e14 + b86eea3 commit 9d8b636
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 18 deletions.
34 changes: 17 additions & 17 deletions docs/workshop_latest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -547,9 +547,9 @@ L2 satellite data already included in the package.
>>> from wavy.satellite_module import satellite_class as sc
>>> path_to_files= '/home/patrikb/wavy/tests/data/CCIv3_20Hz/'
>>> sd = '2019-3-24 18'
>>> ed = '2019-3-24 20'
>>> region = 'NordicSeas'
>>> sd = '2019-3-24 10'
>>> ed = '2019-3-24 11'
>>> region = 'Sulafj'
>>> sco = sc(sd=sd, ed=ed,
>>> nID='L2_20Hz_s3a', name='s3a',
>>> region=region)
Expand All @@ -559,24 +559,21 @@ You can have a first look at the data:

.. code-block:: python3
>>> sco.quicklook(a=True)
>>> sco.quicklook(a=True, land_mask_resolution='f')
.. image:: ./oslo_ws24_filters_1.png
:scale: 80

There could be some land interactions with the satellite track. It is possible to
filter it using *sco.filter_landMask()* function. Additionnally points closer than
a certain distance to the coast can be defined using *sco.filter_distance_to_coast()*
with *llim* argument. Finally, values under threshold (resp. over) can also be discarder using the
*sco.apply_limits()* method with *llim* argument (resp. *ulim*).

There could be some land interactions with the satellite track. It is possible to filter it using *sco.filter_landMask()* function. Additionnally points closer than a certain distance to the coast can be defined using *sco.filter_distance_to_coast()* with *llim* argument. If specifics (range gate resolution and height over ground) about the satellite intsrument are known one can compute a possible foot print land interaction based on the size of the pulse limited footprint size byt adding *.filter_footprint_land_interaction()*. Finally, values under threshold (resp. over) can also be discarder using the *sco.apply_limits()* method with *llim* argument (resp. *ulim*).

The corresponding code is the following:

.. code-block:: python3
>>> sco_filter = sco.filter_landMask()\
... .filter_distance_to_coast(llim=650)\
... .apply_limits(llim=0.5)
... .filter_footprint_land_interaction()\
... .apply_limits(llim=0.1)
.. image:: ./oslo_ws24_filters_2.png
Expand All @@ -586,20 +583,23 @@ Some additional despiking method can be applied with *sco.despike_blockStd()*.

.. code-block:: python3
>>> sco = sco.despike_blockStd(slider=20, sigma=2, chunk_min=5)
>>> sco = sco.despike_blockStd(slider=20, sigma=2, chunk_min=5, sampling_rate_Hz=20)
.. image:: ./oslo_ws24_filters_3.png
:scale: 80

In order to show the computed x-track pulse-limited footprint size one can add:

.. code-block:: python3
>>> sco = sco.despike_blockStd(slider=20, sigma=2, chunk_min=5, sampling_rate_Hz=20)
Another operation you can perform is smoothing the time serie, using a running mean
with the *sco.filter_runmean* method:
Another operation you can perform is smoothing the time serie, using a running mean with the *sco.filter_runmean* method:

.. code-block:: python3
>>> sco = sco.filter_runmean(window=11, chunk_min=5, sampling_rate_Hz=20)
>>> sco = sco.filter_runmean(window=5, chunk_min=5, sampling_rate_Hz=20)
.. image:: ./oslo_ws24_filters_4.png
:scale: 80
10. Saving data to netcdf
#########################
Expand Down
3 changes: 2 additions & 1 deletion wavy/quicklookmod.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ def quicklook(self, a=False, projection=None, **kwargs):
vmax = kwargs.get('vmax', np.nanmax(plot_var))

levels = kwargs.get('levels',
np.arange(vmin, vmax, .5))
np.arange(0, vmax+.5, .5))
#np.arange(vmin, vmax, .5))

cflevels = kwargs.get('cflevels', levels)
clevels = kwargs.get('clevels', levels)
Expand Down

0 comments on commit 9d8b636

Please sign in to comment.