MODULE YOMRSTRHBIAS

USE PARKIND1  ,ONLY : JPIM     ,JPRB

USE PARDIMO

IMPLICIT NONE

SAVE

!     ------------------------------------------------------------------
!      YOMRSTRHBIAS - RS T/RH BIAS CORRECTION PARAMETERS

!        D. VASILJEVIC   ECMWF     10/3/03

!     NAME                         TYPE     MEANING
!     ----                         ----     -------

!     M_COUNTRY_SQN                  I      LIST OF COUNTRY SQ. NO.
!     C_STID_FROM                    C      LIST OF STATION IDs for a given country from
!     C_STID_TO                      C      LIST OF STATION IDs for a given country to
!     M_STID_FROM                    I      LIST OF STATION IDs for a given country from
!     M_STID_TO                      I      LIST OF STATION IDs for a given country to
!     M_LAT_FROM                     I      LIST OF STATION LATs for a given country from
!     M_LAT_TO                       R      LIST OF STATION LATs for a given country to
!     M_LON_FROM                     R      LIST OF STATION LONs for a given country from
!     M_LON_TO                       I      LIST OF STATION LONs for a given country to
!     M_COUNTRY_P                    I      LIST OF COUNTRY POINTERS
!     R_COUNTRY_LEV                  R      LIST OF PRESSURE LEVELS
!     R_COUNTRY_COR                  R      LIST OF BIAS CORR
!     T_COUNTRY_COR_vs_all_mean      R      LIST OF COUNTRY T BIAS CORRs VS all_mean
!     T_COUNTRY_COR_vs_day_mean      R      LIST OF COUNTRY T BIAS CORRs VS day_mean
!     T_COUNTRY_COR_vs_night_mean    R      LIST OF COUNTRY T BIAS CORRs VS night_mean
!     RH_COUNTRY_COR_vs_all_mean     R      LIST OF COUNTRY RH BIAS CORRs VS all_mean
!     RH_COUNTRY_COR_vs_day_mean     R      LIST OF COUNTRY RH BIAS CORRs VS day_mean
!     RH_COUNTRY_COR_vs_night_mean   R      LIST OF COUNTRY RH BIAS CORRs VS night_mean
!     NO_TRH_BIAS_COUNTRIES          I      NO OF COUNTRIES

!     M_SONDE_SQN                    I      LIST OF SONDE SQ. NO.
!     M_SONDE_CODE                   I      LIST OF SONDE codes
!     C_SONDE_NAME                   C      LIST OF SONDE names
!     R_SONDE_LEV                    R      LIST OF PRESSURE LEVEL
!     R_REF_SONDE_LEV                R      LIST OF REFERENCE SONDE PRESSURE LEVEL
!     T_SONDE_COR_vs_all_mean        R      LIST OF SONDE T BIAS CORRs VS all_mean
!     T_SONDE_COR_vs_day_mean        R      LIST OF SONDE T BIAS CORRs VS day_mean
!     T_SONDE_COR_vs_night_mean      R      LIST OF SONDE T BIAS CORRs VS night_mean
!     T_REF_SONDE_COR_vs_all_mean    R      LIST OF SONDE T BIAS CORRs VS all_mean
!     T_REF_SONDE_COR_vs_day_mean    R      LIST OF SONDE T BIAS CORRs VS day_mean
!     T_REF_SONDE_COR_vs_night_mean  R      LIST OF SONDE T BIAS CORRs VS night_mean
!     RH_REF_SONDE_COR_vs_all_mean   R      LIST OF SONDE RH BIAS CORRs VS all_mean
!     RH_REF_SONDE_COR_vs_day_mean   R      LIST OF SONDE RH BIAS CORRs VS day_mean
!     RH_REF_SONDE_COR_vs_night_mean R      LIST OF SONDE RH BIAS CORRs VS night_mean
!     NO_TRH_BIAS_SONDES             I      NO OF sondes

!     NO_TRH_BIAS_LEVELS             I      NO OF PRESSURE LEVELS 
!     NO_TRH_BIAS_CORRS              I      NO OF BIAS CORRECTIONS
!     ------------------------------------------------------------------

