VIC运行笔记2019.05.01

2023-11-07 06:38
文章标签 运行 笔记 01 2019.05 vic

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

可执行文件加入Linux默认路径的办法

如果需要临时的成为系统默认路径可以这样:
export PATH=/home/VIC/vic/drivers/classic:$PATH 
此处假设要加入的路径是usr/local/arm/bin,记住,可执行文件是位于bin下面,比如可执行文件是a.o路径不能是:usr/local/arm/bin/a.o,路径指向可执行文件的所在 文件夹。
这样添加是暂时的,在关闭终端后就失去作用。

 

另外一种长期的方法是:
把路径加到/etc/profile或者~/.bash_profile,添加完之后需要注销一下,或者转换一下用户也可以啦。
就是在PATH加上命令的搜索路径就可以了;

参数文件夹:


#######################################################################
# Land Surface Files and Parameters
#######################################################################
SOIL            /vic/vic.sample.stehekin-old/stehekin/params/vic/soil_param.STEHE    # Soil parameter path/file
ARC_SOIL        FALSE   # TRUE = read soil parameters from ARC/INFO ASCII grids
#SOIL_DIR        (soil param directory)   # Directory containing ARC/INFO ASCII grids of soil parameters - only valid if ARC_SOIL is TRUE
BASEFLOW    ARNO    # ARNO = columns 5-8 are the standard VIC baseflow parameters; NIJSSEN2001 = columns 5-8 of soil file are baseflow parameters from Nijssen et al (2001)
JULY_TAVG_SUPPLIED    FALSE    # TRUE = final column of the soil parameter file will contain average July air temperature, for computing treeline; this will be ignored if COMPUTE_TREELINE is FALSE; FALSE = compute the treeline based on the average July air temperature of the forcings over the simulation period
ORGANIC_FRACT    FALSE    # TRUE = simulate organic soils; soil param file contains 3*Nlayer extra columns, listing for each layer the organic fraction, and the bulk density and soil particle density of the organic matter in the soil layer; FALSE = soil param file does not contain any information about organic soil, and organic fraction should be assumed to be 0
VEGLIB            /vic/vic.sample.stehekin-old/stehekin/params/vic/veglib.LDAS    # Veg library path/file
VEGPARAM        /vic/vic.sample.stehekin-old/stehekin/params/vic/veg_param.STEHE    # Veg parameter path/file
ROOT_ZONES      3    # Number of root zones (must match format of veg param file)
VEGPARAM_LAI     TRUE    # TRUE = veg param file contains LAI information; FALSE = veg param file does NOT contain LAI information
LAI_SRC     LAI_FROM_VEGLIB    # LAI_FROM_VEGPARAM = read LAI from veg param file; LAI_FROM_VEGLIB = read LAI from veg library file
SNOW_BAND    5       /vic/vic.sample.stehekin-old/stehekin/params/vic/snowbands.STEHE    # Number of snow bands; if number of snow bands > 1, you must insert the snow band path/file after the number of bands (e.g. SNOW_BAND 5 my_path/my_snow_band_file)

在此处可以看出设置不设置动态植被!!!

一定注意各个文件引用路径是否对!,因为在linux里路径会发生更改。
[root@VM_0_15_centos src]# gcc *c -lm -o classic  -I/vic/vic/drivers/classic/include //*C 表示编译文件夹里全部文件,-I...表示手动增加头文件地址
make 文件打开检查
之前新版本未编译成功可能是由于缺少make文件,后来发现没有关系!,主要是makefile里路径问题,
如下:注意下面几个路径是否正确!
# VIC DRIVER PATH (include and src are subdirs of this)
DRIVERPATH = . 
# VIC RUN PATH
SHAREDPATH = ../shared_all
# VIC RUN PATH
VICPATH = ../../vic_run
 注意vic_run前仅有两层文件夹!
# Set SHELL = your shell here
SHELL = /bin/bash #linux下一定是bash
# Set CC = your compiler here
ifndef CC
CC=gcc
endif
global_param.STEHE.txt参数文件夹路径一定改对,注意输出结果路径也要改一下!!
./vicNl -g/vic/VIC_sample_data-master/classic/Stehekin/parameters/global_param.STEHE.txt

第一次错误 后面没加后缀.txt

