123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218 |
- ! First include the set of model-wide compiler flags
- #include "tm5.inc"
- Module MTObsTrack
- !
- ! Tropomi NRT NO2 retrieval
- !
- ! This module defines the structure to store the input retrieval data
- !
- ! Henk Eskes, Folkert Boersma, Ruud Dirksen, 2000-2012
- ! Bram Maasakkers, 2013
- ! new separate module created by
- ! Mark ter Linden, Henk Eskes, KNMI, sept 2015
- !
- implicit none
- private
- public :: TObsTrack, TOrbitParts
- public :: ObsTrackAllocate, ObsTrackDeallocate
-
- ! -------------------------------------------------------
- ! Maximum number of satellite track parts per file
- ! -------------------------------------------------------
- integer, parameter :: maxOrbitParts = 15
- ! ------------------------------------------------------------------
- ! structure containing one track of NO2 and cloud data
- ! ------------------------------------------------------------------
- !
- ! count : total number of observations in this orbit
- !
- ! orbitNumber : number of the satellite orbit, same for all orbit parts
- ! nOrbitParts : number of orbit parts
- ! orbitParts : description of the orbit parts
- ! nValidPixels : Number of pixels in the orbit part with flag <> error
- ! dimScanline : nr of scan lines (typically 1600-1700 for OMI)
- ! filename : Name of the file storing the orbit part
- ! startTime, endTime, meanTime : Time of first & last pixel, and mean of these two
- ! format: (y,m,d,h,m,s)
- !
- ! dimGroundPixel : nr of across-track viewing angles (60 for OMI)
- !
- ! subPixelNumber : subset counter (0=East, 1=Nadir, 2=West, 3=Backscan),
- ! Used for GOME and SCIAMACHY, not relevant for OMI, tropomi (default = 1)
- ! orbitPartIndex : the orbit part this pixel belongs to
- ! pixelIndex : pixel number in OMI swath (1-60)
- ! scanLineIndex : image or scan line number along the orbit
- !
- ! pixelFlag : 0 = OK, 1-255: errors, >255 warnings
- !
- ! latitude : pixel centre latitude (degree N)
- ! longitude : pixel centre longitude (degree E)
- ! cornerLatitude : pixel latitude ( corners)
- ! cornerLongitude : pixel longitude ( corners)
- ! viewingZenithAngle : viewing angle (degree)
- ! solarZenithAngle : solar zenith angle (degree)
- ! viewingAzimuthAngle : azimuth angle (degree)
- ! solarAzimuthAngle : solar azimuth angle (degree)
- !
- ! no2SLC : NO2 slant column (10^15 molecules cm^-2)
- ! no2SLCError : DOAS fit error (100*slcsig/slc in %))
- ! chiSquareFit : chi^2 resulting from the DOAS fitting
- !
- ! cloudFraction : cloud fraction (0-1)
- ! cloudTopPressure : cloud top pressure (hPa)
- ! cloudAlbedo : cloud albedo (normally 0.8)
- ! cloudRadianceFraction : fraction of the radiation coming from
- ! the cloud-covered part of the pixel
- ! scenePressure : In case of snow-ice: effective surface pressure (hPa)
- ! sceneAlbedo : In case of snow-ice: effective surface albedo
- ! snowIceFlag : snow-ice flags (0: snowFree, 1-100: fraction of sea ice, 101: ice, 103: snow)
- ! surfaceAlbedo : surface albedo at 758 nm (0-1)
- ! terrainHeight : pixel terrain height (m)
- ! terrainPressure : terrain pressure (hPa)
- !
- type TOrbitParts
- integer :: nValidPixels
- integer :: dimScanline
- integer, dimension(6) :: startTime, endTime, meanTime
- character(len=256) :: filename
- end type TOrbitParts
- type TObsTrack
- integer :: count
- integer :: dimGroundPixel
- integer :: orbitNumber
- integer :: nOrbitParts
- type(Torbitparts), dimension(maxOrbitParts) :: orbitParts
- integer, dimension(:), allocatable :: subPixelNumber
- integer, dimension(:), allocatable :: orbitPartIndex
- integer, dimension(:), allocatable :: pixelIndex
- integer, dimension(:), allocatable :: scanLineIndex
- integer, dimension(:), allocatable :: pixelFlag
- integer, dimension(:), allocatable :: snowIceFlag
- real, dimension(:), allocatable :: latitude
- real, dimension(:), allocatable :: longitude
- real, dimension(:,:), allocatable :: cornerLatitude
- real, dimension(:,:), allocatable :: cornerLongitude
- real, dimension(:), allocatable :: viewingZenithAngle
- real, dimension(:), allocatable :: solarZenithAngle
- real, dimension(:), allocatable :: viewingAzimuthAngle
- real, dimension(:), allocatable :: solarAzimuthAngle
- real, dimension(:), allocatable :: no2SLC
- real, dimension(:), allocatable :: no2SLCError
- real, dimension(:), allocatable :: chiSquareFit
- real, dimension(:), allocatable :: cloudFraction
- real, dimension(:), allocatable :: cloudTopPressure
- real, dimension(:), allocatable :: cloudAlbedo
- real, dimension(:), allocatable :: sceneAlbedo
- real, dimension(:), allocatable :: scenePressure
- real, dimension(:), allocatable :: cloudRadianceFraction
- real, dimension(:), allocatable :: surfaceAlbedo
- real, dimension(:), allocatable :: terrainHeight
- real, dimension(:), allocatable :: terrainPressure
-
- end type TObsTrack
- contains
- subroutine ObsTrackAllocate ( obstrack, n )
- implicit none
- type(TObsTrack), intent(inout) :: obstrack
- integer, intent(in) :: n
- allocate(obstrack%subPixelNumber(n))
- allocate(obstrack%orbitPartIndex(n))
- allocate(obstrack%pixelIndex(n))
- allocate(obstrack%scanLineIndex(n))
- allocate(obstrack%pixelFlag(n))
- allocate(obstrack%snowIceFlag(n))
- allocate(obstrack%latitude(n))
- allocate(obstrack%longitude(n))
- allocate(obstrack%cornerLatitude(4, n))
- allocate(obstrack%cornerLongitude(4, n))
- allocate(obstrack%viewingZenithAngle(n))
- allocate(obstrack%solarZenithAngle(n))
- allocate(obstrack%viewingAzimuthAngle(n))
- allocate(obstrack%solarAzimuthAngle(n))
- allocate(obstrack%no2SLC(n))
- allocate(obstrack%no2SLCError(n))
- allocate(obstrack%chiSquareFit(n))
- allocate(obstrack%cloudFraction(n))
- allocate(obstrack%cloudTopPressure(n))
- allocate(obstrack%cloudAlbedo(n))
- allocate(obstrack%sceneAlbedo(n))
- allocate(obstrack%scenePressure(n))
- allocate(obstrack%cloudRadianceFraction(n))
- allocate(obstrack%surfaceAlbedo(n))
- allocate(obstrack%terrainHeight(n))
- allocate(obstrack%terrainPressure(n))
- end subroutine ObsTrackAllocate
- subroutine ObsTrackDeallocate(obstrack)
- implicit none
- type(TObsTrack), intent(inout) :: obstrack
- deallocate(obstrack%subPixelNumber)
- deallocate(obstrack%orbitPartIndex)
- deallocate(obstrack%pixelIndex)
- deallocate(obstrack%scanLineIndex)
- deallocate(obstrack%pixelFlag)
- deallocate(obstrack%snowIceFlag)
- deallocate(obstrack%latitude)
- deallocate(obstrack%longitude)
- deallocate(obstrack%cornerLatitude)
- deallocate(obstrack%cornerLongitude)
- deallocate(obstrack%viewingZenithAngle)
- deallocate(obstrack%solarZenithAngle)
- deallocate(obstrack%viewingAzimuthAngle)
- deallocate(obstrack%solarAzimuthAngle)
- deallocate(obstrack%no2SLC)
- deallocate(obstrack%no2SLCError)
- deallocate(obstrack%chiSquareFit)
- deallocate(obstrack%cloudFraction)
- deallocate(obstrack%cloudTopPressure)
- deallocate(obstrack%cloudAlbedo)
- deallocate(obstrack%sceneAlbedo)
- deallocate(obstrack%scenePressure)
- deallocate(obstrack%cloudRadianceFraction)
- deallocate(obstrack%surfaceAlbedo)
- deallocate(obstrack%terrainHeight)
- deallocate(obstrack%terrainPressure)
- end subroutine ObsTrackDeallocate
- end Module MTObsTrack
|