Run ECCO Solutions From Julia#
The MITgcm.jl package let’s you run ECCO4 solutions from scracth in two simple commands – MITgcm_config and run.
See the MITgcm.jl docs here for more detail and examples like this.
In the Code Below:#
MITgcm_configdefined the model configuration.we reset parameters, assuming that inputs have already been downloaded and the model compiled
if that’s not the case, just comment out the
push!(MC.inputs...lines, andrunwill download data and/or compile the model.
run(MC)creates a run folder, sets everything up in that folder, and creates a submission script.run(qsub $(script))submits the job to the queuing system from within julia.
using MITgcm
run_folder=tempname()
params=read_toml(:ECCO4)
MC=MITgcm_config(inputs=params,folder=run_folder)
  ID            = 637af6be-1922-491d-ac2c-792d12763498
  model         = MITgcm
  configuration = 
  run folder    = /var/folders/vn/3r695jqd3177cw09wdmf3z940000gn/T/jl_CrkNKvSrKb/637af6be-1922-491d-ac2c-792d12763498
  log subfolder = /var/folders/vn/3r695jqd3177cw09wdmf3z940000gn/T/jl_CrkNKvSrKb/637af6be-1922-491d-ac2c-792d12763498/log
exe=joinpath(tempdir(),"mitgcmuv")
push!(MC.inputs[:setup][:main],(:exe => exe))
input_folder=joinpath(tempdir(),"input_folder")
push!(MC.inputs[:setup][:main],(:input_folder => input_folder))
OrderedCollections.OrderedDict{Any, Any} with 5 entries:
  :category     => "custom"
  :name         => "ECCO4"
  :version      => "main"
  :exe          => "/var/folders/vn/3r695jqd3177cw09wdmf3z940000gn/T/mitgcmuv"
  :input_folder => "/var/folders/vn/3r695jqd3177cw09wdmf3z940000gn/T/input_fold…
run(MC)
script=joinpath(MC,"run","submit.csh")
run(`qsub $(script)`)