CHARACTER(LEN=64 ) , ALLOCATABLE :: C_COUNTRY_NAME                (:    )
CHARACTER(LEN=8  ) , ALLOCATABLE :: C_STID_FROM                   (:    )
CHARACTER(LEN=8  ) , ALLOCATABLE :: C_STID_TO                     (:    )
INTEGER(KIND=JPIM) , ALLOCATABLE :: M_COUNTRY_SQN                 (:    )
INTEGER(KIND=JPIM) , ALLOCATABLE :: M_STID_FROM                   (:    )
INTEGER(KIND=JPIM) , ALLOCATABLE :: M_STID_TO                     (:    )
INTEGER(KIND=JPIM) , ALLOCATABLE :: M_LAT_FROM                    (:    )
INTEGER(KIND=JPIM) , ALLOCATABLE :: M_LAT_TO                      (:    )
INTEGER(KIND=JPIM) , ALLOCATABLE :: M_LON_FROM                    (:    )
INTEGER(KIND=JPIM) , ALLOCATABLE :: M_LON_TO                      (:    )
INTEGER(KIND=JPIM) , ALLOCATABLE :: M_COUNTRY_P                   (:    )
REAL(KIND=JPRB)    , ALLOCATABLE :: R_COUNTRY_LEV                 (:,:  )
!REAL(KIND=JPRB)    , ALLOCATABLE :: R_COUNTRY_COR                 (:,:,:)
REAL(KIND=JPRB)    , ALLOCATABLE :: T_COUNTRY_COR_vs_all_mean     (:,:,:)
REAL(KIND=JPRB)    , ALLOCATABLE :: T_COUNTRY_COR_vs_day_mean     (:,:,:)
REAL(KIND=JPRB)    , ALLOCATABLE :: T_COUNTRY_COR_vs_night_mean   (:,:,:)
REAL(KIND=JPRB)    , ALLOCATABLE :: RH_COUNTRY_COR_vs_all_mean    (:,:,:)
REAL(KIND=JPRB)    , ALLOCATABLE :: RH_COUNTRY_COR_vs_day_mean    (:,:,:)
REAL(KIND=JPRB)    , ALLOCATABLE :: RH_COUNTRY_COR_vs_night_mean  (:,:,:)
INTEGER(KIND=JPIM)               :: NO_TRH_BIAS_COUNTRIES

CHARACTER(LEN=64 ) , ALLOCATABLE :: C_SONDE_NAME                  (:    )
INTEGER(KIND=JPIM) , ALLOCATABLE :: M_SONDE_SQN                   (:    )
INTEGER(KIND=JPIM) , ALLOCATABLE :: M_SONDE_CODE                  (:    )
REAL(KIND=JPRB)    , ALLOCATABLE :: R_SONDE_LEV                   (:,:  )
REAL(KIND=JPRB)    , ALLOCATABLE :: R_REF_SONDE_LEV               (  :  )
REAL(KIND=JPRB)    , ALLOCATABLE :: T_SONDE_COR_vs_all_mean       (:,:,:)
REAL(KIND=JPRB)    , ALLOCATABLE :: T_SONDE_COR_vs_day_mean       (:,:,:)
REAL(KIND=JPRB)    , ALLOCATABLE :: T_SONDE_COR_vs_night_mean     (:,:,:)
REAL(KIND=JPRB)    , ALLOCATABLE :: T_REF_SONDE_COR_vs_all_mean   (:,:  )
REAL(KIND=JPRB)    , ALLOCATABLE :: T_REF_SONDE_COR_vs_day_mean   (:,:  )
REAL(KIND=JPRB)    , ALLOCATABLE :: T_REF_SONDE_COR_vs_night_mean (:,:  )
REAL(KIND=JPRB)    , ALLOCATABLE :: RH_SONDE_COR_vs_all_mean      (:,:,:)
REAL(KIND=JPRB)    , ALLOCATABLE :: RH_SONDE_COR_vs_day_mean      (:,:,:)
REAL(KIND=JPRB)    , ALLOCATABLE :: RH_SONDE_COR_vs_night_mean    (:,:,:)
REAL(KIND=JPRB)    , ALLOCATABLE :: RH_REF_SONDE_COR_vs_all_mean  (:,:  )
REAL(KIND=JPRB)    , ALLOCATABLE :: RH_REF_SONDE_COR_vs_day_mean  (:,:  )
REAL(KIND=JPRB)    , ALLOCATABLE :: RH_REF_SONDE_COR_vs_night_mean(:,:  )
INTEGER(KIND=JPIM)               :: NO_TRH_BIAS_SONDES

INTEGER(KIND=JPIM)               :: NO_TRH_BIAS_LEVELS, NO_TRH_BIAS_CORRS

!     ------------------------------------------------------------------

END MODULE YOMRSTRHBIAS
