5/06/2012

所谓认知

一直以为“认知”是心理学领域的东西,而且因为其抽象、玄乎,而本能的排斥它。后来才知道,“认知”早与“地理”扯上关系,在国外,地理是一门“社会科学”,研究地理是为了更好地研究人,将人与地理结合,或者说将人与环境结合,是地理学的崭新的研究方向,而地理、行为、认知则构成了这新方向的关键词。

可是,认知究竟是什么?在我看来,科学的意义就是用逻辑来解释某种现象,而这种现象必须是可重复发生、可用数据定量描述的。那么认知,符合这样的条件吗?

最近看了一篇心理学的论文,虽不足以解开我所有的疑惑,但让我有所启发;更让我印象深刻的是,之前一些模糊的、关于主客观的“思想”,原来可以用严谨的科学语言来表达,让我重新认识了心理学。

这是广州大学心理与脑科学研究中心的叶浩生老师写的《有关具身认知思潮的理论心理学思考》,对具身认知、离身认知等一些“人如何看待世界”的方式进行了综述,并认为具身认知才是正确的理解心理学的基础。

离身认知(disembodied cognition)认为思维和身体是分离的,身体只是意识的载体。所谓身心二元论,即心和身分属两个世界,主体和客体是一个“表征与被表征”的关系,主体若能镜像般地表征世界,则能真正认识世界。以计算机为比喻,身体就像硬件,负责数据的输入和信息的输出,而思维像程序一样负责信息的加工处理。从这个意义上讲,认知就是信息的表征和操控,“以抽象的符号表征着外在于我们的带我,然后通过操纵这些符号完成思维”。

反过来说,如今的计算机其实正在模拟人的认知过程,只不过如今的程序还非常稚嫩,如今的硬件也无法如人的身体那样感知到足够丰富的信息。另一方面,既然思维和身体是分离的,那就代表它们是可以替换的;那么如果有一天,物理系统足够复杂,就可以承担人类的智能。这与当时陈老师们在吃饭时谈笑的内容多么相似:随着计算机系统越来越复杂,计算机能自动完成的事件越来越多,可以预见,当计算机足够复杂时,它们能够自己debug,自己reflection,那么它们与人类的距离又有多大呢?这或许是所有计算机专家的梦想,也是许多像《黑客帝国》之类的科幻片的灵感来源。

我本人也非常信仰这种观点。可如今,一种新的看法,即具身认知(embodied cognition)被越来越多人认可,也似乎更“高级”,如同当时只研究环境,后来加入的“人”的因素一样,后者显得更合理。这种观点认为,认知在很大程度上与身体的物理属性相关,脑神经水平上的细节、身体的结构、运动系统等都对认知的形成有重要的影响。“人认识世界的方式是用我们的身体以合适的方式与世界中的其他物体互动,在互动的过程中获得对世界的认识”。它认为认知在本质上并非使用抽象符号的表征和加工,而是一种模拟(simulation),而所谓模拟,是“身体、世界和心智互动过程中产生的知觉、运动和内海状态的复演”。我对此并不十分理解,紧接着文章举了个例子,认为同情心的产生即是因为我们“通过大脑与身体的特殊通道模拟了他人的感受”,同样让我不太理解。

文章还举了一个更有说服力的例子。Yale大学的研究者在2010年做了一个实验,把41个大学生随机分成两组,A组学生双手捧着一杯热咖啡,B组学生捧着一杯冰咖啡。然后两组学生分别对同一个想象中的中性人物的人格特征进行评分。结果显示,A组学生比B组学生更有可能把这个人评估为热情、友好。从而认为,身体上感知到的温暖影响了学生认知上的判断。这个结果的确让人惊讶,但仔细一想却也不是那么奇怪。正如所有人都知道的那样,同样的风景给不同的人可能有不同的感受,有人喜有人悲,最简单的,如果人身体健康,那很可能就是乐观的心态,反之如果他正遭受疾病,他更趋向于悲观的心情,这似乎是理所当然的。

最后说说具身认知的方法论。具身认知告诉我们要把有机体放在它的环境中,视有机体、行为和环境紧密相连。这就回到文首的问题,有关“有机体”的变量是可重复出现的吗?我们知道环境是可以量化的,可人在那一刻是喜是悲却无法估计,也不可能重复发生,那如何用科学的方法来研究?另外,具身认知认为,神经科学和心理学是对同一问题的两种不同的解释,应该将这两种方法结合起来,可是具体如何结合呢?

