GSFLOW模型的Codeblocks编译

GSFLOW提供makefile文件,可以在linux系统下编译成功,采用msys虚拟linux系统可成功通过编译(赵彦博帮忙完成)。

然而,我想在windows下编译,并且我想在windows下进行调试。

这里有两种途径,一种是对makefile进行解析,弄清GSFLOW各个模块直接的关联和依赖关系,然后进行顺序编译,然后这不能实现所以模块一起编译,且不同模块如果要改代码,则需要写调试函数,否则不能调试,因为mmf, modflow以及prms模块都编译出lib,然后实现模型耦合,生产gsflow.这个途径显然麻烦。

另一种途径,就是直接在codeblocks下编译linux代码。这里首先要找到虚拟linux系统,且能被codeblocks系统支持,我最后锁定为cygwin,因为正好codeblocks支持。

(1)首先下载cygwin并安装,安装make, gcc gfortran等。

(2) 在codeblock配置编译环境及编译器。需要注意的是,这里配置的编译器,是选择的mingw,而不是cygwin自带的,这是因为mingw与windows系统更[……]

Read more

TRMM 数据批量下载详细流程

Update: daily的数据其实是三小时数据的累加,累加的时间段如下:

FileHeader     = ‘StartGranuleDateTime=1998-07-18T01:30:00.000Z;

                            StopGranuleDateTime=1998-07-19T01:29:59.999Z’

因此,这个数据有一定的时差,比如在中国,用的是UTC8时区,比UTC0早8小时,因此上面对应的时间段在中国相当于如下:

FileHeader     = ‘StartGranuleDateTime=1998-07-18T09:30:00.000UTC8;

                      &nb[……]

Read more

WRR Comment:基于有限理性假设的农民行为分析

Comment on “Exploring the Influence of Smallholders’ Perceptions Regarding Water Availability on Crop Choice and Water Allocation Through Socio‐Hydrological Modeling” by Kuil et al. [Water Resource Research, 54, 2580–2604]

First published: 08 March 2019
A paper has recently been published in Water Resources Research, which explored the influence of smallholder’s perceptions regarding water availability on crop choice and water[……]

Read more

AGWM效率悖论文章

Published in Agricultural Water Management

Ling Zhang, Qimin Ma, Yanbo Zhao et al.

ABSTRACT: Improving irrigation efficiency is widely believed to be a promising opportunity for large water savings. However, more and more voices have been raised against this idea in recent years. This study investigated the impacts of irrigation efficiency improvement on water use and consumption by combining an agro-economic model with the conceptualization of hydrological pathways. The investigation was[……]

Read more

HP水文影响分离文章

Published in Hydrological Processes

https://onlinelibrary.wiley.com/doi/abs/10.1002/hyp.13331

Separating climate change and human contributions to variations in streamflow and its components using eight time‐trend methods

Ling Zhang,  Zhuotong Nan, Weizhen Wang, et al.

Abstract

Separating impacts of human activities and climate change on hydrology is essential for watershed and ecosystem management. Many previous studies have focused on the impacts on total streamflow, however, with lit[……]

Read more

Matlab codes for two breakpoint checken

(1)  累计距平均

data=xlsread(‘test.xlsx’);

data(:,1)=[];

mean_data=mean(data);

diff_streamflow=data(:,1)-mean_data(1);

diff_baseflow=data(:,2)-mean_data(2);

diff_surfq=data(:,3)-mean_data(3);

Sum_streamflow_anomaly=zeros(55,1);

Sum_baseflow_anomaly=zeros(55,1);

Sum_surfq_anomaly=zeros(55,1);

for i=1:55;

Sum_streamflow_anomaly(i)=sum(diff_streamflow(1:i));

Sum_baseflow_anomaly(i)=sum(diff_baseflow(1:i));

Sum_surfq_anomaly(i)=sum(diff_surfq(1:i));

end

years=[……]

Read more

A paper published in JoH

Application of the MacCormack scheme to overland flow routing for high-spatial resolution distributed hydrological model

Although process-based distributed hydrological models (PDHMs) are evolving rapidly over the last few decades, their extensive applications are still challenged by the computational expenses. This study attempted, for the first time, to apply the numerically efficient MacCormack algorithm to ov[……]

Read more