Skip to content

Instantly share code, notes, and snippets.

@alfcrisci
Last active December 19, 2020 15:05
Show Gist options
  • Save alfcrisci/5af58ecabc0f919171568d26719ad911 to your computer and use it in GitHub Desktop.
Save alfcrisci/5af58ecabc0f919171568d26719ad911 to your computer and use it in GitHub Desktop.
# % bash mode
# cdo -selvar,mslp zoom_mslp2018.nc pp.nc
# % qui seleziono per togliere variabili a bischero.
# cdo griddes mslp.nc >oldgrid.txt
# % ottengo info sulla grid
# % dopo cambio xsize ysize e gridsize nel file txt che ho creato
# % Occhio devono essere coerenti.Salvo come newgrid.txt
# cdo remapcon,newgrid.txt mslp.nc newgridslp.nc
# cdo infov newgridslp.nc
install.packages("remotes")
remotes::install_github("markpayneatwork/ClimateOperators")
library(ClimateOperators)
cdo("selvar,mslp zoom_mslp2018.nc mslp.nc")
cdo("remapnn,mslp mslp.nc")
cdo("griddes mslp.nc >oldgrid.txt")
cdo("remapcon,newgrid.txt mslp.nc newgridslp.nc")
cdo("infov newgridslp.nc ")
# references
# https://rpubs.com/markpayne/132500
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment