Closed Yifeng2016 closed 1 year ago
Hello,
As this relates to a particular use case and is neither a bug in the code nor a feature request, it's not something that we are able to address here so I'm closing the issue. I know we should probably set up a user group for questions...
The general approach suggested is the same one I would take: have two scenarios, one with volcanoes and one without, and take the difference of the surface temperatures (f.temperature.loc[dict(layer=0)]
). This should be achievable with two scenario
s (one with volcanoes, one without) in the same FaIR instance.
If you're still having problems you can contact me but the response time might be very slow.
Hello, If anyone calculated global mean surface temperture anomaly caused by volcanic ERF, give me a hand please.
We want to calculate surface temperature anomaly caused by volcanic aerosol forcing. We have the montly ERF anomaly (i.e., relative to novolcano simulation). How should we calculate the surface temperature anomaly caused by the ERF anomaly but relative to a reference state?
Below is my code as my unserstanding. I don't know if it is right. Also, this temperature anomaly is from a reference state, I want to get a temperature anomaly only from ERF anomaly (i.e., volcanic minus novolcanic simulation). What should I do?
import numpy as np import matplotlib.pyplot as pl import pandas as pd
from fair import FAIR from fair.io import read_properties from fair.interface import fill, initialise from fair.earth_params import seconds_per_year
def yyyymm(ys,ye,dtype=int): year = np.arange(ys, ye+1, 1, dtype = dtype) month = np.arange(1,13,1) ym = [] for iy in year: for im in month: ym.append(iy*100 + im) return ym
def cal_temp_ano(scenarios, configs, time, df_volcanic): f = FAIR() f.define_time(time[0], time[1], time[2])
============== user defined ================
ys = 1971 ye = 1993
ym = np.array(yyyymm(ys, ye, dtype=int))
df_volcanic = pd.read_csv('./tests/test_data/volcanic_ERF-PINATUBO.csv', index_col='year') temp_volc, forc_volc = cal_temp_ano(['ssp585'], ['CESM2-WACCM-FV2'] ,[ys, ye+0.917, 1/12], df_volcanic=df_volcanic)