[root@VM_0_15_centos code]# ./vicNl -g/vic/VIC_sample_data-master/classic/Stehekin/parameters/global_param.STEHE.txt
***** VIC Version 4.1.1 *****
"/vic/VIC_sample_data-master/classic/Stehekin/parameters/global_param.STEHE.txt" has beenopened for reading.... skipping header
WARNING: Unrecognized option in the global parameter file:MODEL_STEPS_PER_DAY is unknown - check your spelling
WARNING: Unrecognized option in the global parameter file:SNOW_STEPS_PER_DAY is unknown - check your spelling
WARNING: Unrecognized option in the global parameter file:RUNOFF_STEPS_PER_DAY is unknown - check your spelling
Model run-time error...
Too many variables defined for forcing file 0.
...now exiting to system...

第二次错误:分析原因可能是用的是旧版本vic(4.1) 和新数据集(随着版本更新内部定义发生改变)!

所以直接在网站上下载版本5.01的主文件,并在数据集里下载(主文件了数据集是空)示例数据文件。教训:运行文件与示例文件一定匹配,因为版本更改的过程中,示例数据部分内容会发生变化!
结果如下:
[root@VM_0_15_centos classic]# ./vic_classic.exe -g/vic/VIC_sample_data-master/classic/Stehekin/parameters/global_param.STEHE.txt
VIC Driver  : Classic
VIC Version : 5.0.1 February 1, 2017
VIC Git Tag :
Compiled    : by root on VM_0_15_centos (LINUX) Jun  8 2019 12:19:17
Compiler    : gcc
version    : 4.8.5Variable Infiltration Capacity (VIC) macroscale hydrologicmodel version 5.0.1, Copyright (C) 2016 ComputationalHydrology Group, Dept. of Civil and Environmental Engineering,University of Washington.  VIC comes with ABSOLUTELY NOWARRANTY. This is free software, you may redistribute itunder certain conditions; see LICENSE.txt for details.Report Bugs and Issues to : https://github.com/UW-Hydro/VIC/issuesVIC Users Email Listserve : vic_users@u.washington.edu[INFO] ../shared_all/src/vic_log.c:139: Logging to stderr
[WARN] ./src/read_snowband.c:103: errno: None: average band elevation 1726.542100 not equal to grid_cell average elevation 1668.150000; setting grid cell elevation to average band elevation.
[WARN] ./src/read_snowband.c:131: errno: None: Sum of the snow band precipitation fractions does not equal 1 (1.000000), dividing each fraction by the sum
[INFO] ./src/vic_force.c:111: Read meteorological forcing file
[WARN] ./src/read_snowband.c:103: errno: None: average band elevation 1697.461600 not equal to grid_cell average elevation 1698.790000; setting grid cell elevation to average band elevation.
[INFO] ./src/vic_force.c:111: Read meteorological forcing file
[WARN] ./src/read_vegparam.c:384: errno: None: Cv > 0.99 and Cv < 1.0 at grid cell 85875, model assuming that bare soil is not to be run - fractions being adjusted to equal 1
[WARN] ./src/read_snowband.c:103: errno: None: average band elevation 1593.672000 not equal to grid_cell average elevation 1613.520000; setting grid cell elevation to average band elevation.
[WARN] ./src/read_snowband.c:131: errno: None: Sum of the snow band precipitation fractions does not equal 1 (1.000000), dividing each fraction by the sum
[INFO] ./src/vic_force.c:111: Read meteorological forcing file
[WARN] ./src/read_vegparam.c:374: errno: None: Cv_sum exceeds 1.0 (1.000001) at grid cell 86339, fractions being adjusted to equal 1
[WARN] ./src/read_snowband.c:103: errno: None: average band elevation 1119.222000 not equal to grid_cell average elevation 1126.610000; setting grid cell elevation to average band elevation.
[WARN] ./src/read_snowband.c:131: errno: None: Sum of the snow band precipitation fractions does not equal 1 (1.000000), dividing each fraction by the sum
[INFO] ./src/vic_force.c:111: Read meteorological forcing file
[WARN] ./src/read_vegparam.c:374: errno: None: Cv_sum exceeds 1.0 (1.000001) at grid cell 86803, fractions being adjusted to equal 1
[WARN] ./src/read_snowband.c:103: errno: None: average band elevation 1760.166200 not equal to grid_cell average elevation 1740.180100; setting grid cell elevation to average band elevation.
[INFO] ./src/vic_force.c:111: Read meteorological forcing file
[WARN] ./src/read_snowband.c:103: errno: None: average band elevation 1805.449600 not equal to grid_cell average elevation 1816.870000; setting grid cell elevation to average band elevation.
[INFO] ./src/vic_force.c:111: Read meteorological forcing file
[WARN] ./src/read_snowband.c:103: errno: None: average band elevation 1847.293100 not equal to grid_cell average elevation 1846.020000; setting grid cell elevation to average band elevation.
[INFO] ./src/vic_force.c:111: Read meteorological forcing file
[WARN] ./src/read_snowband.c:103: errno: None: average band elevation 1461.972000 not equal to grid_cell average elevation 1552.689900; setting grid cell elevation to average band elevation.
[INFO] ./src/vic_force.c:111: Read meteorological forcing file
[WARN] ./src/read_vegparam.c:374: errno: None: Cv_sum exceeds 1.0 (1.000001) at grid cell 86802, fractions being adjusted to equal 1
[WARN] ./src/read_snowband.c:103: errno: None: average band elevation 1387.297600 not equal to grid_cell average elevation 1312.670000; setting grid cell elevation to average band elevation.
[INFO] ./src/vic_force.c:111: Read meteorological forcing file
[WARN] ./src/read_snowband.c:103: errno: None: average band elevation 1685.182600 not equal to grid_cell average elevation 1697.860000; setting grid cell elevation to average band elevation.
[INFO] ./src/vic_force.c:111: Read meteorological forcing file
[WARN] ./src/read_snowband.c:103: errno: None: average band elevation 1787.065900 not equal to grid_cell average elevation 1774.990000; setting grid cell elevation to average band elevation.
[INFO] ./src/vic_force.c:111: Read meteorological forcing file
[WARN] ./src/read_vegparam.c:384: errno: None: Cv > 0.99 and Cv < 1.0 at grid cell 86337, model assuming that bare soil is not to be run - fractions being adjusted to equal 1
[WARN] ./src/read_snowband.c:103: errno: None: average band elevation 1428.499200 not equal to grid_cell average elevation 1434.660000; setting grid cell elevation to average band elevation.
[INFO] ./src/vic_force.c:111: Read meteorological forcing file
[WARN] ./src/read_vegparam.c:374: errno: None: Cv_sum exceeds 1.0 (1.000001) at grid cell 86801, fractions being adjusted to equal 1
[WARN] ./src/read_snowband.c:103: errno: None: average band elevation 1477.456800 not equal to grid_cell average elevation 1488.360000; setting grid cell elevation to average band elevation.
[INFO] ./src/vic_force.c:111: Read meteorological forcing file
[WARN] ./src/read_vegparam.c:374: errno: None: Cv_sum exceeds 1.0 (1.000001) at grid cell 87265, fractions being adjusted to equal 1
[INFO] ./src/vic_force.c:111: Read meteorological forcing file
[WARN] ./src/read_snowband.c:103: errno: None: average band elevation 1634.700300 not equal to grid_cell average elevation 1640.470000; setting grid cell elevation to average band elevation.
[INFO] ./src/vic_force.c:111: Read meteorological forcing file
[WARN] ./src/read_snowband.c:103: errno: None: average band elevation 1596.935200 not equal to grid_cell average elevation 1580.660000; setting grid cell elevation to average band elevation.
[INFO] ./src/vic_force.c:111: Read meteorological forcing file
[INFO] ./src/vic_classic.c:351: Completed running VIC Classic------------------------------ VIC TIMING PROFILE ------------------------------Date                      : Sat Jun  8 12:37:58 2019Compiler                  : gcc (4.8.5)Machine                   : VM_0_15_centosVIC User                  : rootVIC Version               :VIC GIT Version           : 5.0.1 February 1, 2017VIC_DRIVER                : ClassicGlobal Param File         : /vic/VIC_sample_data-master/classic/Stehekin/parameters/global_param.STEHE.txtStart Date                : 1949-01-01-00000Stop Date                 : 1949-01-10Nrecs                     : 240Model Timestep (seconds)  : 3600Snow Timestep (seconds)   : 3600Runoff Timestep (seconds) : 3600Atmos Timestep (seconds)  : 3600Overall Metrics---------------Model Cost       : 0.0489256 pe-hrs/simulated_yearModel Throughput : 490.541 simulated_years/dayTiming Table:
|------------|----------------------|----------------------|----------------------|----------------------|
| Timer      | Wall Time (secs)     | CPU Time (secs)      | Wall Time (secs/day) | CPU Time (secs/day)  |
|------------|----------------------|----------------------|----------------------|----------------------|
| Init Time  |           0.00170612 |                    0 |          0.000170612 |                    0 |
| Run Time   |              4.82372 |                 4.54 |             0.482372 |                0.454 |
| Final Time |          8.89301e-05 |                    0 |          8.89301e-06 |                    0 |
| Total Time |              4.82553 |                 4.54 |             0.482553 |                0.454 |
|------------|----------------------|----------------------|----------------------|----------------------|------------------------------ END VIC TIMING PROFILE ------------------------------

 

