汇流运行记录

2023-11-07 06:38
文章标签 运行 记录 汇流

本文主要是介绍汇流运行记录,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

运行汇流文件:

[root@Liuy /home/VIC_hanjiang/rout]# rout /home/VIC_hanjiang/rout/rout_input.STEHENDAY =          365  NMONTHS =           121  STEHE                  35 139Routing station: STEHEsearching catchment...Number of grid cells upstream of present station          16reading grid_UH...making grid UH...making UH_S grid...it takes a while...NOTE:  your new UH_S grid file will be written in thedirectory you run from, and will be calledSTEHE.uh_ssave this file and specify it in your stationlocation file to avoid this step in the futureAt line 90 of file unit_hyd_routines.f (unit = 98)Fortran runtime error: Cannot open file 'STEHE.uh_s': File exists

2020.02.08已制作好汇流所需参数:

[root@Liuy /home/VIC_Routing-1.1_Fortran/samp_inputs]# rout /home/VIC_hanjiang/rout/rout_input.STEHENDAY =          365  NMONTHS =           121  XUNHE                  34  15Routing station: XUNHEsearching catchment...Number of grid cells upstream of present station          62reading grid_UH...making grid UH...making UH_S grid...it takes a while...NOTE:  your new UH_S grid file will be written in thedirectory you run from, and will be calledXUNHE.uh_ssave this file and specify it in your stationlocation file to avoid this step in the futuregrid cell           1  out of          62grid cell           2  out of          62grid cell           3  out of          62grid cell           4  out of          62grid cell           5  out of          62grid cell           6  out of          62grid cell           7  out of          62grid cell           8  out of          62grid cell           9  out of          62grid cell          10  out of          62grid cell          11  out of          62grid cell          12  out of          62grid cell          13  out of          62grid cell          14  out of          62grid cell          15  out of          62grid cell          16  out of          62grid cell          17  out of          62grid cell          18  out of          62grid cell          19  out of          62grid cell          20  out of          62grid cell          21  out of          62grid cell          22  out of          62grid cell          23  out of          62grid cell          24  out of          62grid cell          25  out of          62grid cell          26  out of          62grid cell          27  out of          62grid cell          28  out of          62grid cell          29  out of          62grid cell          30  out of          62grid cell          31  out of          62grid cell          32  out of          62grid cell          33  out of          62grid cell          34  out of          62grid cell          35  out of          62grid cell          36  out of          62grid cell          37  out of          62grid cell          38  out of          62grid cell          39  out of          62grid cell          40  out of          62grid cell          41  out of          62grid cell          42  out of          62grid cell          43  out of          62grid cell          44  out of          62grid cell          45  out of          62grid cell          46  out of          62grid cell          47  out of          62grid cell          48  out of          62grid cell          49  out of          62grid cell          50  out of          62grid cell          51  out of          62grid cell          52  out of          62grid cell          53  out of          62grid cell          54  out of          62grid cell          55  out of          62grid cell          56  out of          62grid cell          57  out of          62grid cell          58  out of          62grid cell          59  out of          62grid cell          60  out of          62grid cell          61  out of          62grid cell          62  out of          62making convolution.../home/VIC_hanjiang/results/fluxes_32.8262_109.3981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_32.9262_109.3981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.0262_109.3981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.1262_109.3981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.2262_109.3981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_32.8262_109.2981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_32.9262_109.2981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.0262_109.2981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.1262_109.2981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.2262_109.2981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.3262_109.2981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.4262_109.2981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_32.9262_109.1981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.0262_109.1981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.1262_109.1981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.2262_109.1981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.3262_109.1981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.4262_109.1981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.5262_109.1981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.0262_109.0981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.1262_109.0981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.2262_109.0981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.3262_109.0981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.4262_109.0981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.5262_109.0981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.1262_108.9981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.2262_108.9981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.3262_108.9981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.4262_108.9981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.5262_108.9981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.6262_108.9981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.1262_108.8981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.2262_108.8981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.3262_108.8981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.4262_108.8981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.5262_108.8981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.6262_108.8981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.7262_108.8981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.3262_108.7981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.4262_108.7981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.5262_108.7981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.6262_108.7981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.7262_108.7981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.8262_108.7981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.3262_108.6981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.4262_108.6981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.5262_108.6981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.6262_108.6981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.7262_108.6981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.8262_108.6981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.5262_108.5981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.6262_108.5981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.7262_108.5981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.8262_108.5981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.5262_108.4981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.6262_108.4981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.7262_108.4981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.8262_108.4981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.6262_108.3981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.7262_108.3981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.6262_108.2981 NOT FOUND, INSERTING ZEROS/home/VIC_hanjiang/results/fluxes_33.7262_108.2981 NOT FOUND, INSERTING ZEROS62  files not found, zero runoff/baseflow usedwriting data...
At line 21 of file write_routines.f (unit = 30)
Fortran runtime error: Cannot open file '/vic/VIC_hanjiang/rout/results/XUNHE.day': No such file or directory

