0

I have the binary file and its control file is provided in figure Control File. I want to extract the rain with latitude and longitude as raster in r. Can anybody help?

    library(weathercan)
    library(rNOMADS)
    library(rgdal)
    library(raster)
    library(ncdf4)
    library(fields)
    library(sp)
    library(sf)
    library(gdalUtilities)
    library(rgdal)      
    library(tiff)
    library(ncdf4)
    library(gdalUtils)
    library(maps)
    library(maptools)
    library(ncdf.tools)
    library(ncdfgeom)
    library(rgl)
    library(rlas)
    library(AnnotationDbi)
    library(SDMTools)

    zz <- file("C:/Users/Administrator/Desktop/PRCP_CU_GAUGE_V1.0GLB_0.50deg.lnx.20090101.RT", "rb")
    zz
    summary(zz)

The output is given as

zz <-file("C:/Users/Administrator/Desktop/PRCP_CU_GAUGE_V1.0GLB_0.50deg.lnx.20090101", "rb")
zz
A connection with                                                                                       
description "C:/Users/Administrator/Desktop/PRCP_CU_GAUGE_V1.0GLB_0.50deg.lnx.20090101"
class       "file"                                                                     
mode        "rb"                                                                       
text        "binary"                                                                   
opened      "opened"                                                                   
can read    "yes"                                                                      
can write   "no"                                                                       
4redwood
  • 365
  • 2
  • 13

1 Answers1

0

Use gdal. There is a wrapper recently published https://cran.r-project.org/web/packages/gdalUtils/gdalUtils.pdf

dl.meteo
  • 1,658
  • 15
  • 25