Skip to content

Commit

Permalink
changed subdaily spline output to only encompass true start/end time …
Browse files Browse the repository at this point in the history
…of observations
  • Loading branch information
kristinemlarson committed Mar 19, 2024
1 parent 380edbd commit 485870b
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ added ultra rapid orbits to nmea code
## 3.1.1
nmea2snr checks rapid, final, and ultra GNSS orbits from GFZ.

Changed it so that last spline written out by subdaily only includes time
periods with data. Before it was starting at the beginning of first day and ending
at the end of the last day. This didn't cause huge problems when full days were
analyzed but is definitely wrong otherwise.

## 3.1.0

hourly downloads from NGS allowed (download_rinex using ngs-hourly archive)
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,10 @@ GNSS-IR was developed with funding from NSF (ATM 0740515, EAR 0948957, AGS 09357
NASA (NNX12AK21G and NNX13AF43G). <code>gnssrefl</code> was initially developed
as a fun post-retirement project, followed by support from NASA (80NSSC20K1731).

The [CRC 1502 DETECT project](https://sfb1502.de/) supported this project from 2022-2024.

Kristine M. Larson

March 15, 2024
March 19, 2024


11 changes: 11 additions & 0 deletions docs/pages/file_structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,17 @@ But for the sake of completeness, we are either using broadcast navigation files
or precise orbits in the sp3 format. If you have nav files for your station, we recommend you delete them.
They are not useful in this code.

The main things you need to know:

- if your files only have GPS data in them, there is no need to use multi-GNSS SP3 files. Flag -nav T

- if your files are multi-GNSS, the best option is gnss, which are final orbits. This is complicated for
older data. Those files are reliably available from 2023. And they cover the four main constellations.
My current default is rapid GNSS - but that does not always have Beidou in it.

- we also have ultra-orbit options, which are appropriate for real-time users. I cannot keep track of
what ultra products are working. You can try ultra, wum, and wum2. The first is from GFZ and the latter two are from Wuhan.

## EXECUTABLES

There are two key executables: CRX2RNX and gfzrnx. For notebook and docker users, these
Expand Down
3 changes: 1 addition & 2 deletions gnssrefl/nmea2snr_cl.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ def nmea2snr( station: str, year: int, doy: int, snr: int = 66, year_end: int=No
overwrite : bool=False, dec : int=1, lat : float = None, lon : float=None,
height : float = None, risky : bool=False, gzip : bool = True):
"""
main script for the nmea2snr conversion code
This code creates SNR files from NMEA files.
The NMEA files should be stored in $REFL_CODE/nmea/ssss/2023 for station ssss and year 2023
Expand All @@ -68,6 +66,7 @@ def nmea2snr( station: str, year: int, doy: int, snr: int = 66, year_end: int=No
is not necessarily large - but you should be aware. The best thing to do is remake your SNR files.
As for March 16, 2024, this code has been changed to use gnssrefl standards for inputs and outputs.
The code, in principle, now looks for final, rapid, and ultra rapid orbits from GFZ, in that order.
Parameters
----------
Expand Down
10 changes: 8 additions & 2 deletions gnssrefl/rinex2snr_cl.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ def rinex2snr(station: str, year: int, doy: int, snr: int = 66, orb: str = None,
Some archives have been set to non-compliant with this feature. Please look in the first few lines
of code to see the names of these archives.
Real-time users should use ultra, wum, or wum2
Default orbits are GPS only until day of year 137, 2021 when rapid GFZ orbits became available. If you still want to use
the nav message, i.e. GPS only, you can request it.
Expand Down Expand Up @@ -530,9 +532,13 @@ def rinex2snr(station: str, year: int, doy: int, snr: int = 66, orb: str = None,
if weekly:
print('You have invoked the weekly option')
skipit = 7
print('Monthly and Weekly functions are not currently working. Resubmit.')
sys.exit()
if monthly:
print('You have invoked the monthly option')
skipit = 30
print('Monthly and Weekly functions are not currently working. Resubmit.')
sys.exit()

# the Makan option
if mk:
Expand All @@ -548,7 +554,6 @@ def rinex2snr(station: str, year: int, doy: int, snr: int = 66, orb: str = None,
MJD1 = int(g.ydoy2mjd(year,doy))
MJD2 = int(g.ydoy2mjd(year_end,doy_end))

print('Monthly and Weekly functions are not currently working.')

# queue which handles any exceptions any of the processes encounter
manager = multiprocessing.Manager()
Expand Down Expand Up @@ -618,6 +623,7 @@ def process_jobs_multi(index,args,datelist,error_queue):
"""

# should try be on each submission? or each list of submissions?
try:
d1 = datelist[index][0]; d2 = datelist[index][1]
mjd_list = list(range(d1, d2+1))
Expand All @@ -635,7 +641,7 @@ def process_jobs_multi(index,args,datelist,error_queue):

def process_jobs(mjd_list, args):
"""
this is not being used
this is not being used - calls should be sent to function above instead
"""
for mjd in mjd_list:
y, d = g.modjul_to_ydoy(mjd)
Expand Down
9 changes: 8 additions & 1 deletion gnssrefl/sd_libs.py
Original file line number Diff line number Diff line change
Expand Up @@ -979,7 +979,14 @@ def RH_ortho_plot2( station, H0, year, txtdir, fs, time_rh, rh, gap_min_val,th,
ndays = s2-s1 # number of days
numvals = 1 + int(ndays*86400/delta_out)
tp=np.linspace(s1,s2,numvals,endpoint= True)
# this means it is alreayd in MJD

# previous tp definition goes from beginning of the first day to the end of last day - but
# does not recognize that the file could have started well beyond that first point
# and it might end say 8 hours into the last day
ii = (tp >= firstpoint) & (tp <= lastpoint)
tp = tp[ii]

# this means it is already in MJD

if (th[0] > 400):
multiyear = True
Expand Down
3 changes: 3 additions & 0 deletions gnssrefl/subdaily.py
Original file line number Diff line number Diff line change
Expand Up @@ -1095,6 +1095,7 @@ def rhdot_correction2(station,fname,fname_new,pltit,outlierV,outlierV2,**kwargs)
firstKnot_in_minutes = 15
t1 = tnew.min()+firstKnot_in_minutes/60/24
t2 = tnew.max()-firstKnot_in_minutes/60/24
print('what are these values? ' , t1, t2)
knots =np.linspace(t1,t2,num=numKnots)


Expand Down Expand Up @@ -1135,6 +1136,8 @@ def rhdot_correction2(station,fname,fname_new,pltit,outlierV,outlierV2,**kwargs)
# make the plot externally now
badpoints2 = sd.subdaily_resids_last_stage(station, year, th, biasCor_rh, spline_at_GPS,
fs, strsig, hires_figs,txtdir, ii,jj,th_even, spline_whole_time)

# pick up the orthometric height from the gnssir_analysis json
H0 = sd.find_ortho_height(station,extension)
# this writes out spline file and makes plot ....
sd.RH_ortho_plot2( station, H0, year, txtdir, fs, th[jj],biasCor_rh[jj],gap_min_val,th,spline,delta_out,csvfile_spline)
Expand Down

0 comments on commit 485870b

Please sign in to comment.