Skip to content

Commit

Permalink
update cdo call (#141)
Browse files Browse the repository at this point in the history
* update cdo call

* tweaked ERA5 preprocessor

* Update whats_new.rst
  • Loading branch information
larsbuntemeyer authored Oct 19, 2023
1 parent 71640dc commit c506916
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions docs/whats_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Internal Changes
~~~~~~~~~~~~~~~~

- Fix SST interpolation and extrapolation for CF preprocessor (:pull:`140`).
- Fix ERA5 cmorizer subprocess call (:pull:`141`).

v0.6.0 (25 August 2023)
-----------------------
Expand Down
9 changes: 7 additions & 2 deletions pyremo/preproc/era5.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,12 @@ def gfile(self, date, path=None, expid=None, filename=None):
call = f"cdo {self.options} invertlat {merge} {filename}"
print(f"execute: {call}")

output = subprocess.Popen(call, shell=True, stdout=subprocess.PIPE)
subprocess.run(
call.split(),
check=True,
shell=False,
)
# stdout, stderr = process.communicate()

return output
return filename
# return self.cdo.invertlat(options=self.options, input=merge, output=filename)

0 comments on commit c506916

Please sign in to comment.