Skip to content

Commit

Permalink
add ocean heat content to FaIR output
Browse files Browse the repository at this point in the history
  • Loading branch information
Kelly McCusker committed Sep 28, 2023
1 parent cb98b9e commit 52cc465
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions src/scmcoat/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,9 +323,23 @@ def run(self, emissda, simid=None, emissions_driven=True, useMultigas=True):#, r
coords=[years],
name="temperature",
)
response_ds = xr.merge(
[C_xarray, F_xarray, T_xarray]
)
if len(ret) == 7:
ohc_xarray = xr.DataArray(
ohc,
dims=[
"year",
],
coords=[years],
name="ocean_heat_content",
)
response_ds = xr.merge(
[C_xarray, F_xarray, T_xarray, ohc_xarray]
)
else:

response_ds = xr.merge(
[C_xarray, F_xarray, T_xarray]
)
response_ds["simulation"] = self.simid

# TODO Add attributes
Expand Down

0 comments on commit 52cc465

Please sign in to comment.