SantanderMetGroup / loadeR

A climate4R package for data access
https://github.com/SantanderMetGroup/climate4R
GNU General Public License v3.0
13 stars 13 forks source link

Export grid data as csv #63

Open zepedromvramiao opened 4 years ago

zepedromvramiao commented 4 years ago

Dear all, Is it possible to export grid data (e.g. EOBS) as txt/ csv (weather station data format), considering the centroids of the grid cells? I could not find any function for that either in loadeR or transformeR Thanks in advance Best,

jbedia commented 4 years ago

Hi, There is not a specific function to do that. The internal helper function array3Dto2Dmat from package transformeR would help to do it easily, in combination with write.table or write.csv

I hope this helps

zepedromvramiao commented 4 years ago

Hi, Many thanks for your feedback I have the directory for the EOBS files and I load them using the loadGridData function I used the resulting file of the loadGridData to the array3DtoDmat but it mentioned " Undefined 'dimensions' attribute" (see in attach). array3Dto2Dmat Any help? Thanks again Best,

jbedia commented 4 years ago

The input must be an array Try array3Dto2Dmat(eobs.tx.load$Data)

zepedromvramiao commented 4 years ago

Many thanks, now it works fine climate4R is being really helpful for me Thanks Best,