Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions parm/soca/obs/config/adt_j3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ obs space:
obsdatain:
engine:
type: H5File
obsfile: !ENV ${DATA}/obs/${OPREFIX}adt_j3.${CDATE}.nc4
obsfile: !ENV ${DATA}/obs/${OPREFIX}adt_j3.${PDY}${cyc}.nc4
obsdataout:
engine:
type: H5File
obsfile: !ENV ${DATA}/diags/adt_j3.${CDATE}.nc4
obsfile: !ENV ${DATA}/diags/adt_j3.${PDY}${cyc}.nc4
simulated variables: [absolute_dynamic_topography]
obs operator:
name: ADT
Expand Down
4 changes: 2 additions & 2 deletions parm/soca/obs/config/icec_emc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ obs space:
obsdatain:
engine:
type: H5File
obsfile: !ENV ${DATA}/obs/${OPREFIX}icec_emc.${CDATE}.nc4
obsfile: !ENV ${DATA}/obs/${OPREFIX}icec_emc.${PDY}${cyc}.nc4
obsdataout:
engine:
type: H5File
obsfile: !ENV ${DATA}/diags/icec_emc.${CDATE}.nc4
obsfile: !ENV ${DATA}/diags/icec_emc.${PDY}${cyc}.nc4
simulated variables: [sea_ice_area_fraction]
obs operator:
name: Identity
Expand Down
4 changes: 2 additions & 2 deletions parm/soca/obs/config/salt_profile_fnmoc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ obs space:
obsdatain:
engine:
type: H5File
obsfile: !ENV ${DATA}/obs/${OPREFIX}salt_profile_fnmoc.${CDATE}.nc4
obsfile: !ENV ${DATA}/obs/${OPREFIX}salt_profile_fnmoc.${PDY}${cyc}.nc4
obsdataout:
engine:
type: H5File
obsfile: !ENV ${DATA}/diags/salt_profile_fnmoc.${CDATE}.nc4
obsfile: !ENV ${DATA}/diags/salt_profile_fnmoc.${PDY}${cyc}.nc4
simulated variables: [sea_water_salinity]
obs operator:
name: Identity
Expand Down
4 changes: 2 additions & 2 deletions parm/soca/obs/config/sss_smap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ obs space:
obsdatain:
engine:
type: H5File
obsfile: !ENV ${DATA}/obs/${OPREFIX}sss_smap.${CDATE}.nc4
obsfile: !ENV ${DATA}/obs/${OPREFIX}sss_smap.${PDY}${cyc}.nc4
obsdataout:
engine:
type: H5File
obsfile: !ENV ${DATA}/diags/sss_smap.${CDATE}.nc4
obsfile: !ENV ${DATA}/diags/sss_smap.${PDY}${cyc}.nc4
simulated variables: [sea_surface_salinity]
obs operator:
name: Identity
Expand Down
4 changes: 2 additions & 2 deletions parm/soca/obs/config/sst_noaa19_l3u.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ obs space:
obsdatain:
engine:
type: H5File
obsfile: !ENV ${DATA}/obs/${OPREFIX}sst_noaa19_l3u.${CDATE}.nc4
obsfile: !ENV ${DATA}/obs/${OPREFIX}sst_noaa19_l3u.${PDY}${cyc}.nc4
obsdataout:
engine:
type: H5File
obsfile: !ENV ${DATA}/diags/sst_noaa19_l3u.${CDATE}.nc4
obsfile: !ENV ${DATA}/diags/sst_noaa19_l3u.${PDY}${cyc}.nc4
simulated variables: [sea_surface_temperature]
obs operator:
name: Identity
Expand Down
4 changes: 2 additions & 2 deletions parm/soca/obs/config/sst_noaa19_l3u_so025.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ obs space:
obsdatain:
engine:
type: H5File
obsfile: !ENV ${DATA}/obs/${OPREFIX}sst_noaa19_l3u_so025.${CDATE}.nc4
obsfile: !ENV ${DATA}/obs/${OPREFIX}sst_noaa19_l3u_so025.${PDY}${cyc}.nc4
obsdataout:
engine:
type: H5File
obsfile: !ENV ${DATA}/diags/sst_noaa19_l3u_so025.${CDATE}.nc4
obsfile: !ENV ${DATA}/diags/sst_noaa19_l3u_so025.${PDY}${cyc}.nc4
simulated variables: [sea_surface_temperature]
io pool:
max pool size: 1
Expand Down
5 changes: 3 additions & 2 deletions scripts/exgdas_global_marine_analysis_prep.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ def gen_bkg_list(bkg_path, out_path, window_begin=' ', file_type='gdas.t*.ocnf00
ufsda.mkdir(bkg_dir)

# create output directory for soca DA
anl_out = os.path.join(comout, 'ocnanal_'+os.getenv('CDATE'), 'Data')
cdate = os.getenv('PDY')+os.getenv('cyc')
anl_out = os.path.join(comout, 'ocnanal_' + cdate, 'Data')
Comment thread
guillaumevernieres marked this conversation as resolved.
Outdated
ufsda.mkdir(anl_out)
ufsda.symlink(anl_out, os.path.join(anl_dir, 'Data'), remove=False)

Expand Down Expand Up @@ -280,7 +281,7 @@ def gen_bkg_list(bkg_path, out_path, window_begin=' ', file_type='gdas.t*.ocnf00
'3dvarfgat.yaml')

half_assim_freq = timedelta(hours=int(os.getenv('assim_freq'))/2)
window_begin = datetime.strptime(os.getenv('CDATE'), '%Y%m%d%H') - half_assim_freq
window_begin = datetime.strptime(cdate, '%Y%m%d%H') - half_assim_freq
gen_bkg_list(bkg_path=os.getenv('COMIN_GES'),
out_path=bkg_dir,
window_begin=window_begin,
Expand Down
1 change: 1 addition & 0 deletions test/soca/gw/config.base
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ export BASE_ENV="$HOMEgfs/env"
export BASE_JOB="$HOMEgfs/jobs/rocoto"

# EXPERIMENT specific environment parameters
CDATE = ${PDY}${cyc}
Comment thread
CoryMartin-NOAA marked this conversation as resolved.
export SDATE=2021032318
export FDATE=@FDATE@
export EDATE=2021032418
Expand Down
1 change: 0 additions & 1 deletion test/soca/gw/runtime_vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export HOMEgfs
export PDY=20180415
export cyc=12
export gcyc=06
export CDATE=2018041512
export ROTDIR="${bindir}/test/soca/gw/testrun/ROTDIRS"
export DATAROOT="${bindir}/test/soca/gw/testrun/RUNDIRS/gdas_test"
export COMIN_GES="${bindir}/test/soca/bkg"
Expand Down
8 changes: 3 additions & 5 deletions test/soca/runtime_vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,16 @@ project_binary_dir=$1
project_source_dir=$2

# Prepare runtime environement
export CDATE=2018041512 # Center of current cycle date
export PDY=20180415 # Center of current cycle date
export cyc=12 # Center of current cycle date
export GDATE=2018041506 # Center of previous cycle date
export gcyc=$(echo $GDATE | cut -c9-10)
export CDUMP=gdas
export GDUMP=gdas
export OPREFIX=${CDUMP}.t${cyc}z.
export PDY=20180415
export cyc=12
export OPREFIX=${CDUMP}.t${cyc}z.
export assim_freq=6 # DA window
export COMOUT=${project_binary_dir}/test/soca/3dvar
export DATA=${project_binary_dir}/test/soca/3dvar/ocnanal_${CDATE}
export DATA=${project_binary_dir}/test/soca/3dvar/ocnanal_${PDY}${cyc}
Comment thread
guillaumevernieres marked this conversation as resolved.
Outdated
export COMIN_OBS=${project_binary_dir}/test/soca/obs/r2d2-shared
export COMIN_GES=${project_binary_dir}/test/soca/bkg # Backgrounds from previous forecast
export CASE_ANL="C48" # TODO: Replace with or add OCNRES
Expand Down
5 changes: 3 additions & 2 deletions ush/ufsda/misc_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ def get_env_config(component='atm'):
# get config dict based on environment variables
# TODO break this into component specific sections
# datetime objects
valid_time = datetime_from_cdate(os.environ['CDATE'])
cdate = os.environ['PDY']+os.environ['cyc']
valid_time = datetime_from_cdate(cdate)
assim_freq = int(os.environ['assim_freq'])
prev_cycle = valid_time - dt.timedelta(hours=assim_freq)
window_begin = valid_time - dt.timedelta(hours=assim_freq/2)
Expand All @@ -131,7 +132,7 @@ def get_env_config(component='atm'):
'OBS_DIR': os.environ['COMOUT'],
'OBS_PREFIX': f"{os.environ['CDUMP']}.t{os.environ['cyc']}z.",
'target_dir': os.environ['COMOUT'],
'OBS_DATE': os.environ['CDATE'],
'OBS_DATE': cdate,
'BIAS_IN_DIR': os.environ['COMOUT'],
'BIAS_PREFIX': f"{os.environ['GDUMP']}.t{os.environ['gcyc']}z.",
'BIAS_DATE': f"{os.environ['GDATE']}",
Expand Down