Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LoadGridData generate NaN data as results #56

Open
Lover221 opened this issue May 3, 2019 · 1 comment
Open

LoadGridData generate NaN data as results #56

Lover221 opened this issue May 3, 2019 · 1 comment

Comments

@Lover221
Copy link

Lover221 commented May 3, 2019

Hi everyone,
I am having an issue in LoadGridData using isimip precipitation code, because it is only generate NaN while data are correct (see data in attached).
I have reviewed all data that I used but still the same error appear.
Is there any way to train the model leaving aside the NaN? Because I tried adding na.rm = T, na.exclude, na.omit but it is not included in the LoadGridData function.
The netcdf file is heavy, so I have attached the text file from the original netcdf (MAM_era_DOM_rain_1980-2005.txt)
Here my example:
#load observation
obs<-"/pd/data/wascal_cclm/BIAS_CORRECTION2019/cdo/MAM_era_DOM_rain_1980-2005.nc"
obs_pr <- loadGridData(obs, var = "pr", lonLim = NULL, latLim =NULL,season =3:5, years = 1980:1981)
obs_pr$Variable$varName <- "precipitation"
obs_pr <- setGridUnits(obs_pr, unit.string = "mm", var = "pr")
**str(obs_pr)
List of 4
$ Variable:List of 2
..$ varName: chr "precipitation"
..$ level : NULL
..- attr(, "use_dictionary")= logi FALSE
..- attr(
, "description")= chr "total_precipitation"
..- attr(, "units")= chr "mm"
..- attr(
, "longname")= chr "pr"
..- attr(, "daily_agg_cellfun")= chr "none"
..- attr(
, "monthly_agg_cellfun")= chr "none"
..- attr(, "verification_time")= chr "none"
$ Data : num [1:184, 1:168, 1:439] NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN ...
..- attr(
, "dimensions")= chr [1:3] "time" "lat" "lon"
$ xyCoords:List of 2
..$ x: num [1:439] -18.9 -18.8 -18.6 -18.5 -18.5 ...
..$ y: num [1:168] 0.15 0.25 0.35 0.45 0.55 ...
..- attr(, "projection")= chr "LatLonProjection"
..- attr(
, "resX")= num 0.1
..- attr(*, "resY")= num 0.1
$ Dates :List of 2
..$ start: chr [1:184] "1980-03-01 00:00:00 GMT" "1980-03-02 00:00:00 GMT" "1980-03-03 00:00:00 GMT" "1980-03-04 00:00:00 GMT" ...
..$ end : chr [1:184] "1980-03-01 00:00:00 GMT" "1980-03-02 00:00:00 GMT" "1980-03-03 00:00:00 GMT" "1980-03-04 00:00:00 GMT" ...

Would be cery happy if you can help!
Best
MAM_era_DOM_rain_1980-2005.txt

@louwangzhiyuwhy
Copy link

I meet the same problem did you solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants