Skip to content

Commit

Permalink
Bugfix for FieldArray with CartesianLinearGrid and no record dimension
Browse files Browse the repository at this point in the history
Typo in size expression resulted in an extra empty (),
causing eg netcdf output to fail for MITgcm config.
  • Loading branch information
sjdaines committed Jan 6, 2025
1 parent f1b1aa6 commit 836b403
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/FieldRecord.jl
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ Base.getindex(rv::FieldRecordValues{E, R, Nothing, 1, 1, false, false, N}, i, j)

Base.size(rv::FieldRecordValues{E, R, LI, NumSpatialDims, NumDataDims, false, false, N}) where {
E, R, LI, NumSpatialDims, NumDataDims, N,
} = (size(rv.linear_index)..., size(first(rv.records))[2:end])
} = (size(rv.linear_index)..., size(first(rv.records))[2:end]...)
function Base.getindex(rv::FieldRecordValues{E, R, LI, 2, 0, false, false, N}, i, j) where {E, R, LI, N}
linear_idx = rv.linear_index[i, j]
return ismissing(linear_idx) ? missing : rv.records[1][linear_idx]
Expand Down

0 comments on commit 836b403

Please sign in to comment.