[Fortran] 纯文本查看 复制代码
program ferrum30
implicit none
!====================================================================
! FERRUM30 is a global database of Ferrum fractions (%) in
! potentially erodible soils.
! The database is available for download: wwww.seevccc.rs/GMINER30
! Data are on 30-seconds gird (~ km) and are organized in 27 tiles
! with NXT x NYT points each.
! The Ferrum fractions are normalized to 100% with respect to clay
! and silt content of soil.
!
! This program is intended for reading Ferrum fractions (%)
! from the database.
!====================================================================
integer :: i, j, it, jj
real, parameter :: dlo=1./120.,dla=1./120.
integer, parameter :: nxt=40./dlo+1, nyt=50./dla+1
integer, parameter :: ntile=27
real, dimension (nxt,nyt) :: minf
character*7, dimension (ntile) :: ctile
data ctile / &
'W180N90', 'W140N90', 'W100N90', 'W060N90', 'W020N90', &
'E020N90', 'E060N90', 'E100N90', 'E140N90', &
'W180N40', 'W140N40', 'W100N40', 'W060N40', 'W020N40', &
'E020N40', 'E060N40', 'E100N40', 'E140N40', &
'W180S10', 'W140S10', 'W100S10', 'W060S10', 'W020S10', &
'E020S10', 'E060S10', 'E100S10', 'E140S10'/
print*, 'Dimensions of each tile:', nxt,'x', nyt
do it=1,ntile
minf=0
open(31,file=ctile(it)//'.TFE', form='unformatted', &
status='unknown', access='direct', recl=nxt*nyt*4) !! for pgf90
read(31,rec=1) ((minf(i,j),i=1,nxt),j=1,nyt)
close(31)
enddo
endprogram ferrum30