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

相关文章

k8s上运行的mysql、mariadb数据库的备份记录(支持x86和arm两种架构)

《k8s上运行的mysql、mariadb数据库的备份记录(支持x86和arm两种架构)》本文记录在K8s上运行的MySQL/MariaDB备份方案,通过工具容器执行mysqldump,结合定时任务实... 目录前言一、获取需要备份的数据库的信息二、备份步骤1.准备工作(X86)1.准备工作(arm)2.手

Java -jar命令如何运行外部依赖JAR包

《Java-jar命令如何运行外部依赖JAR包》在Java应用部署中,java-jar命令是启动可执行JAR包的标准方式,但当应用需要依赖外部JAR文件时,直接使用java-jar会面临类加载困... 目录引言:外部依赖JAR的必要性一、问题本质:类加载机制的限制1. Java -jar的默认行为2. 类加

java -jar命令运行 jar包时运行外部依赖jar包的场景分析

《java-jar命令运行jar包时运行外部依赖jar包的场景分析》:本文主要介绍java-jar命令运行jar包时运行外部依赖jar包的场景分析,本文给大家介绍的非常详细,对大家的学习或工作... 目录Java -jar命令运行 jar包时如何运行外部依赖jar包场景:解决:方法一、启动参数添加: -Xb

eclipse如何运行springboot项目

《eclipse如何运行springboot项目》:本文主要介绍eclipse如何运行springboot项目问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目js录当在eclipse启动spring boot项目时出现问题解决办法1.通过cmd命令行2.在ecl

使用nohup和--remove-source-files在后台运行rsync并记录日志方式

《使用nohup和--remove-source-files在后台运行rsync并记录日志方式》:本文主要介绍使用nohup和--remove-source-files在后台运行rsync并记录日... 目录一、什么是 --remove-source-files?二、示例命令三、命令详解1. nohup2.

Spring Boot项目打包和运行的操作方法

《SpringBoot项目打包和运行的操作方法》SpringBoot应用内嵌了Web服务器,所以基于SpringBoot开发的web应用也可以独立运行,无须部署到其他Web服务器中,下面以打包dem... 目录一、打包为JAR包并运行1.打包为可执行的 JAR 包2.运行 JAR 包二、打包为WAR包并运行

Java NoClassDefFoundError运行时错误分析解决

《JavaNoClassDefFoundError运行时错误分析解决》在Java开发中,NoClassDefFoundError是一种常见的运行时错误,它通常表明Java虚拟机在尝试加载一个类时未能... 目录前言一、问题分析二、报错原因三、解决思路检查类路径配置检查依赖库检查类文件调试类加载器问题四、常见

Python如何精准判断某个进程是否在运行

《Python如何精准判断某个进程是否在运行》这篇文章主要为大家详细介绍了Python如何精准判断某个进程是否在运行,本文为大家整理了3种方法并进行了对比,有需要的小伙伴可以跟随小编一起学习一下... 目录一、为什么需要判断进程是否存在二、方法1:用psutil库(推荐)三、方法2:用os.system调用

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

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

利用Python快速搭建Markdown笔记发布系统

《利用Python快速搭建Markdown笔记发布系统》这篇文章主要为大家详细介绍了使用Python生态的成熟工具,在30分钟内搭建一个支持Markdown渲染、分类标签、全文搜索的私有化知识发布系统... 目录引言:为什么要自建知识博客一、技术选型:极简主义开发栈二、系统架构设计三、核心代码实现(分步解析