Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 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,7 @@ 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')
anl_out = os.path.join(comout, 'ocnanal_' + os.getenv('cyc'), 'Data')
ufsda.mkdir(anl_out)
ufsda.symlink(anl_out, os.path.join(anl_dir, 'Data'), remove=False)

Expand Down Expand Up @@ -280,7 +280,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(os.getenv('PDY')+os.getenv('cyc'), '%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
4 changes: 2 additions & 2 deletions test/soca/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ add_test(NAME test_gdasapp_soca_obsdb
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/soca/obs/)
set_tests_properties(test_gdasapp_soca_obsdb
PROPERTIES
ENVIRONMENT "PYTHONPATH=${PROJECT_BINARY_DIR}/ush:$ENV{PYTHONPATH};OBS_DIR=${OBS_DIR}")
ENVIRONMENT "PYTHONPATH=${PROJECT_BINARY_DIR}/ush:${PROJECT_SOURCE_DIR}/../../ush/python/pygw/src:$ENV{PYTHONPATH};OBS_DIR=${OBS_DIR}")

# Test exgdas_global_marine_analysis_prep.py
# ------------------------------------------
Expand All @@ -92,7 +92,7 @@ add_test(NAME test_gdasapp_soca_ana_prep
# -----------------------------------------
add_test(NAME test_gdasapp_soca_ana_run
COMMAND ${PROJECT_SOURCE_DIR}/test/soca/test_run.sh ${PROJECT_BINARY_DIR} ${PROJECT_SOURCE_DIR}
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/soca/3dvar/ocnanal_2018041512)
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/test/soca/3dvar/ocnanal_12)
set_tests_properties(test_gdasapp_soca_ana_run
PROPERTIES
DEPENDS "test_gdasapp_soca_ana_prep"
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_${cyc}
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
8 changes: 4 additions & 4 deletions test/soca/test_prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ project_source_dir=$2
source ${project_source_dir}/test/soca/test_utils.sh

# Remove previously fetched obs
rm -f ${project_binary_dir}/test/soca/3dvar/ocnanal_2018041512/obs/gdas.t12z.{sst,adt,sss,salt,icec}*.nc4
rm -f ${project_binary_dir}/test/soca/3dvar/ocnanal_12/obs/gdas.t12z.{sst,adt,sss,salt,icec}*.nc4

# Export runtime env. variables
source ${project_source_dir}/test/soca/runtime_vars.sh $project_binary_dir $project_source_dir
Expand Down Expand Up @@ -40,15 +40,15 @@ for o in $obslist; do
continue
;;
"ocn_filename:")
base=${project_binary_dir}/test/soca/3dvar/ocnanal_2018041512/bkg/
base=${project_binary_dir}/test/soca/3dvar/ocnanal_12/bkg/
continue
;;
"ice_filename:")
base=${project_binary_dir}/test/soca/3dvar/ocnanal_2018041512/bkg/
base=${project_binary_dir}/test/soca/3dvar/ocnanal_12/bkg/
continue
;;
"remap_filename:")
base=${project_binary_dir}/test/soca/3dvar/ocnanal_2018041512/
base=${project_binary_dir}/test/soca/3dvar/ocnanal_12/
continue
;;
esac
Expand Down
6 changes: 4 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 @@ -130,7 +131,8 @@ def get_env_config(component='atm'):
'ATM_WINDOW_LENGTH': f"PT{assim_freq}H",
'OBS_DIR': os.environ['COMOUT'],
'OBS_PREFIX': f"{os.environ['CDUMP']}.t{os.environ['cyc']}z.",
'OBS_DATE': os.environ['CDATE'],
'target_dir': os.environ['COMOUT'],
'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