这些都是具身认知让我不可接受的地方。尽管现代科学都越来越重视“人”的因素,都试图把“人”加入研究的范畴(是否和兴起的社交网络有关?),但我还是很难理解怎样用科学、用数字和规则来研究人的行为,甚至人的认知。






3/31/2012

A first glimpse of CMAQ

In the last three weeks, I did three things:
1. Modify the python script written before to interpolate preciser DEM into WRF.
2. Learn NCL
3. Successfully run CMAQ model.

DEM Interpolation

As mentioned in the last post, I wrote a small python script to interpolate our 30-meter-resolution DEM data into WRF, and tried to make the result more accurate. After the script has been written, however, the validation is another challenging work. First we just used geogrid.exe to take in the output data, and compared the result with that using coarser resolution data, say 30 s(econd) and 2 m(inus), to see the rough trend. The result was OK, but not persuasive enough to claim the correctness, because the terrain is too complex and you can not reach every detail with only eyes!

Then we did more accurate validation. First, we made up some experimental data, say, a block of DEM where four quarters were different constant values. The simplified data was easy to check if the output was right or not. Then real data were transferred in WPS, and we did an overlay on the coarser data, and made a "minus" computation in the topography height. In this way, the correctness of the script can be fully validated.

The following work should be to check how much the more precise topography influences WRF. From the geogrid result, you can hardly tell the difference between 1s and 30s terrain. However, from reports by other researchers, the topography does make a difference. The same method is applied: overlay and minus.

NCL

NCL is an interpreted language (like python) designed specifically for scientific data analysis and visualization. As far as I see, the tool has following advantages:
1. Interpreted language. It's easy to use, with compiling and linking problems. Any change can be immediately applied. It is much like python, and can also be run in both interactive mode and batch mode.
2. Powerful I/O ability. It can read almost all scientific data, from ASCII to binary, and netcdf, grib1 & grib2, and shapefile, etc. That's why we abandon GrADS, which can only deal with specific format, and may not be used for WPS, CMAQ and SMOKE.
3. Programming freedom. The language is rather flexible, and give users enough freedom to do what they want. And it is easy to be extended to wrap C and Fortran.
4. Numerous built-in functions. Though I haven't used these mathematical functions, but it is good to know there are many available tools at hands, something like Matlab.
5. Easy map overlay. As it is especially designed for atmospheric and oceanic models, map overlay is very important to study a specific issue.

More features:
There are several different kinds of data in NCL. A variable can have attribute data, coordinate data and missing values. Attribute data explains additional info apart from the "real data", like variable descriptions. Coordinate data facilitates the mapping procedure. Missing value support is another feature that highlights. Many models have a special value that is assigned to those with no sufficient info (e.g. initial condition) to simulate. NCL can recognize these data and do some special tricks.

Also, unlike C, NCL can deal with the whole array. On the other hand, loop though every element in an array is inefficient and not recommended.

CMAQ

It finally comes to CMAQ. Thanks to Prof. Zheng Junyu, now we have SMOKE output, and can run CMAQ. CMAQ consists of  many sub-programs. It is annoying to set up configurations one by one. So I write a top script to control these sub-scripts.

It's interesting to learn the shell programming. Linux shell is much more powerful than Windows Dos. It not only has basic commands, but also variables, statements, functions and procedures, and logical expressions. Some confusions I now have is Linux has various shells, like sh, bash, csh, and different shells has some different syntax. Besides, the concept "process" is important, and affects the pass of variables between functions and scripts.

It is really time-consuming to run CMAQ. For basic configurations, there are six output files, including pollution concentration and average concentration, and wet and dry deposition. One problem I recently solved is variables in CCTM output has no coordinates, but only rows and columns, making it difficult to overlay with the map. Actually there is such info, and it resides in MCIP output, in GRDCRO2D file. There are variables LON AND LAT. They are 4-dimension array, with time steps, layers, rows and columns. In fact for coordinates the array is duplicated. Only one dimension is enough, which is also required by NCL (in NCL, coordinate variables must be one dimensional. For longitude, pick columns and for latitude, pick rows).

3/16/2012

读《激荡三十年》

很早就听说这本书了,由赫赫有名的吴晓波老师写的,当初因为他与我们强化班的导师同名而让我印象深刻。自然,和其他经济学类书一样,这本书受到了强化班同学的追捧。很多人表示“赞”,或想读,或者读过了的出来发表一堆宏论。我自然不喜这些,因此也就耽搁了。

