text:
!
! CRTM_SensorInfo
!
! Module of sensor information parameters definitions for the CRTM.
!
!
! CREATION HISTORY:
!       Written by:     Paul van Delst, CIMSS/SSEC 26-Jun-2005
!                       paul.vandelst@ssec.wisc.edu

MODULE CRTM_SensorInfo

  ! -----------------
  ! Environment setup
  ! -----------------
  ! Modules
  USE Message_Handler, ONLY: SUCCESS, FAILURE, Display_Message
  USE CRTM_Parameters, ONLY: INVALID_WMO_SATELLITE_ID, &
                             INVALID_WMO_SENSOR_ID
  ! Disable implicit typing
  IMPLICIT NONE

  ! ------------
  ! Visibilities
  ! ------------
  PRIVATE
  PUBLIC :: CRTM_Get_SensorAttributes

  ! -----------------
  ! Module parameters
  ! -----------------
  CHARACTER(*), PARAMETER :: MODULE_RCS_ID = &
  '$Id: CRTM_SensorInfo.f90 99117 2017-11-27 18:37:14Z tong.zhu@noaa.gov $'
  ! WMO SENSOR codes from COMMON CODE TABLE C-8
  INTEGER, PUBLIC, PARAMETER :: WMO_HIRS2    = 605
  INTEGER, PUBLIC, PARAMETER :: WMO_MSU      = 623
  INTEGER, PUBLIC, PARAMETER :: WMO_AVHRR2   = 590
  INTEGER, PUBLIC, PARAMETER :: WMO_HIRS3    = 606
  INTEGER, PUBLIC, PARAMETER :: WMO_AMSUA    = 570
  INTEGER, PUBLIC, PARAMETER :: WMO_AMSUB    = 574
  INTEGER, PUBLIC, PARAMETER :: WMO_AVHRR3   = 591
  INTEGER, PUBLIC, PARAMETER :: WMO_MHS      = 203
  INTEGER, PUBLIC, PARAMETER :: WMO_VAS      = 630
  INTEGER, PUBLIC, PARAMETER :: WMO_SOUNDER  = 626
  INTEGER, PUBLIC, PARAMETER :: WMO_IMAGER   = 615
  INTEGER, PUBLIC, PARAMETER :: WMO_SSMI     = 905
  INTEGER, PUBLIC, PARAMETER :: WMO_SSMT1    = 906
  INTEGER, PUBLIC, PARAMETER :: WMO_SSMT2    = 907
  INTEGER, PUBLIC, PARAMETER :: WMO_SSMIS    = 908
  INTEGER, PUBLIC, PARAMETER :: WMO_MODIS    = 389
  INTEGER, PUBLIC, PARAMETER :: WMO_HSB      = 246
  INTEGER, PUBLIC, PARAMETER :: WMO_AMSRE    = 345
  INTEGER, PUBLIC, PARAMETER :: WMO_AIRS     = 420
  INTEGER, PUBLIC, PARAMETER :: WMO_VISSR    = 489
  INTEGER, PUBLIC, PARAMETER :: WMO_MVIRI    = 205
  INTEGER, PUBLIC, PARAMETER :: WMO_SEVIRI   = 207
  INTEGER, PUBLIC, PARAMETER :: WMO_ABI      = INVALID_WMO_SENSOR_ID
  INTEGER, PUBLIC, PARAMETER :: WMO_WINDSAT  = INVALID_WMO_SENSOR_ID
  INTEGER, PUBLIC, PARAMETER :: WMO_ATMS     = 621
  INTEGER, PUBLIC, PARAMETER :: WMO_IASI     = 221

  ! WMO SATELLITE codes from COMMON CODE TABLE C-5
  INTEGER, PUBLIC, PARAMETER :: WMO_TIROSN      = 708
  INTEGER, PUBLIC, PARAMETER :: WMO_NOAA05      = WMO_TIROSN
  INTEGER, PUBLIC, PARAMETER :: WMO_NOAA06      = 706
  INTEGER, PUBLIC, PARAMETER :: WMO_NOAA07      = 707
  INTEGER, PUBLIC, PARAMETER :: WMO_NOAA08      = 200
  INTEGER, PUBLIC, PARAMETER :: WMO_NOAA09      = 201
  INTEGER, PUBLIC, PARAMETER :: WMO_NOAA10      = 202
  INTEGER, PUBLIC, PARAMETER :: WMO_NOAA11      = 203
  INTEGER, PUBLIC, PARAMETER :: WMO_NOAA12      = 204
  INTEGER, PUBLIC, PARAMETER :: WMO_NOAA14      = 205
  INTEGER, PUBLIC, PARAMETER :: WMO_NOAA15      = 206
  INTEGER, PUBLIC, PARAMETER :: WMO_NOAA16      = 207
  INTEGER, PUBLIC, PARAMETER :: WMO_NOAA17      = 208
  INTEGER, PUBLIC, PARAMETER :: WMO_NOAA18      = 209
  INTEGER, PUBLIC, PARAMETER :: WMO_NOAA19      = 223
  INTEGER, PUBLIC, PARAMETER :: WMO_METOPA      =   4
  INTEGER, PUBLIC, PARAMETER :: WMO_METOPB      =   3
  INTEGER, PUBLIC, PARAMETER :: WMO_METOPC      =   5
  INTEGER, PUBLIC, PARAMETER :: WMO_GOES04      = 734
  INTEGER, PUBLIC, PARAMETER :: WMO_GOES05      = 735
  INTEGER, PUBLIC, PARAMETER :: WMO_GOES06      = 250
  INTEGER, PUBLIC, PARAMETER :: WMO_GOES07      = 251
  INTEGER, PUBLIC, PARAMETER :: WMO_GOES08      = 252
  INTEGER, PUBLIC, PARAMETER :: WMO_GOES09      = 253
  INTEGER, PUBLIC, PARAMETER :: WMO_GOES10      = 254
  INTEGER, PUBLIC, PARAMETER :: WMO_GOES11      = 255
  INTEGER, PUBLIC, PARAMETER :: WMO_GOES12      = 256
  INTEGER, PUBLIC, PARAMETER :: WMO_GOES13      = 257
  INTEGER, PUBLIC, PARAMETER :: WMO_DMSP13      = 246
  INTEGER, PUBLIC, PARAMETER :: WMO_DMSP14      = 247
  INTEGER, PUBLIC, PARAMETER :: WMO_DMSP15      = 248
  INTEGER, PUBLIC, PARAMETER :: WMO_DMSP16      = 249
  INTEGER, PUBLIC, PARAMETER :: WMO_DMSP17      = 285
  INTEGER, PUBLIC, PARAMETER :: WMO_DMSP18      = 246
  INTEGER, PUBLIC, PARAMETER :: WMO_DMSP19      = INVALID_WMO_SATELLITE_ID
  INTEGER, PUBLIC, PARAMETER :: WMO_DMSP20      = INVALID_WMO_SATELLITE_ID
  INTEGER, PUBLIC, PARAMETER :: WMO_TERRA       = 783
  INTEGER, PUBLIC, PARAMETER :: WMO_AQUA        = 784
  INTEGER, PUBLIC, PARAMETER :: WMO_GMS5        = 152
  INTEGER, PUBLIC, PARAMETER :: WMO_METEOSAT03  = 50
  INTEGER, PUBLIC, PARAMETER :: WMO_METEOSAT04  = 51
  INTEGER, PUBLIC, PARAMETER :: WMO_METEOSAT05  = 52
  INTEGER, PUBLIC, PARAMETER :: WMO_METEOSAT06  = 53
  INTEGER, PUBLIC, PARAMETER :: WMO_METEOSAT07  = 54
  INTEGER, PUBLIC, PARAMETER :: WMO_METEOSAT08  = 55
  INTEGER, PUBLIC, PARAMETER :: WMO_METEOSAT09  = 56
  INTEGER, PUBLIC, PARAMETER :: WMO_METEOSAT10  = 57
  INTEGER, PUBLIC, PARAMETER :: WMO_METEOSAT11  = 70
  INTEGER, PUBLIC, PARAMETER :: WMO_GOESR       = INVALID_WMO_SATELLITE_ID
  INTEGER, PUBLIC, PARAMETER :: WMO_CORIOLIS    = INVALID_WMO_SATELLITE_ID
  INTEGER, PUBLIC, PARAMETER :: WMO_NPOESSC1    = 224

