In SEAMORE, the class FesomOutputDir finds eligible FESOM files that match a name pattern specified in the ENV and a time period (https://github.com/FESOM/seamore/blob/main/lib/fesom_output_dir.rb). This class name is misleading, it's more about finding out eligible input files for SEAMORE, and less about the FESOM's output structure.
The following features might be or not necessary (to be decided as we develop it):
Requires that the files are all labelled with year, month and day together with the variable_id. I am not sure that this needs to be a limitation, because the dates should also be defined within the file. Only some of those labels might be required depending of the frequency of the output.
Raises an error if all these are not defined in the pattern
In SEAMORE, the class
FesomOutputDir
finds eligible FESOM files that match a name pattern specified in theENV
and a time period (https://github.com/FESOM/seamore/blob/main/lib/fesom_output_dir.rb). This class name is misleading, it's more about finding out eligible input files for SEAMORE, and less about the FESOM's output structure.The following features might be or not necessary (to be decided as we develop it):
PATTERN_ENV_KEY
needs to be defined in the input yaml file (https://github.com/FESOM/seamore/blob/7725366f7b68ea3824ac6baa500ea49531722b72/lib/fesom_output_dir.rb#L4-L19).year
,month
andday
together with thevariable_id
. I am not sure that this needs to be a limitation, because the dates should also be defined within the file. Only some of those labels might be required depending of the frequency of the output.PATTERN_ENV_KEY
in the given directory (https://github.com/FESOM/seamore/blob/7725366f7b68ea3824ac6baa500ea49531722b72/lib/fesom_output_dir.rb#L24-L27) and that match thefirst_year
andlast_year
are defined find the files that match those dates (https://github.com/FESOM/seamore/blob/7725366f7b68ea3824ac6baa500ea49531722b72/lib/fesom_output_dir.rb#L36-L45). We probably want to generalize this a bit more so that users can specify also the months and days. Instead, I suggest to usefirst_date
andlast_date
or something similar.to_s
method puts all eligible files into a string (https://github.com/FESOM/seamore/blob/7725366f7b68ea3824ac6baa500ea49531722b72/lib/fesom_output_dir.rb#L52-L54)