-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from tsutterley/testing
jupyter notebook on binder
- Loading branch information
Showing
62 changed files
with
5,840 additions
and
36 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
aod1b_geocenter.py | ||
================== | ||
|
||
- Reads GRACE/GRACE-FO level-1b dealiasing data files for a specific product | ||
- `atm`: atmospheric loading from ECMWF | ||
- `ocn`: oceanic loading from OMCT/MPIOM | ||
- `glo`: global atmospheric and oceanic loading | ||
- `oba`: ocean bottom pressure from OMCT/MPIOM | ||
- Creates monthly files of geocenter variations at 6-hour intervals | ||
|
||
#### Calling Sequence | ||
``` | ||
from gravity_toolkit.aod1b_geocenter import aod1b_geocenter | ||
aod1b_geocenter(base_dir, DREL='RL06', DSET='glo', CLOBBER=True) | ||
``` | ||
|
||
#### Inputs | ||
1. `base_dir`: working data directory | ||
|
||
#### Options | ||
- `DREL`: GRACE/GRACE-FO data release (RL05 or RL06) | ||
- `DSET`: GRACE/GRACE-FO dataset (atm, ocn, glo, oba) | ||
- `CLOBBER`: overwrite existing data | ||
- `MODE`: Permission mode of directories and files | ||
- `VERBOSE`: Output information for each output file | ||
|
||
#### Dependencies | ||
- `geocenter.py`: converts degree 1 spherical harmonic coefficients to geocenter variations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
combine_harmonics.py | ||
==================== | ||
|
||
- Returns the spatial field for a series of spherical harmonics | ||
|
||
#### Calling Sequence | ||
``` | ||
from gravity_toolkit.combine_harmonics import combine_harmonics | ||
spatial = combine_harmonics(clm,slm,lon,lat,LMAX=60) | ||
``` | ||
|
||
#### Inputs: | ||
1. `clm`: cosine spherical harmonic coefficients | ||
2. `slm`: sine spherical harmonic coefficients | ||
3. `lon`: longitude | ||
4. `lat`: latitude | ||
|
||
#### Options: | ||
- `LMIN`: Lower bound of Spherical Harmonic Degrees | ||
- `LMAX`: Upper bound of Spherical Harmonic Degrees | ||
- `MMAX`: Upper bound of Spherical Harmonic Orders | ||
- `PLM`: Fully-normalized associated Legendre polynomials | ||
|
||
#### Outputs: | ||
- `spatial`: spatial field [lon,lat] | ||
|
||
#### Dependencies | ||
- `plm_holmes.py`: Computes fully-normalized associated Legendre polynomials |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
convert_calendar_decimal.py | ||
=========================== | ||
|
||
- Converts from calendar date into decimal years taking into account leap years | ||
|
||
#### Calling Sequence | ||
``` | ||
from gravity_toolkit.convert_calendar_decimal import convert_calendar_decimal | ||
t_date = convert_calendar_decimal(year, month, DAY=day, \ | ||
HOUR=hour, MINUTE=minute, SECOND=second) | ||
``` | ||
|
||
#### Inputs | ||
1. `year`: calendar year | ||
2. `month`: calendar month (1 = January, ..., 12 = December) | ||
|
||
#### Options | ||
- `DAY`: Number of day of the month | ||
- `HOUR`: hour of the day | ||
- `MINUTE`: minute of the hour | ||
- `SECOND`: second (and fractions of a second) of the minute | ||
- `DofY`: day of the year (January 1 = 1) | ||
|
||
#### Outputs | ||
- `t_date`: date in decimal format (years) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
convert_julian.py | ||
================= | ||
|
||
- Return the calendar date and time given Julian date | ||
|
||
#### Calling Sequence | ||
``` | ||
from gravity_toolkit.convert_julian import convert_julian | ||
YEAR,MONTH,DAY,HOUR,MINUTE,SECOND = convert_julian(JD, FORMAT='tuple') | ||
``` | ||
|
||
#### Inputs | ||
1. `JD`: Julian Day of the specified calendar date (days since -4712-01-01T12:00:00) | ||
|
||
#### Options | ||
- `ASTYPE`: convert output to variable type | ||
- `FORMAT`: format of output variables | ||
- `'dict'`: dictionary with variable keys as listed above | ||
- `'tuple'`: tuple with variable order YEAR,MONTH,DAY,HOUR,MINUTE,SECOND | ||
- `'zip'`: aggregated variable sets | ||
|
||
#### Outputs | ||
- `year`: Number of the desired year | ||
- `month`: Number of the desired month (1 = January, ..., 12 = December) | ||
- `day`: Number of day of the month | ||
- `hour`: hour of the day | ||
- `minute`: minute of the hour | ||
- `second`: second (and fractions of a second) of the minute |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
destripe_harmonics.py | ||
===================== | ||
|
||
- Filters spherical harmonic coefficients for correlated "striping" errors following [Swenson and Wahr (2006)](http://dx.doi.org/10.1029/2005GL025285) | ||
|
||
#### Calling Sequence | ||
``` | ||
from gravity_toolkit.destripe_harmonics import destripe_harmonics | ||
Ylms = destripe_harmonics(clm,slm,LMAX=60) | ||
``` | ||
|
||
#### Inputs | ||
1. `clm`: cosine spherical harmonic coefficients | ||
2. `slm`: sine spherical harmonic coefficients | ||
|
||
#### Options | ||
- `LMIN`: Lower bound of Spherical Harmonic Degrees | ||
- `LMAX`: Upper bound of Spherical Harmonic Degrees | ||
- `MMAX`: Upper bound of Spherical Harmonic Orders | ||
- `ROUND`: use round to find nearest even (True) or use floor (False) | ||
- `NARROW`: Clm=Slm=0 if number of points is less than window size (False) | ||
|
||
#### Outputs | ||
- `Wclm`: filtered cosine spherical harmonic coefficients | ||
- `Wslm`: filtered sine spherical harmonic coefficients |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
gauss_weights.py | ||
================ | ||
|
||
- Computes the Gaussian weights as a function of degree | ||
- A normalized version of [Christopher Jekeli's Gaussian averaging function](http://www.geology.osu.edu/~jekeli.1/OSUReports/reports/report_327.pdf) | ||
|
||
#### Calling Sequence | ||
``` | ||
from gravity_toolkit.gauss_weights import gauss_weights | ||
wl = 2.0*np.pi*gauss_weights(hw,LMAX) | ||
``` | ||
|
||
#### Inputs | ||
1. `hw`: Gaussian smoothing radius in km | ||
2. `LMAX`: Upper bound of Spherical Harmonic Degrees | ||
|
||
#### Outputs | ||
- `wl`: Gaussian weights for each degree `l` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
geocenter.py | ||
============ | ||
|
||
- Calculates the geocenter variation (in mm) from degree 1 Stokes Coefficients | ||
- Calculates the Degree 1 Stokes Coefficients of a geocenter variation (in mm) | ||
|
||
#### Calling Sequence | ||
``` | ||
from gravity_toolkit.geocenter import geocenter | ||
xyz = geocenter(C10=C10, C11=C11, S11=S11) | ||
Ylms = geocenter(X=x, Y=y, Z=z, INVERSE=True) | ||
``` | ||
|
||
#### Options | ||
1. `C10`: Cosine spherical harmonic of degree 1 and order 0 | ||
2. `C11`: Cosine spherical harmonic of degree 1 and order 1 | ||
3. `S11`: Sine spherical harmonic of degree 1 and order 1 | ||
4. `X`: X-component of geocenter variation | ||
5. `Y`: Y-component of geocenter variation | ||
6. `Z`: Z-component of geocenter variation | ||
7. `RADIUS`: Earth's radius for calculating spherical harmonics | ||
8. `INVERSE`: calculates the Stokes Coefficients from geocenter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
grace_date.py | ||
============= | ||
|
||
- Finds GRACE/GRACE-FO index file from `podaac_grace_sync.py` or `gfz_isdc_grace_ftp.py` | ||
- Reads dates of each GRACE/GRACE-FO file and assigns the month number | ||
- Creates an index of dates for GRACE/GRACE-FO files | ||
|
||
#### Calling Sequence | ||
``` | ||
from gravity_toolkit.grace_date import grace_date | ||
grace_files = grace_date(base_dir, PROC=PROC, DREL=DREL, DSET=DSET) | ||
``` | ||
|
||
#### Inputs | ||
1. Working data directory for GRACE/GRACE-FO data | ||
|
||
#### Options | ||
- `PROC`: GRACE data processing center (CSR/CNES/JPL/GFZ) | ||
- `DREL`: GRACE data release | ||
- `DSET`: GRACE dataset (GAA/GAB/GAC/GAD/GSM) | ||
- `GAA` is the non-tidal atmospheric correction | ||
- `GAB` is the non-tidal oceanic correction | ||
- `GAC` is the combined non-tidal atmospheric and oceanic correction | ||
- `GAD` is the GRACE ocean bottom pressure product | ||
- `GSM` is corrected monthly GRACE/GRACE-FO static field product | ||
- `OUTPUT`: create index of dates for GRACE/GRACE-FO data | ||
|
||
#### Outputs | ||
- dictionary of files mapped by GRACE/GRACE-FO month |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
grace_find_months.py | ||
==================== | ||
|
||
- Finds the months available for a GRACE/GRACE-FO product | ||
- Finds the all months missing from the product | ||
|
||
#### Calling Sequence | ||
``` | ||
from gravity_toolkit.grace_find_months import grace_find_months | ||
grace_months = grace_find_months(base_dir, PROC, DREL, DSET=DSET) | ||
``` | ||
|
||
#### Inputs | ||
- `base_dir`: Working data directory for GRACE/GRACE-FO data | ||
- `PROC`: GRACE/GRACE-FO data processing center (CSR, CNES, JPL, GFZ) | ||
- `DREL`: GRACE/GRACE-FO data release (RL04, RL05, RL06) | ||
|
||
#### Options | ||
- `DSET`: GRACE dataset (GSM, GAC, GAD, GAB, GAA) | ||
|
||
#### Outputs | ||
- `start`: First month in a GRACE/GRACE-FO dataset | ||
- `end`: Last month in a GRACE/GRACE-FO dataset | ||
- `missing`: missing months in a GRACE/GRACE-FO dataset | ||
- `months`: all available months in a GRACE/GRACE-FO dataset | ||
- `time`: center dates of all available months in a GRACE/GRACE-FO dataset |
Oops, something went wrong.