PROGRAM FIND_POINTS
USE NETCDF
USE GET_POINTS_MOD
IMPLICIT NONE

INTEGER :: NP_TOT,NPOINTS
INTEGER     ,DIMENSION(:),ALLOCATABLE :: POINTS 
CHARACTER(LEN=500) :: INFO_FILE,NAM_FILE
INTEGER :: NP_LAND_OUT,NP_LAKE_OUT,NP_LAKE_FRAC_OUT,NP_OCEAN_OUT

NAMELIST /NAMFP/INFO_FILE

NAM_FILE='input.nam'

OPEN(99,FILE=TRIM(NAM_FILE),STATUS='old')
READ(99,NAMFP)
CLOSE(99)


CALL GET_POINTS(TRIM(INFO_FILE),TRIM(NAM_FILE),NP_TOT,NPOINTS,POINTS,&
              & NP_LAND_OUT,NP_LAKE_OUT,NP_LAKE_FRAC_OUT,NP_OCEAN_OUT)
	    
! PRINT*,'NP_TOT',NP_TOT
PRINT*,NPOINTS
! PRINT*,'NP_LAND',NP_LAND_OUT
! PRINT*,'NP_LAKE',NP_LAKE_OUT
! PRINT*,'NP_LAKE_FRAC',NP_LAKE_FRAC_OUT
! PRINT*,'NP_OCEAN',NP_OCEAN_OUT

END PROGRAM FIND_POINTS






