Skip to content
Snippets Groups Projects
Commit 45320342 authored by lkugler's avatar lkugler
Browse files

wrfinput before pmo

parent de07587e
Branches
No related tags found
No related merge requests found
import os, shutil, warnings import os, shutil, warnings
from dartwrf.utils import try_remove, print, shell from dartwrf.utils import try_remove, print, shell, symlink
import dartwrf.obs.create_obsseq_in as osi import dartwrf.obs.create_obsseq_in as osi
from dartwrf.obs import obsseq from dartwrf.obs import obsseq
from dartwrf.exp_config import exp from dartwrf.exp_config import exp
from dartwrf.server_config import cluster from dartwrf.server_config import cluster
def _prepare_DART_grid_template():
# DART needs a wrfinput file as a template for the grid
# No data will be read from this file, but the grid information must match exactly.
symlink(cluster.dart_rundir + "/wrfout_d01",
cluster.dart_rundir + "/wrfinput_d01")
def generate_obsseq_out(time): def generate_obsseq_out(time):
"""Generate an obs_seq.out file from the current experiment """Generate an obs_seq.out file from the current experiment
Expects an existing nature file in the cluster.dart_rundir
Args: Args:
time (datetime): time of the observations time (datetime): time of the observations
...@@ -47,6 +55,8 @@ def generate_obsseq_out(time): ...@@ -47,6 +55,8 @@ def generate_obsseq_out(time):
os.makedirs(dir_obsseq, exist_ok=True) os.makedirs(dir_obsseq, exist_ok=True)
osi.create_obs_seq_in(time, exp.observations) osi.create_obs_seq_in(time, exp.observations)
_prepare_DART_grid_template()
run_perfect_model_obs() # generate observation, draws from gaussian run_perfect_model_obs() # generate observation, draws from gaussian
print(" 2.1) obs preprocessing") print(" 2.1) obs preprocessing")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment