Skip to content

Commit

Permalink
improve get_model
Browse files Browse the repository at this point in the history
  • Loading branch information
kongdd committed Oct 6, 2023
1 parent 3f2baa4 commit 6ccd243
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CMIP/CMIPFiles_info.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ filter_model(d::AbstractDataFrame, models::Regex) = d[grepl(d.model, models), :]


"""
get_model(file; prefix = "day_", postfix = "_hist|_ssp|_piControl")
get_model(file; prefix = "day_|mon_|year_", postfix = "_hist|_ssp|_piControl")
"""
function get_model(file, prefix="day_", postfix="_hist|_ssp|_piControl")
function get_model(file, prefix="day_|mon_|year_", postfix="_hist|_ssp|_piControl")
str_extract(basename(file), "(?<=$prefix).*(?=$postfix)") #|> String
end

Expand Down

0 comments on commit 6ccd243

Please sign in to comment.