Skip to content

Commit

Permalink
variable names more similar to roms.in
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Barth committed Nov 19, 2024
1 parent adc9c97 commit 2f645bf
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 283 deletions.
245 changes: 0 additions & 245 deletions docs/src/plots.md

This file was deleted.

16 changes: 8 additions & 8 deletions test/example_config_long.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ grid_fname = joinpath(modeldir,domain_name * ".nc")
basedir = modeldir

# GCM interpolated on model grid
clim_filename = joinpath(basedir,"clim2019.nc")
clm_name = joinpath(basedir,"clim2019.nc")

# initial conditions
ic_filename = joinpath(basedir,"ic2019.nc")
ini_name = joinpath(basedir,"ic2019.nc")

# boundary conditions
bc_filename = joinpath(basedir,"bc2019.nc")
bry_name = joinpath(basedir,"bc2019.nc")

# model specific parameters
opt = (
Expand Down Expand Up @@ -118,10 +118,10 @@ dataset = ROMS.CMEMS(cmems_username,cmems_password,service_id,mapping,outdir,
# take one extra day
tr = [t0-Dates.Day(1), t1+Dates.Day(1)]

ROMS.interp_clim(domain,clim_filename,dataset,tr)
ROMS.interp_clim(domain,clm_name,dataset,tr)

ROMS.extract_ic(domain,clim_filename,ic_filename, t0);
ROMS.extract_bc(domain,clim_filename,bc_filename)
ROMS.extract_ic(domain,clm_name,ini_name, t0);
ROMS.extract_bc(domain,clm_name,bry_name)

# Prepare atmospheric forcings

Expand All @@ -140,8 +140,8 @@ halo = 2;
Niter = 50
max_tscale = 5e5

nudge_filename = joinpath(basedir,"roms_nud_$(tscale)_$(Niter).nc")
tracer_NudgeCoef = ROMS.nudgecoef(domain,nudge_filename,alpha,Niter,
nud_name = joinpath(basedir,"roms_nud_$(tscale)_$(Niter).nc")
tracer_NudgeCoef = ROMS.nudgecoef(domain,nud_name,alpha,Niter,
halo,tscale; max_tscale = max_tscale)


Expand Down
16 changes: 8 additions & 8 deletions test/example_config_next.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ romsdir = expanduser("~/src/roms")
simulationdir = joinpath(basedir,"Simulation1")

intemplate = joinpath(romsdir,"User","External","roms.in")
varname_template = joinpath(romsdir,"ROMS","External","varinfo.dat")
var_name_template = joinpath(romsdir,"ROMS","External","varinfo.dat")

mkpath(simulationdir)
infile = joinpath(simulationdir,"roms.in")
varname = joinpath(simulationdir,"varinfo.dat")
var_name = joinpath(simulationdir,"varinfo.dat")

cp(varname_template,varname; force=true)
cp(var_name_template,var_name; force=true)

forc_filenames = unique(getindex.(forcing_filenames,2))

Expand All @@ -36,11 +36,11 @@ NTIMES = floor(Int,Dates.value(t1-t0) / (DT * 1000))
substitutions = Dict(
"TITLE" => "My test",
"TIME_REF" => "18581117",
"VARNAME" => varname,
"VARNAME" => var_name,
"GRDNAME" => grid_fname,
"ININAME" => ic_filename,
"BRYNAME" => bc_filename,
"CLMNAME" => clim_filename,
"ININAME" => ini_name,
"BRYNAME" => bry_name,
"CLMNAME" => clm_name,
"NFFILES" => length(forc_filenames),
"FRCNAME" => join(forc_filenames," \\\n "),
"Vtransform" => opt.Vtransform,
Expand All @@ -63,7 +63,7 @@ substitutions = Dict(
"NAVG" => NAVG,
"NRST" => NRST,
"NTIMES" => NTIMES,
"NUDNAME" => nudge_filename,
"NUDNAME" => nud_name,
"TNUDG" => "10.0d0 10.0d0",
"LtracerCLM" => "T T",
"LnudgeTCLM" => "T T",
Expand Down
Loading

0 comments on commit 2f645bf

Please sign in to comment.