报错:

1.径流量输出文件带有.txt后缀;

解决方案(R):

##提取全部文件名并转为向量格式
path <- "C:/Users/Liuy/Documents/results"f1 <- dir(path)
f2 <- as.character(f1)
f2##批量替换!gsub()可以用于字段的删减、增补、替换和切割,可以处理一个字段也可以处理由字段组成的向量。
##具体的使用方法为:gsub("目标字符", "替换字符", 对象)f2 <- gsub(".txt","",f2)
f2##源文件夹文件重命名
##由于f1是dir()直接赋值过来,因此其代表了系统文件名,而f1的顺序与f2一一对应,仅仅是对字符串进行了查找替换操作,因此可以放心利用file.rename()重命名文件file.rename(f1, f2) #函数形式为file.rename(from, to),from为原始文件名向量,to为新的文件名向量

2.自动识别出的经纬度坐标与径流输出经纬度不匹配(参数文件问题)制作的文件存在偏移

如:

改为0480即匹配在一起了。

更改后:

[root@Liuy /home/VIC_Routing-1.1_Fortran/samp_inputs]# rout /home/VIC_hanjiang/rout/rout_input.STEHENDAY =          365  NMONTHS =           121  XUNHE                  34  15Routing station: XUNHEsearching catchment...Number of grid cells upstream of present station          62reading grid_UH...making grid UH...making UH_S grid...it takes a while...NOTE:  your new UH_S grid file will be written in thedirectory you run from, and will be calledXUNHE.uh_ssave this file and specify it in your stationlocation file to avoid this step in the future
At line 90 of file unit_hyd_routines.f (unit = 98)
Fortran runtime error: Cannot open file 'XUNHE.uh_s': File exists

这是由于在站点文件中默认不存在站点单位线文件,程序会根据一套算法计算出单位先,然后保存为xxx.uh_s文件。

所以下次计算的时候就可以将上次生成的单位线文件直接拿过来用,不过需要在站点文件中将NONE更改为单位线文件位置,从而缩短计算时间。

发现其跑到了VIC_routing示例文件中,这是由于生成的单位线文件自动写入当前运行文件夹。在VIC_hanjiang/rout下运行即可。

 

 



 

