In this post, I address an common problem in geoscience research: how to arrange the original geodata into pre-defined grid system. Sometimes, we need to unify the resolution of various dataset or summary the scatter data to raster one.

Specifically, this brief tutorial will look at two different original data, and allow you to creat gridded data in python. For better illustration, two practial cases with detailed code are shown:

  • Creating an emission inventory based on the emissions from point sources (e.g., power plants, cement plants)
  • Remapping a population density map to a coarser resolution

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

有时,我们无法直接获取某些地理数据的精确位置信息,仅能从网络中下载他人的地图作品。因而,我请教了一名规划师同学,参考网络图像,通过适配地理范围,手工获取其实际地理属性。本文以我国集中采暖南北分界线的绘制为例,简述QGIS软件的具体实现步骤。

mehr

Sometimes, we need to clip or extract the raster image with polygon features, e.g., only focus on the percipitation within China using global dataset. This post will introduce two methods to mask the 2-d array-like dataset by a specific geometry using Python.

  • The first method use GeoPandas module to test those raster coordidnates within/out of the shapefile
  • The second method which I strongly recommended with faster speed was based on shapely module.

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

Hillshade is the representation of the earth’s surface under the radiation of sun. A terrain raster data can be better visualized by adding the information of hillshades. This blog will introduce some procrdures to overlay the hillshade with terrain for a nice picture.

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

Your browser is out-of-date!

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

×