Skip to content

Commit f878dde

Browse files
author
Milan K
authored
Merge pull request #117 from milankl/forecasts
Feedback and DefaultParameters updated
2 parents 67e22a8 + fcb09d1 commit f878dde

File tree

4 files changed

+9
-71
lines changed

4 files changed

+9
-71
lines changed

experiments/forecast_ens.jl

Lines changed: 0 additions & 49 deletions
This file was deleted.

experiments/forecast_master.jl

Lines changed: 0 additions & 19 deletions
This file was deleted.

src/DefaultParameters.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
sst_initial::String="south" # "west", "south", "rect", "flat" or "restart"
7777
sst_rect_coords::Array{Float64,1}=[0.,0.15,0.,1.0]
7878
# (x0,x1,y0,y1) are the size of the rectangle in [0,1]
79-
Uadv::Real=0.2 # Velocity scale [m/s] for tracer advection
79+
Uadv::Real=0.25 # Velocity scale [m/s] for tracer advection
8080
SSTmax::Real=1. # tracer (sea surface temperature) max for restoring
8181
SSTmin::Real=0. # tracer (sea surface temperature) min for restoring
8282
τSST::Real=500. # tracer restoring time scale [days]
@@ -128,4 +128,6 @@
128128
@assert Uadv > 0.0 "Advection velocity scale Uadv has to be >0, $Uadv given."
129129
@assert output_dt > 0 "Output time step has to be >0, $output_dt given."
130130
@assert initial_cond in ["rest", "ncfile"] "Initial conditions '$initial_cond' unsupported."
131+
@assert init_run_id >= 0 "Initial condition run id, init_run_id, has to be >= 0, $init_run_id given."
132+
@assert init_starti > 0 || init_starti == -1 "Start index, init_starti, has to be >0 || -1, $init_starti given."
131133
end

src/Feedback.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ end
7373

7474
"""Initialises the progress txt file."""
7575
function feedback_init(S::ModelSetup)
76-
@unpack output = S.parameters
76+
@unpack output,init_starti = S.parameters
7777
@unpack nt,nout = S.grid
7878

7979
if output
@@ -92,7 +92,11 @@ function feedback_init(S::ModelSetup)
9292
if initial_cond == "rest"
9393
write(txt,"rest.\n")
9494
else
95-
write(txt,"last time step of run $init_run_id.\n")
95+
if init_starti > 0
96+
write(txt,"time step $init_starti of run $init_run_id.\n")
97+
else
98+
write(txt,"last time step of run $init_run_id.\n")
99+
end
96100
end
97101
write(txt,"Boundary conditions are $bc with lbc=.\n")
98102
write(txt,"Number format is "*string(T)*".\n")

0 commit comments

Comments
 (0)