[root@Liuy /home/VIC_hanjiang/rout]# rout /home/VIC_hanjiang/rout/rout_input.STEHENDAY =          365  NMONTHS =           121  XUNHE                  34  15Routing station: XUNHEsearching catchment...Number of grid cells upstream of present station          62reading grid_UH...making grid UH...making UH_S grid...it takes a while...NOTE:  your new UH_S grid file will be written in thedirectory you run from, and will be calledXUNHE.uh_ssave this file and specify it in your stationlocation file to avoid this step in the futuregrid cell           1  out of          62grid cell           2  out of          62grid cell           3  out of          62grid cell           4  out of          62grid cell           5  out of          62grid cell           6  out of          62grid cell           7  out of          62grid cell           8  out of          62grid cell           9  out of          62grid cell          10  out of          62grid cell          11  out of          62grid cell          12  out of          62grid cell          13  out of          62grid cell          14  out of          62grid cell          15  out of          62grid cell          16  out of          62grid cell          17  out of          62grid cell          18  out of          62grid cell          19  out of          62grid cell          20  out of          62grid cell          21  out of          62grid cell          22  out of          62grid cell          23  out of          62grid cell          24  out of          62grid cell          25  out of          62grid cell          26  out of          62grid cell          27  out of          62grid cell          28  out of          62grid cell          29  out of          62grid cell          30  out of          62grid cell          31  out of          62grid cell          32  out of          62grid cell          33  out of          62grid cell          34  out of          62grid cell          35  out of          62grid cell          36  out of          62grid cell          37  out of          62grid cell          38  out of          62grid cell          39  out of          62grid cell          40  out of          62grid cell          41  out of          62grid cell          42  out of          62grid cell          43  out of          62grid cell          44  out of          62grid cell          45  out of          62grid cell          46  out of          62grid cell          47  out of          62grid cell          48  out of          62grid cell          49  out of          62grid cell          50  out of          62grid cell          51  out of          62grid cell          52  out of          62grid cell          53  out of          62grid cell          54  out of          62grid cell          55  out of          62grid cell          56  out of          62grid cell          57  out of          62grid cell          58  out of          62grid cell          59  out of          62grid cell          60  out of          62grid cell          61  out of          62grid cell          62  out of          62making convolution...1  of          62 : /home/VIC_hanjiang/results/fluxes_32.8262_109.3980Error reading time-series data, insufficient data or missing input file/home/VIC_hanjiang/results/fluxes_32.8262_109.3980writing data...
At line 21 of file write_routines.f (unit = 30)
Fortran runtime error: Cannot open file '/vic/VIC_hanjiang/rout/results/XUNHE.day': No such file or directory

径流输出文件内容与汇流模型不匹配。

原因,径流输出自带解释行和标题行,汇流模型无法识别。

VIC_4中可在全局参数output部分设置:

PRT_HEADER 为FALSE

从而实现输出结果不保留解释文件与头文件。但是VIC_5中将其弃用:

[root@Liuy /home/VIC_hanjiang/rout]# vic_classic.exe -g/home/VIC_hanjiang/parameters/global_param.hanjiang.txt
---------------------------------------------------------------------------
Traceback (most recent call last):
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7fd191940830]
vic_classic.exe() [0x44eafa]
vic_classic.exe() [0x457bf9]
[ERROR] ./src/get_global_param.c:663: errno: None: PRT_HEADER has been deprecated. All output files include a header including pertinent metadata.

解决方案:批量去除径流模型输出前三行(R)。

LINUX_bash

[root@Liuy /home/VIC_hanjiang/results]# for i in `ls`;do sed -i '1,3d' $i;done

使用sed命令,sed -i表示将改动直接写入到原文件里。‘1,3d’表示删除1-3行。

 



