

module met_data_module

   ! Derived types
   
   type met_data
      integer                       :: version
      !version == 3 => PREGRID
      !version == 4 => GRIB_PREP
      !version == 5 => WPS
      integer                       :: nx
      integer                       :: ny
      integer                       :: iproj
      !iproj == 0 => Cylindrical equidistant
                 ! startlat
                 ! startlon
                 ! deltalat
                 ! deltalon
      !iproj == 1 => Mercator
      !iproj == 3 => Lambert conformal
      !iproj == 4 => Gaussian 
                 ! startloc = 'CENTER' or 'SWCORNER'
                 ! startlat 
                 ! startlon 
                 ! deltalat 
                 ! deltalon 
                 ! earth_radius
      !iproj == 5 => Polar stereographic
      real                          :: xfcst
      real                          :: xlvl!
      !xlvl=200100.0                       => !10 meter, 2 meters, surface
      !xlvl=100000.0 Pa , ..... , 100.0 Pa => Isabaric levels
      real                          :: startlat
      real                          :: startlon
      real                          :: starti
      real                          :: startj
      real                          :: deltalat
      real                          :: deltalon
      real                          :: dx
      real                          :: dy
      real                          :: xlonc
      real                          :: centerlat
      real                          :: centerlon
      real                          :: pole_lat
      real                          :: pole_lon
      real                          :: truelat1
      real                          :: truelat2
      real                          :: earth_radius
      real, pointer, dimension(:,:) :: slab
      logical                       :: is_wind_grid_rel
      character (len=9)             :: field
      !        field            = TT           =surface 2m
      !        field            = UU           =surface 10m
      !        field            = VV           =surface 10m
      !        field            = RH           =surface 2m
 
      !        field            = PSFC
      !        field            = PMSL
      !        field            = SKINTEMP
      !        field            = SEAICE
      !        field            = SST
      !        field            = SNOW
      !        field            = SNOWH
 
      !        field            = ST000007
      !        field            = ST007028
      !        field            = ST028100 
      !        field            = ST100289
 
      !        field            = SM000007
      !        field            = SM007028
      !        field            = SM028100
      !        field            = SM100289
 
      !        field            = GHT            =isobaric levels
      !        field            = TT             =isobaric levels
      !        field            = UU             =isobaric levels
      !        field            = VV             =isobaric levels
      !        field            = RH             =isobaric levels

      !        field            = LANDSEA        = landsea mask 
      !        field            = SOILHGT        = source data topography 
      character (len=24)            :: hdate!
                                      !hdate='YYYY-MM-DD_HH:mm:ss'
      character (len=25)            :: units
           ! units            =K
           ! units            =m s-1
           ! units            =m s-1
           ! units            =%
 
           ! units            =Pa
           ! units            =Pa
           ! units            =K
           ! units            =fraction
           ! units            =K
           ! units            =kg m-2
           ! units            =m
 
           ! units            =K
           ! units            =K
           ! units            =K
           ! units            =K
 
           ! units            =m3 m-3
           ! units            =m3 m-3
           ! units            =m3 m-3
           ! units            =m3 m-3
 
           ! units            =m
           ! units            =K
           ! units            =m s-1
           ! units            =m s-1
           ! units            =%
 
           ! units            =0/1 Flag
           ! units            =m      
      character (len=32)            :: map_source
      !map_source ='ECMWF'              => ECMWF data
      !map_source ='NCEP GFS Analysis'  => NCEP  data
      character (len=46)            :: desc
   end type met_data

end module met_data_module
