Plotting in Cartopy

I have been using Basemap for years in my Python scripting. Now I would like to slowly switch to Python 3, but Basemap is no longer officially supported there. There seems to be some workaround (such as using customized versions of Basemap), but personally I do not want to try that. So, I guess it is time to find an alternative, such as Cartopy.

In this post, I leave a record of my learning more about Cartopy, as well as some useful tricks (that I found out after hours of experiments..) Continue reading

About packages in Python

I have started my first “big” project in Python: I plan to develop a spatial-temporal analysis toolbox in Python that handles the data often used in geophysics and atmospheric sciences.

The first step is to construct the big structure of the package. So far, I have worked out several obstacles, and I am putting them here to help myself (and probably others).

  1. About importing a folder

In the “” file, put a line as “import SAL”.

NCL learning

Post processing WRF is a big task, especially when different tasks come in different times. Most of the time I can find pretty simple (and beautiful) solutions in NCL, so I decided to learn more about it. I will add more to this post when I get new codes that are useful.

NCL means NCAR Command Language, and here is the official website. It is designed to handle the climate data, so WRF is kind of natively supported. It has a package called “WRFUserARW.ncl”, which is super helpful in processing WRF results.

NCL has 3 main references, and they are great tools to start with. Here I mainly handling NetCDF files, and I am only putting some useful quick notes (or short code piece) in case I need them. Continue reading

NetCDF Guide (ongoing)

I have been dealing with NetCDF files extensively recently. This provides me a good opportunity of learning more about NCO and CDO. Also, Python has helped a lot before I figured out the NetCDF4 support in CDO. I am collecting all the useful information here, as my future reference.


1.  Basic knowledge of NetCDF

2.  Creating a NetCDF file

3.  Reading, plotting

4.  Editing, editing

5.  Dealing with multiple files

Continue reading


Just a reminder for myself:

2. Configuration of Android Studio (mainly JAVA environment variables);

4. learning sublime (create a new tag “sublime”)

5. learning GIMP, how to make simple animation in .gif format.

6. How to set up environmental for multiple WRF runs in parallel.


Here is a good page for fixing Ubuntu vmtools problem…