Prof. Gan is one of the most influential person in the world who has been contributing to the issues of water resources and irrigation. He gave a talk in the seminar today. He proposed a novel and exciting research result which can reduce the desertion along the coastal area. Prof. Gan found that the horizontal infiltration is about 4 times greater than the amount of vertical infiltration at the irrigation area, especially for farms of paddy rice. In addition, he also mentioned that the illegal groundwater extraction at farmland of vegetables is prevalent now. It can cause the significant drawdown of groundwater levels and thus the ground level residence.
These findings can be exciting for some potential further research.
For example, the illegal pumping detection and the amount of horizontal flow estimation.
Showing posts with label Research. Show all posts
Showing posts with label Research. Show all posts
Thursday, October 1, 2009
Friday, June 13, 2008
More SEKS-GUI
1. Clustering analysis
- to identify the attribute clustering
- to identify the data location clustering
- Memebership to create the listing of users
- Update users about SEKSGUI news
- Rewrite an up-to-date manual for SEKSGUI
Saturday, February 16, 2008
Compile Fortran and C++ together under VS2005
Since the new release of windows vista system, the old mixed-language programming under WS6.0 and Compaq Fortran 6.0 does not work anymore since both compilers are not compatible with the new windows OS system. In order to response to such changes, here I did my first test of the mixed-language programming under VS2005 and Intel Fortran. The example codes are copied from the website. It should be noticed that the calling convention between Compaq Fortran 6.0 and VS6.0 is different from that between Intel Fortran and VS2005. Here is a table shown in Steve's article "Porting applications from Compaq frotran to Intel Fortran" to list the difference calling conventions.