[root@Liuy /home/VIC_hanjiang/rout]#  rout /home/VIC_hanjiang/rout/rout_input.STEHENDAY =          365  NMONTHS =           121  XUNHE                  34  15Routing station: XUNHEsearching catchment...Number of grid cells upstream of present station          62reading grid_UH...making grid UH...reading UH_S grid from filemaking convolution...1  of          62 : /home/VIC_hanjiang/results/fluxes_32.8262_109.39802  of          62 : /home/VIC_hanjiang/results/fluxes_32.9262_109.39803  of          62 : /home/VIC_hanjiang/results/fluxes_33.0262_109.39804  of          62 : /home/VIC_hanjiang/results/fluxes_33.1262_109.39805  of          62 : /home/VIC_hanjiang/results/fluxes_33.2262_109.39806  of          62 : /home/VIC_hanjiang/results/fluxes_32.8262_109.2980
......58  of          62 : /home/VIC_hanjiang/results/fluxes_33.8262_108.498059  of          62 : /home/VIC_hanjiang/results/fluxes_33.6262_108.398060  of          62 : /home/VIC_hanjiang/results/fluxes_33.7262_108.398061  of          62 : /home/VIC_hanjiang/results/fluxes_33.6262_108.298062  of          62 : /home/VIC_hanjiang/results/fluxes_33.7262_108.2980writing data...
At line 21 of file write_routines.f (unit = 30)
Fortran runtime error: Cannot open file '/vic/VIC_hanjiang/rout/results/XUNHE.day': No such file or directory

原因:全局文件中路径打错啦!!!

应该是/home/VIC_hanjiang/rout/results/

汇流模块会自动写入各种(逐日,月)汇流结果。



