YT met segmentation fault error when using similar tech as in the UV Nudging experiment to conduct TP heatforcing experiments.
The segfault comes from the user-added call in phypkg.F90
:
call infld('tp', fh_tpmask, 'lon', 'lat', 1, pcols, begchunk, endchunk, &
tpmask, found, grid_map='PHYS')
According to wikipedia:
In computing, a segmentation fault (often shortened to segfault) or access violation is a fault, or failure condition, raised by hardware with memory protection, notifying an operating system (OS) the software has attempted to access a restricted area of memory (a memory access violation).
We believe the error comes from the infld
reading process. Somehow the program violates the memory access limit, such as using double to read byte, or reading after End-of-File.
However, the original code is copied from a previous F compset run, which was smoothly conducted. So we re-check the ad-hoc part:
!*** MOD START: infld TP mask and heating file
fh_tpmask=>tpmask_file_get_id()
call infld('tp', fh_tpmask, 'lon', 'lat', 1, pcols, begchunk, endchunk, &
tpmask, found, grid_map='PHYS')
The thing is that we read the file info (get the file handle) in a function from another module (cam_initfiles.F90
), and use the pointer to get the function handle in phypkg.F90
. In ` cam_initfiles.F90` we define:
function tpmask_file_get_id()
type(file_desc_t), pointer :: tpmask_file_get_id
tpmask_file_get_id => fh_tpmask
end function tpmask_file_get_id
Updated 2018-12-27
FS in OUC is trying to setup CESM fully coupled Pre-industrial (B1850 compset) cases while faced with some problem.
In the run log, we found:
ERROR: restformat: number of records on restart file not supported
By searching, the error seems to come from the ice restart file.
We then checked the default restart file, which can be located in ice_in
, in ${CESM_INPUT}/ice/cice/iced.0001-01-01.gx1v6_20080212
. The file is zero in size. Thus, it must be created by the model, and the model cannot read anything from it. We re-download the corresponding file and the problem solved.
Updated 2018-12-26
看了下github,已经三个周没有contribution了。上周AGU,应该是毕业前最后一次出国开会,早就准备,YQ也一并同去,两人第一次在国外开会overlap,一起逛了DC的两个博物馆,方尖碑,林肯纪念堂和国会山,看到了梵高自画像的原作,YQ很开心,好久没有见她这么长时间持续的开心了,我也很欣慰。
返程从NY直飞CN,整航班的纨绔美本,着装相貌言谈举止,耳闻目睹间与影视作品中对接角色相差不大。想这代人与他们父辈之间已经判若云泥,略感唏嘘。
航班起飞之后直冲正北,冰洋航线,第一次飞入北极圈。飞西海岸都是走白令海测地线,阿留申群岛掠过,并没有进入北极圈。如今看这长虹贯日般的冰洋航线,想到进入极夜区或许能看到极光,不禁一阵兴奋。
进入北极圈后很快就进入极夜区,与飞越晨昏线的情况类似,似入黄昏一般逐渐暗淡,夕阳在右舷窗外,下面是时而包块时而条状的极地层状云。时值上弦月,斜挂西天,银光下泻,照亮一片云缝之中格陵兰的冰川和海面。
除了引擎的轰鸣,窗外静谧地像油画一般,完全感受不到这片静谧之中是彻骨寒冷。朦胧中忽然发现一片灯光,飞行信息上显示是格陵兰的首府,努克。呵,从这个高度望去,这个小镇的灯火如美国商铺门口的OPEN彩灯一般精巧,不知道这里的人们过着怎样的生活,与我9年前期盼的山顶测站相比如何?有生之年若有机会,愿来这里守候极光。
Updated 2018-12-18