CONTAINS

  FUNCTION CRTM_Get_SensorAttributes( Sensor_Id       , &  ! Input
                                      nChannels       , &  ! Optional output
                                      nFOVs           , &  ! Optional output
                                      Detector        , &  ! Optional output
                                      WMO_Sensor_Id   , &  ! Optional output
                                      WMO_Satellite_Id, &  ! Optional output
                                      SensorName      , &  ! Optional output
                                      SatelliteName   , &  ! Optional output
                                      RCS_Id          , &  ! Version control
                                      Message_Log     ) &  ! Error messaging
                                    RESULT( Error_Status )
    ! Arguments
    CHARACTER(*),           INTENT(IN)  :: Sensor_Id
    INTEGER,      OPTIONAL, INTENT(OUT) :: nChannels
    INTEGER,      OPTIONAL, INTENT(OUT) :: nFOVs
    INTEGER,      OPTIONAL, INTENT(OUT) :: Detector
    INTEGER,      OPTIONAL, INTENT(OUT) :: WMO_Sensor_Id
    INTEGER,      OPTIONAL, INTENT(OUT) :: WMO_Satellite_Id
    CHARACTER(*), OPTIONAL, INTENT(OUT) :: SensorName
    CHARACTER(*), OPTIONAL, INTENT(OUT) :: SatelliteName
    CHARACTER(*), OPTIONAL, INTENT(OUT) :: RCS_Id
    CHARACTER(*), OPTIONAL, INTENT(IN)  :: Message_Log
    ! Function result
    INTEGER :: Error_Status
    ! Local parameters
    CHARACTER(*), PARAMETER :: ROUTINE_NAME='CRTM_Get_SensorAttributes'
    INTEGER,      PARAMETER :: SL=20
    ! Local variables
    INTEGER       :: local_nChannels
    INTEGER       :: local_nFOVs
    INTEGER       :: local_Detector
    INTEGER       :: local_WMO_Sensor_Id
    INTEGER       :: local_WMO_Satellite_Id
    CHARACTER(SL) :: local_SensorName
    CHARACTER(SL) :: local_SatelliteName

    ! Set up
    Error_Status  = SUCCESS
    IF ( PRESENT(RCS_Id) ) RCS_Id = MODULE_RCS_Id
    ! Defaults
    local_nChannels        =  0
    local_nFOVs            =  0
    local_Detector         = -1
    local_WMO_Sensor_Id    = INVALID_WMO_SENSOR_ID
    local_WMO_Satellite_Id = INVALID_WMO_SATELLITE_ID
    local_SensorName       = 'NONE'
    local_SatelliteName    = 'NONE'

    ! Search for sensor attributes
    ! This humungous CASE construct will have to be replaced, but for now it'll do.
    ! The code below was created from the Create_SensorInfo_Code.f90 program
    SELECT CASE (TRIM(ADJUSTL(Sensor_Id)))
      CASE('hirs2_n05')
        local_nChannels        = 19
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 605
        local_WMO_Satellite_Id = 708
        local_SensorName       = 'HIRS/2'
        local_SatelliteName    = 'TIROS-N'
      CASE('msu_n05')
        local_nChannels        = 4
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 623
        local_WMO_Satellite_Id = 708
        local_SensorName       = 'MSU'
        local_SatelliteName    = 'TIROS-N'
      CASE('ssu_n05')
        local_nChannels        = 3
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 627
        local_WMO_Satellite_Id = 708
        local_SensorName       = 'SSU'
        local_SatelliteName    = 'TIROS-N'
      CASE('avhrr2_n05')
        local_nChannels        = 2
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 590
        local_WMO_Satellite_Id = 708
        local_SensorName       = 'AVHRR/2'
        local_SatelliteName    = 'TIROS-N'
      CASE('hirs2_n06')
        local_nChannels        = 19
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 605
        local_WMO_Satellite_Id = 706
        local_SensorName       = 'HIRS/2'
        local_SatelliteName    = 'NOAA-06'
      CASE('msu_n06')
        local_nChannels        = 4
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 623
        local_WMO_Satellite_Id = 706
        local_SensorName       = 'MSU'
        local_SatelliteName    = 'NOAA-06'
      CASE('ssu_n06')
        local_nChannels        = 3
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 627
        local_WMO_Satellite_Id = 706
        local_SensorName       = 'SSU'
        local_SatelliteName    = 'NOAA-06'
      CASE('avhrr2_n06')
        local_nChannels        = 2
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 590
        local_WMO_Satellite_Id = 706
        local_SensorName       = 'AVHRR/2'
        local_SatelliteName    = 'NOAA-06'
      CASE('hirs2_n07')
        local_nChannels        = 19
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 605
        local_WMO_Satellite_Id = 707
        local_SensorName       = 'HIRS/2'
        local_SatelliteName    = 'NOAA-07'
      CASE('msu_n07')
        local_nChannels        = 4
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 623
        local_WMO_Satellite_Id = 707
        local_SensorName       = 'MSU'
        local_SatelliteName    = 'NOAA-07'
      CASE('ssu_n07')
        local_nChannels        = 3
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 627
        local_WMO_Satellite_Id = 707
        local_SensorName       = 'SSU'
        local_SatelliteName    = 'NOAA-07'
      CASE('avhrr2_n07')
        local_nChannels        = 3
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 590
        local_WMO_Satellite_Id = 707
        local_SensorName       = 'AVHRR/2'
        local_SatelliteName    = 'NOAA-07'
      CASE('hirs2_n08')
        local_nChannels        = 19
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 605
        local_WMO_Satellite_Id = 200
        local_SensorName       = 'HIRS/2'
        local_SatelliteName    = 'NOAA-08'
      CASE('msu_n08')
        local_nChannels        = 4
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 623
        local_WMO_Satellite_Id = 200
        local_SensorName       = 'MSU'
        local_SatelliteName    = 'NOAA-08'
      CASE('ssu_n08')
        local_nChannels        = 3
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 627
        local_WMO_Satellite_Id = 200
        local_SensorName       = 'SSU'
        local_SatelliteName    = 'NOAA-08'
      CASE('avhrr2_n08')
        local_nChannels        = 2
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 590
        local_WMO_Satellite_Id = 200
        local_SensorName       = 'AVHRR/2'
        local_SatelliteName    = 'NOAA-08'
      CASE('hirs2_n09')
        local_nChannels        = 19
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 605
        local_WMO_Satellite_Id = 201
        local_SensorName       = 'HIRS/2'
        local_SatelliteName    = 'NOAA-09'
      CASE('msu_n09')
        local_nChannels        = 4
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 623
        local_WMO_Satellite_Id = 201
        local_SensorName       = 'MSU'
        local_SatelliteName    = 'NOAA-09'
      CASE('ssu_n09')
        local_nChannels        = 3
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 627
        local_WMO_Satellite_Id = 201
        local_SensorName       = 'SSU'
        local_SatelliteName    = 'NOAA-09'
      CASE('avhrr2_n09')
        local_nChannels        = 3
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 590
        local_WMO_Satellite_Id = 201
        local_SensorName       = 'AVHRR/2'
        local_SatelliteName    = 'NOAA-09'
      CASE('hirs2_n10')
        local_nChannels        = 19
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 605
        local_WMO_Satellite_Id = 202
        local_SensorName       = 'HIRS/2'
        local_SatelliteName    = 'NOAA-10'
      CASE('msu_n10')
        local_nChannels        = 4
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 623
        local_WMO_Satellite_Id = 202
        local_SensorName       = 'MSU'
        local_SatelliteName    = 'NOAA-10'
      CASE('avhrr2_n10')
        local_nChannels        = 2
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 590
        local_WMO_Satellite_Id = 202
        local_SensorName       = 'AVHRR/2'
        local_SatelliteName    = 'NOAA-10'
      CASE('hirs2_n11')
        local_nChannels        = 19
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 605
        local_WMO_Satellite_Id = 203
        local_SensorName       = 'HIRS/2'
        local_SatelliteName    = 'NOAA-11'
      CASE('msu_n11')
        local_nChannels        = 4
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 623
        local_WMO_Satellite_Id = 203
        local_SensorName       = 'MSU'
        local_SatelliteName    = 'NOAA-11'
      CASE('ssu_n11')
        local_nChannels        = 3
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 627
        local_WMO_Satellite_Id = 203
        local_SensorName       = 'SSU'
        local_SatelliteName    = 'NOAA-11'
      CASE('avhrr2_n11')
        local_nChannels        = 3
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 590
        local_WMO_Satellite_Id = 203
        local_SensorName       = 'AVHRR/2'
        local_SatelliteName    = 'NOAA-11'
      CASE('hirs2_n12')
        local_nChannels        = 19
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 605
        local_WMO_Satellite_Id = 204
        local_SensorName       = 'HIRS/2'
        local_SatelliteName    = 'NOAA-12'
      CASE('msu_n12')
        local_nChannels        = 4
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 623
        local_WMO_Satellite_Id = 204
        local_SensorName       = 'MSU'
        local_SatelliteName    = 'NOAA-12'
      CASE('avhrr2_n12')
        local_nChannels        = 3
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 590
        local_WMO_Satellite_Id = 204
        local_SensorName       = 'AVHRR/2'
        local_SatelliteName    = 'NOAA-12'
      CASE('hirs2_n14')
        local_nChannels        = 19
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 605
        local_WMO_Satellite_Id = 205
        local_SensorName       = 'HIRS/2'
        local_SatelliteName    = 'NOAA-14'
      CASE('msu_n14')
        local_nChannels        = 4
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 623
        local_WMO_Satellite_Id = 205
        local_SensorName       = 'MSU'
        local_SatelliteName    = 'NOAA-14'
      CASE('ssu_n14')
        local_nChannels        = 3
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 627
        local_WMO_Satellite_Id = 205
        local_SensorName       = 'SSU'
        local_SatelliteName    = 'NOAA-14'
      CASE('avhrr2_n14')
        local_nChannels        = 3
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 590
        local_WMO_Satellite_Id = 205
        local_SensorName       = 'AVHRR/2'
        local_SatelliteName    = 'NOAA-14'
      CASE('hirs3_n15')
        local_nChannels        = 19
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 606
        local_WMO_Satellite_Id = 206
        local_SensorName       = 'HIRS/3'
        local_SatelliteName    = 'NOAA-15'
      CASE('amsua_n15')
        local_nChannels        = 15
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 570
        local_WMO_Satellite_Id = 206
        local_SensorName       = 'AMSU-A'
        local_SatelliteName    = 'NOAA-15'
      CASE('amsub_n15')
        local_nChannels        = 5
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 574
        local_WMO_Satellite_Id = 206
        local_SensorName       = 'AMSU-B'
        local_SatelliteName    = 'NOAA-15'
      CASE('avhrr3_n15')
        local_nChannels        = 3
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 591
        local_WMO_Satellite_Id = 206
        local_SensorName       = 'AVHRR/3'
        local_SatelliteName    = 'NOAA-15'
      CASE('hirs3_n16')
        local_nChannels        = 19
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 606
        local_WMO_Satellite_Id = 207
        local_SensorName       = 'HIRS/3'
        local_SatelliteName    = 'NOAA-16'
      CASE('amsua_n16')
        local_nChannels        = 15
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 570
        local_WMO_Satellite_Id = 207
        local_SensorName       = 'AMSU-A'
        local_SatelliteName    = 'NOAA-16'
      CASE('amsub_n16')
        local_nChannels        = 5
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 574
        local_WMO_Satellite_Id = 207
        local_SensorName       = 'AMSU-B'
        local_SatelliteName    = 'NOAA-16'
      CASE('avhrr3_n16')
        local_nChannels        = 3
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 591
        local_WMO_Satellite_Id = 207
        local_SensorName       = 'AVHRR/3'
        local_SatelliteName    = 'NOAA-16'
      CASE('hirs3_n17')
        local_nChannels        = 19
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 606
        local_WMO_Satellite_Id = 208
        local_SensorName       = 'HIRS/3'
        local_SatelliteName    = 'NOAA-17'
      CASE('amsua_n17')
        local_nChannels        = 15
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 570
        local_WMO_Satellite_Id = 208
        local_SensorName       = 'AMSU-A'
        local_SatelliteName    = 'NOAA-17'
      CASE('amsub_n17')
        local_nChannels        = 5
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 574
        local_WMO_Satellite_Id = 208
        local_SensorName       = 'AMSU-B'
        local_SatelliteName    = 'NOAA-17'
      CASE('avhrr3_n17')
        local_nChannels        = 3
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 591
        local_WMO_Satellite_Id = 208
        local_SensorName       = 'AVHRR/3'
        local_SatelliteName    = 'NOAA-17'
      CASE('hirs4_n18')
        local_nChannels        = 19
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 607
        local_WMO_Satellite_Id = 209
        local_SensorName       = 'HIRS/4'
        local_SatelliteName    = 'NOAA-18'
      CASE('amsua_n18')
        local_nChannels        = 15
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 570
        local_WMO_Satellite_Id = 209
        local_SensorName       = 'AMSU-A'
        local_SatelliteName    = 'NOAA-18'
      CASE('mhs_n18')
        local_nChannels        = 5
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 203
        local_WMO_Satellite_Id = 209
        local_SensorName       = 'MHS'
        local_SatelliteName    = 'NOAA-18'
      CASE('avhrr3_n18')
        local_nChannels        = 3
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 591
        local_WMO_Satellite_Id = 209
        local_SensorName       = 'AVHRR/3'
        local_SatelliteName    = 'NOAA-18'
      CASE('amsua_n19')
        local_nChannels        = 15
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 570
        local_WMO_Satellite_Id = 210
        local_SensorName       = 'AMSU-A'
        local_SatelliteName    = 'NOAA-19'
      CASE('mhs_n19')
        local_nChannels        = 5
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 203
        local_WMO_Satellite_Id = 210
        local_SensorName       = 'MHS'
        local_SatelliteName    = 'NOAA-19'
      CASE('hirs4_metop-a')
        local_nChannels        = 19
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 607
        local_WMO_Satellite_Id = 4
        local_SensorName       = 'HIRS/4'
        local_SatelliteName    = 'MetOp-A'
      CASE('avhrr3_metop-a')
        local_nChannels        = 3
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 591
        local_WMO_Satellite_Id = 4
        local_SensorName       = 'AVHRR/3'
        local_SatelliteName    = 'MetOp-A'
      CASE('amsua_metop-a')
        local_nChannels        = 15
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 570
        local_WMO_Satellite_Id = 4
        local_SensorName       = 'AMSU-A'
        local_SatelliteName    = 'MetOp-A'
      CASE('mhs_metop-a')
        local_nChannels        = 5
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 203
        local_WMO_Satellite_Id = 4
        local_SensorName       = 'MHS'
        local_SatelliteName    = 'MetOp-A'
      CASE('amsua_metop-b')
        local_nChannels        = 15
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 570
        local_WMO_Satellite_Id = 3
        local_SensorName       = 'AMSU-A'
        local_SatelliteName    = 'MetOp-B'
      CASE('mhs_metop-b')
        local_nChannels        = 5
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 203
        local_WMO_Satellite_Id = 3
        local_SensorName       = 'MHS'
        local_SatelliteName    = 'MetOp-B'
      CASE('amsua_metop-c')
        local_nChannels        = 15
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 570
        local_WMO_Satellite_Id = 5
        local_SensorName       = 'AMSU-A'
        local_SatelliteName    = 'MetOp-C'
      CASE('mhs_metop-c')
        local_nChannels        = 5
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 203
        local_WMO_Satellite_Id = 5
        local_SensorName       = 'MHS'
        local_SatelliteName    = 'MetOp-C'
      CASE('vas_g04')
        local_nChannels        = 12
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 630
        local_WMO_Satellite_Id = 734
        local_SensorName       = 'VAS'
        local_SatelliteName    = 'GOES-04'
      CASE('vas_g05')
        local_nChannels        = 12
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 630
        local_WMO_Satellite_Id = 735
        local_SensorName       = 'VAS'
        local_SatelliteName    = 'GOES-05'
      CASE('vas_g06')
        local_nChannels        = 12
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 630
        local_WMO_Satellite_Id = 250
        local_SensorName       = 'VAS'
        local_SatelliteName    = 'GOES-06'
      CASE('vas_g07')
        local_nChannels        = 12
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 630
        local_WMO_Satellite_Id = 251
        local_SensorName       = 'VAS'
        local_SatelliteName    = 'GOES-07'
      CASE('sndr_g08')
        local_nChannels        = 18
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 626
        local_WMO_Satellite_Id = 252
        local_SensorName       = 'SOUNDER'
        local_SatelliteName    = 'GOES-08'
      CASE('imgr_g08')
        local_nChannels        = 4
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 615
        local_WMO_Satellite_Id = 252
        local_SensorName       = 'IMAGER'
        local_SatelliteName    = 'GOES-08'
      CASE('sndr_g09')
        local_nChannels        = 18
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 626
        local_WMO_Satellite_Id = 253
        local_SensorName       = 'SOUNDER'
        local_SatelliteName    = 'GOES-09'
      CASE('imgr_g09')
        local_nChannels        = 4
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 615
        local_WMO_Satellite_Id = 253
        local_SensorName       = 'IMAGER'
        local_SatelliteName    = 'GOES-09'
      CASE('sndr_g10')
        local_nChannels        = 18
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 626
        local_WMO_Satellite_Id = 254
        local_SensorName       = 'SOUNDER'
        local_SatelliteName    = 'GOES-10'
      CASE('sndrD1_g10')
        local_nChannels        = 18
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 626
        local_WMO_Satellite_Id = 254
        local_SensorName       = 'SOUNDER'
        local_SatelliteName    = 'GOES-10'
      CASE('sndrD2_g10')
        local_nChannels        = 18
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 626
        local_WMO_Satellite_Id = 254
        local_SensorName       = 'SOUNDER'
        local_SatelliteName    = 'GOES-10'
      CASE('sndrD3_g10')
        local_nChannels        = 18
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 626
        local_WMO_Satellite_Id = 254
        local_SensorName       = 'SOUNDER'
        local_SatelliteName    = 'GOES-10'
      CASE('sndrD4_g10')
        local_nChannels        = 18
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 626
        local_WMO_Satellite_Id = 254
        local_SensorName       = 'SOUNDER'
        local_SatelliteName    = 'GOES-10'
      CASE('imgr_g10')
        local_nChannels        = 4
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 615
        local_WMO_Satellite_Id = 254
        local_SensorName       = 'IMAGER'
        local_SatelliteName    = 'GOES-10'
      CASE('sndr_g11')
        local_nChannels        = 18
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 626
        local_WMO_Satellite_Id = 255
        local_SensorName       = 'SOUNDER'
        local_SatelliteName    = 'GOES-11'
      CASE('sndrD1_g11')
        local_nChannels        = 18
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 626
        local_WMO_Satellite_Id = 255
        local_SensorName       = 'SOUNDER'
        local_SatelliteName    = 'GOES-11'
      CASE('sndrD2_g11')
        local_nChannels        = 18
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 626
        local_WMO_Satellite_Id = 255
        local_SensorName       = 'SOUNDER'
        local_SatelliteName    = 'GOES-11'
      CASE('sndrD3_g11')
        local_nChannels        = 18
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 626
        local_WMO_Satellite_Id = 255
        local_SensorName       = 'SOUNDER'
        local_SatelliteName    = 'GOES-11'
      CASE('sndrD4_g11')
        local_nChannels        = 18
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 626
        local_WMO_Satellite_Id = 255
        local_SensorName       = 'SOUNDER'
        local_SatelliteName    = 'GOES-11'
      CASE('imgr_g11')
        local_nChannels        = 4
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 615
        local_WMO_Satellite_Id = 255
        local_SensorName       = 'IMAGER'
        local_SatelliteName    = 'GOES-11'
      CASE('sndr_g12')
        local_nChannels        = 18
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 626
        local_WMO_Satellite_Id = 256
        local_SensorName       = 'SOUNDER'
        local_SatelliteName    = 'GOES-12'
      CASE('sndrD1_g12')
        local_nChannels        = 18
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 626
        local_WMO_Satellite_Id = 256
        local_SensorName       = 'SOUNDER'
        local_SatelliteName    = 'GOES-12'
      CASE('sndrD2_g12')
        local_nChannels        = 18
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 626
        local_WMO_Satellite_Id = 256
        local_SensorName       = 'SOUNDER'
        local_SatelliteName    = 'GOES-12'
      CASE('sndrD3_g12')
        local_nChannels        = 18
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 626
        local_WMO_Satellite_Id = 256
        local_SensorName       = 'SOUNDER'
        local_SatelliteName    = 'GOES-12'
      CASE('sndrD4_g12')
        local_nChannels        = 18
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 626
        local_WMO_Satellite_Id = 256
        local_SensorName       = 'SOUNDER'
        local_SatelliteName    = 'GOES-12'
      CASE('imgr_g12')
        local_nChannels        = 4
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 615
        local_WMO_Satellite_Id = 256
        local_SensorName       = 'IMAGER'
        local_SatelliteName    = 'GOES-12'
      CASE('sndr_g13')
        local_nChannels        = 18
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 626
        local_WMO_Satellite_Id = 257
        local_SensorName       = 'SOUNDER'
        local_SatelliteName    = 'GOES-13'
      CASE('sndrD1_g13')
        local_nChannels        = 18
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 626
        local_WMO_Satellite_Id = 257
        local_SensorName       = 'SOUNDER'
        local_SatelliteName    = 'GOES-13'
      CASE('sndrD2_g13')
        local_nChannels        = 18
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 626
        local_WMO_Satellite_Id = 257
        local_SensorName       = 'SOUNDER'
        local_SatelliteName    = 'GOES-13'
      CASE('sndrD3_g13')
        local_nChannels        = 18
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 626
        local_WMO_Satellite_Id = 257
        local_SensorName       = 'SOUNDER'
        local_SatelliteName    = 'GOES-13'
      CASE('sndrD4_g13')
        local_nChannels        = 18
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 626
        local_WMO_Satellite_Id = 257
        local_SensorName       = 'SOUNDER'
        local_SatelliteName    = 'GOES-13'
      CASE('imgr_g13')
        local_nChannels        = 4
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 615
        local_WMO_Satellite_Id = 257
        local_SensorName       = 'IMAGER'
        local_SatelliteName    = 'GOES-13'
      CASE('imgrS1_g13')
        local_nChannels        = 4
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 615
        local_WMO_Satellite_Id = 257
        local_SensorName       = 'IMAGER'
        local_SatelliteName    = 'GOES-13'
      CASE('imgrS2_g13')
        local_nChannels        = 4
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 615
        local_WMO_Satellite_Id = 257
        local_SensorName       = 'IMAGER'
        local_SatelliteName    = 'GOES-13'
      CASE('imgrD1S1_g13')
        local_nChannels        = 4
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 615
        local_WMO_Satellite_Id = 257
        local_SensorName       = 'IMAGER'
        local_SatelliteName    = 'GOES-13'
      CASE('imgrD1S2_g13')
        local_nChannels        = 4
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 615
        local_WMO_Satellite_Id = 257
        local_SensorName       = 'IMAGER'
        local_SatelliteName    = 'GOES-13'
      CASE('imgrD2S1_g13')
        local_nChannels        = 4
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 615
        local_WMO_Satellite_Id = 257
        local_SensorName       = 'IMAGER'
        local_SatelliteName    = 'GOES-13'
      CASE('imgrD2S2_g13')
        local_nChannels        = 4
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 615
        local_WMO_Satellite_Id = 257
        local_SensorName       = 'IMAGER'
        local_SatelliteName    = 'GOES-13'
      CASE('abi_gr')
        local_nChannels        = 10
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = -1
        local_WMO_Satellite_Id = -1
        local_SensorName       = 'ABI'
        local_SatelliteName    = 'GOES-R'
      CASE('imgr_mt1r')
        local_nChannels        = 4
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 294
        local_WMO_Satellite_Id = 171
        local_SensorName       = 'IMAGER'
        local_SatelliteName    = 'MTSAT-1R'
      CASE('ssmi_f13')
        local_nChannels        = 7
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 905
        local_WMO_Satellite_Id = 246
        local_SensorName       = 'SSM/I'
        local_SatelliteName    = 'DMSP-13'
      CASE('ssmi_f14')
        local_nChannels        = 7
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 905
        local_WMO_Satellite_Id = 247
        local_SensorName       = 'SSM/I'
        local_SatelliteName    = 'DMSP-14'
      CASE('ssmi_f15')
        local_nChannels        = 7
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 905
        local_WMO_Satellite_Id = 248
        local_SensorName       = 'SSM/I'
        local_SatelliteName    = 'DMSP-15'
      CASE('ssmt1_f13')
        local_nChannels        = 7
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 906
        local_WMO_Satellite_Id = 246
        local_SensorName       = 'SSM/T-1'
        local_SatelliteName    = 'DMSP-13'
      CASE('ssmt1_f15')
        local_nChannels        = 7
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 906
        local_WMO_Satellite_Id = 248
        local_SensorName       = 'SSM/T-1'
        local_SatelliteName    = 'DMSP-15'
      CASE('ssmt2_f14')
        local_nChannels        = 5
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 907
        local_WMO_Satellite_Id = 247
        local_SensorName       = 'SSM/T-2'
        local_SatelliteName    = 'DMSP-14'
      CASE('ssmt2_f15')
        local_nChannels        = 5
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 907
        local_WMO_Satellite_Id = 248
        local_SensorName       = 'SSM/T-2'
        local_SatelliteName    = 'DMSP-15'
      CASE('ssmis_f16')
        local_nChannels        = 24
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 908
        local_WMO_Satellite_Id = 249
        local_SensorName       = 'SSMIS'
        local_SatelliteName    = 'DMSP-16'
      CASE('ssmis_f17')
        local_nChannels        = 24
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = WMO_SSMIS
        local_WMO_Satellite_Id = WMO_DMSP17
        local_SensorName       = 'SSMIS'
        local_SatelliteName    = 'DMSP-17'
      CASE('ssmis_f18')
        local_nChannels        = 24
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = WMO_SSMIS
        local_WMO_Satellite_Id = WMO_DMSP18
        local_SensorName       = 'SSMIS'
        local_SatelliteName    = 'DMSP-18'
      CASE('ssmis_f19')
        local_nChannels        = 24
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = WMO_SSMIS
        local_WMO_Satellite_Id = WMO_DMSP19
        local_SensorName       = 'SSMIS'
        local_SatelliteName    = 'DMSP-19'
      CASE('ssmis_f20')
        local_nChannels        = 24
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = WMO_SSMIS
        local_WMO_Satellite_Id = WMO_DMSP20
        local_SensorName       = 'SSMIS'
        local_SatelliteName    = 'DMSP-20'
      CASE('amsua_aqua')
        local_nChannels        = 15
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 570
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'AMSU-A'
        local_SatelliteName    = 'AQUA'
      CASE('hsb_aqua')
        local_nChannels        = 4
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 246
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'HSB'
        local_SatelliteName    = 'AQUA'
      CASE('amsre_aqua')
        local_nChannels        = 12
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 345
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'AMSR-E'
        local_SatelliteName    = 'AQUA'
      CASE('airs281SUBSET_aqua')
        local_nChannels        = 281
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 420
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'AIRS'
        local_SatelliteName    = 'Aqua'
      CASE('airs324SUBSET_aqua')
        local_nChannels        = 324
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 420
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'AIRS'
        local_SatelliteName    = 'Aqua'
      CASE('airsM12_aqua')
        local_nChannels        = 130
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 420
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'AIRS'
        local_SatelliteName    = 'Aqua'
      CASE('airsM11_aqua')
        local_nChannels        = 144
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 420
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'AIRS'
        local_SatelliteName    = 'Aqua'
      CASE('airsM10_aqua')
        local_nChannels        = 167
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 420
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'AIRS'
        local_SatelliteName    = 'Aqua'
      CASE('airsM9_aqua')
        local_nChannels        = 167
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 420
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'AIRS'
        local_SatelliteName    = 'Aqua'
      CASE('airsM8_aqua')
        local_nChannels        = 161
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 420
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'AIRS'
        local_SatelliteName    = 'Aqua'
      CASE('airsM7_aqua')
        local_nChannels        = 167
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 420
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'AIRS'
        local_SatelliteName    = 'Aqua'
      CASE('airsM6_aqua')
        local_nChannels        = 167
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 420
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'AIRS'
        local_SatelliteName    = 'Aqua'
      CASE('airsM5_aqua')
        local_nChannels        = 159
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 420
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'AIRS'
        local_SatelliteName    = 'Aqua'
      CASE('airsM4d_aqua')
        local_nChannels        = 106
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 420
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'AIRS'
        local_SatelliteName    = 'Aqua'
      CASE('airsM4c_aqua')
        local_nChannels        = 94
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 420
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'AIRS'
        local_SatelliteName    = 'Aqua'
      CASE('airsM3_aqua')
        local_nChannels        = 192
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 420
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'AIRS'
        local_SatelliteName    = 'Aqua'
      CASE('airsM4b_aqua')
        local_nChannels        = 106
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 420
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'AIRS'
        local_SatelliteName    = 'Aqua'
      CASE('airsM4a_aqua')
        local_nChannels        = 104
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 420
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'AIRS'
        local_SatelliteName    = 'Aqua'
      CASE('airsM2b_aqua')
        local_nChannels        = 150
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 420
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'AIRS'
        local_SatelliteName    = 'Aqua'
      CASE('airsM1b_aqua')
        local_nChannels        = 130
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 420
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'AIRS'
        local_SatelliteName    = 'Aqua'
      CASE('airsM2a_aqua')
        local_nChannels        = 116
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 420
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'AIRS'
        local_SatelliteName    = 'Aqua'
      CASE('airsM1a_aqua')
        local_nChannels        = 118
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 420
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'AIRS'
        local_SatelliteName    = 'Aqua'
      CASE('modis_terra')
        local_nChannels        = 16
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 389
        local_WMO_Satellite_Id = 783
        local_SensorName       = 'MODIS'
        local_SatelliteName    = 'TERRA'
      CASE('modisD01_terra')
        local_nChannels        = 16
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 389
        local_WMO_Satellite_Id = 783
        local_SensorName       = 'MODIS'
        local_SatelliteName    = 'TERRA'
      CASE('modisD02_terra')
        local_nChannels        = 16
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 389
        local_WMO_Satellite_Id = 783
        local_SensorName       = 'MODIS'
        local_SatelliteName    = 'TERRA'
      CASE('modisD03_terra')
        local_nChannels        = 16
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 389
        local_WMO_Satellite_Id = 783
        local_SensorName       = 'MODIS'
        local_SatelliteName    = 'TERRA'
      CASE('modisD04_terra')
        local_nChannels        = 16
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 389
        local_WMO_Satellite_Id = 783
        local_SensorName       = 'MODIS'
        local_SatelliteName    = 'TERRA'
      CASE('modisD05_terra')
        local_nChannels        = 16
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 389
        local_WMO_Satellite_Id = 783
        local_SensorName       = 'MODIS'
        local_SatelliteName    = 'TERRA'
      CASE('modisD06_terra')
        local_nChannels        = 16
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 389
        local_WMO_Satellite_Id = 783
        local_SensorName       = 'MODIS'
        local_SatelliteName    = 'TERRA'
      CASE('modisD07_terra')
        local_nChannels        = 16
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 389
        local_WMO_Satellite_Id = 783
        local_SensorName       = 'MODIS'
        local_SatelliteName    = 'TERRA'
      CASE('modisD08_terra')
        local_nChannels        = 16
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 389
        local_WMO_Satellite_Id = 783
        local_SensorName       = 'MODIS'
        local_SatelliteName    = 'TERRA'
      CASE('modisD09_terra')
        local_nChannels        = 16
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 389
        local_WMO_Satellite_Id = 783
        local_SensorName       = 'MODIS'
        local_SatelliteName    = 'TERRA'
      CASE('modisD10_terra')
        local_nChannels        = 16
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 389
        local_WMO_Satellite_Id = 783
        local_SensorName       = 'MODIS'
        local_SatelliteName    = 'TERRA'
      CASE('modis_aqua')
        local_nChannels        = 16
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 389
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'MODIS'
        local_SatelliteName    = 'AQUA'
      CASE('modisD01_aqua')
        local_nChannels        = 16
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 389
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'MODIS'
        local_SatelliteName    = 'AQUA'
      CASE('modisD02_aqua')
        local_nChannels        = 16
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 389
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'MODIS'
        local_SatelliteName    = 'AQUA'
      CASE('modisD03_aqua')
        local_nChannels        = 16
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 389
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'MODIS'
        local_SatelliteName    = 'AQUA'
      CASE('modisD04_aqua')
        local_nChannels        = 16
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 389
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'MODIS'
        local_SatelliteName    = 'AQUA'
      CASE('modisD05_aqua')
        local_nChannels        = 16
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 389
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'MODIS'
        local_SatelliteName    = 'AQUA'
      CASE('modisD06_aqua')
        local_nChannels        = 16
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 389
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'MODIS'
        local_SatelliteName    = 'AQUA'
      CASE('modisD07_aqua')
        local_nChannels        = 16
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 389
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'MODIS'
        local_SatelliteName    = 'AQUA'
      CASE('modisD08_aqua')
        local_nChannels        = 16
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 389
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'MODIS'
        local_SatelliteName    = 'AQUA'
      CASE('modisD09_aqua')
        local_nChannels        = 16
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 389
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'MODIS'
        local_SatelliteName    = 'AQUA'
      CASE('modisD10_aqua')
        local_nChannels        = 16
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 389
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'MODIS'
        local_SatelliteName    = 'AQUA'
      CASE('vissrDetA_gms5')
        local_nChannels        = 3
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 489
        local_WMO_Satellite_Id = 152
        local_SensorName       = 'VISSR'
        local_SatelliteName    = 'GMS-5'
      CASE('vissrDetB_gms5')
        local_nChannels        = 3
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 489
        local_WMO_Satellite_Id = 152
        local_SensorName       = 'VISSR'
        local_SatelliteName    = 'GMS-5'
      CASE('mviriNOM_m03')
        local_nChannels        = 2
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 205
        local_WMO_Satellite_Id = 50
        local_SensorName       = 'MVIRI'
        local_SatelliteName    = 'METEOSAT-03'
      CASE('mviriBKUP_m03')
        local_nChannels        = 2
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 205
        local_WMO_Satellite_Id = 50
        local_SensorName       = 'MVIRI'
        local_SatelliteName    = 'METEOSAT-03'
      CASE('mviriNOM_m04')
        local_nChannels        = 2
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 205
        local_WMO_Satellite_Id = 51
        local_SensorName       = 'MVIRI'
        local_SatelliteName    = 'METEOSAT-04'
      CASE('mviriBKUP_m04')
        local_nChannels        = 2
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 205
        local_WMO_Satellite_Id = 51
        local_SensorName       = 'MVIRI'
        local_SatelliteName    = 'METEOSAT-04'
      CASE('mviriNOM_m05')
        local_nChannels        = 2
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 205
        local_WMO_Satellite_Id = 52
        local_SensorName       = 'MVIRI'
        local_SatelliteName    = 'METEOSAT-05'
      CASE('mviriBKUP_m05')
        local_nChannels        = 2
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 205
        local_WMO_Satellite_Id = 52
        local_SensorName       = 'MVIRI'
        local_SatelliteName    = 'METEOSAT-05'
      CASE('mviriNOM_m06')
        local_nChannels        = 2
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 205
        local_WMO_Satellite_Id = 53
        local_SensorName       = 'MVIRI'
        local_SatelliteName    = 'METEOSAT-06'
      CASE('mviriBKUP_m06')
        local_nChannels        = 2
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 205
        local_WMO_Satellite_Id = 53
        local_SensorName       = 'MVIRI'
        local_SatelliteName    = 'METEOSAT-06'
      CASE('mviriNOM_m07')
        local_nChannels        = 2
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 205
        local_WMO_Satellite_Id = 54
        local_SensorName       = 'MVIRI'
        local_SatelliteName    = 'METEOSAT-07'
      CASE('mviriBKUP_m07')
        local_nChannels        = 2
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 205
        local_WMO_Satellite_Id = 54
        local_SensorName       = 'MVIRI'
        local_SatelliteName    = 'METEOSAT-07'
      CASE('seviri_m08')
        local_nChannels        = 8
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = WMO_SEVIRI
        local_WMO_Satellite_Id = WMO_METEOSAT08
        local_SensorName       = 'SEVIRI'
        local_SatelliteName    = 'METEOSAT-08'
      CASE('seviri_m09')
        local_nChannels        = 8
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = WMO_SEVIRI
        local_WMO_Satellite_Id = WMO_METEOSAT09
        local_SensorName       = 'SEVIRI'
        local_SatelliteName    = 'METEOSAT-09'
      CASE('seviri_m10')
        local_nChannels        = 8
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = WMO_SEVIRI
        local_WMO_Satellite_Id = WMO_METEOSAT10
        local_SensorName       = 'SEVIRI'
        local_SatelliteName    = 'METEOSAT-10'
      CASE('seviri_m11')
        local_nChannels        = 8
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = WMO_SEVIRI
        local_WMO_Satellite_Id = WMO_METEOSAT11
        local_SensorName       = 'SEVIRI'
        local_SatelliteName    = 'METEOSAT-11'
      CASE('windsat_coriolis')
        local_nChannels        = 16
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 2047
        local_WMO_Satellite_Id = 283
        local_SensorName       = 'WindSat'
        local_SatelliteName    = 'Coriolis'
      CASE('atms_c1')
        local_nChannels        = 22
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = WMO_ATMS
        local_WMO_Satellite_Id = WMO_NPOESSC1
        local_SensorName       = 'ATMS'
        local_SatelliteName    = 'NPOESS-C1'
      CASE('airs_aqua')
        local_nChannels        = 2378
        local_nFOVs            = -1
        local_Detector         = -1
        local_WMO_Sensor_Id    = 420
        local_WMO_Satellite_Id = 784
        local_SensorName       = 'AIRS'
        local_SatelliteName    = 'Aqua'
      CASE DEFAULT
        Error_Status=FAILURE
        CALL Display_Message( ROUTINE_NAME, &
                              'No entry for Sensor_Id'//TRIM(ADJUSTL(Sensor_Id)), &
                              Error_Status, &
                              Message_Log=Message_Log)
    END SELECT

    ! Return requested attributes
    IF ( PRESENT(nChannels       ) ) nChannels        = local_nChannels
    IF ( PRESENT(nFOVs           ) ) nFOVs            = local_nFOVs
    IF ( PRESENT(Detector        ) ) Detector         = local_Detector
    IF ( PRESENT(WMO_Sensor_Id   ) ) WMO_Sensor_Id    = local_WMO_Sensor_Id
    IF ( PRESENT(WMO_Satellite_Id) ) WMO_Satellite_Id = local_WMO_Satellite_Id
    IF ( PRESENT(SensorName      ) ) SensorName       = local_SensorName
    IF ( PRESENT(SatelliteName   ) ) SatelliteName    = local_SatelliteName

  END FUNCTION CRTM_Get_SensorAttributes

