Skip to content

Commit

Permalink
fix setup.py
Browse files Browse the repository at this point in the history
  • Loading branch information
chan-hoo committed Jan 23, 2025
1 parent fc259d1 commit 3645b71
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 18 deletions.
42 changes: 30 additions & 12 deletions scripts/exregional_run_fcst.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
#
. $USHdir/source_util_funcs.sh
for sect in user nco platform workflow global cpl_aqm_parm constants fixed_files \
task_get_extrn_lbcs task_run_fcst task_run_post fire; do
task_get_extrn_lbcs task_run_fcst task_run_post smoke_dust_parm fire; do
source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect}
done

Expand Down Expand Up @@ -298,7 +298,7 @@ create_symlink_to_file $target $symlink ${relative_link_flag}
# that the FV3 model is hardcoded to recognize, and those are the names
# we use below.
#
suites=( "FV3_RAP" "FV3_HRRR" "FV3_GFS_v15_thompson_mynn_lam3km" "FV3_GFS_v17_p8" )
suites=( "FV3_RAP" "FV3_HRRR" "FV3_HRRR_gf" "FV3_GFS_v15_thompson_mynn_lam3km" "FV3_GFS_v17_p8" )
if [[ ${suites[@]} =~ "${CCPP_PHYS_SUITE}" ]] ; then
file_ids=( "ss" "ls" )
for file_id in "${file_ids[@]}"; do
Expand Down Expand Up @@ -338,7 +338,7 @@ cd ${DATA}/INPUT
#
relative_link_flag="FALSE"

if [ $(boolify "${CPL_AQM}") = "TRUE" ]; then
if [ $(boolify "${CPL_AQM}") = "TRUE" ] || [ $(boolify "${DO_SMOKE_DUST}") = "TRUE" ]; then
COMIN="${COMROOT}/${NET}/${model_ver}/${RUN}.${PDY}/${cyc}${SLASH_ENSMEM_SUBDIR}" #temporary path, should be removed later

target="${COMIN}/${NET}.${cycle}${dot_ensmem}.gfs_data.tile${TILE_RGNL}.halo${NH0}.nc"
Expand All @@ -358,17 +358,35 @@ if [ $(boolify "${CPL_AQM}") = "TRUE" ]; then
symlink="gfs_bndy.tile${TILE_RGNL}.${fhr}.nc"
create_symlink_to_file $target $symlink ${relative_link_flag}
done
target="${COMIN}/${NET}.${cycle}${dot_ensmem}.NEXUS_Expt.nc"
symlink="NEXUS_Expt.nc"
create_symlink_to_file $target $symlink ${relative_link_flag}

# create symlink to PT for point source in SRW-AQM
target="${COMIN}/${NET}.${cycle}${dot_ensmem}.PT.nc"
if [ -f ${target} ]; then
symlink="PT.nc"
if [ $(boolify "${CPL_AQM}") = "TRUE" ]; then
target="${COMIN}/${NET}.${cycle}${dot_ensmem}.NEXUS_Expt.nc"
symlink="NEXUS_Expt.nc"
create_symlink_to_file $target $symlink ${relative_link_flag}
fi

# create symlink to PT for point source in SRW-AQM
target="${COMIN}/${NET}.${cycle}${dot_ensmem}.PT.nc"
if [ -f ${target} ]; then
symlink="PT.nc"
create_symlink_to_file $target $symlink ${relative_link_flag}
fi
else
ln -nsf ${FIXsmoke}/${PREDEF_GRID_NAME}/dust12m_data.nc .
ln -nsf ${FIXsmoke}/${PREDEF_GRID_NAME}/emi_data.nc .

