Skip to content

Commit

Permalink
Update Gulf Stream eval with satellite SSH extended through 2023 (#143)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-c-ross authored Feb 13, 2025
1 parent a338ee6 commit 623a324
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
Binary file modified diagnostics/data/obs/satellite_ssh_index.pkl
Binary file not shown.
Binary file modified diagnostics/data/obs/satellite_ssh_points.nc
Binary file not shown.
15 changes: 7 additions & 8 deletions diagnostics/physics/NWA12/plot_gulf_stream.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,17 @@ def plot_gulf_stream(pp_root, label):
glorys_t200 = xarray.open_dataarray('../../data/diagnostics/glorys_T200.nc')

# Get satellite points
#satellite_ssh_index, satellite_ssh_points = compute_gs(satellite['adt'])
#satellite_ssh_points.to_netcdf('../data/obs/satellite_ssh_points.nc')
#satellite_ssh_index.to_pickle('../data/obs/satellite_ssh_index.pkl')
#read pre-calculate satellite_ssh_index and points
# satellite = xarray.open_dataset('/work/acr/cmems/cmems_obs-sl_glo_phy-ssh_my_allsat-l4-duacs-0.125deg_P1D/monthly_averaged/obs-sl_glo_phy-ssh_my_allsat-l4-duacs-0.125deg.nc')
# satellite = satellite.rename({'longitude': 'lon', 'latitude': 'lat'})
# satellite_ssh_index, satellite_ssh_points = compute_gs(satellite['adt'])
# satellite_ssh_points.to_netcdf('../data/obs/satellite_ssh_points.nc')
# satellite_ssh_index.to_pickle('../data/obs/satellite_ssh_index.pkl')
# OR
# read pre-calculate satellite_ssh_index and points
satellite_ssh_points = xarray.open_dataset('../../data/obs/satellite_ssh_points.nc')
satellite_ssh_index = pd.read_pickle('../../data/obs/satellite_ssh_index.pkl')
satellite_rolled = satellite_ssh_index.rolling(25, center=True, min_periods=25).mean().dropna()

#satellite = xarray.open_mfdataset([f'/net2/acr/altimetry/SEALEVEL_GLO_PHY_L4_MY_008_047/adt_{y}_{m:02d}.nc' for y in range(1993, 2020) for m in range(1, 13)])
#satellite = satellite.rename({'longitude': 'lon', 'latitude': 'lat'})
#satellite = satellite.resample(time='1MS').mean('time')

# Get rolling averages and correlations
model_rolled = model_ssh_index.rolling(25, center=True, min_periods=25).mean().dropna()
corr = pd.concat((model_ssh_index, satellite_ssh_index), axis=1).corr().iloc[0, 1]
Expand Down

0 comments on commit 623a324

Please sign in to comment.