The text file (4606 lines) contains a global distribution of January mean Sea Su
ID: 3783055 • Letter: T
Question
The text file (4606 lines) contains a global distribution of January mean Sea Surface Temperature (SST) that can be used as the boundary condition of climate model simulation Each line consists of longitude, latitude, and SST (K). Over land, SST value is specified as -0.99990E+20 Calculate global mean value of the SST field using a fortran program. Submit your results and program by Jan 27. The land grid points should be excluded from your calculation The SST value should be weighted by cos(latitude) to account for the fact that actual grid size gets smaller as you go poleward Sample code that reads the text file is given in the following slideExplanation / Answer
program global_mean_sst
implicit none
integer :: NL =4606, i
real,dimension(NL) :: longitude,latitude,sst
allocate(cs(NL,2))
open(11, 'global_sst.txt', status='old')
do i=1,NL
read (*,*) longitude(i,1),latitude(i,2),sst(i,3)
enddo
!After this code you will get values in longitude, latitude and sst array traverse three array to calculate your desire value
end
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.