2019.06.11 开始跑径流
[root@VM_0_15_centos input]# /VIC_Routing-Fortran_version/src/rout /vic/VIC_sample_data-master/classic/Stehekin/rout/rout_input.STEHE
NDAY =         1095  NMONTHS =           36
1  STEHE                  35 139
Routing station: STEHE                
searching catchment...
Number of grid cells upstream of present station          16
reading grid_UH...
making grid UH...
reading UH_S grid from file
making convolution...
/vic/VIC_sample_data-master/classic/Stehekin/rout/input/fluxes_48.3125_-120.5625 NOT FOUND, INSERTING ZEROS
/vic/VIC_sample_data-master/classic/Stehekin/rout/input/fluxes_48.4375_-120.5625 NOT FOUND, INSERTING ZEROS
/vic/VIC_sample_data-master/classic/Stehekin/rout/input/fluxes_48.1875_-120.6875 NOT FOUND, INSERTING ZEROS
/vic/VIC_sample_data-master/classic/Stehekin/rout/input/fluxes_48.3125_-120.6875 NOT FOUND, INSERTING ZEROS
/vic/VIC_sample_data-master/classic/Stehekin/rout/input/fluxes_48.4375_-120.6875 NOT FOUND, INSERTING ZEROS
/vic/VIC_sample_data-master/classic/Stehekin/rout/input/fluxes_48.5625_-120.6875 NOT FOUND, INSERTING ZEROS
/vic/VIC_sample_data-master/classic/Stehekin/rout/input/fluxes_48.1875_-120.8125 NOT FOUND, INSERTING ZEROS
/vic/VIC_sample_data-master/classic/Stehekin/rout/input/fluxes_48.3125_-120.8125 NOT FOUND, INSERTING ZEROS
/vic/VIC_sample_data-master/classic/Stehekin/rout/input/fluxes_48.4375_-120.8125 NOT FOUND, INSERTING ZEROS
/vic/VIC_sample_data-master/classic/Stehekin/rout/input/fluxes_48.5625_-120.8125 NOT FOUND, INSERTING ZEROS
/vic/VIC_sample_data-master/classic/Stehekin/rout/input/fluxes_48.1875_-120.9375 NOT FOUND, INSERTING ZEROS
/vic/VIC_sample_data-master/classic/Stehekin/rout/input/fluxes_48.3125_-120.9375 NOT FOUND, INSERTING ZEROS
/vic/VIC_sample_data-master/classic/Stehekin/rout/input/fluxes_48.4375_-120.9375 NOT FOUND, INSERTING ZEROS
/vic/VIC_sample_data-master/classic/Stehekin/rout/input/fluxes_48.5625_-120.9375 NOT FOUND, INSERTING ZEROS
/vic/VIC_sample_data-master/classic/Stehekin/rout/input/fluxes_48.3125_-121.0625 NOT FOUND, INSERTING ZEROS
/vic/VIC_sample_data-master/classic/Stehekin/rout/input/fluxes_48.4375_-121.0625 NOT FOUND, INSERTING ZEROS16  files not found, zero runoff/baseflow used
writing data...

