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

"Variable not found" error when loading original Trace21ka data files #70

Open
dinilu opened this issue Aug 7, 2020 · 1 comment
Open

Comments

@dinilu
Copy link

dinilu commented Aug 7, 2020

Hello!
I am trying to use loadeR to import original files from the Trace21ka experiment. I can import files from the most recent time periods (e.g. trace.36.400BP-1990CE.cam2.h0.TSMN.2160101-2204012.nc), but any other file for the same variable but different time period (e.g. trace.01.22000-20001BP.cam2.h0.TSMN.0000101-0200012.nc) fails with the following message:

di <- dataInventory("../Data/Trace21ka/TSMN/trace.01.22000-20001BP.cam2.h0.TSMN.0000101-0200012.nc")
[2020-08-07 17:54:12] Doing inventory ...
Error: No variables found
tsmx <- loadGridData(dataset = "../Data/Trace21ka/TSMX/trace.01.22000-20001BP.cam2.h0.TSMX.0000101-0200012.nc", var = "TSMX", lonLim = lon, latLim = lat, dictionary = FALSE)
Error: Variable requested not found
Check 'dataInventory' output and/or dictionary 'identifier'.

I have manually checked and compared both files and they look quite the similar but the units of the time dimension. The most recent periods (and working file) is "days since 0001-01-01 00:00:00" while the other files is "ka BP". Is there anything I am missing in order to load those files? Is this a known issue?

All the best and thank you for the helpfull packages of climate4R framework.
Diego

@dinilu
Copy link
Author

dinilu commented Sep 3, 2020

Looking into this issue, it seems to me that loadeR is using a date format that doesn't allow to specify dates before year 0. I think this might be causing the issue since invalid date formats seems to results in a vector of NAs.

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

1 participant