Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@navidcy
navidcy / cookbook-with-daskclient-spits-warnings.ipynb
Created February 27, 2024 11:46
cookbook-with-daskclient-spits-warnings notebook
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@navidcy
navidcy / CMEMS_adt.ipynb
Last active October 12, 2021 06:43
Load and slice CMEMS adt
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@navidcy
navidcy / MnWE-shift-time-axis.ipynb
Created June 10, 2021 05:54
Minimal non-Working Example for shifting `time`
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@navidcy
navidcy / regrid-xesmf.ipynb
Created February 3, 2021 21:36
xesfm regrid attempt
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@navidcy
navidcy / gist:cc1baced64d57b2ce7477eca71eeee2d
Created November 28, 2020 01:44
clear GeophysicalFlowsDocumentation previews folder
git clone https://github.com/FourierFlows/GeophysicalFlowsDocumentation.jl.git; cd GeophysicalFlowsDocumentation.jl; git checkout gh-pages; git rm -rf previews; git commit -m "delete previews"; git branch gh-pages-new $(echo "delete history" | git commit-tree HEAD^{tree}); git push --force origin gh-pages-new:gh-pages;
@navidcy
navidcy / gist:5034891d186f65e2f0bcaab1141b3442
Last active September 7, 2020 23:27
Merge output from multiple IAF cycles that all start at 1958
# loat temp data from the two IAF cycles
temp_cycle1 = cc.querying.getvar('01deg_jra55v140_iaf', 'temp', session, ncfile='ocean-3d-temp-1-monthly-mean-ym_%.nc')
temp_cycle2 = cc.querying.getvar('01deg_jra55v140_iaf_cycle2', 'temp', session, ncfile='ocean-3d-temp-1-monthly-mean-ym_%.nc')
# The above data arrays have monthly temporal resolution.
# We would like to shift the time-axis of `cycle2` so
# as to plot them as a contiguous time-series,
# find out how many months we need to shift `cycle2`
howmanymonths = str(temp_010_cycle1_IAF_all.time.size + 1) + 'M'
using FourierFlows, Printf, Random
using Random: seed!
using FFTW: rfft, irfft
import GeophysicalFlows.TwoDNavierStokes
import GeophysicalFlows.TwoDNavierStokes: energy, enstrophy
import GeophysicalFlows: peakedisotropicspectrum