Open dschlaep opened 7 years ago
Current behavior as of commit a25e1d5f1fbaf95bdedff8fa504486c04819e9a2:
The function get_GCMdata_netCDF
calls extract_variable_netCDF
with the argument
filepath = dots[["ncFiles"]][temp1][1]
This means that data from the alphabetically sorted first ensemble member
is extracted if multiple members' data are available, e.g.,
[1] "pr_Amon_CSIRO-Mk3L-1-2_historical_r1i1p1_185101-200012.nc" [2] "pr_Amon_CSIRO-Mk3L-1-2_historical_r1i2p1_185101-200512.nc" [3] "pr_Amon_CSIRO-Mk3L-1-2_historical_r2i2p1_185101-200512.nc" [4] "pr_Amon_CSIRO-Mk3L-1-2_historical_r3i2p1_185101-200512.nc"
The sorting is because of the command list.files
:
The files are sorted in alphabetical order, on the full path if full.names = TRUE.
This means also that if we had two files of the same ensemble member
but with different time periods, then the alphabetically first one would be selected -- even if it contains the shorter time period, e.g.,
[1] "pr_Amon_CSIRO-Mk3L-1-2_historical_r1i1p1_185101-200012.nc" [2] "pr_Amon_CSIRO-Mk3L-1-2_historical_r1i1p1_185101-200512.nc"
clarify what current code is doing when multiple data files (
ensemble members
, Taylor et al. 2012) for a model/scenario are availablenew code should handle with explicit user input:
guarantee that temporal splicing of historic and scenario data files occur for matching
ensemble member
outputTaylor KE, Balaji V, Hankin S, Juckes M, Lawrence B, Pascoe S (2012) CMIP5 Data Reference Syntax (DRS) and Controlled Vocabularies. Version 1.3.1 (13 June 2012).