def geometry_index(nsza, nvza, nraz, isza, ivza, iraz):
    """
   Calculate the geometry index for UNL-VRTM output of STOKES parameter

   Parameters
   ----------
      nsza: number of solar zenith angles
      nvza: ......... viewing zenith angles
      nraz: ......... relative azimuthal angles
      isza: subscripts (index) of the specified solar zenith angle 
      ivza: ................................... viewing zenith angle
      iraz: ................................... relative azimuthal angle
  
     Note that isza, (ivza, and iraz) should be a number between 0 
     and nsza-1, (nvza-1, and nraz-1), following Python array's 
     indixing rule.
 
   Returns
   -------
      i_geom: index for the geometry dimension of variable STOKES.

   """
    ngeom = nsza * nvza * nraz
    vza_offset = isza * nvza + ivza
    igeom = nraz * vza_offset + iraz
    return igeom, ngeom
