Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion flopy/export/netcdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
ITMUNI = {0: "undefined", 1: "seconds", 2: "minutes", 3: "hours", 4: "days",
5: "years"}
LENUNI = {0: "undefined", 1: "feet", 2: "meters", 3: "centimeters"}
PRECISION_STRS = ["f4", "f8", "i4"]
PRECISION_STRS = ["f4", "f8", "i4", "i8"]

STANDARD_VARS = ["longitude", "latitude", "layer", "elevation", "delr", "delc",
"time"]
Expand Down
4 changes: 2 additions & 2 deletions flopy/export/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from . import shapefile_utils


NC_PRECISION_TYPE = {np.float32: "f4", np.int: "i4", np.int64: "i4",
np.int32: "i4"}
NC_PRECISION_TYPE = {np.float: "f4", np.float32: "f4", np.float64: "f8",
np.int: "i4", np.int32: "i4", np.int64: "i8"}

path = os.path.split(netcdf.__file__)[0]
with open(path + '/longnames.json') as f:
Expand Down
96 changes: 48 additions & 48 deletions flopy/modflow/mfsfr2.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ def get_empty_reach_data(nreaches=0, aux_names=None, structured=True,
# get an empty recarray that correponds to dtype
dtype = ModflowSfr2.get_default_reach_dtype(structured=structured)
if aux_names is not None:
dtype = Package.add_to_dtype(dtype, aux_names, np.float32)
dtype = Package.add_to_dtype(dtype, aux_names, np.float)
d = create_empty_recarray(nreaches, dtype, default_value=default_value)
d['reachID'] = np.arange(1, nreaches + 1)
return d
Expand All @@ -527,7 +527,7 @@ def get_empty_segment_data(nsegments=0, aux_names=None, default_value=0.):
# get an empty recarray that correponds to dtype
dtype = ModflowSfr2.get_default_segment_dtype()
if aux_names is not None:
dtype = Package.add_to_dtype(dtype, aux_names, np.float32)
dtype = Package.add_to_dtype(dtype, aux_names, np.float)
d = create_empty_recarray(nsegments, dtype, default_value=default_value)
return d

Expand All @@ -541,30 +541,30 @@ def get_default_reach_dtype(structured=True):
('j', np.int),
('iseg', np.int),
('ireach', np.int),
('rchlen', np.float32),
('strtop', np.float32),
('slope', np.float32),
('strthick', np.float32),
('strhc1', np.float32),
('thts', np.float32),
('thti', np.float32),
('eps', np.float32),
('uhc', np.float32),
('rchlen', np.float),
('strtop', np.float),
('slope', np.float),
('strthick', np.float),
('strhc1', np.float),
('thts', np.float),
('thti', np.float),
('eps', np.float),
('uhc', np.float),
('reachID', np.int),
('outreach', np.int)])
else:
return np.dtype([('node', np.int)
('iseg', np.int),
('ireach', np.int),
('rchlen', np.float32),
('strtop', np.float32),
('slope', np.float32),
('strthick', np.float32),
('strhc1', np.float32),
('thts', np.float32),
('thti', np.float32),
('eps', np.float32),
('uhc', np.float32),
('rchlen', np.float),
('strtop', np.float),
('slope', np.float),
('strthick', np.float),
('strhc1', np.float),
('thts', np.float),
('thti', np.float),
('eps', np.float),
('uhc', np.float),
('reachID', np.int),
('outreach', np.int)])

Expand All @@ -576,34 +576,34 @@ def get_default_segment_dtype():
('iupseg', np.int),
('iprior', np.int),
('nstrpts', np.int),
('flow', np.float32),
('runoff', np.float32),
('etsw', np.float32),
('pptsw', np.float32),
('roughch', np.float32),
('roughbk', np.float32),
('cdpth', np.float32),
('fdpth', np.float32),
('awdth', np.float32),
('bwdth', np.float32),
('hcond1', np.float32),
('thickm1', np.float32),
('elevup', np.float32),
('width1', np.float32),
('depth1', np.float32),
('thts1', np.float32),
('thti1', np.float32),
('eps1', np.float32),
('uhc1', np.float32),
('hcond2', np.float32),
('thickm2', np.float32),
('elevdn', np.float32),
('width2', np.float32),
('depth2', np.float32),
('thts2', np.float32),
('thti2', np.float32),
('eps2', np.float32),
('uhc2', np.float32)])
('flow', np.float),
('runoff', np.float),
('etsw', np.float),
('pptsw', np.float),
('roughch', np.float),
('roughbk', np.float),
('cdpth', np.float),
('fdpth', np.float),
('awdth', np.float),
('bwdth', np.float),
('hcond1', np.float),
('thickm1', np.float),
('elevup', np.float),
('width1', np.float),
('depth1', np.float),
('thts1', np.float),
('thti1', np.float),
('eps1', np.float),
('uhc1', np.float),
('hcond2', np.float),
('thickm2', np.float),
('elevdn', np.float),
('width2', np.float),
('depth2', np.float),
('thts2', np.float),
('thti2', np.float),
('eps2', np.float),
('uhc2', np.float)])

@staticmethod
def load(f, model, nper=None, gwt=False, nsol=1, ext_unit_dict=None):
Expand Down