[root@Liuy /home/VIC_hanjiang/rout/results]# rout /home/VIC_hanjiang/rout/rout_input.STEHENDAY =          365  NMONTHS =           121  XUNHE                  34  15Routing station: XUNHEsearching catchment...Number of grid cells upstream of present station          62reading grid_UH...making grid UH...reading UH_S grid from filemaking convolution...1  of          62 : /home/VIC_hanjiang/results/fluxes_32.8262_109.39802  of          62 : /home/VIC_hanjiang/results/fluxes_32.9262_109.3980
......57  of          62 : /home/VIC_hanjiang/results/fluxes_33.7262_108.498058  of          62 : /home/VIC_hanjiang/results/fluxes_33.8262_108.498059  of          62 : /home/VIC_hanjiang/results/fluxes_33.6262_108.398060  of          62 : /home/VIC_hanjiang/results/fluxes_33.7262_108.398061  of          62 : /home/VIC_hanjiang/results/fluxes_33.6262_108.298062  of          62 : /home/VIC_hanjiang/results/fluxes_33.7262_108.2980writing data...1  YOUFG                  47  15Routing station: YOUFGsearching catchment...Number of grid cells upstream of present station         669reading grid_UH...making grid UH...making UH_S grid...it takes a while...NOTE:  your new UH_S grid file will be written in thedirectory you run from, and will be calledYOUFG.uh_ssave this file and specify it in your stationlocation file to avoid this step in the futuregrid cell           1  out of         669grid cell           2  out of         669grid cell           3  out of         669grid cell           4  out of         669......grid cell         662  out of         669grid cell         663  out of         669grid cell         664  out of         669grid cell         665  out of         669grid cell         666  out of         669grid cell         667  out of         669grid cell         668  out of         669grid cell         669  out of         669making convolution...1  of         669 : /home/VIC_hanjiang/results/fluxes_32.4262_110.69802  of         669 : /home/VIC_hanjiang/results/fluxes_32.7262_110.69803  of         669 : /home/VIC_hanjiang/results/fluxes_32.8262_110.6980
......663  of         669 : /home/VIC_hanjiang/results/fluxes_33.5262_106.3980664  of         669 : /home/VIC_hanjiang/results/fluxes_33.6262_106.3980665  of         669 : /home/VIC_hanjiang/results/fluxes_32.9262_106.2980666  of         669 : /home/VIC_hanjiang/results/fluxes_33.2262_106.2980667  of         669 : /home/VIC_hanjiang/results/fluxes_33.3262_106.2980668  of         669 : /home/VIC_hanjiang/results/fluxes_33.4262_106.2980669  of         669 : /home/VIC_hanjiang/results/fluxes_33.5262_106.2980writing data...1  JINZG                  51  19Routing station: JINZGsearching catchment...Number of grid cells upstream of present station          89reading grid_UH...making grid UH...making UH_S grid...it takes a while...NOTE:  your new UH_S grid file will be written in thedirectory you run from, and will be calledJINZG.uh_ssave this file and specify it in your stationlocation file to avoid this step in the futuregrid cell           1  out of          89grid cell           2  out of          89grid cell           3  out of          89grid cell           4  out of          89
......grid cell          85  out of          89grid cell          86  out of          89grid cell          87  out of          89grid cell          88  out of          89grid cell          89  out of          89making convolution...1  of          89 : /home/VIC_hanjiang/results/fluxes_33.4262_111.29802  of          89 : /home/VIC_hanjiang/results/fluxes_33.5262_111.29803  of          89 : /home/VIC_hanjiang/results/fluxes_33.3262_111.1980
......85  of          89 : /home/VIC_hanjiang/results/fluxes_33.9262_109.698086  of          89 : /home/VIC_hanjiang/results/fluxes_34.0262_109.698087  of          89 : /home/VIC_hanjiang/results/fluxes_34.1262_109.698088  of          89 : /home/VIC_hanjiang/results/fluxes_33.9262_109.598089  of          89 : /home/VIC_hanjiang/results/fluxes_34.0262_109.5980writing data...1  DANJA                  55  16Routing station: DANJAsearching catchment...Number of grid cells upstream of present station         147reading grid_UH...making grid UH...making UH_S grid...it takes a while...NOTE:  your new UH_S grid file will be written in thedirectory you run from, and will be calledDANJA.uh_ssave this file and specify it in your stationlocation file to avoid this step in the futuregrid cell           1  out of         147grid cell           2  out of         147grid cell           3  out of         147
......grid cell         142  out of         147grid cell         143  out of         147grid cell         144  out of         147grid cell         145  out of         147grid cell         146  out of         147grid cell         147  out of         147making convolution...1  of         147 : /home/VIC_hanjiang/results/fluxes_33.5262_111.79802  of         147 : /home/VIC_hanjiang/results/fluxes_33.6262_111.7980
......144  of         147 : /home/VIC_hanjiang/results/fluxes_34.0262_109.6980145  of         147 : /home/VIC_hanjiang/results/fluxes_34.1262_109.6980146  of         147 : /home/VIC_hanjiang/results/fluxes_33.9262_109.5980147  of         147 : /home/VIC_hanjiang/results/fluxes_34.0262_109.5980writing data...1  HANJA                  51  14Routing station: HANJAsearching catchment...Number of grid cells upstream of present station         697reading grid_UH...making grid UH...making UH_S grid...it takes a while...NOTE:  your new UH_S grid file will be written in thedirectory you run from, and will be calledHANJA.uh_ssave this file and specify it in your stationlocation file to avoid this step in the futuregrid cell           1  out of         697grid cell           2  out of         697
......grid cell         688  out of         697grid cell         689  out of         697grid cell         690  out of         697grid cell         691  out of         697grid cell         692  out of         697grid cell         693  out of         697grid cell         694  out of         697grid cell         695  out of         697grid cell         696  out of         697grid cell         697  out of         697making convolution...1  of         697 : /home/VIC_hanjiang/results/fluxes_32.7262_111.19802  of         697 : /home/VIC_hanjiang/results/fluxes_32.8262_111.1980......694  of         697 : /home/VIC_hanjiang/results/fluxes_33.2262_106.2980695  of         697 : /home/VIC_hanjiang/results/fluxes_33.3262_106.2980696  of         697 : /home/VIC_hanjiang/results/fluxes_33.4262_106.2980697  of         697 : /home/VIC_hanjiang/results/fluxes_33.5262_106.2980writing data...1  ZONGK                  56  15Routing station: ZONGKsearching catchment...Number of grid cells upstream of present station         871reading grid_UH...making grid UH...making UH_S grid...it takes a while...NOTE:  your new UH_S grid file will be written in thedirectory you run from, and will be calledZONGK.uh_ssave this file and specify it in your stationlocation file to avoid this step in the futuregrid cell           1  out of         871grid cell           2  out of         871grid cell           3  out of         871
......grid cell         866  out of         871grid cell         867  out of         871grid cell         868  out of         871grid cell         869  out of         871grid cell         870  out of         871grid cell         871  out of         871making convolution...1  of         871 : /home/VIC_hanjiang/results/fluxes_33.5262_111.79802  of         871 : /home/VIC_hanjiang/results/fluxes_33.6262_111.7980
......866  of         871 : /home/VIC_hanjiang/results/fluxes_33.6262_106.3980867  of         871 : /home/VIC_hanjiang/results/fluxes_32.9262_106.2980868  of         871 : /home/VIC_hanjiang/results/fluxes_33.2262_106.2980869  of         871 : /home/VIC_hanjiang/results/fluxes_33.3262_106.2980870  of         871 : /home/VIC_hanjiang/results/fluxes_33.4262_106.2980871  of         871 : /home/VIC_hanjiang/results/fluxes_33.5262_106.2980writing data...
Note: The following floating-point exceptions are signalling: IEEE_INVALID_FLAG IEEE_UNDERFLOW_FLAG IEEE_DENORMAL

