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 as tf | |
import numpy as np | |
import pandas as pd | |
import imageio | |
im_orig = imageio.imread("cameraman.jpg")[::4,::4].astype(np.float32) / 255 | |
im_orig_df = pd.DataFrame(im_orig) | |
im_df_masked = im_orig_df.copy() |
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
from __future__ import print_function, division | |
from keras.layers import concatenate, Input, Concatenate, BatchNormalization | |
from keras.layers.convolutional import UpSampling2D, Conv2D | |
from keras.models import Model | |
from keras.optimizers import Adam | |
import xarray as xr | |
import numpy as np | |
import pickle |
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 numpy as np | |
import netCDF4 | |
x = netCDF4.Dataset("/datasets/work/D61_CPSR_A_INPUT/ERA5_global/press_levels_201501.nc")["z"][:] | |
x = np.moveaxes(x,1,-1) | |
topo = netCDF4.Dataset("/datasets/work/D61_CPSR_A_INPUT/ERA5_global/ERA5_orography.nc")['z'][:] | |
topo = np.tile(topo, (x.shape[0],1,1,1)) | |
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) |
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
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 | |
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.