第一次报错,分析原因,vic跑出来的文件自带后缀.txt,所以需要把每个文件后缀删掉!(经验,直接看径流源代码 convention文件,发现问题)

[root@VM_0_15_centos input]# /VIC_Routing-Fortran_version/src/rout /vic/VIC_sample_data-master/classic/Stehekin/rout/rout_input.STEHE
NDAY =         1095  NMONTHS =           36
1  STEHE                  35 139
Routing station: STEHE                
searching catchment...
Number of grid cells upstream of present station          16
reading grid_UH...
making grid UH...
reading UH_S grid from file
making convolution...1  of          16 : /vic/VIC_sample_data-master/classic/Stehekin/rout/input/fluxes_48.3125_-120.5625
Error reading time-series data, insufficient data or missing input file/vic/VIC_sample_data-master/classic/Stehekin/rout/input/fluxes_48.3125_-120.5625
writing data...

 

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



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

相关文章

通过prometheus监控Tomcat运行状态的操作流程

《通过prometheus监控Tomcat运行状态的操作流程》文章介绍了如何安装和配置Tomcat,并使用Prometheus和TomcatExporter来监控Tomcat的运行状态,文章详细讲解了... 目录Tomcat安装配置以及prometheus监控Tomcat一. 安装并配置tomcat1、安装

