subroutine cotthetatheta(cottheta,theta) c ********************************************************************** c Converts cotheta value into a theta value - intended to decode c VCTRHL_tdip c ********************************************************************** c 1 2 3 4 5 6 7 implicit none real cottheta,theta real pi parameter(pi=3.141592654) c ---------------------------------------------------------------------- if (cottheta.EQ.0.) then theta=pi/2 return endif if (cottheta.GT.0.) then theta=atan(1./cottheta) else if (cottheta.LT.0.) then theta=pi-atan(-1./cottheta) endif return end c