0%

About Me

I am a master student in the School of Atmospheric Sciences, Sun Yat-sen University. I graduated from Chengdu University of Information and Technology with a bachelor's degree. My research involves climate change of extreme precipitation under global warming, machine learning, statistical model and complex network.

In my spare time, I like badminton, cycling, hiking, rock music and technology. This website will mainly share my favorite music, photos and bits and pieces of technical experience.

Research Interests

Extreme Preciptation: Gloabl Warming, Internal Atmospheric Variability, Future Changes.

Machine Learning: Residual Network, Attention Mechanism, Diffusion Model, et al.

阅读全文 »

Xarray

xr.resample 的等效替换

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import xarray as xr
import pandas as pd
import numpy as np
np.random.seed(0)
date = pd.date_range('2000-01-01', '2001-12-31', freq='D')
lon = np.arange(0, 360, 2.5)
lat = np.arange(-90, 92.5, 2.5)
data = xr.DataArray(data=np.random.rand(date.size, lon.size, lat.size),
dims=['time', 'lon', 'lat'],
coords=dict(time=date, lon=lon, lat=lat))

# 求 data 各月的最大值
## 法一 resample
mmax = data.resample(time='M').max()

## 法二 groupby
groupbins = xr.DataArray(data=data.indexes['time'].to_period('M').to_timestamp(),
dims=['time'], coords=dict(time=data.time))
mmax = data.groupby(groupbins).max()
阅读全文 »

CESM 介绍

CESM (Community Earth System Model) 是一个模拟地球气候系统的耦合气候模式,由模拟大气、海洋、陆地、河流径流、陆冰和海冰的模块组成

CESM2 需要的软件

阅读全文 »