mysqld_multi在Linux服务器上运行多个MySQL实例

《mysqld_multi在Linux服务器上运行多个MySQL实例》在Linux系统上使用mysqld_multi来启动和管理多个MySQL实例是一种常见的做法,这种方式允许你在同一台机器上运行多个... 目录1. 安装mysql2. 配置文件示例配置文件3. 创建数据目录4. 启动和管理实例启动所有实例

IDEA运行spring项目时,控制台未出现的解决方案

《IDEA运行spring项目时,控制台未出现的解决方案》文章总结了在使用IDEA运行代码时,控制台未出现的问题和解决方案,问题可能是由于点击图标或重启IDEA后控制台仍未显示,解决方案提供了解决方法... 目录问题分析解决方案总结问题js使用IDEA,点击运行按钮,运行结束,但控制台未出现http://

解决Spring运行时报错:Consider defining a bean of type ‘xxx.xxx.xxx.Xxx‘ in your configuration

《解决Spring运行时报错:Considerdefiningabeanoftype‘xxx.xxx.xxx.Xxx‘inyourconfiguration》该文章主要讲述了在使用S... 目录问题分析解决方案总结问题Description:Parameter 0 of constructor in x

解决IDEA使用springBoot创建项目,lombok标注实体类后编译无报错,但是运行时报错问题

《解决IDEA使用springBoot创建项目,lombok标注实体类后编译无报错,但是运行时报错问题》文章详细描述了在使用lombok的@Data注解标注实体类时遇到编译无误但运行时报错的问题,分析... 目录问题分析问题解决方案步骤一步骤二步骤三总结问题使用lombok注解@Data标注实体类,编译时

Linux使用nohup命令在后台运行脚本

《Linux使用nohup命令在后台运行脚本》在Linux或类Unix系统中,后台运行脚本是一项非常实用的技能,尤其适用于需要长时间运行的任务或服务,本文我们来看看如何使用nohup命令在后台... 目录nohup 命令简介基本用法输出重定向& 符号的作用后台进程的特点注意事项实际应用场景长时间运行的任务服

如何在一台服务器上使用docker运行kafka集群

《如何在一台服务器上使用docker运行kafka集群》文章详细介绍了如何在一台服务器上使用Docker运行Kafka集群,包括拉取镜像、创建网络、启动Kafka容器、检查运行状态、编写启动和关闭脚本... 目录1.拉取镜像2.创建集群之间通信的网络3.将zookeeper加入到网络中4.启动kafka集群

PostgreSQL如何用psql运行SQL文件

《PostgreSQL如何用psql运行SQL文件》文章介绍了两种运行预写好的SQL文件的方式:首先连接数据库后执行,或者直接通过psql命令执行,需要注意的是,文件路径在Linux系统中应使用斜杠/... 目录PostgreSQ编程L用psql运行SQL文件方式一方式二总结PostgreSQL用psql运

如何用Docker运行Django项目

本章教程,介绍如何用Docker创建一个Django,并运行能够访问。 一、拉取镜像 这里我们使用python3.11版本的docker镜像 docker pull python:3.11 二、运行容器 这里我们将容器内部的8080端口,映射到宿主机的80端口上。 docker run -itd --name python311 -p

hdu 2602 and poj 3624(01背包)

01背包的模板题。 hdu2602代码: #include<stdio.h>#include<string.h>const int MaxN = 1001;int max(int a, int b){return a > b ? a : b;}int w[MaxN];int v[MaxN];int dp[MaxN];int main(){int T;int N, V;s