46 real(dp),
intent(out) :: dxi, deta
48 integer(i4b) :: i, j, n
53 character(len= 8) :: ch_imax
54 character(len=128) :: fmt4
56 write(ch_imax, fmt=
'(i8)') imax
57 write(fmt4, fmt=
'(a)')
'('//trim(adjustl(ch_imax))//
'(i1),i1)'
61 open(23, iostat=ios, &
62 file=inpath//
'/ant/'//zl0_file, &
63 recl=8192, status=
'old')
65 if (ios /= 0) stop
' topography2: Error when opening the zl0 file!'
67 open(24, iostat=ios, &
68 file=inpath//
'/ant/'//mask_present_file, &
69 recl=1024, status=
'old')
71 if (ios /= 0) stop
' topography2: Error when opening the mask file!'
73 do n=1, 6;
read(23, fmt=
'(a)') ch_dummy;
end do
74 do n=1, 6;
read(24, fmt=
'(a)') ch_dummy;
end do
77 read(23, fmt=*) (zl0(j,i), i=0,imax)
78 read(24, fmt=trim(fmt4)) (maske(j,i), i=0,imax)
81 close(23, status=
'keep')
82 close(24, status=
'keep')
95 if (maske(j,i) <= 1 )
then
102 #if ( MARGIN==1 || MARGIN==2 )
112 xi(i) = xi0 +
real(i,dp)*dxi
113 eta(j) = eta0 +
real(j,dp)*deta
115 call
geo_coord(phi(j,i), lambda(j,i), xi(i), eta(j))
123 dzs_dtau(j,i) = 0.0_dp
124 dzm_dtau(j,i) = 0.0_dp
125 dzb_dtau(j,i) = 0.0_dp
126 dzl_dtau(j,i) = 0.0_dp
127 dh_c_dtau(j,i) = 0.0_dp
128 dh_t_dtau(j,i) = 0.0_dp
147 area(j,i) = sq_g11_g(j,i)*sq_g22_g(j,i)*dxi*deta