Therefore, in Intel Fortran, we no longer require the __stdcall put ahead of the fortran functions in the C code. Instead, __stdcall should be replaced by __cdecl or simply be removed. The original codes in the website become
(1) The C++ file:
// This illustrates how a Fortran routine and function may be
// called from a main program in C++
#include
extern "C"
{
void FR1(int*,int *);
int FF1(int *);
}
int main()
{
int n=10,nSq,nCube;
FR1(&n,&nSq);
cout << "The square is:" << ncube="FF1(&n);" style="font-weight: bold;"> (2) The Fortran File:
SUBROUTINE FR1(N,M)
C COMPUTES THE SQUARE OF N, RETURNS IN M
M=N*N
RETURN
END
C
INTEGER FUNCTION FF1(N)
C COMPUTES THE CUBE OF N
FF1=N*N*N
RETURN
END
To build mixed-language the VS2005 project, it is not similar to what we did in VS6.0 where we put both C++ files and fortran files in the same project and then compile them together as a whole. In VS2005, we should separate them into two projects, one for C++ and one form Fortran.

Therefore, in Intel Fortran, we no longer require the __stdcall put ahead of the fortran functions in the C code. Instead, __stdcall should be replaced by __cdecl or simply be removed. The original codes in the website become
(1) The C++ file:
// This illustrates how a Fortran routine and function may be
// called from a main program in C++
#include
extern "C"
{
void FR1(int*,int *);
int FF1(int *);
}
int main()
{
int n=10,nSq,nCube;
FR1(&n,&nSq);
cout << "The square is:" << ncube="FF1(&n);" style="font-weight: bold;"> (2) The Fortran File:
SUBROUTINE FR1(N,M)
C COMPUTES THE SQUARE OF N, RETURNS IN M
M=N*N
RETURN
END
C
INTEGER FUNCTION FF1(N)
C COMPUTES THE CUBE OF N
FF1=N*N*N
RETURN
END
To build mixed-language the VS2005 project, it is not similar to what we did in VS6.0 where we put both C++ files and fortran files in the same project and then compile them together as a whole. In VS2005, we should separate them into two projects, one for C++ and one form Fortran.
Create a static library package for Fortran files by File > New> Intel Fortran > Library > Static Library when creating the package. - Create a Win32 console application package for C++ files by File > New> Visual C++ > Win32 console application
- Create a VS2005 solution by going to File > New > Other Studio solutions > VS solution and add both created packages in.
- Add the Fortran and C++ into their packages respectively.
- Right-click both packages to confirm their runtime libraries are consistent. For C++, it is at Property > C/C++ > Code Generation > runtime library. For Fortran, it is at Property > Fortran > Libraries and also make sure that "Disable OBJCOMMENT ....." is set to be NO
- Add the new created lib file (from the Fortran package) into the solution by add the Fortran package name (FortranName.lib) at Property > Linker > Input > Additional dependence by right-click the C++ package
- Add the additional library path for C++ package by going to Tools > Options > Projects and Solutions > Library files and click the white boards to add Intel Fortran library at \IntelFortranRoot\Compiler\Fortran\versioncode\IA32\Lib and the location where the new lib file is generated.
- After all these settings, I successfully my first package built under VS2005.
Sunday, December 9, 2007
Controversial 228 documentary
These two videos are very controversial in this island. The embed links are also requested to be removed from the youtube so that I can not show the video directly here. 228 now is our national peace memorial day, a holiday. For over 50 years ago, several hundreds and thousands people are killed because of the demonstration to the new government. This history had been hidden for so long, over 40 years, by the government. Our people did not dare to mention anything about this. Today Taiwan people finally get our freedom to discuss our past; however, the competition of the two political parties, it makes every discussion is so controversial. I feel such attitude to against understanding our past is sick, even though they are political controversial. None of historians can be pure objective. Every interpretation implicitly has its own perspective. For such important hidden tragedy of our nation, we should listen to as many studies or reports as possible to help us understand the past.
http://www.youtube.com/watch?v=CgFpdWktVxc&feature=related
http://www.youtube.com/watch?v=Pjrg-DV-GgA&feature=related
http://www.youtube.com/watch?v=CgFpdWktVxc&feature=related
http://www.youtube.com/watch?v=Pjrg-DV-GgA&feature=related
Monday, October 22, 2007
Friday, October 5, 2007
Wednesday, October 3, 2007
Accessibility approach
The accessibility approach can incorporate the road network computational power in GIS to obtain the quantitative value to evaluate the accessibility for a certain area. Dr. Su's student just came by to discuss her topic with me before.
I gave her the suggestion that the random sampling can be applied to obtain the average pattern of the accessibility in a large area. With the consideration of the uncertainty of traffic conditions, e.g. traffic light, traffic jam, or parking time, a range for the access time can be obtain to evaluate the mean and variability of the accessibility of certain area.
I gave her the suggestion that the random sampling can be applied to obtain the average pattern of the accessibility in a large area. With the consideration of the uncertainty of traffic conditions, e.g. traffic light, traffic jam, or parking time, a range for the access time can be obtain to evaluate the mean and variability of the accessibility of certain area.
Friday, August 17, 2007
Research Idea: the comparison of two long-term variables (2)
In the discussion of t-distribution idea of comparing two long-term variables
Dr. Chen raised a very constructive comment about this idea and suggested that the definition of the long-term exposure is kind of similar to the idea in the survey sampling, where the long-term exposure can be considered as the exact if the everyday measurement is available.
I did the wrong way to interpret the daily measurements within the long-term period to consider its annual mean variance is the variance of annual exposure. If the measurements are complete, the annual exposure should not have any variance in lieu of the mean variance.
The test should be to check if an random variable with mean and variance can be considered as the approximation of the exact value (z-test), where the null hypothesis is to see if the population mean and sample mean are the same.
Once the measurement is incomplete, I should consult with the sampling analysis to see how to use the incomplete sample to have a representative value and its corresponding variance.
Dr. Chen raised a very constructive comment about this idea and suggested that the definition of the long-term exposure is kind of similar to the idea in the survey sampling, where the long-term exposure can be considered as the exact if the everyday measurement is available.
I did the wrong way to interpret the daily measurements within the long-term period to consider its annual mean variance is the variance of annual exposure. If the measurements are complete, the annual exposure should not have any variance in lieu of the mean variance.
The test should be to check if an random variable with mean and variance can be considered as the approximation of the exact value (z-test), where the null hypothesis is to see if the population mean and sample mean are the same.
Once the measurement is incomplete, I should consult with the sampling analysis to see how to use the incomplete sample to have a representative value and its corresponding variance.
Sunday, August 12, 2007
Idea of future direction
The dynamic system is to describe the interaction of a series of linear differential equations, which can be used to discuss the behavior of disease transmission or the interaction within the human body.
The geostatists idea should be able to incorporate into the stoachstic part of these dynamic solutions. This dynamic solution can be solved by the representation as Lagevin equations (Colizza et al, 2007). The proposed way to incorporate geostatistics is to replace the pure random variable into spatial/spatiotemporal correlated random variables.
To familiarize this, I should do some study and focus on the the solution of compartment functions in biology or ecology(?).
The geostatists idea should be able to incorporate into the stoachstic part of these dynamic solutions. This dynamic solution can be solved by the representation as Lagevin equations (Colizza et al, 2007). The proposed way to incorporate geostatistics is to replace the pure random variable into spatial/spatiotemporal correlated random variables.
To familiarize this, I should do some study and focus on the the solution of compartment functions in biology or ecology(?).
Thursday, August 9, 2007
CDC Environmental Health Data
Here might be some valuable data for the environmental research
The next step
Few of the possible directions for me to pursue in the next few years. My weakness is the lack of the major domain knowledge other than hydrology, which is less and less unpopular in the field.
I have to pick one of the field to extend my career to stabilize the funding resources. I have to spend more time in Epid, such as spatial epidemiology and risk assessment, especially probability risk assessment to incorporate the environmental issues with human health or ecological concerns.
I do not know how far I can devote into. But I have to read a lot of books in this area in order to be familiar with the concerns of each domain knowledge to generate new research topics.
I have to pick one of the field to extend my career to stabilize the funding resources. I have to spend more time in Epid, such as spatial epidemiology and risk assessment, especially probability risk assessment to incorporate the environmental issues with human health or ecological concerns.
I do not know how far I can devote into. But I have to read a lot of books in this area in order to be familiar with the concerns of each domain knowledge to generate new research topics.
Monday, July 23, 2007
Research Memo: co-kriging functions
The function kriging and coregfit are two functions to work for cokriging in BMElib. The convention of using kriging in multivariate problem is discussed in BMEprobamoments. The idea is to use the cell data structure to save the multivariate information and do the prediction.
Tuesday, July 17, 2007
DLL creation and calling by VC++6
In Yahoo Kimo knowledge base, there is a very good example to learn the dll creation and calling in VC++6. I do use this example to create the dll file for my own project and it runs well.
Here I borrow some of the content from the website and add some of my interpretation.
The essential part to generate a usable dll file is the modification of the header file from the original one for exe file.
For example, the hello.h should be
// hello.h___________________
In the main file, hello.c, we can simply keep the original file as the original one, such as
// hello.c___________________
Here I borrow some of the content from the website and add some of my interpretation.
The essential part to generate a usable dll file is the modification of the header file from the original one for exe file.
For example, the hello.h should be
// hello.h___________________
#ifdef __cpluscplus
#define EXPORT extern "C" __declspec(dllexport)
#else
#define EXPORT __declspec(dllexport)
#endif
EXPORT void hello();
// end hello.h___________________
In the main file, hello.c, we can simply keep the original file as the original one, such as
// hello.c___________________
#include"hello.h"
#include
EXPORT void hello(){
printf("The First Hello World !");
}
- To build a hello.dll, in visual C++ 6, we can create a dll project with the inclusion of the files above.
- To use the hello.dll, we should include the hello.lib generated from the compiler into the main executable code. Then the dll, lib and other codes are put in the same folder to make a new executable file which can use the functions in dll files.
Fortran and C/C++ interaction
To develop a C++-based program with the support of built Fortran library, the mixed language programming is the essential part. It had been a frustrated process for me to figure this out. Here are some very important documents for the interaction between Fortran and C++ with the usage of visual Fortran and visual C++.
- A introductory website
- The MSDN mixed-language programming page
- Some tips: some of them are not quite right but it is still worthwhile to consult with.
- The most important: the table to see which library and settings has to be done in visual studio. It is also briefly shown here in Table 1 and Table 2
Table 1: The library combination for Visual Studio (both Visual Fortran and Visual C++)

Table 2
GIS data and resources
- Few ArcGIS Notes from a website of a doctoral student in NTU
- Taiwan GIS resources from a class document in 2008 spring
- GIS resources page from Duke university which has a very well-organized with simple description and links
- Computer Geography page from Ireland which provides some lecture notes about Computational Geography (such as small area problem and Spatial analyst) and also many useful GIS resources.
- Xtoolspro is a shareware for ArcGIS which provides many useful functionality addition to the original ArcGIS functions.
- SaTScan: A free software that analyzes spatial, temporal and space-time data using the spatial, temporal, or space-time scan statistics.
Monday, July 16, 2007
Research Idea: the comparison of two long-term variables
Following the idea of upscaling study, how do we know if the long-term estimates is good enough in the case that we do not have long-term data to compare with?
The idea of the comparison is for both of them, to create a t-distribution and compare these two t-distribution by using t-test to see if the null hypothesis will be rejected.
For the t-test, we should estimate the long-term mean along with their standard deviations, and the number of valid values. However, one difference between the regular t-test and our t-test, because the long-term estimates also accompany with their estimation variances. One possible approach is to add estimation variances on the regular variances to be the new long-term estimation variances for the t-test.
Another proposed task for the upscaling test is the evaluation of the spatial pattern of the accuracy. The presentation of the estimation errors over the space is drawn on the map.
The idea of the comparison is for both of them, to create a t-distribution and compare these two t-distribution by using t-test to see if the null hypothesis will be rejected.
For the t-test, we should estimate the long-term mean along with their standard deviations, and the number of valid values. However, one difference between the regular t-test and our t-test, because the long-term estimates also accompany with their estimation variances. One possible approach is to add estimation variances on the regular variances to be the new long-term estimation variances for the t-test.
Another proposed task for the upscaling test is the evaluation of the spatial pattern of the accuracy. The presentation of the estimation errors over the space is drawn on the map.
Research Memo: Upscaling technique
In the HEAPL study, I develop two upscaling techniques; however, for the geostatistical approach, a S/T process is often considered as the combo of a meantrend and residuals. For the upscaling problem, we should be careful of how to apply the upscaling techniques.
It is divided into two parts: meantrend part and residual parts
From the equation (3) and (4) in the HEAPL paper, it upscales the residual meantrend and covariance function into larger scale. As for meantrend part, it is also very important to the estimation, though it is considered as deterministic.
To upscale the meantrend part of the S/T process, instead of the stochastic upscaling as mentioned in (3) and (4), it can be simply aggregated by arithmetic average on the basis of the long-term period.
This idea can not only be applied in this HEAPL study but should be used in any S/T studies.
It is divided into two parts: meantrend part and residual parts
From the equation (3) and (4) in the HEAPL paper, it upscales the residual meantrend and covariance function into larger scale. As for meantrend part, it is also very important to the estimation, though it is considered as deterministic.
To upscale the meantrend part of the S/T process, instead of the stochastic upscaling as mentioned in (3) and (4), it can be simply aggregated by arithmetic average on the basis of the long-term period.
This idea can not only be applied in this HEAPL study but should be used in any S/T studies.
Subscribe to:
Posts (Atom)