不过,对经济学类的书的好奇让我又翻看了这本书。似乎第一次看这么“务实”的书。书的内容让我很意外,写的很浅显,也很真实,让不谙世事的我第一次对这些“身边的最实实在在的事”有了一个认识。尤其是读到台州的李书福甚至玉环的那些事时,我深切地体会到书中讲的事情是多么的现实。

所以说经济学是很有意思的一门学科,它不像我平时做的学科如计算机等那么抽象、那么脱离现实,它是研究这个社会如何动作的学科,与古时读书人的清风傲骨隔隔不入。

或许以后也该多读点这类务实的书。有时想想,何必执着于那些所谓的技术呢?

3/12/2012

Topography in WPS

Two weeks ago, I tried to run CMAQ. However, it was really beyond my expectation that the pollution emission source data were so difficult to deal with, and finally we had to give up.

SMOKE is a set of programs responsible for the emission data. It takes in pollution inventory and turns it into CMAQ permitted format. In addition, it also divides the inventory spatially into grids and temporally into hours and days as most inventory data we get are annual. The problem is, SMOKE is developed by Americans and for USA use. The standards and administrative divisions are totally different. To take advantage of SMOKE, a specific methodology to adapt to the local is needed. Spanish scholars (R. Borge, et al)  have done that. In China, Prof. Zheng Junyu from South China University of Technology spent two years finishing that.

We are lucky that on 2nd March, Prof. Zheng came here and gave us a speech, exactly about pollution inventory preparation. He promised to give us his fruit so that we can go further. This Wednesday we are going there to learn about the skills.

Last week, I tried to replace topography data for WPS with my own data. WPS is the pre-processing software of WRF, preparing geographical and meteorological data for real-case weather simulation. It consists of three sub-programs, among which geogrid is responsible for interpolating static geographical data into grids. WPS is equipped with global geographical data issued by USGS, with 10m, 5m, 2m, 30s resolutions. For better precision, we have to add customized data to geogrid. We've got 1s (30 meters) PRD DEM data, and we can replace the topography data with it. Later, we are going to collect landuse data and do the same replacement.

The work is not so difficult as it seems. Both DEM data and geogrid formatted data are in grids. All I have to do is to read DEM into memory and then output it to static data. GDAL facilitates us greatly with dealing with DEM and WPS provides the output routine. We have to pay attention to obeying the WPS program interface. Also, data sequence in these two data formats are different. GDAL tends to read data from the first row (from north to south), but geogrid routine writes data from the south to the north. 

Ater the static data are ready, some configurations have to be modified to instruct geogrid to use the data we specified. After geo_em.d* have been output, we can use NCL to view the result. A sample ncl script can be downloaded here

In this way, terrain data with better resolution can be applied to WRF, which should affect the simulation result, like wind direction. Of course, the simulation grid is important in determining the significance of this work. Simulation with large domains and low resolution care less about course geography.

Fig1. Terrain with USGS 10m data

Fig2. Terrain with 1s data

3/05/2012

人生的转折点?

此刻,我正坐在303,听着小萝莉的 phd qualify,看着一页一页很华丽的图文,百感交集:这就是我以后要做的?

昨天看了一篇日志,一个满怀壮志的青年不甘于过着每天上班哄妻子带小孩的平淡日子,决意出国,只有外面的大千世界才能容下他博大的雄心。时隔四年,当他每天忙于看paper、做project、写本子,他最大的愿望就是早点毕业,过上高级知识分子应该有的高薪生活,然后有一个幸福的家庭。他不禁感叹到,到最后,我竟然回到了原点。

这或许是困扰所有人的一个问题:我们为什么活着?几天前,我收到了PSU的offer,我当然很兴奋,但我知道我并没有做好准备。我的兴奋只是因为我赢得了【申请】这一仗,我的【被认可】让我有很大的成就感。但是,这其实只是最初的一小步,后面还有5年6年甚至更长的时间。每天,我要做的就是看paper,写paper,申项目,做presentation,很明显我并不愿意过这样的生活,这只是为我今后有更好的生活付出的代价。不知将来我是否会为我今天这样“牺牲”的决定后悔?

美国,多么令人向往的国家。从小,我妈就希望我出人头地,而一个标竿就是出国,留洋。而我也从小迫切地希望能出去走走,去看我妈妈、我外婆、我曾外婆都从没看过的世界。可是,就在两年前,我真的到了美国,三个星期的时间里给我的只有无助、寂寞,也正是这三周灰色的印象,让我在本科毕业时放弃了出国的想法。如今,为何我又萌生了出国的想法呢?说实话,连我自己也说不清楚。或许小池子说的对吧,我心里还是有一颗出去走走的火苗,如果我出去了,或许有一天我会后悔;可如果我没有出去,我将来肯定会后悔。Follow your heart.

