From 64e7dc1d96325901352276d281e89feec63006c1 Mon Sep 17 00:00:00 2001 From: James Manners Date: Tue, 24 Feb 2026 13:24:26 +0000 Subject: [PATCH] Bug-fixes copied across from #16 --- .gitignore | 1 + python/nctools.py | 2 +- src/general/make_block_17.f90 | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 58d9166..096e5ee 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ __pycache__ .idea *.pyc .pytest_cache +bin/ diff --git a/python/nctools.py b/python/nctools.py index b4c0381..af4dacc 100644 --- a/python/nctools.py +++ b/python/nctools.py @@ -324,8 +324,8 @@ def ncout_view(file, lon, lat, direction, level, pol, azim, rlev): write_dim(ncdf_file, n_lon, lon, 'lon', 'f4', 'lon', 'degree', 'LONGITUDE') write_dim(ncdf_file, n_lat, lat, 'lat', 'f4', 'lat', 'degree', 'LATITUDE') - write_dim(ncdf_file, levels, p, 'level', 'i2', 'level', 'None', 'LEVEL') write_dim(ncdf_file, n_dir, direction, 'direction', 'i2', 'direction', 'None', 'MOMENT') + write_dim(ncdf_file, n_lvl, level, 'level', 'i2', 'level', 'None', 'LEVEL') write_var(ncdf_file, pols, 'pol', 'f4', ('direction', 'lat', 'lon') , 'degree', 'POLAR VIEWING ANGLE') diff --git a/src/general/make_block_17.f90 b/src/general/make_block_17.f90 index c1cdb75..4a57f0c 100644 --- a/src/general/make_block_17.f90 +++ b/src/general/make_block_17.f90 @@ -249,7 +249,7 @@ END SUBROUTINE map_heap_func END IF CASE (6) WRITE(*, '(a)') 'Enter location of data file:' - READ(*, *, IOSTAT=ios) cmip6_file + READ(*, '(a)', IOSTAT=ios) cmip6_file ! Open the file for reading CALL nf(nf90_open(TRIM(cmip6_file),NF90_NOWRITE,ncid)) ! Get number of times