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

combine: combining more than two dataset (3,4,....n-data) prior to estimating EOF #274

Open
Mohsen-cph opened this issue Oct 2, 2023 · 2 comments

Comments

@Mohsen-cph
Copy link

Mohsen-cph commented Oct 2, 2023

Hi,

I'm using esd package to perform CommonEOFs for multiple soil moisture SM datasets from different sources. The goal is to compare different SM grid datasets in terms of variability in space and time.

For combining two dataset, it is working (i.e., it takes the anomalies and regrid the second data to the first one). However, I would like to combine >2 datasets; but the following ''combine function'' only takes the first two datasets into account, and ignores the rest of the input data, for example:

SM_combined <- combine(SM_ERA5L,SM_CFSNCEP, SM_ESACCI, SM_EnsembleMean)
ceof <- EOF(SM_combined)
plot(ceof)

Any suggestions please?

@brasmus
Copy link
Collaborator

brasmus commented Oct 6, 2023

Hi. I see that your netCDF-file is written in a way that may cause problems:

netcdf SWE_ERA5L_168TimeSteps_2000_2020_MackenzieBasin_ShapefileClipped {
dimensions:
	time = UNLIMITED ; // (168 currently)
	longitude = 371 ;
	latitude = 211 ;
variables:
	double time(time) ;
		time:standard_name = "time" ;
		time:units = "day as %Y%m%d.%f" ;
		time:calendar = "proleptic_gregorian" ;
		time:axis = "T" ;
	double longitude(longitude) ;
		longitude:standard_name = "longitude" ;
		longitude:long_name = "longitude" ;
		longitude:units = "degrees_east" ;
		longitude:axis = "X" ;
	double latitude(latitude) ;
		latitude:standard_name = "latitude" ;
		latitude:long_name = "latitude" ;
		latitude:units = "degrees_north" ;
		latitude:axis = "Y" ;

@brasmus
Copy link
Collaborator

brasmus commented Oct 6, 2023

It's better to use time units such as hours/days/months/years since a date:

netcdf ERA5_tp_mon_2022 {
dimensions:
	longitude = 1440 ;
	latitude = 721 ;
	time = 12 ;
variables:
	float longitude(longitude) ;
		longitude:units = "degrees_east" ;
		longitude:long_name = "longitude" ;
	float latitude(latitude) ;
		latitude:units = "degrees_north" ;
		latitude:long_name = "latitude" ;
	int time(time) ;
		time:units = "hours since 1900-01-01 00:00:00.0" ;
		time:long_name = "time" ;
		time:calendar = "gregorian" ;
	short tp(time, latitude, longitude) ;
		tp:scale_factor = 1.68157988508652e-06 ;
		tp:add_offset = 0.055098646514745 ;
		tp:_FillValue = -32767s ;
		tp:missing_value = -32767s ;
		tp:units = "m" ;
		tp:long_name = "Total precipitation" ;

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