<jupyter_start><jupyter_text>Campo de gravidade no mundo  Importando bibliotecas<jupyter_code>import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import cartopy.crs as ccrs
import xarray as xr
import harmonica as hm
notebook_name = '1.2. gravity_earth.ipynb'<jupyter_output><empty_output><jupyter_text>Plot Style<jupyter_code>plt.style.use('ggplot')<jupyter_output><empty_output><jupyter_text>Carregando os dados de gravidade<jupyter_code>def fetch_dataset(fname):
    data = xr.open_dataset(fname)
    # Capture attributes dict because it's removed after converting the data to
    # float64
    attrs = data.attrs.copy()
    # The data are stored as ints and data as float32 to save space on the
    # data file. Cast them to float64 to avoid integer division errors.
    data = data.astype("float64")
    data.attrs = attrs
    return data
filename = 'data_set/gravity_05deg_EIGEN-6C4.nc'
data = fetch_dataset(filename)
data
lon = data.longitude
lat = data.latitude
grav = data.gravity<jupyter_output><empty_output><jupyter_text>Campo gravitacional (Mundo)<jupyter_code>title_font = 18
bottom_font = 15
plt.figure(figsize=(10,10), tight_layout=True)

projection = ccrs.Mollweide()
ax = plt.axes(projection=projection)
ax.set_global()
ax.coastlines()
ax.set_title('Gravidade (mGal)',size=title_font)
pg = ax.contourf(lon,
                 lat,
                 grav,100,transform=ccrs.PlateCarree(),cmap='RdBu_r')
cb = plt.colorbar(pg, orientation="horizontal", pad=0.01, aspect=50, shrink=1.1)
cb.ax.tick_params(labelsize=bottom_font)

plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10450563204005006, 'fraction_numerical': 0.02002503128911139, 'mean_word_length': 5.345238095238095, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '331897', 'license': 'CC-BY-4.0', 'n_tokens_mistral': 600, 'n_tokens_neox': 568, 'n_words': 125, 'path': 'Content/code/1. Gravity_earth/.ipynb_checkpoints/1.2. gravity_geoid_topography-checkpoint.ipynb', 'repo_name': 'andrelreis/metodos-potenciais', 'size': '1598'}