Skip to main content

Posts

Showing posts from 2018

The hydrology in the real world

Below is a region of interest from Global Lakes and Wetlands Database (link).



My question is how can we represent them in the Earth System Model?
To understand the challenge, we need to know how hydrology features are represented in current modeling work.
In an ideal scenario when there is no lake, stream network are the dominant hydrology features. To date, most existing hydrology simulations are conducted at relatively large spatial domain. As a result, the spatial resolution of such simulation is limited to hundred to thousand of meters. Sometimes it is impossible to capture some features under this resolution.
On the other hand, the land is never homogeneous and lots of local depressions are visible. These local depressions are removed in most hydrological model.
When there are lakes, the situation gets complicated. There are several challenges we will face: A lake may changed its boundary depending on water storage;A lake may or may not have an outlet;A lake itself is a local dep…

A modern way of automate calibration of a hydrologic model

Calibration of hydrologic model can be tedious, that is why we spent great efforts to automate this process. And sometimes we need some tool that is universal, reusable, so that we don't have to re-invent the wheel again and again.

Today I want to introduce a very effective framework to conduct a hydrologic model calibration. I call it framework because you can apply this method to any model and use any of your preferred language in some steps.

Here is the framework:
Let me explain what is going on:
PEST generate new parameter file based on a simple template;PEST call Python interface to start model simulation;Python interface translates parameter file to model input files;Python interface launches SWAT simulation;Python interface extracts results; andPEST analyzes result and updates parameters.
A few highlights here:
This is an example for a SWAT model, and you can change it to any model you are calibrating;I used Python, but you can also use any other language such as C/C++ or eve…

The problem with the HRU definition in the current SWAT model

Model calibration is a critical step in most numerical simulations, including hydrology simulations.

While I am conducting the model calibration for a SWAT model in one of my current projects, I found there are several issues in current methods.

In SWAT, a watershed is represented by a list of Hydrologic Response Unit (HRU), which is the smallest unit that has the same hydrologic property.

Besides, a watershed is also divided into a list of subbasin using watershed delineation process.
In the end, a watershed is actually represented using the following structure.

Figure 1. The structure of a watershed in SWAT model.

The HRU is commonly defined using land cover, soil type and slope.

On the other side, data and parameters are usually assigned using different levels. For example, an unique ID is assigned to each HRU and some parameters are assigned to subbasin.

In reality, when two HRUs share the same land cover, soil and slope type, they are supposed to have the same hydrologic characte…

The current state of ocean water storage

In the hydrological cycle, ocean water has the largest storage without doubt. However, our estimates of the ocean water storage have great uncertainty. I have done some preliminary research into this field and I'd like to share my understanding of the current state of these estimates. I also post a related question in the ReseachGate website (Link). I will start with a few publications and reports. The first one is the USGS website: https://water.usgs.gov/edu/earthwherewater.html, which states the ocean storage to be around 96.5% of the global storage. The numbers are from "World fresh water resources" by Peter H Gleick 1993.

The problem of geographic coordinate system in global scale simulation

Earlier I have discussed some idea about the hexagon-based grid system. Now I have provided some tests and materials to support this project.

90% percent of global maps you can find online are using the geographic coordinate system (GCS). You can try to search "global map" in Google image.

There might be 9% of them are using various map projection. The reason why there are so many different ways to represent the Earth is that Earth is NOT flat. Google know it so they changed the Google Map recently.
So these are some basic GIS knowledge but you can also learn it from this video.
While it is generally OK to view these types of global map for daily usage, it can cause problems for large scale to global scale simulations.

In Earth science, GCS is most commonly used as the grid system for terrestrial ecosystem simulations. For example, a 1* 1 degree grid will discrete the global into a 360 * 180 matrix.

However, it will be problematic for several reasons.
For example, the area a…

A visual decomposition of the land grid in the E3SM/CESM model

One of my recent development projects needs to exchange several variables between different components using the Common Infrastructure for Modeling the Earth (CIME) model. However, different components have different grid systems. Therefore, I have to get familiar with the grid system of these two component before assigning any variables.

One of them is the land grid used in Community Land Model (CLM)/ELM, which is the land component in the Energy Exascale Earth System Model (E3SM) model. Because CLM is also part of CESM, this post should also apply to the CESM land component.

In short, the land component distributes all the land units across multiple nodes/cores and each grid cell is run by clump.

Here I developed a small Python utility to illustrate the concept.

First we define a sample problem as follow:

Variable Value Description npes 4 CPU/Node clump_pproc 10 Core per CPU nsegspc 2 Segment per clump nclumps 40 Core count lni 20

From watershed to global

Ever since I finished my 3D ecosystem simulation using the ECO3D model, I started to think about applying this model to a larger spatial domain such as global.

While there are several technical difficulties in doing so, there are also different combinations of solutions to resolve these issues. In this post I will list out major issues we will address:

First, on a global scale, we need much more massive input data preparation. What's more, some traditional algorithm/method may not even work. For example, the watershed lineation process on global scale will not be used anymore. Instead, another river routing algorithm or dataset should be used.File I/O will becomes an issue. Global scale simulation will use parallel computing, which mean the file I/O must support parallel reading/writing. Whether file system will be ideal or other options remains unclear. For example, can we use database or Hadoop?Parallel computing with/without MPI/OpenMP. I am not sure of other options but running…

Some review on the fate of dissolved organic carbon in terrestrial ecosystem

My recent modeling work involves some rewind of the process happened near the land surface, which causes some issue to the estimate of dissolved organic carbon (DOC) dynamics in terrestrial ecosystem.

