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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import TensorFlow | |
// Custom differentiable type. | |
struct LinearRegressor: Differentiable { | |
var w: Tensor<Float> | |
var b: Tensor<Float> | |
func callAsFunction(_ x: Tensor<Float>) -> Tensor<Float> { | |
return matmul(x, w) + b | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from pyproj import Proj, transform | |
wgs84_proj = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs " | |
au_albers = "+proj=aea +lat_1=-18 +lat_2=-36 +lat_0=0 +lon_0=132 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs " | |
# Canberra (Australia) | |
lat = -35.28 | |
lon = 149.13 |
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module load gdal/1.9.2 | |
module load cdo | |
module load nco | |
YEAR=2017 | |
DATE=$(date -u -d $YEAR"-01-01") | |
END=$(date -u -d "2018-01-01") | |
COUNTER=0 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module load cdo | |
module load nco | |
module load gdal/2.2.2 | |
cdo -b I16 select,name=maxPV /g/data/ub8/au/LandCover/DEA_ALC/17_-25/fc_metrics_17_-25_2014.nc out.nc | |
ncpdq -a y,x out.nc out_swap.nc | |
gdal_translate -ot Byte NETCDF:"out_swap.nc":maxPV test.tiff -co TILED=YES -co COMPRESS=DEFLATE | |
gdaladdo test.tiff 2 4 8 16 32 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import xarray as xr | |
import numpy as np | |
import matplotlib.pyplot as plt | |
print("Jan") | |
ds = xr.open_dataset("era5_prec_2018H1.nc") | |
prec = ds.tp.sel(dict(time=slice('2018-01-01', '2018-01-31'))).data * 1000 | |
ds.close() | |
print(prec.shape) |