; ;------------------------------------------------------------------ ; function fslt, slt,ut,glon,iflag ; ; If iflag = 1 -> return slt, given ut and glon ; If iflag = 2 -> return ut, given slt and glon ; If iflag = 3 -> return glon, given slt and ut ; (slt and ut always in decimal hours, glon in -180 -> 180) ; case iflag of 1: begin fslt = ut + glon/15. if (fslt lt 0.) then fslt = fslt+24. if (fslt ge 24.) then fslt = fslt-24. end 2: begin fslt = slt - glon/15. if (fslt lt 0.) then fslt = fslt+24. if (fslt gt 24.) then fslt = fslt-24. end 3: begin fslt = (slt-ut) * 15. if (fslt ge 180.) then fslt = fslt-360. if (fslt lt -180.) then fslt = fslt+360. end else: begin print,'>>> fslt: bad iflag=',iflag fslt = 0. end endcase return,fslt end