Code to construct a (at 100m and other resolutions) CHUK grid on EPSG:27700 and export it to NetCDF4
Requires packages xarray, pyproj and netcdf4.
conda env create -f environment.yml
conda activate pyproj_env
pip install -e .
# generate grid at 1km resolution
create_chuk_grid output.nc --resolution 1000
tested at 1000m, check that a 100m resolution grid can be generated by running on JASMIN
usage: create_chuk_grid [-h] [--resolution RESOLUTION] [--min-northing MIN_NORTHING] [--max-northing MAX_NORTHING] [--min-easting MIN_EASTING]
[--max-easting MAX_EASTING] [--precision PRECISION] [--version VERSION]
output_path
positional arguments:
output_path path to write the output netcdf4 file to
options:
-h, --help show this help message and exit
--resolution RESOLUTION
grid resolution in metres
--min-northing MIN_NORTHING
minimum northing (metres)
--max-northing MAX_NORTHING
minimum northing (metres)
--min-easting MIN_EASTING
minimum easting (metres)
--max-easting MAX_EASTING
maximum easting (metres)
--precision PRECISION
set output precision to single or double
--version VERSION
set the version of the grid as an attribute in the output file