Skip to content

Commit

Permalink
Merge pull request #150 from OMS-NetZero/black-patch
Browse files Browse the repository at this point in the history
pass black update
  • Loading branch information
chrisroadmap authored Feb 1, 2024
2 parents bb64f2b + 1f6abbf commit c09bee8
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 25 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Changelog
---------

master
------

(`#150 <https://github.com/OMS-NetZero/FAIR/pull/150>`_) Reformat for black update

(`#149 <https://github.com/OMS-NetZero/FAIR/pull/149>`_) Add nightly tests


v2.1.3
------

Expand Down
52 changes: 27 additions & 25 deletions src/fair/fair.py
Original file line number Diff line number Diff line change
Expand Up @@ -809,17 +809,17 @@ def fill_from_rcmip(self):
species_to_rcmip["CO2 FFI"] = "CO2|MAGICC Fossil and Industrial"
species_to_rcmip["CO2 AFOLU"] = "CO2|MAGICC AFOLU"
species_to_rcmip["NOx aviation"] = "NOx|MAGICC Fossil and Industrial|Aircraft"
species_to_rcmip[
"Aerosol-radiation interactions"
] = "Aerosols-radiation interactions"
species_to_rcmip[
"Aerosol-cloud interactions"
] = "Aerosols-radiation interactions"
species_to_rcmip["Aerosol-radiation interactions"] = (
"Aerosols-radiation interactions"
)
species_to_rcmip["Aerosol-cloud interactions"] = (
"Aerosols-radiation interactions"
)
species_to_rcmip["Contrails"] = "Contrails and Contrail-induced Cirrus"
species_to_rcmip["Light absorbing particles on snow and ice"] = "BC on Snow"
species_to_rcmip[
"Stratospheric water vapour"
] = "CH4 Oxidation Stratospheric H2O"
species_to_rcmip["Stratospheric water vapour"] = (
"CH4 Oxidation Stratospheric H2O"
)
species_to_rcmip["Land use"] = "Albedo Change"

species_to_rcmip_copy = copy.deepcopy(species_to_rcmip)
Expand Down Expand Up @@ -1910,26 +1910,28 @@ def run(self, progress=True, suppress_warnings=True):
forcing_sum_array[i_timepoint + 1 : i_timepoint + 2, ...] = np.nansum(
forcing_array[i_timepoint + 1 : i_timepoint + 2, ...], axis=SPECIES_AXIS
)
forcing_efficacy_sum_array[
i_timepoint + 1 : i_timepoint + 2, ...
] = np.nansum(
forcing_array[i_timepoint + 1 : i_timepoint + 2, ...]
* forcing_efficacy_array[None, None, ...],
axis=SPECIES_AXIS,
forcing_efficacy_sum_array[i_timepoint + 1 : i_timepoint + 2, ...] = (
np.nansum(
forcing_array[i_timepoint + 1 : i_timepoint + 2, ...]
* forcing_efficacy_array[None, None, ...],
axis=SPECIES_AXIS,
)
)

# 16. forcing to temperature
if self._routine_flags["temperature"]:
cummins_state_array[
i_timepoint + 1 : i_timepoint + 2, ...
] = step_temperature(
cummins_state_array[i_timepoint : i_timepoint + 1, ...],
eb_matrix_d_array[None, None, ...],
forcing_vector_d_array[None, None, ...],
stochastic_d_array[i_timepoint + 1 : i_timepoint + 2, None, ...],
forcing_efficacy_sum_array[
i_timepoint + 1 : i_timepoint + 2, ..., None
],
cummins_state_array[i_timepoint + 1 : i_timepoint + 2, ...] = (
step_temperature(
cummins_state_array[i_timepoint : i_timepoint + 1, ...],
eb_matrix_d_array[None, None, ...],
forcing_vector_d_array[None, None, ...],
stochastic_d_array[
i_timepoint + 1 : i_timepoint + 2, None, ...
],
forcing_efficacy_sum_array[
i_timepoint + 1 : i_timepoint + 2, ..., None
],
)
)

# 17. TOA imbalance
Expand Down

0 comments on commit c09bee8

Please sign in to comment.