From 3ea349f0e60e273c3c0f9386d508dbc4c164f924 Mon Sep 17 00:00:00 2001 From: ctena Date: Wed, 12 Apr 2023 14:57:44 +0200 Subject: [PATCH 1/2] module update --- tests/run_scalability_tests_nord3v2.sh | 2 +- tests/test_bash_mn4.cmd | 2 +- tests/test_bash_nord3v2.cmd | 2 +- tutorials/Jupyter_bash_nord3v2.cmd | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/run_scalability_tests_nord3v2.sh b/tests/run_scalability_tests_nord3v2.sh index 214fecd..00039ad 100644 --- a/tests/run_scalability_tests_nord3v2.sh +++ b/tests/run_scalability_tests_nord3v2.sh @@ -5,7 +5,7 @@ SRCPATH="/gpfs/scratch/bsc32/bsc32538/NES_tests/NES/tests" module purge module load Python/3.7.4-GCCcore-8.3.0 -module load NES/1.0.0-nord3-v2-foss-2019b-Python-3.7.4 +module load NES/1.1.1-nord3-v2-foss-2019b-Python-3.7.4 for EXE in "1.1-test_read_write_projection.py" "1.2-test_create_projection.py" "1.3-test_selecting.py" "2.1-test_spatial_join.py" "2.2-test_create_shapefile.py" "2.3-test_bounds.py" "2.4-test_cell_area.py" "3.1-test_vertical_interp.py" "3.2-test_horiz_interp_bilinear.py" "3.3-test_horiz_interp_conservative.py" "4.1-test_daily_stats.py" "4.2-test_sum.py" "4.3-test_write_timestep.py" diff --git a/tests/test_bash_mn4.cmd b/tests/test_bash_mn4.cmd index f7450c7..4a031ef 100644 --- a/tests/test_bash_mn4.cmd +++ b/tests/test_bash_mn4.cmd @@ -15,7 +15,7 @@ module purge module use /gpfs/projects/bsc32/software/suselinux/11/modules/all -module load NES/1.1.0-mn4-foss-2019b-Python-3.7.4 +module load NES/1.1.1-mn4-foss-2019b-Python-3.7.4 module load OpenMPI/4.0.5-GCC-8.3.0-mn4 cd /gpfs/projects/bsc32/models/NES_master/tests || exit diff --git a/tests/test_bash_nord3v2.cmd b/tests/test_bash_nord3v2.cmd index 1ef30c0..c6b8409 100644 --- a/tests/test_bash_nord3v2.cmd +++ b/tests/test_bash_nord3v2.cmd @@ -14,7 +14,7 @@ module purge -module load NES/1.1.0-nord3-v2-foss-2019b-Python-3.7.4 +module load NES/1.1.1-nord3-v2-foss-2019b-Python-3.7.4 cd /gpfs/projects/bsc32/models/NES_master/tests || exit diff --git a/tutorials/Jupyter_bash_nord3v2.cmd b/tutorials/Jupyter_bash_nord3v2.cmd index be19eba..94e4666 100644 --- a/tutorials/Jupyter_bash_nord3v2.cmd +++ b/tutorials/Jupyter_bash_nord3v2.cmd @@ -25,7 +25,7 @@ localhost:${port} (prefix w/ https:// if using password) # load modules or conda environments here module load jupyterlab/3.0.9-foss-2019b-Python-3.7.4 -module load NES/1.1.0-nord3-v2-foss-2019b-Python-3.7.4 +module load NES/1.1.1-nord3-v2-foss-2019b-Python-3.7.4 # DON'T USE ADDRESS BELOW. -- GitLab From 4bc1985cc1370757baca6239cab8ec3371843b3a Mon Sep 17 00:00:00 2001 From: ctena Date: Fri, 14 Apr 2023 10:31:01 +0200 Subject: [PATCH 2/2] Bugfix when no CRS information for Regular LatLon projections --- nes/nc_projections/latlon_nes.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nes/nc_projections/latlon_nes.py b/nes/nc_projections/latlon_nes.py index 2e22316..43a37a8 100644 --- a/nes/nc_projections/latlon_nes.py +++ b/nes/nc_projections/latlon_nes.py @@ -125,9 +125,11 @@ class LatLonNes(Nes): projection_data = self.variables['crs'] self.free_vars('crs') else: - msg = 'There is no variable called crs, projection has not been defined.' - raise RuntimeError(msg) - + projection_data = {'grid_mapping_name': 'latitude_longitude', + 'semi_major_axis': str(self.earth_radius[1]), + 'inverse_flattening': str(0), + } + if 'dtype' in projection_data.keys(): del projection_data['dtype'] -- GitLab