I will skip the importance of DOC because you can find plenty of literatures online but instead I will focus on the challenge from a modeler's perspective.

First, we need to understand the source of DOC. Generally we think DOC is produced due to decomposition process and water flux. As we know, microbial decomposition occurs within nearly all places within the ecosystem: litter, soil and aquatic systems, etc. But water may not be present all the times in some ecosystem components.

In litter, decomposition is a continuous process through which fresh vegetation is transferred into organic carbon and enter into soil. However, a portion of the organic carbon may be transported through water flux in form of DOC during snowmelt, runoff and surface leaching. In this case, it is almost certa…

The journey of a three-dimensional ecosystem model debugging and calibration

Currently I am working on the model development, debugging and calibration of the ECO3D model.

Due to the model complexity, I have spent great efforts to get things done in an appropriate way. Throughout the process, I have also acquired much experiences in model developments. Here I want to share some of the most useful tips. However, I will not discuss the technical aspects such as program language unless inevitable.
You may use OpenMP to speed up the program, but it appears that the debugger, such as the one I use, Totalview, is not quite friendly when debugging in multiple-thread. So I suggest you can prepare two versions of CMakeList files, so you can switch between for different purposes;Use conditional breakpoint in Totalview can save you some time when you are only interested in certain point/condition;Ecosystem models, or Earth system models, require a "spin-up" simulation, which usually takes a great length of time ranging from hours to days. So you don't want t…

Hole and Boundary

We sometimes do not understand well enough of what we are dealing with in our daily life.
I was lucky enough to attend a seminar by Achille C. Varzi a few years ago, which inspired me on this topic: looking at hole and boundary from a different perspective.

This post is a mixture of both philosophy and Earth Science (but which discipline isn't driven by philosophy anyway?) The topic of this post is about hole and boundary, which are very common objects in our daily life.

By the definition from Wikipedia: A hole is a hollow place, an opening in/through a solid body, or an excavation in the ground. In another word, a hole exists because there is a closed Boundary between two different types of materials (often one of them is air). For example, a donut has a hole.

Now the question is how should we define boundary, which is not an easy task if you look closer.
For example, where is the boundary between a lake and its surrounding land? If you draw a polygon around the lake, you will so…

Some thoughts on respiration and the role of microbe

I was recently upgrading some components within the ECO3D model, specifically the carbon pool and fluxes in vegetation, litter and soil.

The overall scheme of these components are illustrated in Figure 1:
Figure 1. The carbon pool and flux.
While it is well-known that the incoming carbon flux is mainly from photosynthesis process, which is also been well studied, the challenge is the outgoing carbon flux.
Without considering wildfire, etc., disturbance, "respiration" is generally considered the major pathway through which carbon is released back into the atmosphere. However, for individual site, horizontal carbon flux (DOC and DIC, etc.) is also important but it only services as a transport pathway.
In most terrestrial ecosystem modeling, respiration is broken into autotrophic respiration and heterotrophic respiration (Figure 2). Figure 2. Respiration in terrestrial ecosystem. Fundamentally, respiration is a biological and biochemical process occurs in cellular level. And it…

Quantifying the role of permafrost distribution in groundwater and surface water interactions using a three-dimensional hydrological model

Following my earlier post on promoting my research, this is the second study that I conducted in an attempt to understand the hydrology processes in high latitudes.

You are encouraged to read the first post for a background understanding of this study.
Let's cut to the chase, the title of this study is "Quantifying the role of permafrost distribution in groundwater and surface water interactions using a three-dimensional hydrological model", and you can access the paper through here or this.
In Arctic, snow and glacier are not the only players in the hydrology processes. Permafrost, the so called frozen soil is also an important player in both hydrology and carbon cycles.
There are several reasons for that: It is frozen, so it could potentially release a lot of water in the warming climate;Permafrost degradation can change the landscape, then both the carbon and water cycles will be affected;Permafrost is like a barrier, it blocks interactions. Therefore, permafrost degra…

Quantifying the Role of Snowmelt in Stream Discharge in an Alaskan Watershed

Inspired by fellow science social on publication and citation, I decided to write a few short introduction posts on my recent publications.

Aside to promote my research, I also want to explain the research in depth for those who do not have a background in related research.

My first talk is about my paper titled "Quantifying the Role of Snowmelt in Stream Discharge in an Alaskan Watershed: An Analysis Using a Spatially Distributed Surface Hydrology Model". You can find the abstract of this paper from "https://agupubs.onlinelibrary.wiley.com/doi/full/10.1002/2017JF004214"

As the introduction explained, the major motivation of this study is due to the sensitivity of cryosphere to the warming climate. In general, the climate change community all agree that the high latitudes are more vulnerable to the global warming. If the global temperature increases, lots of snow cover and glacier may disappear. In fact, this is happening right now and reported by numerous observat…

Another thought on Earth System Model challenge

I recent had several discussions with several friends on various topics. Such as whether improving one component with an Earth System Model (ESM) necessarily improve the overall performance.

In the end, I realized that the problem we were discussing is actually very interesting and yet challenge.

To put the question into another perspective, consider the following scenario: if you want to buy a computer, here are three options provided to you:
Some low frequency CPU + 32GB RAM + unknown motherboard;Some high frequency CPU, i.e. i7 + 1GB RAM + unknown motherboard;Some average frequency CPU, i.e. i5 + 16 GB RAM + unknown motherboard. Which one will you pick for daily use?  Another aspect I also want to point out is that the "unknown motherboard", what if the motherboard does not even support the CPU or RAM frequency?
Let's switch gear back to ESM. Does ESM also have similar issue? To run a ESM simulation, you have multiple choice of land model, ocean model and atmosphere mo…