Skip to content

Commit

Permalink
use float32 for IB
Browse files Browse the repository at this point in the history
  • Loading branch information
tsutterley committed Nov 20, 2023
1 parent ad23305 commit 1718e0a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions DAC/calculate_inverse_barometer.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ def ncdf_pressure(fileID, VARNAME, TIMENAME, MEAN, OCEAN, AREA):
# invalid value
fill_value = fileID.variables[VARNAME]._FillValue
# allocate for pressure fields
SLP = np.ma.zeros((24,ny,nx), fill_value=fill_value)
TPX = np.ma.zeros((24,ny,nx), fill_value=fill_value)
SLP = np.ma.zeros((24,ny,nx), dtype=np.float32, fill_value=fill_value)
TPX = np.ma.zeros((24,ny,nx), dtype=np.float32, fill_value=fill_value)
# calculate total area of reanalysis ocean
# ocean pressure points will be based on reanalysis mask
ii,jj = np.nonzero(OCEAN)
Expand Down Expand Up @@ -253,7 +253,6 @@ def calculate_inverse_barometer(base_dir, MODEL, YEAR=None, RANGE=None,
regex_years = r'\d{4}' if (YEAR is None) else r'|'.join(map(str,YEAR))
rx = re.compile(regex_pattern.format(regex_years), re.VERBOSE)
input_files = [fi for fi in ddir.iterdir() if rx.match(fi.name)]
print(ddir)
# for each reanalysis file
for INPUT_FILE in sorted(input_files):
# extract parameters from filename
Expand Down
1 change: 1 addition & 0 deletions grounding_zones/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"""
from __future__ import annotations

import sys
import ssl
import pathlib
import inspect
Expand Down

0 comments on commit 1718e0a

Please sign in to comment.