Skip to content

Commit

Permalink
import directly from wxflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aerorahul committed Jul 8, 2023
1 parent f743d9c commit 4d585fc
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 18 deletions.
2 changes: 1 addition & 1 deletion scripts/exgdas_global_marine_analysis_post.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import shutil
import logging
from datetime import datetime, timedelta
from wxflow.file_utils import FileHandler
from wxflow import FileHandler


# TODO: Move this somewhere else?
Expand Down
5 changes: 1 addition & 4 deletions scripts/exgdas_global_marine_analysis_prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@
from netCDF4 import Dataset
import xarray as xr
import numpy as np
from wxflow.attrdict import AttrDict
from wxflow.template import Template, TemplateConstants
from wxflow.yaml_file import YAMLFile
from wxflow.file_utils import FileHandler
from wxflow import (AttrDict, Template, TemplateConstants, YAMLFile, FileHandler)

# set up logger
logging.basicConfig(format='%(asctime)s:%(levelname)s:%(message)s', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S')
Expand Down
4 changes: 1 addition & 3 deletions test/aero/genyaml_3dvar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ mkdir -p $DATA

# run some python code to generate the YAML
python3 - <<EOF
from wxflow.attrdict import AttrDict
from wxflow.template import Template, TemplateConstants
from wxflow.yaml_file import YAMLFile
from wxflow import AttrDict, Template, TemplateConstants, YAMLFile
import datetime
config = YAMLFile(path='$YAMLin')
Expand Down
2 changes: 1 addition & 1 deletion test/check_valid_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import os
import pathlib
import sys
from wxflow.yaml_file import YAMLFile
from wxflow import YAMLFile


def check_valid_yaml(repodir):
Expand Down
3 changes: 1 addition & 2 deletions ush/ioda/gen_bufr2ioda_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
# and certain configuration parameters
import argparse
import os
from wxflow.template import Template, TemplateConstants
from wxflow.yaml_file import YAMLFile
from wxflow import Template, TemplateConstants, YAMLFile


# list of satellite radiance BUFR files that need split by SatId
Expand Down
2 changes: 1 addition & 1 deletion ush/run_jedi_exe.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import sys
import yaml
import wxflow
from wxflow.yaml_file import parse_j2yaml, save_as_yaml
from wxflow import parse_j2yaml, save_as_yaml


def export_envar(yamlfile, bashout):
Expand Down
2 changes: 1 addition & 1 deletion ush/socaincr2mom6.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from netCDF4 import Dataset
from scipy.interpolate import griddata
import ufsda
from wxflow.yaml_file import YAMLFile
from wxflow import YAMLFile


def socaincr2mom6(incr, bkg, grid, incr_out, nsst_yaml=None):
Expand Down
2 changes: 1 addition & 1 deletion ush/ufsda/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import shutil
import datetime as dt
import ufsda
from wxflow.yaml_file import YAMLFile
from wxflow import YAMLFile

__all__ = ['atm_diags']

Expand Down
3 changes: 1 addition & 2 deletions ush/ufsda/genYAML.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
import os
import re
import yaml
from wxflow.template import Template, TemplateConstants
from wxflow.yaml_file import YAMLFile
from wxflow import Template, TemplateConstants, YAMLFile


def genYAML(yamlconfig, output=None):
Expand Down
2 changes: 1 addition & 1 deletion ush/ufsda/stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import logging
import glob
import numpy as np
from wxflow.yaml_file import YAMLFile, parse_yaml, parse_j2yaml
from wxflow import YAMLFile, parse_yaml, parse_j2yaml
import ufsda.soca_utils

__all__ = ['atm_background', 'atm_obs', 'bias_obs', 'background', 'background_ens', 'fv3jedi', 'obs', 'berror', 'gdas_fix', 'gdas_single_cycle']
Expand Down
2 changes: 1 addition & 1 deletion ush/ufsda/yamltools.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def save_check(config, target, app='var'):
config['cost function']['observations']['observers'] = cleaned_obs_spaces

# save cleaned yaml
wxflow.yaml_file.save_as_yaml(config, target)
wxflow.save_as_yaml(config, target)


def parse_config(input_config_dict, template=None, clean=True):
Expand Down

0 comments on commit 4d585fc

Please sign in to comment.