MODULE datastruct_module
  use constants_module
  implicit none

  INTEGER, parameter :: MAX_NXTRACK = 60
  INTEGER, parameter :: MAX_NTIMES  = 2000
  INTEGER, parameter :: MAX_presslevels = 35

  type Tdatastruct
    real              :: SolarZenithAngle,SolarAzimuthAngle,longitude,latitude
    real              :: ViewingZenithAngle,ViewingAzimuthAngle,TM4SurfacePressure
    real              :: CloudPressure,CloudPressureStd,CloudFraction,CloudFractionStd
    real              :: SpacecraftAltitude,SpacecraftLatitude,SpacecraftLongitude
    real              :: GhostColumn,AirMassFactor,AirMassFactorTropospheric,AirMassFactorGeometric,SurfaceAlbedo
    real              :: VCDTropErrorUsingAvKernel,VCDErrorUsingAvKernel,CloudRadianceFraction,OriginalSlantColumnAmountNO2
    real              :: TotalVerticalColumn,TotalVerticalColumnError,TroposphericVerticalColumn,TroposphericVerticalColumnError          
    real              :: AssStratSlantColumn,AssStratVerticalColumn,AssStratVerticalColumnError
    real              :: SlantColumnAmountNO2,SlantColumnAmountNO2Std,TroposphericVerticalColumnModel
    real(flt64)       :: TAItime
    integer(int32)    :: htime,hdate
    integer(int16)    :: MeasurementQualityFlags
    integer(int16)    :: InstrumentConfigurationId,TM4TerrainHeight,TerrainHeight
    integer(int32)    :: GroundPixelQualityFlags
    integer(int16)    :: TM4TropoPauseLevel,TroposphericColumnFlag
    real,dimension(NCORNERPOINTS)  :: LatitudeCornerpoints,LongitudeCornerpoints
    real,dimension(MAX_presslevels):: averagingkernel
  end type Tdatastruct
  

END MODULE datastruct_module
