你知道吗输入:给定值,如sig和rho\u c 列出所有的日子 使用for循环找到每一天的时间 节省时间 找到温度的变化。每一天 找到每一天的温度值 找出你需要的价值观 绘制数据图 输出:日与温度曲线图。你知道吗
Aice = 1
Anoice=0.
Tice =273.
Tnoice=293.
dt = 86400.
S = 342.5
rho_c =206000000.
epsilon_tow =.62
sig =5.6710E-8
Tint=288.
import numpy as N
tempvals= N.zeros((3000,)) #creates an array to store temp. values
tempvals[0]= Tint #set the first value of array to Tint
times=N.zeros((3000,)) #creates array to store time values
for day in range(3000): #Creates the values of day and goes through
#calculates for every day time, A,dT,T
time = (dt)*day
times[day] = time
if tempvals[day] <= Tice:
A=Aice
elif tempvals[day] >=Tnoice:
A=Anoice
else :
A=(((tempvals[day]-Tice)/(Tnoice-Tice)*(Anoice-Aice))+Aice)
dT =(((S*(1-A))-((epsilon_tow*sig*(tempvals[day]**4))/rho_c )*dt
if day <2999
tempvals[day+1]= T+dT
tempvals[day]= T
plot(day,T) #plots graph of day valueson x axis and
#T values on as y-axis
plot.title(T) #creates title of the graph
上一行中缺少
:
。你知道吗编辑:此行中还有不匹配的方括号/圆括号:
这条线看起来更像:
相关问题 更多 >
编程相关推荐