Skip to content

Commit 307a801

Browse files
committed
no NetCDF.close anymore
1 parent d0c17da commit 307a801

File tree

3 files changed

+10
-18
lines changed

3 files changed

+10
-18
lines changed

src/DefaultParameters.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ Creates a Parameter struct with following options and default values
185185
186186
# SURFACE FORCING
187187
surface_forcing::Bool=false # yes?
188-
ωFη::Real=1.0 # (annual) frequency [1/year]
188+
ωFη::Real=1.0 # frequency [1/year] for surfance forcing
189189
A::Real=3e-5 # Amplitude [m/s]
190190
ϕk::Real=ϕ # Central latitude of Kelvin wave pumping
191191
wk::Real=10e3 # width [m] in y of Gaussian used for surface forcing

src/InitialConditions.jl

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ function initial_conditions(::Type{T},S::ModelSetup) where {T<:AbstractFloat}
5353
end
5454

5555
u = ncu.vars["u"][:,:,init_starti]
56-
NetCDF.close(ncu)
56+
# NetCDF.close(ncu)
5757

5858
ncv = NetCDF.open(joinpath(inirunpath,"v.nc"))
5959
v = ncv.vars["v"][:,:,init_starti]
60-
NetCDF.close(ncv)
60+
# NetCDF.close(ncv)
6161

6262
ncη = NetCDF.open(joinpath(inirunpath,"eta.nc"))
6363
η = ncη.vars["eta"][:,:,init_starti]
64-
NetCDF.close(ncη)
64+
# NetCDF.close(ncη)
6565

6666
# remove singleton time dimension
6767
u = reshape(u,size(u)[1:2])
@@ -147,7 +147,7 @@ function initial_conditions(::Type{T},S::ModelSetup) where {T<:AbstractFloat}
147147
if initial_cond == "ncfile" && sst_initial == "restart"
148148
ncsst = NetCDF.open(joinpath(inirunpath,"sst.nc"))
149149
sst = ncsst.vars["sst"][:,:,init_starti]
150-
NetCDF.close(ncsst)
150+
# NetCDF.close(ncsst)
151151

152152
sst = reshape(sst,size(sst)[1:2])
153153
end
@@ -164,11 +164,3 @@ function initial_conditions(::Type{T},S::ModelSetup) where {T<:AbstractFloat}
164164

165165
return PrognosticVars{T}(u,v,η,sst)
166166
end
167-
168-
# if injection_region == "south"
169-
# sst_inj_region = sst_south
170-
# elseif injection_region == "west"
171-
# sst_inj_region = sst_west
172-
# elseif injection_region == "rect"
173-
# sst_inj_region = sst_rect
174-
# end

src/Output.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,11 @@ function output_close!(ncs::NcFiles,feedback::Feedback,S::ModelSetup)
147147
@unpack output = S.parameters
148148

149149
if output
150-
for nc in (ncs.u,ncs.v,ncs.η,ncs.sst,ncs.q,ncs.ζ,ncs.du,ncs.dv,ncs.dη)
151-
if nc != nothing
152-
NetCDF.close(nc)
153-
end
154-
end
150+
# for nc in (ncs.u,ncs.v,ncs.η,ncs.sst,ncs.q,ncs.ζ,ncs.du,ncs.dv,ncs.dη)
151+
# if nc != nothing
152+
# NetCDF.close(nc)
153+
# end
154+
# end
155155
println("All data stored.")
156156
write(feedback.progress_txt,"All data stored.")
157157
close(feedback.progress_txt)

0 commit comments

Comments
 (0)