Research

Xarray provides pandas-level convenience for working with ultidimensional data. Xarray has two fundamental data structure: a DataArray, which holds a single multi-dimensional variable and its coordinates;
a Dataset, which holds multiple variables that potentially share the same coordinates.

Moreover, a DataArray has four attributes:

  • values: a numpy.ndarray holding the array’s values (矩阵数值,例如地表温度具体数值)
  • dims: dimension names for each axis (e.g., (‘x’, ‘y’, ‘z’)) (维度名称,如经度、纬度、垂直分层、时间等)
  • coords: a dict-like container of arrays (coordinates) that label each * point (e.g., 1-dimensional arrays of numbers, datetime objects or strings) (各维度坐标体系,如时间序列)
  • attrs: an OrderedDict to hold arbitrary metadata (attributes) (对各属性的描述)

mehr

提要:定义嵌套网格是运行WRF模型的重要工作。本文基于Python 3.7,在Salem工具包基础上加以改进,结合Cartopy对中国国界线进行替换,同时实现修改默认底图。

mehr

部分互联网资料仅提供在线预览,无法直接下载。若预览系统设计欠佳,或限于网速内容加载过慢,都会对阅读体验造成严重影响。在此分别以国家自然基金研究报告和学位论文为例,介绍两种不同的下载合成方法,供有需要的老师同学们参考。欢迎大家提出宝贵意见。

mehr

When you’ve got the all the files from WRF simulations, you might want to merge them without the spin-up frames (to reach a balanced state with the boundary conditions, i.e., 12 hours for a 5-day simulation). Meanwhile, the variables/grids which are not focused on can be ignore. Therefore, a general workflow in pythonic way is presented. I will also rewritten this function as my first Python Package. Please note the updates on my website.

mehr

I’m writing today about downloading, handling, and plotting satellite derived air pollution maps with cartopy and fiona using Python. One key task in this post is to clip a raster-like (2-d array) dataset with a polygon in pure Python environment (i.e., no need for ArcGIS or QGIS GUI-based software).

The satellite sensor can offer critical supplementary data of several atmospheric species, e.g., SO2, NO2, PM2.5. Comparaing to ground-based monitoring which might be sparse in some areas (e.g., Africa, South America, oceans), the satellite observation offers a full picture for better understanding the spatiotemporal patterns of some air pollutants.

Below is an excerpt of a NO2 column maps within Chengyu urabn agglomeration in China.

mehr

In this post, I present some simple programs written in Python for post-processing the flexpart-wrf output.

It mainly contains several aspects, data merging, data processing and data visualization. I will also show some tips tp creat self-defined colormaps for nice plots.

PS: All th codes are also uploaded in my GitHub respority PyFlex

mehr

以前处理WRF等气象模型的输出文件,总是下载到本地电脑做后处理分析。由于计算量不断增加,模拟生成的文件往往会很大。因而,我考虑直接在服务器中处理数据。本来是很容易的事情,却因为课题组服务器的系统版本较旧,在安装有关工具时耗去了不少时间。在此记录我的探索过程。

气象模拟文件的后处理PartA: 曲折的安装

mehr

FLEXPART is a Lagrangian particle dispersion model (LPDM) developed by Norwegian Institute of Air Research, Norway. It allows researchers to simulate the long-range transportation, diffusion, dry/wet deposition processes of atmospheric spcecies from their sources. It also can be utilized for backward calculation based on the observation of receptor to anaysis source-receptor relationships.

This model is coded following the Fortran 95 standard, and can be freely download from the page here. Flexpart 8.x/9.x is easy for compilation following the offical reference. I noticed that netCDF-format output (which would make the post-processing easier compared to the original binary output files) has been merged in the newer veision. Therefore, I tried to compile FLEXPART 10.0 beta version in the Linux system, while lots of issues appeared. My installing steps are listed as follows

mehr

全国空气质量历史数据是大气环境研究的重要基础资料,而我国官方平台仅提供实时监测信息,而且还只支持IE浏览器(╮(╯_╰)╭)。

我曾尝试采用爬虫工具获取并存储逐时信息,但限于权限,未能在实验室服务器上连续长时间运行。互联网上直接提供数据或API端口的网站有很多,如环境云PM25.in, 青悦开放环境数据中心等。其中,beijingair最具分享精神,提供了2013年至今的详尽历史数据,且完全免费。

由衷感谢@王_晓磊的出色工作和无私分享,极大地推动了我国环境数据的公开与透明。其数据格式为每日一份csv文件存储当日所有站点/城市的逐时信息。在长时间尺度的数据分析时,需逐一阅读各原始文件。此处,我考虑将全年数据文件整合为多维度数据存储格式(HDF5)文件,便于调用和处理。

mehr

提要:此文介绍利用Python语言处理NASA MODIS火点数据(Global Monthly Fire Location Product,MCD14ML),可实现的基本功能包括:(1)特定时期的火点信息提取;(2)特定区域内的火点信息提取;(3)火点密度空间分布的计算与可视化表达

mehr

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×