Use Netcdf
Real, Allocatable :: Xlon(:), Xlat(:), XTime(:), T2m(:,:,:)
Integer :: Nst, Ntime, ist, it
Real, Allocatable :: DatBL(:,:)

Call Read_data_netcdf

CONTAINS
!------------------------------------------------------------------------------
Subroutine Read_data_netcdf
Character (Len=255) :: FileName, VarName
!Real, Allocatable :: Xlon(:), Xlat(:), XTime(:) !, X(:,:,:)
!Real, Allocatable :: XTime(:), X(:,:,:)
Integer :: Nlon, Nlat, Nt, i, j, ist, it

  FileName="../../OBS_Stn/Daily/NC/T2m.nc"
  VarName ="T2m"
  Call rd_ncdf_3d (trim(FileName),Xlon,Xlat,XTime, Nlon, Nlat, Nt, T2m, trim(VarName))
  Nst = Nlon; Ntime = Nt
  Allocate (DatBL(Ntime,Nst))
!  XXLon(:) = Xlon(:); XXLat(:) = Xlat(:)

  print*,"In Read_data_netcdf: Nlon, Nlat, Nt=", Nlon1, Nlat1, Nt
  print*,Xlon, Xlat
!  Where (Precip < 0) Precip = amssng;
  Do ist=1, Nst
     Do it=1, Ntime
        DatBL(it,ist) = T2m(ist,ist,it)
     Enddo
     print*,"Stn:", ist, "Lon, Lat:",Xlon(ist),Xlat(ist)
     print "(20F5.1)", (DatBL(it,ist), it=1,40)
     pause
  Enddo
End Subroutine Read_data_netcdf
!------------------------------------------------------------------------------
Include "../Libs/sub_wr_ncdf.F90"
Include "../Libs/sub_rd_ncdf.F90"

END
