Thursday, December 4, 2008

zonal and meridianal components of wind code in fortran

c Program to calculate zonal and meridianal components of wind


integer ff,ddd
real u,v

print*,'Enter the wind speed:'
read*,ff
print*,'Enter the wind direction:'
read*,ddd


u=0.5148*(-1)*ff*sin(ddd*3.14/180)
v=0.5148*(-1)*ff*cos(ddd*3.14/180)

write(*,1)u
1 format('zonal velocity=',f10.4,' m/s' )

write(*,2)v
2 format('Meridianal velocity=',f10.4,' m/s' )

stop
end

No comments: