Skip to content

Commit

Permalink
more use of env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewEichmann-NOAA committed Nov 14, 2023
1 parent 126df70 commit 4f5c3fc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/exglobal_prep_ocean_obs.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
cyc = os.getenv('cyc')
PDY = os.getenv('PDY')

# TODO (AFE): ideally this should be an env var
obsprocexec = "/scratch1/NCEPDEV/da/Andrew.Eichmann/fv3gfs/newoceaanobs/global-workflow/sorc/gdas.cd/build/bin/gdas_obsprovider2ioda.x"

logging.info('hippogriff')
print('jangle')

Expand All @@ -27,11 +24,14 @@
windowBegin = windowBeginDatetime.strftime('%Y-%m-%dT%H:%M:%SZ')
windowEnd = windowEndDatetime.strftime('%Y-%m-%dT%H:%M:%SZ')

OCNOBS2IODAEXEC = os.getenv('OCNOBS2IODAEXEC')

OBS_YAML = os.getenv('OBS_YAML')
obsConfig = YAMLFile(OBS_YAML)

# TODO (AFE): set dynamically, obvs
obsprocConfig = YAMLFile('/scratch1/NCEPDEV/da/Andrew.Eichmann/fv3gfs/newoceaanobs/global-workflow/sorc/gdas.cd/parm/soca/obsproc/obsproc_config.yaml')
OBSPROC_YAML = os.getenv('OBSPROC_YAML')
obsprocConfig = YAMLFile(OBSPROC_YAML)


for observer in obsConfig['observers']:

Expand All @@ -53,7 +53,7 @@
iodaYamlFilename = obsprocSpaceName + '2ioda.yaml'
save_as_yaml(obsprocSpace, iodaYamlFilename)

subprocess.run([obsprocexec, iodaYamlFilename], check=True)
subprocess.run([OCNOBS2IODAEXEC, iodaYamlFilename], check=True)

# else:
# print(f"WARNING: obsSpaceName {obsSpaceName} not found in OBSPROC_YAML, skipping")
Expand Down

0 comments on commit 4f5c3fc

Please sign in to comment.