Skip to content

Commit

Permalink
BCReader: type safety and avoid abstarct type in struct
Browse files Browse the repository at this point in the history
  • Loading branch information
valeriabarra committed Feb 7, 2023
1 parent f2ccb4a commit 1ec2ba5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/BCReader.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Stores information specific to each boundary condition from a file and each vari
- segment_length::Vector{Int} # length of each month segment (used in the daily interpolation)
- interpolate_daily::Bool # switch to trigger daily interpolation
"""
struct BCFileInfo{FT <: Real, B, X, S, V, D, C, O, M}
struct BCFileInfo{FT <: Real, B, X, S, V, D, C, O, M, VI}
bcfile_dir::B
comms_ctx::X
hd_outfile_root::S
Expand All @@ -45,13 +45,13 @@ struct BCFileInfo{FT <: Real, B, X, S, V, D, C, O, M}
monthly_fields::C
scaling_function::O
land_mask::M
segment_idx::Vector{Int}
segment_idx0::Vector{Int}
segment_length::Vector{Int}
segment_idx::VI
segment_idx0::VI
segment_length::VI
interpolate_daily::Bool
end

BCFileInfo{FT}(args...) where {FT} = BCFileInfo{FT, typeof.(args[1:8])...}(args...)
BCFileInfo{FT}(args...) where {FT} = BCFileInfo{FT, typeof.(args[1:9])...}(args...)

float_type_bcf(::BCFileInfo{FT}) where {FT} = FT

Expand Down

0 comments on commit 1ec2ba5

Please sign in to comment.