PROGRAM read_nc
USE netcdf
integer,parameter :: nlon=559 ,nlat=409, ntime=365
integer :: ncid2,jj!,iy
real :: temp(nlon,nlat,27)
real :: xlon(nlon),xlat(nlat)
character(len=200) :: path,file2
character(LEN=50) :: dim1,dim2,dim3,num2
INteger(kind=4),dimension(nf90_max_var_dims) :: dimids
integer(kind=4) :: N1,N2,N3,iy,i,j,k
character ye*4
!
file2="wrfinput_d01_2019070100"
write(*,*) 'file2',file2
ierr1=nf90_open(trim(file2),nf90_nowrite,ncid2)
ierr2=nf90_inq_varid(ncid2, 'T', varid)
ierr3=nf90_get_var(ncid2,varid,temp)
write(*,*) ierr1,ierr2,ierr3
write(*,*) "check temp daata"
write(*,*) temp(1:10,1:10,1)
!
ierr4=nf90_inq_varid(ncid2, 'XLONG', varid)
ierr5=nf90_get_var(ncid2,varid,xlon,start=(/1,1,1/),count=(/nlon,nlat/))
write(*,*) ierr4,ierr5
end