一顿搜索后发现可能是由于汇流编写使用Fortran70,而现在使用95的原因。(其实并不影响输出结果!!)

暂且不管。由于Fortran编写的不太稳定。

这里使用大神(再次膜拜)自己用c编写的汇流程序。https://github.com/Sibada/CRout

[root@Liuy ~]# crout /home/VIC_hanjiang/rout/rout_input.STEHE
CRout Direction format: defaultFlow direction file:         /home/VIC_hanjiang/rout/STEHE.fdirFlow velocity file:  .false.Diffusion file:      1.50Fraction file:        .false.Station location file         800VIC output path       .false.     11111 decimal places.--Runoff data at column 0 and 1Routing output path   .true.Error: routing calculating date format incorrect: /home/VIC_hanjiang/rout/STEHE.fract

发现VIC output path怎么是.false 111 

说明CRout输入参数读取顺序与原有的不匹配。需检查src/crout.cpp中的读取顺序。



[root@Liuy ~]# crout /home/VIC_hanjiang/rout/rout_input.STEHE
CRout Direction format: defaultFlow direction file:         /home/VIC_hanjiang/rout/STEHE.fdirFlow velocity file:  uniform value 1.5Diffusion file:      uniform value 800Fraction file:        /home/VIC_hanjiang/rout/STEHE.fractStation location file         /home/VIC_hanjiang/rout/STEHE.stnlocVIC output path       /home/VIC_hanjiang/results/fluxes_     4 decimal places.--Runoff data at column 0 and 1Routing output path   /home/VIC_hanjiang/rout/results/Slope UH file /home/VIC_hanjiang/rout/UH.allTime period of routing calculation:      1990-1-1 -> 1990-12-31Time period of output data:              1990-1-1 -> 1990-12-31-----Station: XUNHE, location: 34,15 -----------------------> Reading station UH file...-> Grids num of current basin: 61-> Routing calculating...Warning: VIC output file /home/VIC_hanjiang/results/fluxes_31.3262_105.9980 not found.corresponding value will be set to zero.
Segmentation fault (core dumped)

报错气象文件未发现,但是报错的 fluxes_31.3262_105.9980位置不在研究区内,说明其汇流地理位置的计算和Fortran的不一致?并不是!

只是由于本次运行使用了fortran制作的站点单位线文件,而c制作的单位线文件每一行前两个字符增加了网格位置,因此使用fortran制作的单位线文件来运行crout将会读入错误信息,需要重新制作单位线文件。将其保存在/home/CRout-master/中。

