4 Star 25 Fork 10

Yonghe / GeoFlying

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
MuskRouteFlux.cs 3.69 KB
一键复制 编辑 原始数据 按行查看 历史
Yonghe 提交于 2020-10-02 09:33 . first
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
namespace GeoFly
{
public class MuskRouteFlux
{
public MuskRouteFlux()
{
}
public RouteFlux pPreRoute;
public RouteFlux pRoute;
}
/// <summary>
/// 植被参数结构
/// </summary>
public class VegInfo
{
public VegInfo()
{
}
public void ResetContent()
{
dManning_n = 0.005; //FRZZ
}
public void ReadVegFile(string FileName)
{
if (!File.Exists(FileName))
throw new Exception("错误");
ResetContent();
List<string> saIn = MatrixFuncs.FileRead(FileName);
string[] buffer = saIn[0].Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
if (Veg_Name != buffer[1])
throw new Exception("植被名称不一致");
buffer = saIn[1].Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
LAIMX = Convert.ToDouble(buffer[1]);
buffer = saIn[2].Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
LAIMN = Convert.ToDouble(buffer[1]);
buffer = saIn[3].Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
doffset = Convert.ToDouble(buffer[1]);
buffer = saIn[4].Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
dManning_n = Convert.ToDouble(buffer[1]);
buffer = saIn[5].Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
for (int j = 1; j <= 12; j++)
{
LAI[j - 1] = Convert.ToDouble(buffer[j]);
}
buffer = saIn[6].Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
for (int j = 1; j <= 12; j++)
{
Albedo[j - 1] = Convert.ToDouble(buffer[j]);
}
buffer = saIn[7].Split(new char[] { ' ', '\t' }, StringSplitOptions.RemoveEmptyEntries);
for (int j = 1; j <= 12; j++)
{
CoverDeg[j - 1] = Convert.ToDouble(buffer[j]);
}
}
public bool WriteVegFile(string FileName)
{
return true;
}
/// <summary>
/// 植被类型名(或土地利用类型名)
/// </summary>
public string Veg_Name; //植被类型名(或土地利用类型名)
/// <summary>
/// 类型ID
/// </summary>
public int Veg_id; //类型ID
/// <summary>
/// 年LAI最大值
/// </summary>
public double LAIMX; //年LAI最大值
/// <summary>
/// 年LAI最小值
/// </summary>
public double LAIMN; //年LAI最小值
/// <summary>
/// 年LAI植被峰值偏移
/// </summary>
public double doffset; //年LAI植被峰值偏移
/// <summary>
/// 逐月LAI
/// </summary>
public double[] LAI = new double[12]; //逐月LAI
/// <summary>
/// 逐月Albedo
/// </summary>
public double[] Albedo = new double[12]; //逐月Albedo
/// <summary>
/// 值被覆盖度
/// </summary>
public double[] CoverDeg = new double[12];
public double InitVWC;
/// <summary>
/// 曼宁糙率系数
/// </summary>
public double dManning_n; //曼宁糙率系数
}
}
C#
1
https://gitee.com/sucksis/geo-flying.git
git@gitee.com:sucksis/geo-flying.git
sucksis
geo-flying
GeoFlying
master

搜索帮助