Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Short block of fortran code-help with syntax

Status
Not open for further replies.

cjgato

Technical User
Jan 14, 2016
1
US
Hello-
I wrote the following blockof code to specify albedo (basically a ratio of shortwave radiation reflected from earth/ocean surface). I am unfamiliar with the syntax and I was hoping someone could take a look and make sure the syntax is correct. Thanks so much!
if (flux_albav) then
do n=1,nloc_o
For n=1,nloc
If (lats(n) .lt. -20 .and. lats(n) .gt. -40 .and. lons(n) .lt. 360 .and. lons(n) .gt. 330)
then
Anidr=0.15
Avsdr=0.15
Anidf=0.15
Avsdf=0.15
Elseif (lats(n) .lt. -20 .and. lats(n) .gt. -40 .and lons(n) .lt. 105 .and. lons(n) .gt. 55)
then
Anidr=0.15
Avsdr=0.15
Anidf=0.15
Avsdf=0.15
Elseif (lats(n) .gt. -15 .and. lats(n) .lt. -40 .and. lons(n) .lt. 280 .and. lons(n) .gt. 190)
then
Anidr=0.15
Avsdr=0.15
Anidf=0.15
Avsdf=0.15
Else
anidr = albdir
avsdr = albdir
anidf = albdif
avsdf = albdif
End if
 
Why don't you just run it through a compiler - it will tell you what is wrong. If you can't figure that out then ask again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top