``````

In [3]:

program fullness
implicit none
REAL A,F,VOL
DOUBLE PRECISION H,V,V1
F=2540.4
IF(F .LT. 2400.) THEN! Overflowing Case
H = 2529.4
VOL = (4.747475*H*H*H-34533.8*H*H+83773360.*H-67772125000.)/1000.
A = 193400
ELSE ! Calculate from absolute level
H = F
V = 4.747475*H*H*H-34533.8*H*H+83773360.*H-67772125000.
H = H + 1.0
V1 = 4.747475*H*H*H-34533.8*H*H+83773360.*H-67772125000.
A = V1 - V
VOL = V/1000.
END IF
print *, A, VOL
end program

``````
``````

231051.938       11210.6465

``````

## This is Tony's code

``````

In [4]:

program dayno
IMPLICIT NONE
INTEGER YR,MO,DY
INTEGER I,IYR, NO
IYR=2000
MO=2
DY=1
I=0
YR=IYR-2000
IF(MO.LE.2) GOTO 10
I= MO+3-MO/9
IF(YR.EQ.(YR/4)*4) I=I-2
10 CONTINUE
I=I/2
NO=DY-1+(MO-1)*31-I+(YR-1)/4 + YR*365
print *, NO
end program

``````
``````

31

``````
``````

In [1]:

program es
! E loss from lake surface in TJ/day
! Equations apply for nominal surface area of 200000 square metres
! Since area is only to a small power, this error is negligible
! -----------------------------------------------------------------------------
IMPLICIT NONE
REAL T,W,A,VOL,LOSS,EV
REAL ER,EE,EC,Efree,Eforced
REAL TK,TL,L
REAL VP,VP1,VD,Ratio
A = 200000
W = 5.0
T = 35
L = 500 ! Characteristic length of lake
!  Expressions for H2O properties as function of temperature
! Vapour Pressure Function from CIMO Guide (WMO, 2008)
T = T - 1.
VP = 6.112 * exp(17.62*T/(243.12+T))
! VP1= 6.112 * exp(17.62*(T-1.)/(242.12+T)) ! T - 1 for surface T
! Vapour Density from Hyperphysics Site
VD = .006335 + .0006718*T-.000020887*T*T+.00000073095*T*T*T

!First term is for radiation, Power(W) = aC(Tw^4 - Ta^4)A
!Temperatures absolute, a is emissivity, C Stefans Constant
TK = T + 273.15
TL = 0.9 + 273.15! 0.9 C is air temperature
ER = 5.67E-8 * A * (0.97*TK*TK*TK*TK -  0.8*TL*TL*TL*TL)

!  Free convection formula from Adams et al(1990) Power (W) = A * factor * delT^1/3 * (es-ea)
!  where factor = 2.3 at 25C and 18% less at 67 C, hence factor = 2.55 - 0.01 * Twr.
!  For both delT and es, we make a 1 C correction, for surface temp below bulk water temp
!  SVP at average air tmperature 6.5 mBar

Efree = A * 2.2 * (T - 0.9) ** (1/3.0) * (VP - 6.5)

!  Forced convection by Satori's Equation  Evaporation (kg/s per m2)= (0.00407 * W**0.8 / L**0.2 - 0.01107/L)(Pw-Pd)/P
!  Latent heat of vapourization about 2400 kJ/kg in range 20 - 60 C, Atmospheric Pressure 750 mBar at Crater Lake

Eforced = A * (0.00407 * W**0.8 / L**0.2 - 0.01107/L) * (VP-6.5)/800. * 2400000! W
EE = sqrt(Efree*Efree + Eforced*Eforced)

!  The ratio of Heat Loss by Convection to that by Evaporation is rhoCp/L * (Tw - Ta)/(qw - qa)
!  rho is air density .948 kg/m3, Cp Specific Heat of Air 1005 J/kg degC, qw & qa are Sat Vap Density

Ratio = .948 * (1005 /2400000.) * (T - 0.9) / (VD - .0022)

!  The power calculation is in W. Calculate Energy Loss (TW/day) and
!  evaporative volume loss in kT/day
EV = 86400 * EE / 2.4E12! kT/day
LOSS =(ER + EE*(1+Ratio))*86400*1.0E-12  ! TW/day
print *, ev, loss
end program

``````
``````

4.87545872       20.6102772

``````
``````

In [ ]:

``````