Yearly Archives: 2018

一个批量将MODIS LST HDF转换为GeoTIFF的工具 v1.02

功能:

  1. 批量转换MODIS地表温度数据(LST)的HDF到GeoTIFF格式
  2. 支持多tiles的mosaic
  3. 支持剪裁(目前只支持指定矩形范围)
  4. 输出指定变量(白天晚上的LST、质量控制、观测时间共6个变量中的若干个)

当前版本 1.02

下载地址见文末。任何问题请向giscn(at)msn.com 报告。 Continue reading

Words to Cindy’s youth 青春寄语

时光如白驹之过隙,我的小宝贝已经长成婷婷少女。

青春充满无限活力和希望,是人生最美好的一个阶段,明确志向,发展兴趣,向前努力,尽情追逐你的梦想。

爱护你的家人和朋友,爱护自己,活出你的快乐,活出你的精彩。

youth1

我目前的vpn方案

VyprVPN用了一年,可访问性和速度都不让我满意,因此没有再续。

Linode买了月费$5 的VPS (购买前搜索一下往往可以找到一些优惠代码,有$10、20不等的优惠码),选用的是Tokyo 2机房,ping的延迟大概是200ms左右,每月1TB的流量,够用了。

在之上安装了CentOS 7,并安装了shadowsocks服务。

Windows上安装了Shadowsocks for win;

IOS上安装的是SsrConnectPro;目前使用情况基本让人满意。

A paper on an application of GRACE gravity data

Cao Y, Nan Z, Cheng G, Zhang L. Hydrological variability in the arid lands of northwest China during 2002-2013. Advances in Meteorology. 2018, 2018(1502472): 1-13. DOI:10.1155/2018/1502472.

Abstract:

The arid region of Northwest China (ANC) has a distinct and fragile inland water cycle. This study examined the hydrological variations in ANC and its three subregions from August 2002 to December 2013 by integrating terrestrial water storage (TWS) anomaly data derived from the Gravity Recovery and Climate Experiment (GRACE) satellite, soil moisture data modeled by the Global Land Data Assimilation System, and passive microwave snow water equivalent data. The results show that the TWS in ANC increased at a rate of 1.7mm/a over the past decade, which consisted of an increasing trend of precipitation (0.12mm/a). Spatially, in the northern ANC, TWS exhibited a significant decreasing trend of −3.64 mm/a ( < 0.05) as a result of reduced rainfall, increased glacial meltwater draining away from the mountains, and intensified human activities. The TWS in southern and eastern ANC increased at a rate of 2.14 ( = 0.10) and 1.63 ( < 0.01)mm/a, respectively. In addition to increasing precipitation and temperature, decreasing potential evapotranspiration in Southern Xinjiang and expanding human activities in Hexi-Alashan together led to an overall increase in TWS. Increased glacier meltwater and permafrost degradation in response to climate warming may also affect the regional TWS balance. The variations in soil moisture, groundwater, and surface water accounted for the majority of the TWS anomalies in southern and easternANC.The proposed remote sensing approach combiningmultiple data sources proved applicable and useful to understand the spatiotemporal characteristics of hydrological variability in a large area of arid land without the need for field observations.

Links: Baidu, Official,

一些win下无法删除的长路径

这些路径在资源管理器里一路点下去,最终提示找不到路径,在cmd下提示 system cannot find the specified path;此外雪上加霜的是这些路径可能还有权限的问题,通过资源管理器里的security下的advance将安全传播到子目录,会提示 cannot enumerate objects in the container类似的提示,cmd下的takeown等也类似有找不到specified path的问题而无法起作用。用我此前开发的removelongpath也无法删除,会提示 access is denied (因为权限不对)。

我天才的试了一下rsync里的sync功能,居然可行!通过 rsync (如deltac)里的sync (即client上没有的server端文件要被删除)来实现删除这些长路径。长路径放到server端。为了解决windows下的权限问题,把deltas的服务设为管理员权限。在客户端使用 –perms选项。

原因大概是因为rsync是个mingw的仿win环境,可以绕过win本身设置的一些限制,比如max path这些。

