Skip to content

Instantly share code, notes, and snippets.

View mdsumner's full-sized avatar

Michael Sumner mdsumner

  • Integrated Digital East Antarctica, Australian Antarctic Division
  • Hobart, Australia
View GitHub Profile
@mdsumner
mdsumner / minx.md
Last active December 17, 2024 12:55

running the quickstart

air_temp.to_zarr(repo.store, group='air_temperature')
/workenv/lib/python3.11/site-packages/xarray/core/dataset.py:2621: SerializationWarning: saving variable None with floating point data as an integer dtype without any _FillValue to use for NaNs
  return to_zarr(  # type: ignore[call-overload,misc]
Traceback (most recent call last):

A docker image for R folks wanting python too on GADI.

This update script will get the latest version of the image (it's big). Set your project/s for scratch and storage, I don't really understand the temp file stuff yet but this worked for me. Takes about 25min to get the image (you don't need to update often, this is very latest GDAL/PROJ/GEOS.

#!/bin/bash


#PBS -l ncpus=1

Get rema in longlat for a given extent, and resolution.

2m resolution is some thing like 1/50000 of a degree, so 3e-5 gives cells with 4m^2 area at 70S

#' Get REMA v2 data in longlat
#' 
#' This is crafted VRT hosted on github that references the source 2m GeoTIFFs and some pre-rendered lower resolutions, 
#' so we can make data from large areas quickly as well as small areas. 
#' 
```R
prj <- "+proj=stere +lat_0=-90 +lon_0=100 +lat_ts=-70"
library(raadtools)
files <- read_amsr2_3k_ice(returnfiles = TRUE)
files <- files[nrow(files):1, ]
im <- vapour::gdal_raster_data(files$fullname[1], target_ext = e, target_crs = prj)
p <- reproj::reproj(cbind(99.3, -64.5), prj, source = "EPSG:4326")
@mdsumner
mdsumner / maria.md
Created November 18, 2024 05:30
Maria Island coastal contours

a

A small list of global datasets on Pawsey object storage.

'NSIDC_SEAICE_PS_S25km', 'NSIDC_SEAICE_PS_N25km' are the 25km sea ice concentrations between 1978-now, there are some missing days (was originally 2-daily, and there's a gap or two in the sources).

Polar stereographic grids, virtual Zarr referencing NetCDF objects on Pawsey storage, stored as "kerchunk Parquet".

import xarray