Young and to be young, follow your heart.

题目是“人生的转折点?”,这个出国的决定或许会影响我的一生,甚至改变我今后的职业和发展环境。之所以加个问号,是我又怀疑这个决定真的重大到会“改变”我的人生轨迹吗?会不会如其他决定一样,当我面对它的时候,它总是无限倍地放大,而当几年后我回头再看时,它只是我人生中轻描淡写的一笔。或许根本没有什么能真正改变人生,事实上也根本没有改变之说,谁也不知道“人生”原来怎么样。这就是人生,没什么东西是大不了的。对的错的,好的坏的,都筑成了人生的一分子。

最后想起了你的一句话:

我会勇敢的走下去,只要牵着你的手。

这里的路,已不再只是你我的爱情之路,而是你我的人生长路。

2/27/2012

SMOKE 初窥

SMOKE比我想象的要复杂很多,它并不像WRF或CMAQ一样有一个核心的程序,而是有很多子程序 (processors)。

SMOKE由MCNC-North Carolina Supercomputing开发,旨在为CMAQ等空气质量模拟软件提供污染源,其实质是对国家公布的排放清单作一个数据转换,对年排放量内插出日排放量,将特定区域划分网格 (gridding)。SMOKE可以处理面源、点源、线源、生物排放等污染源,每个源由不同的程序执行。下图显示了主要程序:


Smkinven将排放清单读入,最后Smkmerge和Mrggrid输出model-ready的排放源文件。

可是,SMOKE是为美国设计的,其排放源的分类、区域代码、空间地理信息、时间谱等都使用美国标准,需要开展很多的本地化工作,华南理工大学的张礼俊的硕士论文就是做这方面的工作,可以借鉴。目前,我还是很糊涂,也在犹豫是否要深入研究,毕竟这个工作量都足够人家硕士毕业了。

2/21/2012

做一个完整的人

一直在想是不是要把这个博客写成一个纯技术型的,把对她的感情分离到另一个博客中。但今天看完周国平写的<在世纪的转折点上:尼采>后,我改变了这个想法。正如尼采所说的,我们过分地崇尚科学,甚至被科学所奴役,我们忘了一个根本性的问题:究竟是科学为人服务,还是人为科学服务?就像我之前,我觉得将科学和情感放在一个博客中展现很奇怪;事实上,我这种想法才是很奇怪的,理性和感性本就是人的两面,我为什么要刻意地分开,甚至觉得让别人看到一个技术男在谈感情是令人别扭的一件事呢?因此,我决定把我所有的想法全写在这一个博客上,只做标签上的区别,在这里,展现一个完整的我。

写到这里,顺便摘一些书上看到的比较发人深省的话。

你要站在你自己的生命之上,高屋建瓴地俯视你自己的生命,不把它看得太重要,这样你反而能真正地体验它,享受它,尽你所能地把它过得有意义。

人只以勇敢和毅力所许可的限度接近真理。强者必须认识并肯定现实,正如弱者必须害怕和逃避现实一样。只有强者才有认识的自由,弱者却需要生活在欺骗之中。精神的强者出于内在的丰满和强盛,与一切相嬉戏,玩弄至今被视为神圣不可侵犯的事物,藐视至高无上者。只有这样的强者才能真切体验到人生的意义,从人生的痛苦中发现人生的欢乐。他的精神足够充实,在沙漠中不会沮丧,反而感觉到孤独的乐趣。他的精神足够热烈,在冰窟中不会冻僵,反而感觉到凛冽的快意。这也就是尼采所提倡的酒神精神。

无聊是一颗空虚的心灵寻求消遣而不可得,它是喜剧性的。寂寞是寻求普通的人间温暖而不可得,它是中性的。然而,人们往往将它们混淆,甚至以无聊冒充孤独……“我孤独了。”啊,你配吗?

最后,总结下尼采的各种重要的观点:酒神精神,强力意志,评价,创造,“自我”,非理性,以及“一切价值的重估”。

不得不说,理科的思维让我们局囿在微观的世界中,我们更多地关注了一个技术性或科学性问题,却忘了以鸟瞰人生长河的豁达来思考人生,以俯视大千世界的广阔来理解世界。有时候,跳出一些框架,整个世界都会发生变化。