-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
load_earth_magnetic_anomaly: Add mag4km parameter to support earth_mag4km dataset #2239
load_earth_magnetic_anomaly: Add mag4km parameter to support earth_mag4km dataset #2239
Conversation
data = load_earth_magnetic_anomaly( | ||
resolution="01d", registration="gridline", mag4km=False | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer the old test without mag4km=False
, because it also checks if the default dataset type (i.e., earth_mag
) is changed.
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Specifies using the observations at sea level only over oceanic | ||
regions or over land and water at an altitude of 4 kilometers. The | ||
default is ``False``, which uses an *earth_mag_type* of **earth_mag**\. | ||
Setting ``mag4km`` to ``True`` sets the *earth_mag_type* | ||
of **earth_mag4km**. The oceanic files are ~60% smaller. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel the description is a little difficult to understand. Maybe rewrite it to something like:
Choose the data version to use. The default is
False
, which is observed at sea level over oceanic regions and have no data over land. Settingmag4km
toTrue
to use a version where all observations are relative to an altitude of 4 km above the geoid and includes data over land.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed.
…maly-4km' into load-remote-dataset/magnetic-anomaly-4km
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
…g4km dataset (GenericMappingTools#2239) * Add mag4km parameter to load_earth_magnetic_anomaly.py * Add tests for mag4km and associated cache files * Add test_earth_mag_incorrect_resolution_registration function * Remove unnecessary file suffix from cache .grd files used by test_datasets_earth_magnetic_anomaly.py Co-authored-by: Dongdong Tian <seisman.info@gmail.com> Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
As referenced in this comment, this adds the
mag4km
option for the magnetic anomaly dataset.Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.Slash Commands
You can write slash commands (
/command
) in the first line of a comment to performspecific operations. Supported slash commands are:
/format
: automatically format and lint the code/test-gmt-dev
: run full tests on the latest GMT development version