Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Timeseries Reshaping mode, aka Splitting:

As ncclimo will reshape a series of input files into outputs that are continuous timeseries of each variable taken from all input files. Timeseries to be reshaped (split) often come with hard-to-predict names, e.g., because the number of days or months in a file, or timesteps per day or month may all vary. Thus ncclimo in splitter mode requires the user to supply the input filenames. ncclimo will not construct input filenames itself in splitter mode (unlike monthly or annual climo generation mode). ncclimo will, as of version 4.6.4, ncclimo will automatically  automatically switch to timeseries reshaping mode if it receives a list of files through a pipe to stdin, or, alternatively, placed as positional arguments (after the last command-line option), or if neither of these is done and no caseid is specified, in which case it assumes all *.nc files in drc_in constitute the input file list. These examples invoke reshaping mode in the four possible ways (choose your poison):

...

# Read list from file
ls $drc_in/*cam.h0.0[012]??* > input_list
ncclimo --dbg=0 --yr_srt=1 --yr_end=250 --var=FSNT,AODVIS --map=${map_fl} --drc_out=$drc_out < input_list
# Pipe list to stdin
cd $drc_in
ls *cam.h0.0[012]??* | ncclimo --dbg=0 --yr_srt=1 --yr_end=250 --var=FSNT,AODVIS --map=${map_fl} --drc_out=$drc_out
# List as positional arguments
ncclimo --var=FSNT,AODVIS --yr_srt=1 --yr_end=250 --drc_out=$drc_out $drc_in/*mdl*000[1-9]*.nc
# Read directory
ncclimo --var=T,Q,RH --yr_srt=1 --yr_end=250 --drc_in=$drc_in --drc_out=$drc_out

Assuming each input file is a monthly average comprising the variables T, Q, and RH, then the output will be FSNT_000101_000912.nc and AODVIS_000101_000912.ncncclimo reshapes the input so that the outputs are continuous timeseries of each variable taken from all input files.  When When necessary, the output is split into segments each containing no more than ypf_max (default 50) years-per-file, ie.eg., FSNT_000101_005012.nc, FSNT_005101_009912.nc, FSNT_010001_014912.nc, etc. Change the maximum number of years-per-output-file with the --ypf_max=ypf_max option. The remainder of this documentation refers to climatology-generation mode.

...