END MODULE CRTM_SensorInfo

max_stars_repo_name: matzegoebel/WRF-fluxavg

max_issues_repo_name: teb-model/wrf-teb

max_forks_repo_name: teb-model/wrf-teb


text:
	SUBROUTINE GDPTIN  ( gdatim, gdfile, scale, glevel, gvcord,
     +			gfunc, proj, gdarea, kxky, cpyfil, satfil,
     +			calinfo, wmohdr, iret )
C************************************************************************
C* GDPTIN								*
C*									*
C* This subroutine gets the input parameters for GD2IMG.		*
C*									*
C* GDPTIN  (gdatim,gdfile,scale,glevel,gvcoord,gfunc,proj,gdarea,kxky,	*
C*		cpyfil, satfil, calinfo, wmohdr, iret) 			*
C*        								*
C**									*
C* Log:									*
C************************************************************************
	CHARACTER*(*)	gdatim, gdfile, scale, glevel, gvcord, gfunc,
     +			proj, gdarea, kxky, cpyfil, satfil, calinfo,
     +			wmohdr
	INTEGER 	ier (13), iret
C------------------------------------------------------------------------
	CALL IP_STR  ( 'GDATTIM',	gdatim,	ier(1) )
	CALL IP_STR  ( 'GDFILE',	gdfile,	ier(2) )
	CALL IP_STR  ( 'SCALE',		scale,	ier(3) )
	CALL IP_STR  ( 'GLEVEL',	glevel,	ier(4) )
	CALL IP_STR  ( 'GVCORD',	gvcord, ier(5) )
	CALL IP_STR  ( 'GFUNC',		gfunc,	ier(6) )
	CALL IP_STR  ( 'PROJ',		proj,	ier(7) )
	CALL IP_STR  ( 'GRDAREA',	gdarea,	ier(8) )
	CALL IP_STR  ( 'KXKY',		kxky,	ier(9) )
	CALL IP_STR  ( 'CPYFIL',	cpyfil,	ier(10) )
	CALL IP_STR  ( 'SATFIL',	satfil,	ier(11) )
	CALL IP_STR  ( 'CALINFO',	calinfo,ier(12) )
	CALL IP_STR  ( 'WMOHDR',	wmohdr ,ier(13) )
