I need to write out the result at a station, i found a bug in the SUBROUTINE extract_sta3d.
! !!!!Interpolate from 3D field at RHO-points.:
DO k=N(ng),2,-1
Ztop=GRID(ng)%z_r(i1,j1,k)
Zbot=GRID(ng)%z_r(i1,j1,k-1)
IF ((Ztop.gt.Zgrd).and.(Zgrd.ge.Zbot)) THEN k1=k-1
k2=k
END IF
END DO
the Zgrd is from ZposR of wrt_station.F,: ZposR(np)=REAL(k,r8)
GRID(ng)%z_r is bathymeter of each layer, and the ZposR is the number of layer, I think there may be some error ?
the problem of STATION output
Re: the problem of STATION output
I made a mistake.
I missed the control line "IF (Zgrd.ge.0.0_r8) THEN" that is set before the early posted "Program Lines" in SUBROUTINE extract_sta.F.
It write the result in a S-coor.
The code is right.