Code Monkey home page Code Monkey logo

Comments (11)

lodhajyoti avatar lodhajyoti commented on August 23, 2024

Hi
Link for the sample data file "https://drive.google.com/open?id=1H3tfZFhMfRoiJy63oZiBPK7W_es-54sr"

from hyfo.

Yuanchao-Xu avatar Yuanchao-Xu commented on August 23, 2024

@lodhajyoti

Hi, by using getNcdVar, you will obtain 3 variable names, of which I think you need the "tasmax". Use "tasmax" instead of varname when loadNcdf, since varname is not a string but a vector.

from hyfo.

lodhajyoti avatar lodhajyoti commented on August 23, 2024

Hi
Thanks it solved my issue.I have three issue which as follows
1)How I can change the units in writeNcdf function as it is only for time units, how to give units like K for (kelvin) or C (Celsius) in our data sets.
2) How to set missing values as NA as it is taking NAN in the data sets?
3) Which is the best method for Temperature? As currently I am using qunatile mapping EQM , Is it correct ?.
Wait for a positive reply.

from hyfo.

Yuanchao-Xu avatar Yuanchao-Xu commented on August 23, 2024

@lodhajyoti

Hi,
for Q1 and Q2, it's about dataframe in R, and can be simply achieved by adding one columns in R, or replacing values in R. By googling it, I think you can find a better solution.

For Q3, please type in ?biasCorrect in R and check the documentation about different bias correction method.

from hyfo.

Mulugetat avatar Mulugetat commented on August 23, 2024

I can install getNcdfVar. I get the following message:
install.packages("getNcdfVar")
Installing package into ‘C:/Users/pc/Documents/R/win-library/4.1’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘getNcdfVar’ is not available for this version of R

A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
What can you please help me?

from hyfo.

Yuanchao-Xu avatar Yuanchao-Xu commented on August 23, 2024

Hi @Mulugetat, I've no idea of the package "getNcdfVar", maybe you can try to contact the author of that package?

from hyfo.

Mulugetat avatar Mulugetat commented on August 23, 2024

Thanks, Dear @Yuanchao-Xu. I went to the installation of this package after trying to read the variable name from NC climate data file this way:
> varname <- getNcdfVar(filePath)
but I'm getting this error:
Error in getNcdfVar(filePath) : could not find function "getNcdfVar"
My basic problem is this.

from hyfo.

Yuanchao-Xu avatar Yuanchao-Xu commented on August 23, 2024

Hi @Mulugetat try library(hyfo) first, then run the code above.

from hyfo.

Mulugetat avatar Mulugetat commented on August 23, 2024

Thanks, @Yuanchao-Xu.
It worked for me after loading the following 3 packages: library(hyfo), library(ncdf4) and library(R.utils)..

from hyfo.

Mulugetat avatar Mulugetat commented on August 23, 2024

I am planning to use hyfo for CMIP6 data in ncdf format. I followed the following steps as per the hyfo downscaling example:

library(hyfo)
library(ncdf4)
library(R.utils)
filePath <- system.file("extdata", "D:/CMIP6/Copernicus_EU/Precipitation/Historical/NC files/pr.nc", package = "hyfo")

but I'm getting the following error message for

varname <- getNcdfVar(filePath)
Error in nc_open(filePath) :
Passed a filename that is NOT a string of characters!

Would please help me in spotting the possible source of this error?

Thanks,

from hyfo.

Yuanchao-Xu avatar Yuanchao-Xu commented on August 23, 2024

@Mulugetat please follow instructions by ??getNcdfVar.
image
then print out the filePath, and compare it with yours.
That may give you some idea.

from hyfo.

Related Issues (11)

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.