Skip to content

Commit

Permalink
fix bug in daily_avg when no RH values exist
Browse files Browse the repository at this point in the history
  • Loading branch information
kristinemlarson committed Aug 10, 2023
1 parent 82cfc03 commit 612c112
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
24 changes: 6 additions & 18 deletions docs/pages/README_dailyavg.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,42 +37,30 @@ is printed to the screen and a plot is created.
- daily average RH that meet the QC criteria


I illustrate the steps you might take with station MCHN. The antenna is very close to the water, so that is
I illustrate the steps you might take with station MCHN. The antenna is very close to the water, so that is good.
But the receiver itself is operated suboptimally and only L1 GPS data can be used here.
This severely limits the number of tracks that can be used.

I start out with almost no QC (outliers with 2 meters of the median value, only 5 satelliet arcs required per day):

I start out with almost no QC (outliers with 2 meters of the median value, only 5 satellite arcs required per day):

<code> daily_avg mchn 2 5 </code>

<p align=center>
<img width=500 src=../_static/mchn_01.png>
</p>

<p align=center>
<img width=500 src=../_static/mchn_02.png>
</p>

<p align=center>
<img width=500 src=../_static/mchn_03.png>
</p>


You can easily see the outliers - and that you need to use something more
useful than 2 meters for the median filter. I will use 0.25 meters. I am also going to
change the required tracks to 10
change the required tracks to 10:

<p align=center>
<img width=500 src=../_static/mchn_04.png>
</p>

<p align=center>
<img width=500 src=../_static/mchn_05.png>
</p>


<p align=center>
<img width=500 src=../_static/mchn_06.png>
</p>

Expand All @@ -86,10 +74,10 @@ You can see that at least visually, this makes no change in the daily averages.

<p align=center>
<img width=500 src=../_static/mchn_07.png>
</p>

<p align=center>
<img width=500 src=../_static/mchn_08.png>
</p>


I hope this module is helpful for you. If it is not, there is certainly nothing
wrong with doing your own QC using another software tool such as Matlab.

4 changes: 4 additions & 0 deletions gnssrefl/daily_avg.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,10 @@ def quick_raw(alldatafile2,xdir,station,subdir):
"""
if os.path.exists(alldatafile2):
raw = np.loadtxt(alldatafile2,comments='%')
if len(raw) == 0:
print('There are no RH data. At all. Exiting')
sys.exit()

ns= len(raw.shape)
if ns == 2:
nr,nc = raw.shape
Expand Down
2 changes: 2 additions & 0 deletions software_tests
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,11 @@ gnssir_input p103
#make_json_input p103 0 0 0



quickLook p103 2020 105 -plt F
quickLook p103 2020 107 -plt F -fr 2

gnssir p103 2020 105 -doy_end 109
daily_avg p103 0.5 10 -plt F

subdaily p103 2020 -plt F
Expand Down

0 comments on commit 612c112

Please sign in to comment.