C*
	iret = 0
	DO i = 1, 13
	  iret = iret + ier (i)
	END DO
C*
	IF  ( iret .ne. 0 )  iret = -2
C*
	RETURN
	END

ext: f

max_stars_repo_name: oxelson/gempak

max_issues_repo_name: oxelson/gempak

max_forks_repo_name: oxelson/gempak


text:
This editor can edit this entry and tell us a bit about themselves by clicking the Edit icon.

20080710 21:07:15 nbsp Welcome to the Wiki. I notice that both you and Users/TORIDUMAS left similar comments on the Great Clips for Hair within minutes of each other. You may want to clear up any confusion that you are engaging in the practice of Sockpuppet sockpuppeting. Sockpuppeting is the practice of creating another account an expressing similar views in order to make it look like many people share your viewpoint. Users/JasonAller

max_stars_repo_name: voflo/Search

max_issues_repo_name: voflo/Search

max_forks_repo_name: voflo/Search


program fpm_shell
use :: M_journal,   only : journal
use :: M_history,   only : redo
use :: M_cli2,      only : set_args ,sget,rget,lget,iget, rgets,igets,sgets, unnamed
use :: M_io,        only : which, get_env
! extensions: chdir
implicit NONE
integer,parameter             :: dp=kind(0.0d0)         ! calculator returns double precision values
integer,parameter             :: iclen_calc=256
character(len=iclen_calc)     :: line0                  ! input line
character(len=iclen_calc)     :: linet                  ! input line trimmed of leading spaces
integer                       :: ii                     ! location of end of verb on input lines
integer                       :: iin=5                  ! I/O unit to read input from
integer                       :: ios                    ! status returned by last READ
character(len=4096)           :: message
character(len=:),allocatable  :: oldread
character(len=:),allocatable  :: help_text(:)
character(len=:),allocatable  :: version_text(:)
   oldread=''
   call setup()
   call set_args(' -read " " -replay " "',help_text,version_text)  ! parse command line arguments
   if(sget('read').ne.' ')then                                     ! found an initial file to read
      iin=iin+10
      open(unit=iin,file=trim(sget('read')),iostat=ios)
      if(ios.ne.0)iin=iin-10                               ! if open failed fall back to previous I/O unit
      iin=iin+10
   endif
   call journal('O',sget('replay'))                        ! turn on journal file
   INFINITE: do                                            ! start loop to read input lines
      if(iin.eq.5)then                                     ! only show the prompt when reading from stdin
         write(*,'(a)',advance='no')'fpm>'                 ! write prompt showing nesting level in if/else/endif
      elseif(iin.lt.5)then
         call journal('sc','*fpm-shell* error: internal value for input unit is ',iin)
         stop
      endif
      if(iin.eq.5)then
         read(iin,'(a)',iostat=ios)line0                 ! read next line of input
         ios=0
      else
         read(iin,'(a)',iostat=ios)line0                   ! read next line of input
      endif
      if(ios.ne.0)then                                     ! process an I/O error
         if(iin.eq.5)exit INFINITE                         ! if reading from stdin exit
         close(iin,iostat=ios)                             ! if reading from an alternate input file close it
         iin=iin-10                                        ! drop back to previous input file
         cycle INFINITE
      else
         !call journal('T',trim(line0))
      endif
      call redo(line0) ! store into history if not "r".         ! if "r", edit and return a line from the history editor
      linet=adjustl(line0)                                      ! trim leading whitespace
      ii=index(linet,' ')                                       ! find end of first word
      if(ii.eq.0)ii=len(linet)                                  ! if input line is completely full first word is entire line
      if(linet(:1).eq.'#')then                                  ! ignore comment lines
         cycle INFINITE
      endif
      select case(linet(:ii))                                   ! handle all the other verbs
      case('.','quit')                                          ! COMMAND: quit program
         call journal('*fpm-shell*: that''s all folks ...')
         stop
      case(' ')                                                 ! ignore blank lines
      case('run','install','test','build','new','list','update','search')
          call execute_command_line( 'fpm '//linet )            ! call fpm
      case('fman')
          call execute_command_line( 'fpm '//linet(2:)//' --color|less -r' ) ! call fpm-man
      case('cd')
          call chdir(linet(ii+1:))                              ! gfortran fortran extension
      case('?')                                                 ! display help
              write(*,'(a)')help_text
      case('help')                                              ! display help
          call execute_command_line( 'fpm '//linet//'|more' )   ! call fpm
      case('man')                                               ! display help
          write(*,*)'env MANPATH=./man:"$MANPATH" '//linet
          call execute_command_line( 'env MANPATH="./man:$MANPATH" man '//linet )   ! call man with possible man directory
      case('version')
         call execute_command_line('fpm --version')             ! see if shell will execute it
      case('read')                                              ! read from alternate input file
          !!call dissect(linet(:ii),' -q F',linet(ii+1:),ierr)  ! define and parse command
          iin=iin+10                                            ! increment I/O unit used for input
          if(size(unnamed).gt.0)then
             cycle INFINITE
          elseif(unnamed(1).eq.'')then
             open(unit=iin,file=oldread,iostat=ios,iomsg=message,status='old')
          else
             oldread=sget('read')
             open(unit=iin,file=oldread,iostat=ios,iomsg=message,status='old')
          endif
          if(ios.ne.0)then
             iin=iin-10                                ! if open failed fall back to previous I/O unit
             write(*,*)'*read* ERROR:'//trim(message)
          endif
      case default
         !=============
         ! GNU Fortran (GCC) 6.4.0 -- fails on bad command if do not return CMDMSG
         ! call execute_command_line(linet(:len_trim(linet)))   ! see if shell will execute it
         !=============
         CMD: block
         integer            :: command_exit
         integer            :: command_status
         character(len=256) :: command_message
         command_message=''
         call execute_command_line(linet(:len_trim(linet)),exitstat=command_exit,cmdstat=command_status,cmdmsg=command_message)
         if(command_exit.ne.0)then
                 write(*,'(a)')trim(command_message)
         endif
         endblock CMD
      end select
   enddo INFINITE
   call journal('*fpm-shell* exiting')
contains

subroutine setup()
! @(#)help_usage(3f): prints help information
help_text=[ CHARACTER(LEN=128) :: &
'NAME                                                                            ',&
'   fpm-shell(1f) - shell for demonstrating interactive fpm concept              ',&
'   (LICENSE:PD)                                                                 ',&
'SYNOPSIS                                                                        ',&
'   shell --help| --version|[ -replay][ -read FILENAME]                          ',&
'DESCRIPTION                                                                     ',&
'    Example command line interface with command line history.                   ',&
'    Could add if/else/elseif/endif logic, calculator, basic graphics,           ',&
'    matlab88, ...                                                               ',&
'OPTIONS                                                                         ',&
'   --read FILENAME  read initial commands from specified file                   ',&
'   --replay         turn on journal file                                        ',&
'   --help           display this help and exit                                  ',&
'   --version        output version information and exit                         ',&
'USAGE                                                                           ',&
' At the command prompt the following example commands may be used:              ',&
'  #----------------------------------------------------------------------------#',&
'  | command                     || description                                 |',&
'  #----------------------------------------------------------------------------#',&
'  | run, build, test, help      || run "fpm CMD ..."                           |',&
'  | install, new, list, update  ||                                             |',&
'  | search, fman                || plugins which must be installed             |',&
'  | r                           || enter history editor; ? will produce help   |',&
'  | read file [-q]              || read from another input file                |',&
'  | ?                           || display this information                    |',&
'  | cd                          || change directory                            |',&
'  | version                     || fpm -version                                |',&
'  | quit|.                      || exit program                                |',&
'  | anything_else               | execute as system command                    |',&
'  #----------------------------------------------------------------------------#',&
'']

version_text=[ CHARACTER(LEN=128) :: &
'@(#)PRODUCT:        GPF (General Purpose Fortran) utilities and examples>',&
'@(#)PROGRAM:        fpm-shell(1f)>',&
'@(#)DESCRIPTION:    shell for demonstrating concept of interactive fpm>',&
'@(#)VERSION:        1.0.1, 20201213>',&
'@(#)AUTHOR:         John S. Urban>',&
'@(#)HOME PAGE:      http://www.urbanjost.altervista.org/index.html>',&
'@(#)LICENSE:        Public Domain. This is free software: you are free to change and redistribute it.>',&
'@(#)                There is NO WARRANTY, to the extent permitted by law.>',&
'']
end subroutine setup

end program fpm_shell


text:
SUBROUTINE qad(valbig,mitot,mjtot,nvar,  &
    svdflx,qc1d,lenbc,lratiox,lratioy,hx,hy,  &
    maux,auxbig,auxc1d,delt,mptr)

!!  USE amr_module, only : timemult, nghost, max1d, maxaux, mwaves,nestlevel,rnode, &
!!       auxtype, node, method
  IMPLICIT NONE

  INTEGER mitot, mjtot, nvar, lenbc, lratiox, lratioy, maux
  INTEGER mptr
  DOUBLE PRECISION hx,hy,delt

  DOUBLE PRECISION valbig(nvar,mitot,mjtot)
  DOUBLE PRECISION auxbig(maux,mitot,mjtot)
  DOUBLE PRECISION qc1d(nvar,lenbc)
  DOUBLE PRECISION svdflx(nvar,lenbc)
  DOUBLE PRECISION auxc1d(maux,lenbc)

  INTEGER qad_mode
  COMMON /qad_comm/ qad_mode

  IF (qad_mode .eq. 0) THEN
!!    # Don't include conservation fix
      return
  ELSEIF (qad_mode .eq. 1) THEN
!!    # Original qad
      CALL qad_original(valbig,mitot,mjtot,nvar,  &
                     svdflx,qc1d,lenbc,lratiox,lratioy,hx,hy,  &
                     maux,auxbig,auxc1d,delt,mptr)
  ELSEIF (qad_mode .eq. 2) THEN
      CALL qad_modified(valbig,mitot,mjtot,nvar,  &
                        svdflx,qc1d,lenbc,lratiox,lratioy,hx,hy,  &
                        maux,auxbig,auxc1d,delt,mptr)
  ELSEIF (qad_mode .eq. 3) then
!!    # New qad
      CALL qad_new(valbig,mitot,mjtot,nvar, &
                   svdflx,qc1d,lenbc,lratiox,lratioy,hx,hy, &
                   maux,auxbig,auxc1d,delt,mptr)
  ENDIF

END SUBROUTINE qad

max_stars_repo_name: ECLAIRWaveS/ForestClaw

max_issues_repo_name: ECLAIRWaveS/ForestClaw

max_forks_repo_name: ECLAIRWaveS/ForestClaw


text:
subroutine ice_fall()

! Sedimentation of ice:

use vars
use microphysics, only: micro_field, index_cloud_ice
!use micro_params
use params

implicit none

integer i,j,k, kb, kc, kmax, kmin, ici
real coef,dqi,lat_heat,vt_ice
real omnu, omnc, omnd, qiu, qic, qid, tmp_theta, tmp_phi
real fz(nx,ny,nz)

kmax=0
kmin=nzm+1

do k = 1,nzm
 do j = 1, ny
  do i = 1, nx
      if(qcl(i,j,k)+qci(i,j,k).gt.0..and. tabs(i,j,k).lt.273.15) then
        kmin = min(kmin,k)
        kmax = max(kmax,k)
      end if
  end do
 end do
end do

do k = 1,nzm
   qifall(k) = 0.
   tlatqi(k) = 0.
end do

if(index_cloud_ice.eq.-1) return

call t_startf ('ice_fall')

fz = 0.

! Compute cloud ice flux (using flux limited advection scheme, as in
! chapter 6 of Finite Volume Methods for Hyperbolic Problems by R.J.
! LeVeque, Cambridge University Press, 2002).
do k = max(1,kmin-1),kmax
   ! Set up indices for x-y planes above and below current plane.
   kc = min(nzm,k+1)
   kb = max(1,k-1)
   ! CFL number based on grid spacing interpolated to interface i,j,k-1/2
   coef = dtn/(0.5*(adz(kb)+adz(k))*dz)
   do j = 1,ny
      do i = 1,nx
         ! Compute cloud ice density in this cell and the ones above/below.
         ! Since cloud ice is falling, the above cell is u (upwind),
         ! this cell is c (center) and the one below is d (downwind).

         qiu = rho(kc)*qci(i,j,kc)
         qic = rho(k) *qci(i,j,k)
         qid = rho(kb)*qci(i,j,kb)

         ! Ice sedimentation velocity depends on ice content. The fiting is
         ! based on the data by Heymsfield (JAS,2003). -Marat
         ! 0.1 m/s low bound was suggested by Chris Bretherton
!          vt_ice = 0.0
!         vt_ice = max(0.1,0.5*log10(qic+1.e-12)+3.) ! based on Heymsfield's figure
         vt_ice = 8.66*(max(0.,qic)+1.e-10)**0.24   ! Heymsfield (JAS, 2003, p.2607)

         ! Use MC flux limiter in computation of flux correction.
         ! (MC = monotonized centered difference).
         if (qic.eq.qid) then
            tmp_phi = 0.
         else
            tmp_theta = (qiu-qic)/(qic-qid)
            tmp_phi = max(0.,min(0.5*(1.+tmp_theta),2.,2.*tmp_theta))
         end if

         ! Compute limited flux.
         ! Since falling cloud ice is a 1D advection problem, this
         ! flux-limited advection scheme is monotonic.
         fz(i,j,k) = -vt_ice*(qic - 0.5*(1.-coef*vt_ice)*tmp_phi*(qic-qid))
      end do
   end do
end do
fz(:,:,nz) = 0.

ici = index_cloud_ice

do k=max(1,kmin-2),kmax
   coef=dtn/(dz*adz(k)*rho(k))
   do j=1,ny
      do i=1,nx
         ! The cloud ice increment is the difference of the fluxes.
         dqi=coef*(fz(i,j,k)-fz(i,j,k+1))
         ! Add this increment to both non-precipitating and total water.
         micro_field(i,j,k,ici)  = micro_field(i,j,k,ici)  + dqi
         ! Include this effect in the total moisture budget.
         qifall(k) = qifall(k) + dqi

         ! The latent heat flux induced by the falling cloud ice enters
         ! the liquid-ice static energy budget in the same way as the
         ! precipitation.  Note: use latent heat of sublimation.
         lat_heat  = (fac_cond+fac_fus)*dqi
         ! Add divergence of latent heat flux to liquid-ice static energy.
         t(i,j,k)  = t(i,j,k)  - lat_heat
         ! Add divergence to liquid-ice static energy budget.
         tlatqi(k) = tlatqi(k) - lat_heat
      end do
   end do
end do

call t_stopf ('ice_fall')

end subroutine ice_fall

max_stars_repo_name: kbren/uwnet

max_issues_repo_name: kbren/uwnet

max_forks_repo_name: kbren/uwnet


text:
C$Procedure MAKVTX ( MKDSK: create vertex from coordinates )

      SUBROUTINE MAKVTX ( CORSYS, CORPAR, COORDS,
     .                    REFVAL, HEIGHT, VERTEX )

C$ Abstract
C
C     Create a vertex from domain coordinates and height.
C
C$ Disclaimer
C
C     THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE
C     CALIFORNIA INSTITUTE OF TECHNOLOGY (CALTECH) UNDER A U.S.
C     GOVERNMENT CONTRACT WITH THE NATIONAL AERONAUTICS AND SPACE
C     ADMINISTRATION (NASA). THE SOFTWARE IS TECHNOLOGY AND SOFTWARE
C     PUBLICLY AVAILABLE UNDER U.S. EXPORT LAWS AND IS PROVIDED "AS-IS"
C     TO THE RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY
C     WARRANTIES OF PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A
C     PARTICULAR USE OR PURPOSE (AS SET FORTH IN UNITED STATES UCC
C     SECTIONS 2312-2313) OR FOR ANY PURPOSE WHATSOEVER, FOR THE
C     SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
C
C     IN NO EVENT SHALL CALTECH, ITS JET PROPULSION LABORATORY, OR NASA
C     BE LIABLE FOR ANY DAMAGES AND/OR COSTS, INCLUDING, BUT NOT
C     LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY KIND,
C     INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
C     REGARDLESS OF WHETHER CALTECH, JPL, OR NASA BE ADVISED, HAVE
C     REASON TO KNOW, OR, IN FACT, SHALL KNOW OF THE POSSIBILITY.
C
C     RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF
C     THE SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY
C     CALTECH AND NASA FOR ALL THIRD-PARTY CLAIMS RESULTING FROM THE
C     ACTIONS OF RECIPIENT IN THE USE OF THE SOFTWARE.
C
C$ Required_Reading
C
C     DSK
C
C$ Keywords
C
C     MKDSK
C
C$ Declarations

      IMPLICIT NONE

      INCLUDE 'dskdsc.inc'

      INTEGER               CORSYS
      DOUBLE PRECISION      CORPAR ( * )
      DOUBLE PRECISION      COORDS ( 2 )
      DOUBLE PRECISION      REFVAL
      DOUBLE PRECISION      HEIGHT
      DOUBLE PRECISION      VERTEX ( 3 )

C$ Brief_I/O
C
C     VARIABLE  I/O  DESCRIPTION
C     --------  ---  --------------------------------------------------
C     CORSYS     I   Coordinate system.
C     CORPAR     I   Coordinate parameters.
C     COORDS     I   Domain coordinates.
C     REFVAL     I   Height reference value.
C     HEIGHT     I   Height.
C     VERTEX     O   Vertex.
C
C$ Detailed_Input
C
C     CORSYS     is a DSK subsystem code designating the coordinate
C                system of the input coordinates.
C
C     CORPAR     is an array containing parameters associated with
C                the input coordinate system. The contents of the
C                array are as described in the DSK include file
C                dskdsc.inc.
C
C     COORDS     is a pair of domain coordinates: these may be,
C
C                   - planetocentric longitude and latitude
C
C                   - planetodetic longitude and latitude
C
C                   - X and Y
C
C                For a given coordinate system, the order of the
C                elements of COORDS is that of the coordinate names in
C                the list above.
C
C     REFVAL     is a reference value to be added to the input height.
C                REFVAL is used only for latitudinal and rectangular
C                coordinates.
C
C                REFVAL must be non-negative.
C
C                Units are km.
C
C
C     HEIGHT     is a height datum. Units are km.
C
C
C$ Detailed_Output
C
C     VERTEX     is a 3-vector corresponding to the input coordinates,
C                height, and if applicable, height reference.
C
C                Units are always km.
C
C$ Parameters
C
C     None.
C
C$ Exceptions
C
C     1)  If the coordinate system code is not recognized, the error
C         SPICE(NOTSUPPORTED) is signaled.
C
C     2)  If an error occurs while converting planetodetic coordinates
C         to rectangular coordinates, the error will be diagnosed by a
C         routine in the call tree of this routine.
C
C     3)  If REFVAL is negative, the error SPICE(VALUEOUTOFRANGE) is
C         signaled. REFVAL is checked whether or not it is applicable.
C
C$ Files
C
C     None.
C
C$ Particulars
C
C     None.
C
C$ Examples
C
C     See usage in the MKDSK routine MKVARR.
C
C$ Restrictions
C
C     1) For use only within program MKDSK.
C
C$ Literature_References
C
C     None.
C
C$ Author_and_Institution
C
C     N.J. Bachman    (JPL)
C
C$ Version
C
C-    MKDSK Version 1.0.0, 25-FEB-2017 (NJB)
C
C-&

C
C     SPICELIB functions
C
      LOGICAL               RETURN

C
C     Local variables
C
      DOUBLE PRECISION      ALT
      DOUBLE PRECISION      F
      DOUBLE PRECISION      RADIUS
      DOUBLE PRECISION      RE

      IF ( RETURN() ) THEN
         RETURN
      END IF

      CALL CHKIN ( 'MAKVTX' )

      IF ( REFVAL .LT. 0.D0 ) THEN

         CALL SETMSG ( 'Reference value # must be '
     .   //            'non-negative.'             )
         CALL ERRDP  ( '#', REFVAL                 )
         CALL SIGERR ( 'SPICE(VALUEOUTOFRANGE)'    )
         CALL CHKOUT ( 'MAKVTX'                    )
         RETURN

      END IF

      IF ( CORSYS .EQ. LATSYS ) THEN
C
C        REFVAL has the same units as HEIGHT.
C        HSCALE converts these units to km.
C
         RADIUS = REFVAL + HEIGHT

         CALL LATREC ( RADIUS, COORDS(1), COORDS(2), VERTEX )

      ELSE IF ( CORSYS .EQ. PDTSYS ) THEN
C
C        Height is relative to the system's reference spheroid.
C
         RE  = CORPAR(1)
         F   = CORPAR(2)
         ALT = HEIGHT

         CALL GEOREC ( COORDS(1), COORDS(2), ALT, RE, F, VERTEX )

      ELSE IF ( CORSYS .EQ. RECSYS ) THEN
C
C        Height is relative to the reference Z-value.
C
C        REFVAL has the same units as HEIGHT.
C        HSCALE converts these units to km.
C
         VERTEX(1) = COORDS(1)
         VERTEX(2) = COORDS(2)
         VERTEX(3) = REFVAL + HEIGHT

      ELSE

         CALL SETMSG ( 'Coordinate system code # is not '
     .   //            'recognized.'                     )
         CALL ERRINT ( '#', CORSYS                       )
         CALL SIGERR ( 'SPICE(NOTSUPPORTED)'             )
         CALL CHKOUT ( 'MAKVTX'                          )
         RETURN

      END IF

      CALL CHKOUT ( 'MAKVTX' )
      RETURN
      END

max_stars_repo_name: agforero/FTFramework

max_issues_repo_name: agforero/fortran-testing-framework

max_forks_repo_name: agforero/fortran-testing-framework