metno / esd

An R-package designed for climate and weather data analysis, empirical-statistical downscaling, and visualisation.
88 stars 30 forks source link

Blended ECA&D data? #244

Closed cortinah closed 5 years ago

cortinah commented 5 years ago

Currently esd uses ECA&D non-blended datasets. These datasets may have missing values or be out of date. The blended datasets incorporate additional data to fill-in missing values. Would it be possible to have an option in select.station() to use the blended data? thank you very much!

brasmus commented 5 years ago

Hi. It's possible to do that manually by downloading the blended data (for now), but we'll keep your suggestion in mind.

cortinah commented 5 years ago

Thank you for putting together this powerful package. Hope to make good use of it. I think incorporating the blended data manually is a bit harder that it may appear at first glance. Beside changing all url and path references to blend from nonblend, the blended files seem to have slightly different station ID codes? STAID vs SOUID? and the read.table file needs to be changed to skip=20 from 18. that said, I haven't yet got it to work properly. Am i missing any additional changes? thanks!

abdelkaderm commented 5 years ago

Hi there,

I think that there is much to do for incorporating blended data as the meta data file used by select.station() function for ECAD blended might be inappropriate.

Abdelkader

brasmus commented 5 years ago

The following code will convert ECA&D data to netCDF files

#/bin/bash
cat > Rjob.R << EOF
library(esd)
## The following are old element codes thatesd has inherited:
eles <- c(101,121,111,601,301,401,501,502,503,801,901)
print(eles)
demo(ecad2nc4,ask=FALSE)
EOF

R CMD BATCH Rjob.R