Code Monkey home page Code Monkey logo

rainlink's People

Contributors

claudiabrauer avatar gayansandaruwan avatar overeem11 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

rainlink's Issues

projstring causes error in spTransform()

It seems that with the new versions of proj4 (>=6) and gdal (>=3) there are more strict requirements for proj4 strings. In four files an Azimuthal Equidistant projection is defined as:

projstring <- paste("+proj=aeqd +a=6378.137 +b=6356.752 +R_A +lat_0=",YMiddle,
    " +lon_0=",XMiddle," +x_0=0 +y_0=0",sep="") 

This caused errors for me with R version 4.0.3 and these versions of GDAL and PROJ:

> library(rgdal)
rgdal: version: 1.5-18, (SVN revision 1082)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 3.1.4, released 2020/10/20
Path to GDAL shared files: /usr/share/gdal
GDAL binary built with GEOS: TRUE 
Loaded PROJ runtime: Rel. 7.2.0, November 1st, 2020, [PJ_VERSION: 720]

I edited the projstring in four files - Interpolation, ReadRainLocation, Topology and WetDryNearby..., as follows and then the various RAINLINK functions ran successfully:

projstring <- paste("+proj=aeqd +R_A +lat_0=", YMiddle,
                      " +lon_0=", XMiddle,
                      " +x_0=0 +y_0=0 +ellps=WGS84",sep="")

The "+ellips" phrase is now required, and then the "+a" and "+b" phrases are redundant (implicit in the ellipsoid)

I can suggest a PR for this small correction.

Regards, Micha

warn.conflicts in attach() call

Hi Aart,

I get numerous warning messages about the object masking done by the 'attach()' function every loop of the interpolation process. It is about 72k rows for the data of the sample, which make the output reading uncomfortable. I also understand that the masking is not an issue but instead makes the code work properly.

So, can I suggest to add the "warn.conflicts = FALSE" option to the attach() function in the Interpolation.R file? It will completely suppress the warnings without altering the program.

if (Variogram=="ClimVar"){
ParamVarModel <- ClimVarParam(DateStr = as.character(t[i]), TimeScaleHours = dt / 3600)
attach(ParamVarModel, warn.conflicts = FALSE)
Method <- "# Ordinary kriging interpolation. Climatological sill, range, and nugget."
}

I already tried that myself and it works correctly, as you can see in the enclosed output file.

Run.Rout2.txt

Regards

Giacomo Roversi
Ferrara, Italy

warning message in dir.create( ): folder already exists

In case of multiple runs of the code, the program tries to create already existing folders.
To prevent this from happening, I suggest to replace

dir.create("FolderName")

with

if(!dir.exists("FolderName")){ dir.create("FolderName") }

I've tried it in all the functions and it works correctly.

Error During WET dry classification for new data

I encountered the following error while trying to run the data from a region in my country. PreprocessingMinMaxRSL successfully completes and the WetDryNearbyLinkApMinMaxRSL gives the following error.Error in $<-.data.frame(tmp, "ID", value = character(0)) : replacement has 0 rows, data has 317626 .
Any help would be a lot.

invalid subscript type 'list'

Hi,
I tried to run the RAINLINK package launching the 'Run.R' script after reading the Manual files and the Overeem et al. 2016 article. The program execution halts during the 'RainMapsRadarsTimeStep' function with the error message that follows:
Error in ScaleLow[p] : invalid subscript type 'list' Calls: RainMapsRadarsTimeStep ... by_layer -> f -> <Anonymous> -> f -> lapply -> FUN -> eval
The corresponding figure is blank.
I tried too look at the code for some debugging but I am not R expert.

That's the output from R CMD BATCH Run.R (I added the .txt extension for the upload)

Run.Rout.txt

Thanks
Giacomo Roversi

Ambiguous function name: Polygons

The same function name 'Polygons' appears both in the RAINLINK package and in the 'sp' package, which is required from the RAINLINK package itself. Different installation orders lead to wrong function calls. However there is no need to rename the function. It will be sufficient to specify to what package the wanted function belongs, which means that every function call of the form
dataf <- Polygons(cond=cond, Selected=Selected)
should become
dataf <- RAINLINK::Polygons(cond=cond, Selected=Selected)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.