[root@Liuy /home/CRout-master]# crout /home/VIC_hanjiang/rout/rout_input.STEHE
CRout Direction format: defaultFlow direction file:         /home/VIC_hanjiang/rout/STEHE.fdirFlow velocity file:  uniform value 1.5Diffusion file:      uniform value 800Fraction file:        /home/VIC_hanjiang/rout/STEHE.fractStation location file         /home/VIC_hanjiang/rout/STEHE.stnlocVIC output path       /home/VIC_hanjiang/results/fluxes_     4 decimal places.--Runoff data at column 3 and 4Routing output path   /home/VIC_hanjiang/rout/results/Slope UH file /home/VIC_hanjiang/rout/UH.allTime period of routing calculation:      1990-1-1 -> 1990-12-31Time period of output data:              1990-1-1 -> 1990-12-31ncol is 58nrow is 29xll is 106.048yll is 31.3762csize is 0.1-----Station: XUNHE, location: 34,15 -----------------------> Reading station UH file...-> Grids num of current basin: 62-> Routing calculating...- Grid 1/62 complete.- Grid 2/62 complete.- Grid 3/62 complete.
......- Grid 61/62 complete.- Grid 62/62 complete.-> Writing routing simulation data per day...-> Writing routing simulation data per month...-----Station: YOUFG, location: 47,15 -----------------------> Reading station UH file...-> Grids num of current basin: 669-> Routing calculating...- Grid 6/669 complete.- Grid 12/669 complete.- Grid 18/669 complete.- Grid 24/669 complete.
......- Grid 660/669 complete.- Grid 666/669 complete.-> Writing routing simulation data per day...-> Writing routing simulation data per month...-----Station: JINZG, location: 51,19 -----------------------> Reading station UH file...-> Grids num of current basin: 89-> Routing calculating...- Grid 1/89 complete.- Grid 2/89 complete.- Grid 3/89 complete.- Grid 4/89 complete.- Grid 5/89 complete.- Grid 6/89 complete.- Grid 7/89 complete.
......- Grid 88/89 complete.- Grid 89/89 complete.-> Writing routing simulation data per day...-> Writing routing simulation data per month...-----Station: DANJA, location: 55,16 -----------------------> Reading station UH file...-> Grids num of current basin: 147-> Routing calculating...- Grid 1/147 complete.- Grid 2/147 complete.- Grid 3/147 complete.- Grid 4/147 complete.
......- Grid 145/147 complete.- Grid 146/147 complete.- Grid 147/147 complete.-> Writing routing simulation data per day...-> Writing routing simulation data per month...-----Station: HANJA, location: 51,14 -----------------------> Reading station UH file...-> Grids num of current basin: 697-> Routing calculating...- Grid 6/697 complete.- Grid 12/697 complete.- Grid 18/697 complete.- Grid 24/697 complete.- Grid 30/697 complete.
......- Grid 678/697 complete.- Grid 684/697 complete.- Grid 690/697 complete.- Grid 696/697 complete.-> Writing routing simulation data per day...-> Writing routing simulation data per month...-----Station: ZONGK, location: 56,15 -----------------------> Reading station UH file...-> Grids num of current basin: 871-> Routing calculating...- Grid 8/871 complete.- Grid 16/871 complete.- Grid 24/871 complete.
......- Grid 848/871 complete.- Grid 856/871 complete.- Grid 864/871 complete.-> Writing routing simulation data per day...-> Writing routing simulation data per month...Done. (4s costs)

运行成功!

汇流结果:(具体单位??)

DAY和MONTH文件(应该是平均径流量)——每月的值等于该月每天值求和后平均

DAY_MM和MONTH_MM文件——每月的值等于该月每天值求和

 

这篇关于汇流运行记录的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/361897

相关文章

Python运行中频繁出现Restart提示的解决办法

《Python运行中频繁出现Restart提示的解决办法》在编程的世界里,遇到各种奇怪的问题是家常便饭,但是,当你的Python程序在运行过程中频繁出现“Restart”提示时,这可能不仅仅是令人头疼... 目录问题描述代码示例无限循环递归调用内存泄漏解决方案1. 检查代码逻辑无限循环递归调用内存泄漏2.