如何从zcom的zmaker电子杂志中提取图片

需求大概是这么来的:一个毕业照相册用zmaker做成电子的了,看起来很cool,有动画,有同学们的靓照,年轻时也许不知道离别苦,二十年后某天听说某同学不在了,而手头只有这个电子杂志里的有唯一一张其照片,问遍能问的同学,居然都没有其他照片(那个海鸥相机象征身份的年代)。截图当然可行,但说实话分辨率很不理想,尤其原照片还是以前扫描的。所以有了这个需求。

环境:win 10,ZCOM互动杂志 1.0.1.2 (通过查看相册exe文件的属性信息)

方法:

  1. 打开zmaker的exe程序,不关,到 C:\Sandbox\<你的用户名>\test\user\current\AppData\Local\Temp\{一串数字和横线}\,注意时间戳(最新生成的),慢慢可以找到。
  2. 里面有很多文件夹,把这些文件夹拷贝出来,这些文件夹下面是一些main.swf,这个是flash动画,对应着电子杂志里的每一页。
  3. 到百度里搜索 swf extractor 的某个绿色版,打开,将需要的那个main.swf 打开,就可以看到里面的照片,提取出来,保存即可。

Done!

参考 http://blog.sina.com.cn/s/blog_3d8405d50100fplh.html,win10下有所不同。

机器学习用于验证码识别

看了几个机器学习的东西,其中一个是Tesseract,ocr可以用于转换图片到文字。这几天在考虑国家自然科学基金,里面查项目一项有个简单的验证码,十分讨厌,所以以这个为例,试着用了一下,写了个小代码。调用了Tesseract用于ocr,Magick convert用于图片转换,识别率还是比较高 (如果对Tesseract专门训练可能效果更好,但我简单看了一下还是蛮复杂的样子)。这意味着理论上我们就可以把国自项目的信息全部爬下来,不过没有时间去弄。

  • Qt 5/ Mingw环境。
  • ImageMagick-7.0.7-22-portable-Q16-x86
  • Tesseract-OCR-4.0.0alpha

一些截图:

Image(2)[4]Image(6)Image(7)Image(8)

提供一本水文数据分析的工具书下载

原书作者Hipel和McLeod在他们主页上提供公开下载,原网页是 http://www.stats.uwo.ca/faculty/aim/1994Book/。免费使用的条件是:

“We give our permission to use this material freely for teaching provided that the following citation is included: “Time Series Modelling of Water Resources and Environmental Systems” by Keith W. Hipel and A. Ian McLeod.”

(我们许可免费使用本书用于教学目的,只要将下述引用包括进来:“Time Series Modelling of Water Resources and Environmental Systems” by Keith W. Hipel and A. Ian McLeod.”)

这本关于水文数据时间序列的书长达1千多页,内容十分丰富;遗憾的原网页在国内一些地方被屏蔽,无法访问, 转帖到这里方便国内学者使用。务请尊重原作者许可的使用条件。

Hipel K W, Mcleod A I. Time Series Modelling of Water Resources and Environmental Systems. Amsterdam, The Netherlands: Elesevier, 1994, 1013.

Links: Link1 (Baidu, ~63MB)

新版DeltaCopy: DeltaCopy_rsync3.12

支持Rsync 3.1.2和Cygwin 2.3.1,消除了Windows上的权限问题,其中的rsync, cygwin1等几个包来自cwRsync_5.5.0_x86_Free。我做了简单的repack和测试。

Windows上的权限问题在此文有描述。使用此版本不需要加perms选项。

*我同样试了从最新的Cygwin里提取文件,跟deltacopy放一起不能用,主要chmod的权限问题无法解决。cwRsync里的chmod权限可能做了处理。

a. 如果已经安装了DeltaCopy Service,那么在安装此版本前,需要把原Service卸载掉,方法如下:

1 在控制面板的服务里找到deltacopy server,将之停止

2 管理权限打开cmd

3 运行 sc delte deltacopyservice,会提示删除成功

b. 把DeltaCopy_rsync3.12.zip下载后(下载链接见后文),解压缩到某文件夹。 Continue reading