grid need to be specified when loading data
Hi, Omar and me met a problem when loading simulation with the Load function without providing the grid in the arguments. We advise everybody to indicate the grid that you need when loading data, to avoid any possible errors. Here is an example of the problem:
lonmin <- 270; lonmax <- 60; latmin <- 20; latmax <- 90
sdates_new <- paste(seq(as.Date("1993/11/01"),as.Date("1994/11/01"), "years"),sep="-")
sdates_ok <- gsub("-","",sdates_new)
var='tas'
Data_tas1=Load(var,c("m04o"),obs=c("ERAint"),sdates=sdates_ok,output="lonlat",storefreq = "monthly",nleadtime=4,leadtimemin=1,leadtimemax=4,lonmin=lonmin,lonmax=lonmax,latmin=latmin,latmax=latmax)
Data_tas2=Load(var,c("m04o"),obs=c("ERAint"),sdates=sdates_ok,output="lonlat",storefreq = "monthly",nleadtime=4,leadtimemin=1,leadtimemax=4,lonmin=lonmin,lonmax=lonmax,latmin=latmin,latmax=latmax,grid='r512x256')
Data_tas3=Load(var,c("m04o"),obs=c("ERAint"),sdates=sdates_ok,output="lonlat",storefreq = "monthly",nleadtime=4,leadtimemin=1,leadtimemax=4,lonmin=lonmin,lonmax=lonmax,latmin=latmin,latmax=latmax,grid='t255grid')
Data_tas4=Load(var,c("m04o"),obs=c("ERAint"),sdates=sdates_ok,output="lonlat",storefreq = "monthly",nleadtime=4,leadtimemin=1,leadtimemax=4,lonmin=lonmin,lonmax=lonmax,latmin=latmin,latmax=latmax,grid='t106grid')
In the first case (Data_tas1), you will get bugged data: /cfunas/scratch/mmenegoz/ENSO-NAO/test_grids/temperature_loaded_without_grid.ps Data_tas2 is OK: /cfunas/scratch/mmenegoz/ENSO-NAO/test_grids/temperature_loaded_grid_r512x256.ps
Note that Data_tas3 provide data different from Data_tas2. It is normal, since the grids r512x256 and t255grid are different (the first one is defined as regular grid, whereas the second one is a spectral grid). However, I was not expecting so strong differences in the resolutions of these grids. Finally, Data_tas4 is the data get with the default grid (t106grid) appearing in the IC3.conf file. Anyway, Load should provide data with the grid of the first experiment (as indicated in the documentation), but it appears that the grid need to be provided in the arguments when using the current version of Load to avoid any errors. Before arranging this problem, we could specify in the documentation that the grid is a mandatory argument of the Load function.
One can find a script testing the use of Load with different grids, including maps illustrating the problem: /cfunas/scratch/mmenegoz/ENSO-NAO/test_grids/test_exp.R
Cheers,
Omar and Martin