在Spring Boot中浅尝内存泄漏的实战记录

《在SpringBoot中浅尝内存泄漏的实战记录》本文给大家分享在SpringBoot中浅尝内存泄漏的实战记录,结合实例代码给大家介绍的非常详细,感兴趣的朋友一起看看吧... 目录使用静态集合持有对象引用,阻止GC回收关键点:可执行代码:验证:1,运行程序(启动时添加JVM参数限制堆大小):2,访问 htt

MySQL 中查询 VARCHAR 类型 JSON 数据的问题记录

《MySQL中查询VARCHAR类型JSON数据的问题记录》在数据库设计中,有时我们会将JSON数据存储在VARCHAR或TEXT类型字段中,本文将详细介绍如何在MySQL中有效查询存储为V... 目录一、问题背景二、mysql jsON 函数2.1 常用 JSON 函数三、查询示例3.1 基本查询3.2

Python获取中国节假日数据记录入JSON文件

《Python获取中国节假日数据记录入JSON文件》项目系统内置的日历应用为了提升用户体验,特别设置了在调休日期显示“休”的UI图标功能,那么问题是这些调休数据从哪里来呢?我尝试一种更为智能的方法:P... 目录节假日数据获取存入jsON文件节假日数据读取封装完整代码项目系统内置的日历应用为了提升用户体验,

Spring Boot 配置文件之类型、加载顺序与最佳实践记录

《SpringBoot配置文件之类型、加载顺序与最佳实践记录》SpringBoot的配置文件是灵活且强大的工具,通过合理的配置管理,可以让应用开发和部署更加高效,无论是简单的属性配置,还是复杂... 目录Spring Boot 配置文件详解一、Spring Boot 配置文件类型1.1 applicatio

MySQL INSERT语句实现当记录不存在时插入的几种方法

《MySQLINSERT语句实现当记录不存在时插入的几种方法》MySQL的INSERT语句是用于向数据库表中插入新记录的关键命令,下面:本文主要介绍MySQLINSERT语句实现当记录不存在时... 目录使用 INSERT IGNORE使用 ON DUPLICATE KEY UPDATE使用 REPLACE

Python 中的异步与同步深度解析(实践记录)

《Python中的异步与同步深度解析(实践记录)》在Python编程世界里,异步和同步的概念是理解程序执行流程和性能优化的关键,这篇文章将带你深入了解它们的差异,以及阻塞和非阻塞的特性,同时通过实际... 目录python中的异步与同步:深度解析与实践异步与同步的定义异步同步阻塞与非阻塞的概念阻塞非阻塞同步

Python Dash框架在数据可视化仪表板中的应用与实践记录

《PythonDash框架在数据可视化仪表板中的应用与实践记录》Python的PlotlyDash库提供了一种简便且强大的方式来构建和展示互动式数据仪表板,本篇文章将深入探讨如何使用Dash设计一... 目录python Dash框架在数据可视化仪表板中的应用与实践1. 什么是Plotly Dash?1.1

Java终止正在运行的线程的三种方法

《Java终止正在运行的线程的三种方法》停止一个线程意味着在任务处理完任务之前停掉正在做的操作,也就是放弃当前的操作,停止一个线程可以用Thread.stop()方法,但最好不要用它,本文给大家介绍了... 目录前言1. 停止不了的线程2. 判断线程是否停止状态3. 能停止的线程–异常法4. 在沉睡中停止5

Spring Boot中定时任务Cron表达式的终极指南最佳实践记录

《SpringBoot中定时任务Cron表达式的终极指南最佳实践记录》本文详细介绍了SpringBoot中定时任务的实现方法,特别是Cron表达式的使用技巧和高级用法,从基础语法到复杂场景,从快速启... 目录一、Cron表达式基础1.1 Cron表达式结构1.2 核心语法规则二、Spring Boot中定