Skip to content

Commit 59846cf

Browse files
committed
Removed unnecessary Numpy dependency.
1 parent dd3350d commit 59846cf

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

environment.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ channels:
66
dependencies:
77
# Multi language support:
88
- python>=3.6
9-
- numpy
109
- netcdf4=*=mpi_mpich*
1110
- mpi4py

src/py_nemo_rebuild/nemo_rebuild.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import os
1414
import re
1515
import datetime as dt
16-
import numpy as np
1716
import netCDF4 as nc
1817

1918
####################################################################
@@ -177,9 +176,12 @@ def nemo_rebuild(in_file=None,
177176
}
178177
#
179178
if (nohalo):
180-
orig = gattrs['DOMAIN_size_global']
181-
gattrs['original_DOMAIN_size_global'] = orig
182-
gattrs['DOMAIN_size_global'] = np.array([gnx, gny], dtype=orig.dtype)
179+
orig = gattrs['DOMAIN_size_global'].copy()
180+
gattrs['original_DOMAIN_size_global'] = gattrs['DOMAIN_size_global']
181+
orig[0]=gnx
182+
orig[1]=gny
183+
gattrs['DOMAIN_size_global'] = orig
184+
del orig
183185
orig = gattrs.pop('comment', None)
184186
if (orig == None):
185187
gattrs['comment'] = 'Global domain halo removed'

0 commit comments

Comments
 (0)