smokefile="${COMIN}/${SMOKE_DUST_FILE_PREFIX}_${PDY}${cyc}00.nc"
if [ -f ${smokefile} ]; then
ln -nsf ${smokefile} ${SMOKE_DUST_FILE_PREFIX}.nc
else
if [ "${EBB_DCYCLE}" = "1" ]; then
ln -nsf ${FIXsmoke}/${PREDEF_GRID_NAME}/dummy_24hr_smoke_ebbdc1.nc ${SMOKE_DUST_FILE_PREFIX}.nc
echo "WARNING: Smoke file is not available, use dummy_24hr_smoke_ebbdc1.nc instead"
else
ln -nsf ${FIXsmoke}/${PREDEF_GRID_NAME}/dummy_24hr_smoke.nc ${SMOKE_DUST_FILE_PREFIX}.nc
echo "WARNING: Smoke file is not available, use dummy_24hr_smoke.nc instead"
fi
fi
fi
else
target="${INPUT_DATA}/${NET}.${cycle}${dot_ensmem}.gfs_data.tile${TILE_RGNL}.halo${NH0}.nc"
symlink="gfs_data.nc"
Expand Down Expand Up @@ -520,7 +538,7 @@ if [ $(boolify ${WRITE_DOPOST}) = "TRUE" ]; then
if [ $(boolify "${CPL_AQM}") = "TRUE" ]; then
post_config_fp="${PARMdir}/upp/postxconfig-NT-AQM.txt"
else
post_config_fp="${PARMdir}/upp/postxconfig-NT-fv3lam.txt"
post_config_fp="${PARMdir}/upp/postxconfig-NT-rrfs.txt"
fi
print_info_msg "
====================================================================
Expand Down
21 changes: 16 additions & 5 deletions ush/config.smoke_dust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,12 @@ metadata:
description: config for Smoke and Dust, RRFS_CONUS_3km
user:
RUN_ENVIR: community
platform:
BUILD_MOD_FN: 'build_{{ user.MACHINE|lower() }}_intel_prod'
MACHINE: [hera/orion/hercules/gaea-c6]
ACCOUNT: [account name]
workflow:
USE_CRON_TO_RELAUNCH: false
CRON_RELAUNCH_INTVL_MNTS: 3
EXPT_SUBDIR: smoke_dust_conus3km
PREDEF_GRID_NAME: RRFS_CONUS_3km
CCPP_PHYS_SUITE: FV3_HRRR_gf
DATE_FIRST_CYCL: '2019072200'
Expand All @@ -19,10 +22,11 @@ workflow:
FIELD_TABLE_TMPL_FN: field_table_smoke_dust.FV3_HRRR_gf
DO_REAL_TIME: false
COLDSTART: true
# WARMSTART_CYCLE_DIR: '/path/to/warm/start/files'
nco:
envir_default: we2e_smoke_dust
NET_default: we2e_smoke_dust
RUN_default: we2e_smoke_dust
envir_default: test_smoke_dust
NET_default: smoke_dust
RUN_default: smoke_dust
rocoto:
tasks:
taskgroups: '{{ ["parm/wflow/prep.yaml", "parm/wflow/smoke_dust.yaml", "parm/wflow/coldstart.yaml", "parm/wflow/post.yaml"]|include }}'
Expand All @@ -33,16 +37,23 @@ task_get_extrn_ics:
EXTRN_MDL_NAME_ICS: RAP
EXTRN_MDL_ICS_OFFSET_HRS: 0
USE_USER_STAGED_EXTRN_FILES: true
EXTRN_MDL_SOURCE_BASEDIR_ICS: /scratch2/NAGAPE/epic/SRW-AQM_DATA/data_smoke_dust/RAP_DATA_SD/${yyyymmddhh} # hera
# EXTRN_MDL_SOURCE_BASEDIR_ICS: /work/noaa/epic/SRW-AQM_DATA/input_model_data/RAP/${yyyymmddhh} # orion/hercules
# EXTRN_MDL_SOURCE_BASEDIR_ICS: /gpfs/f6/bil-fire8/world-shared/UFS_SRW_data/develop/input_model_data/RAP/${yyyymmddhh} # gaea-c6
task_get_extrn_lbcs:
EXTRN_MDL_NAME_LBCS: RAP
LBC_SPEC_INTVL_HRS: 6
EXTRN_MDL_LBCS_OFFSET_HRS: 0
USE_USER_STAGED_EXTRN_FILES: true
EXTRN_MDL_SOURCE_BASEDIR_LBCS: /scratch2/NAGAPE/epic/SRW-AQM_DATA/data_smoke_dust/RAP_DATA_SD/${yyyymmddhh} # hera
# EXTRN_MDL_SOURCE_BASEDIR_LBCS: /work/noaa/epic/SRW-AQM_DATA/input_model_data/RAP/${yyyymmddhh} # orion/hercules
# EXTRN_MDL_SOURCE_BASEDIR_LBCS: /gpfs/f6/bil-fire8/world-shared/UFS_SRW_data/develop/input_model_data/RAP/${yyyymmddhh} # gaea-c6
task_make_ics:
VCOORD_FILE: "{{ workflow.FIXam }}/global_hyblev_fcst_rrfsL65.txt"
task_make_lbcs:
VCOORD_FILE: "{{ workflow.FIXam }}/global_hyblev_fcst_rrfsL65.txt"
task_run_fcst:
OMP_NUM_THREADS_RUN_FCST: 1
DT_ATMOS: 36
LAYOUT_X: 15
LAYOUT_Y: 20
Expand Down
2 changes: 1 addition & 1 deletion ush/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1820,7 +1820,7 @@ def _dict_find(user_dict, substring):

# Generate a flag file for cold start
if expt_config["workflow"].get("COLDSTART"):
coldstart_date=date_to_str(workflow_config["DATE_FIRST_CYCL"])
coldstart_date = var_defns_cfg["workflow"]["DATE_FIRST_CYCL"]
fn_pass=f"task_skip_coldstart_{coldstart_date}.txt"
open(os.path.join(exptdir,fn_pass), 'a').close()

Expand Down

0 comments on commit 3645b71

Please sign in to comment.