real function cgszll(stcprm, alat, along)
      real stcprm(15)
      real map(3)
      real geog(3)
      call ll_geo(alat, along, geog)
      call basg2m(stcprm, geog, map)
      if (map(3) .ge. 1.) then
        if (stcprm(1) .ge. 1.) then
          cgszll = 2. * stcprm(15)
        else
          cgszll = 0.
        endif
      else if (map(3) .le. -1.) then
        if (stcprm(1) .le. -1.) then
          cgszll = 2. * stcprm(15)
        else
          cgszll = 0.
        endif
      else if (abs(stcprm(1)) .ge. 1.) then
        cgszll = stcprm(15) * (1. + sign(map(3),stcprm(1)))
      else
        ymerc = -.5 * log( (1. - map(3))/(1. + map(3)) )
        cgszll = stcprm(15) * exp( - (1.-stcprm(1)) * ymerc) * 
     C   (1. + map(3))
      endif
      return
      end