diff --git a/src/fibgrid/construction.py b/src/fibgrid/construction.py index d9f3f9c..86fe76a 100644 --- a/src/fibgrid/construction.py +++ b/src/fibgrid/construction.py @@ -190,8 +190,3 @@ def read_grid(filename, variables=['gpi', 'lon', 'lat']): data[var] = fp.variables[var][:] return data - - -if __name__ == '__main__': - n = 6600000 - compute_fib_grid_wgs84(n) diff --git a/src/fibgrid/files/fibgrid_wgs84_n1650000.nc b/src/fibgrid/files/fibgrid_wgs84_n1650000.nc new file mode 100644 index 0000000..7334eb9 Binary files /dev/null and b/src/fibgrid/files/fibgrid_wgs84_n1650000.nc differ diff --git a/src/fibgrid/files/fibgrid_wgs84_n430000.nc b/src/fibgrid/files/fibgrid_wgs84_n430000.nc new file mode 100644 index 0000000..2dc4a53 Binary files /dev/null and b/src/fibgrid/files/fibgrid_wgs84_n430000.nc differ diff --git a/src/fibgrid/files/fibgrid_wgs84_n6600000.nc b/src/fibgrid/files/fibgrid_wgs84_n6600000.nc new file mode 100644 index 0000000..a33c76d Binary files /dev/null and b/src/fibgrid/files/fibgrid_wgs84_n6600000.nc differ diff --git a/src/fibgrid/realization.py b/src/fibgrid/realization.py index c797672..3e7e19e 100644 --- a/src/fibgrid/realization.py +++ b/src/fibgrid/realization.py @@ -64,7 +64,8 @@ def read_grid_file(n, geodatum='WGS84'): 'fibgrid_{}_n{}.nc'.format(geodatum.lower(), n)) metadata_fields = ['land_frac_fw', 'land_frac_hw', - 'land_mask_hw', 'land_mask_fw'] + 'land_mask_hw', 'land_mask_fw', + 'land_flag'] metadata_list = [] with netCDF4.Dataset(filename) as fp: lon = fp.variables['lon'][:] @@ -139,7 +140,6 @@ def __init__(self, res, geodatum='WGS84'): lon, lat, cell, gpi, self.metadata = read_grid_file( n, geodatum=geodatum) - subset = np.nonzero((self.metadata['land_mask_hw'] > 50) & - (self.metadata['land_mask_fw'] > 50))[0] + subset = np.nonzero(self.metadata['land_flag']) super().__init__(lon, lat, cell, gpi, subset=subset, geodatum=geodatum)