You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to reproduce the world, land mask values for CESM2-WACCM r1i1p1f1 ssp585 and am struggling. My script is below
importirisimportnumpyasnptas=iris.load_cube("tas_Amon_CESM2-WACCM_ssp585_r1i1p1f1_gn_201501-210012.nc")
land_frac=iris.load_cube("land_sea_mask_1degree.nc4")
tas_regridded=tas.regrid(land_frac, iris.analysis.Linear())
cosine_latitude_weights=np.cos(np.pi*tas_regridded.coords("latitude")[0].points/180)
# really stupid way to do to this but fine as a hackcosine_latitude_weights_lat_lon= []
foriinrange(tas_regridded.coords("longitude")[0].shape[0]):
cosine_latitude_weights_lat_lon.append(cosine_latitude_weights)
cosine_latitude_weights_lat_lon=np.vstack(cosine_latitude_weights_lat_lon).Ttas_regridded_weighted_mean=tas_regridded.collapsed(
["longitude", "latitude"],
iris.analysis.MEAN,
weights=(land_frac.data>0.999).astype(int) *np.broadcast_to(cosine_latitude_weights_lat_lon, tas_regridded.shape)
)
tas_regridded_weighted_mean.data[:5]
tas_regridded_weighted_mean.data[:5] -273.15# gives 5.454, 5.387, 7.496, 10.090, 12.722
(And one more...)
I'm trying to reproduce the world, land mask values for CESM2-WACCM r1i1p1f1 ssp585 and am struggling. My script is below
For 2015-01
I get: 5.454 C
You report: -0.106 C
For 2015-02
I get: 5.387 C
You report: -0.364 C
For 2015-05
I get: 12.722 C
You report: 7.01 C
This seems a large difference to put down only to regridding?
The text was updated successfully, but these errors were encountered: