... | @@ -51,7 +51,7 @@ Format the bathymetry, from *.tif* to *.nc* |
... | @@ -51,7 +51,7 @@ Format the bathymetry, from *.tif* to *.nc* |
|
```python
|
|
```python
|
|
bath_tiff = '../etopo.tif'
|
|
bath_tiff = '../etopo.tif'
|
|
bath = slimPre.geo_tiff(bath_tiff).evaluate_region(region_global)
|
|
bath = slimPre.geo_tiff(bath_tiff).evaluate_region(region_global)
|
|
bath = np.abs(bath) # convention differs from QGIS to SLIM
|
|
bath = -bath # convention differs from QGIS to SLIM
|
|
bath[bath<2] = 2 # avoid negative water depths
|
|
bath[bath<2] = 2 # avoid negative water depths
|
|
slimPre.write_file(data_dir+'bathymetry.nc', region=region_global, time=None, data=[('bathymetry', bath)])
|
|
slimPre.write_file(data_dir+'bathymetry.nc', region=region_global, time=None, data=[('bathymetry', bath)])
|
|
```
|
|
```
|
... | | ... | |