Skip to content

Commit

Permalink
removing unused function and import to remove an extra dep
Browse files Browse the repository at this point in the history
  • Loading branch information
KMarkert committed May 25, 2021
1 parent 4ecf8c4 commit 71495d4
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions fierpy/fier.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import numpy as np
import xarray as xr
import pandas as pd
import rioxarray

import os
import logging
Expand Down Expand Up @@ -374,19 +373,4 @@ def synthesize(reof_ds: xr.Dataset, q_df: xr.DataArray, polynomial: np.poly1d, m
synth = synth.astype(np.float32).drop("mode").sortby("time")


return synth


def reofs_to_geotiff(reof_ds: xr.Dataset, path: str):
"""Helper funtion to convert xr.Dataset spatial modes from REOF analysis to geotiff
args:
reof_ds (xr.Dataset):
path (str):
"""

reof_rio = reof_ds.rio.write_crs("epsg:4326").rename({"lon":"x","lat":"y"})

reof_rio.spatial_modes.transpose('mode', 'y', 'x').rio.to_raster(path)

return
return synth

0 comments on commit 71495d4

Please sign in to comment.