diff --git a/jobs/JLANDDA_ANALYSIS b/jobs/JLANDDA_ANALYSIS index 4e7670ad..6e166640 100755 --- a/jobs/JLANDDA_ANALYSIS +++ b/jobs/JLANDDA_ANALYSIS @@ -75,8 +75,8 @@ export COMOUThofx="${COMOUThofx:-${COMOUT}/hofx}" mkdir -p ${COMOUThofx} # Create a teomporary share directory -export DATA_SHARE="${DATA_SHARE:-${DATAROOT}/DATA_SHARE/${PDY}}" -mkdir -p ${DATA_SHARE} +export DATA_RESTART="${DATA_RESTART:-${DATAROOT}/DATA_SHARE/RESTART}" +mkdir -p ${DATA_RESTART} export DATA_HOFX="${DATA_HOFX:-${DATAROOT}/DATA_SHARE/hofx}" mkdir -p ${DATA_HOFX} diff --git a/jobs/JLANDDA_FCST_IC b/jobs/JLANDDA_FCST_IC index a4d37d91..f7c722db 100755 --- a/jobs/JLANDDA_FCST_IC +++ b/jobs/JLANDDA_FCST_IC @@ -65,23 +65,17 @@ setpdy.sh if [ "${MACHINE}" = "WCOSS2" ]; then export COMIN="${COMIN:-$(compath.py -o ${NET}/${model_ver}/${RUN}.${PDY})}" export COMOUT="${COMOUT:-$(compath.py -o ${NET}/${model_ver}/${RUN}.${PDY})}" - export COMINm1="${COMINm1:-$(compath.py -o ${NET}/${model_ver}/${RUN}.${PDYm1})}" export COMINgdas="${COMINgdas:-$(compath.py ${envir}/gdas/${gdas_ver})}" export COMINgfs="${COMINgfs:-$(compath.py ${envir}/gfs/${gfs_ver})}" else export COMIN="${COMIN:-${COMROOT}/${NET}/${model_ver}/${RUN}.${PDY}}" export COMOUT="${COMOUT:-${COMROOT}/${NET}/${model_ver}/${RUN}.${PDY}}" - export COMINm1="${COMINm1:-${COMROOT}/${NET}/${model_ver}/${RUN}.${PDYm1}}" export COMINgdas="${COMINgdas:-${FIXlandda}/DATA_gdas}" export COMINgfs="${COMINgfs:-${FIXlandda}/DATA_gfs}" fi mkdir -p ${COMOUT} -# Create a teomporary share directory -export DATA_SHARE="${DATA_SHARE:-${DATAROOT}/DATA_SHARE/${PDY}}" -mkdir -p ${DATA_SHARE} - # #----------------------------------------------------------------------- # diff --git a/jobs/JLANDDA_FORECAST b/jobs/JLANDDA_FORECAST index fbfc984b..1472b414 100755 --- a/jobs/JLANDDA_FORECAST +++ b/jobs/JLANDDA_FORECAST @@ -81,8 +81,6 @@ export COMOUTplot="${COMOUTplot:-${COMOUT}/plot}" mkdir -p ${COMOUTplot} # Create a teomporary share directory -export DATA_SHARE="${DATA_SHARE:-${DATAROOT}/DATA_SHARE/${PDY}}" -mkdir -p ${DATA_SHARE} export DATA_RESTART="${DATA_RESTART:-${DATAROOT}/DATA_SHARE/RESTART}" mkdir -p ${DATA_RESTART} diff --git a/jobs/JLANDDA_PLOT_STATS b/jobs/JLANDDA_PLOT_STATS index f0a83a74..3a350190 100755 --- a/jobs/JLANDDA_PLOT_STATS +++ b/jobs/JLANDDA_PLOT_STATS @@ -75,8 +75,6 @@ export COMOUTplot="${COMOUTplot:-${COMOUT}/plot}" mkdir -p ${COMOUTplot} # Create a teomporary share directory -export DATA_SHARE="${DATA_SHARE:-${DATAROOT}/DATA_SHARE/${PDY}}" -mkdir -p ${DATA_SHARE} export DATA_HOFX="${DATA_HOFX:-${DATAROOT}/DATA_SHARE/hofx}" mkdir -p ${DATA_HOFX} diff --git a/jobs/JLANDDA_POST_ANAL b/jobs/JLANDDA_POST_ANAL index aaad6ba3..187c6f44 100755 --- a/jobs/JLANDDA_POST_ANAL +++ b/jobs/JLANDDA_POST_ANAL @@ -73,8 +73,8 @@ fi mkdir -p ${COMOUT} # Create a teomporary share directory -export DATA_SHARE="${DATA_SHARE:-${DATAROOT}/DATA_SHARE/${PDY}}" -mkdir -p ${DATA_SHARE} +export DATA_RESTART="${DATA_RESTART:-${DATAROOT}/DATA_SHARE/RESTART}" +mkdir -p ${DATA_RESTART} # #----------------------------------------------------------------------- diff --git a/jobs/JLANDDA_PREP_OBS b/jobs/JLANDDA_PREP_OBS index b456670c..0e2807ef 100755 --- a/jobs/JLANDDA_PREP_OBS +++ b/jobs/JLANDDA_PREP_OBS @@ -76,10 +76,6 @@ mkdir -p ${COMOUTobs} export COMOUTplot="${COMOUTplot:-${COMOUT}/plot}" mkdir -p ${COMOUTplot} -# Create a teomporary share directory -export DATA_SHARE="${DATA_SHARE:-${DATAROOT}/DATA_SHARE/${PDY}}" -mkdir -p ${DATA_SHARE} - # #----------------------------------------------------------------------- # diff --git a/jobs/JLANDDA_PRE_ANAL b/jobs/JLANDDA_PRE_ANAL index 394232b8..9de219d5 100755 --- a/jobs/JLANDDA_PRE_ANAL +++ b/jobs/JLANDDA_PRE_ANAL @@ -73,8 +73,6 @@ fi mkdir -p ${COMOUT} # Create a teomporary share directory -export DATA_SHARE="${DATA_SHARE:-${DATAROOT}/DATA_SHARE/${PDY}}" -mkdir -p ${DATA_SHARE} export DATA_RESTART="${DATA_RESTART:-${DATAROOT}/DATA_SHARE/RESTART}" mkdir -p ${DATA_RESTART} diff --git a/parm/templates/template.ATML.input.nml.FV3_GFS_v17_p8 b/parm/templates/template.ATML.input.nml.FV3_GFS_v17_p8 index ec95a400..d3b9dbd0 100644 --- a/parm/templates/template.ATML.input.nml.FV3_GFS_v17_p8 +++ b/parm/templates/template.ATML.input.nml.FV3_GFS_v17_p8 @@ -3,6 +3,7 @@ chksum_debug = .false. dycore_only = .false. ccpp_suite = '{{ ccpp_suite }}' + ignore_rst_cksum = .true. / &diag_manager_nml diff --git a/parm/templates/template.land_analysis.yaml b/parm/templates/template.land_analysis.yaml index 61a0f640..fcc11ead 100644 --- a/parm/templates/template.land_analysis.yaml +++ b/parm/templates/template.land_analysis.yaml @@ -81,6 +81,7 @@ workflow: DATADEP_FILE1: "&DATAROOT;/DATA_SHARE/RESTART/ufs_land_restart.@Y-@m-@d_@H-00-00.tile6.nc" DATADEP_FILE2: "&WARMSTART_DIR;/ufs_land_restart.@Y-@m-@d_@H-00-00.tile6.nc" DATADEP_COLDSTART: "&EXP_BASEDIR;/exp_case/&EXP_CASE_NAME;/task_skip_coldstart_@Y@m@d@H.txt" + DATADEP_SFCDATA: "&DATAROOT;/DATA_SHARE/RESTART/@Y@m@d.@H0000.sfc_data.tile6.nc" log: "&LOGDIR;/workflow.log" tasks: task_prep_obs: @@ -144,6 +145,7 @@ workflow: join: "&LOGDIR;/fcst_ic&LOGFN_SUFFIX;" memory: 128G {%- endif %} +{%- if app == "LND" %} task_pre_anal: attrs: {%- if coldstart == "YES" %} @@ -184,6 +186,7 @@ workflow: attrs: age: 5 value: "&DATADEP_FILE2;" +{%- endif %} {%- endif %} task_analysis: attrs: @@ -226,9 +229,16 @@ workflow: taskdep_prep_obs: attrs: task: prep_obs +{%- if app == "LND" %} taskdep_pre_anal: attrs: task: pre_anal +{%- else %} + datadep_sfcdata: + attrs: + age: 5 + value: "&DATADEP_SFCDATA;" +{%- endif %} task_post_anal: attrs: {%- if coldstart == "YES" %} diff --git a/scripts/exlandda_analysis.sh b/scripts/exlandda_analysis.sh index 20b9a891..ba69216d 100755 --- a/scripts/exlandda_analysis.sh +++ b/scripts/exlandda_analysis.sh @@ -40,7 +40,7 @@ B=30 # back ground error std for LETKFOI # Import input files for itile in {1..6} do - cp ${DATA_SHARE}/${FILEDATE}.sfc_data.tile${itile}.nc . + cp ${DATA_RESTART}/${FILEDATE}.sfc_data.tile${itile}.nc . done ln -nsf ${COMIN}/obs/GHCN_${YYYY}${MM}${DD}${HH}.nc . @@ -70,7 +70,7 @@ if [ $GFSv17 == "YES" ]; then else SNOWDEPTHVAR="snwdph" # replace field overwrite file - cp ${PARMlandda}/jedi/gfs-land.yaml ${DATA}/gfs-land.yaml + cp -p ${PARMlandda}/jedi/gfs-land.yaml ${DATA}/gfs-land.yaml fi # FOR LETKFOI, CREATE THE PSEUDO-ENSEMBLE for ens in pos neg @@ -79,8 +79,8 @@ do rm -r $DATA/mem_${ens} fi mkdir -p $DATA/mem_${ens} - cp ${FILEDATE}.sfc_data.tile*.nc ${DATA}/mem_${ens} - cp ${DATA}/${FILEDATE}.coupler.res ${DATA}/mem_${ens}/${FILEDATE}.coupler.res + cp -p ${FILEDATE}.sfc_data.tile*.nc ${DATA}/mem_${ens} + cp -p ${DATA}/${FILEDATE}.coupler.res ${DATA}/mem_${ens}/${FILEDATE}.coupler.res done # using ioda mods to get a python version with netCDF4 @@ -207,8 +207,8 @@ if [[ $do_DA == "YES" ]]; then cat << EOF > apply_incr_nml &noahmp_snow date_str=${YYYY}${MM}${DD} - hour_str=$HH - res=$RES + hour_str=${HH} + res=${RES} frac_grid=$GFSv17 orog_path="${FIXlandda}/FV3_fix_tiled/C${RES}" otype="C${RES}_oro_data" @@ -237,7 +237,7 @@ do cp -p ${DATA}/${FILEDATE}.sfc_data.tile${itile}.nc ${COMOUT} done -if [[ -d output/DA/hofx ]]; then +if [ -d output/DA/hofx ]; then cp -p output/DA/hofx/* ${COMOUThofx} ln -nsf ${COMOUThofx}/* ${DATA_HOFX} fi @@ -245,13 +245,13 @@ fi ########################################################### # WE2E test ########################################################### -if [[ "${WE2E_TEST}" == "YES" ]]; then +if [ "${WE2E_TEST}" == "YES" ]; then path_fbase="${FIXlandda}/test_base/we2e_com/${RUN}.${PDY}" fn_sfc="${FILEDATE}.sfc_data.tile" fn_inc="${FILEDATE}.xainc.sfc_data.tile" fn_hofx="letkf_hofx_ghcn_${PDY}${cyc}.nc" we2e_log_fp="${LOGDIR}/${WE2E_LOG_FN}" - if [[ ! -e "${we2e_log_fp}" ]]; then + if [ ! -f "${we2e_log_fp}" ]; then touch ${we2e_log_fp} fi # surface data tiles diff --git a/scripts/exlandda_forecast.sh b/scripts/exlandda_forecast.sh index dae96705..9e59f31f 100755 --- a/scripts/exlandda_forecast.sh +++ b/scripts/exlandda_forecast.sh @@ -175,9 +175,9 @@ ${USHlandda}/fill_jinja_template.py -u "${settings}" -t "${fp_template}" -o "${f if [ "${APP}" = "LND" ]; then # CDEPS restart and pointer files for DATM (LND) rfile2="ufs.cpld.datm.r.${YYYY}-${MM}-${DD}-${HHsec_5d}.nc" - if [[ -e "${COMINm1}/${rfile2}" ]]; then + if [ -f "${COMINm1}/${rfile2}" ]; then ln -nsf "${COMINm1}/${rfile2}" . - elif [[ -e "${WARMSTART_DIR}/${rfile2}" ]]; then + elif [ -f "${WARMSTART_DIR}/${rfile2}" ]; then ln -nsf "${WARMSTART_DIR}/${rfile2}" . else ln -nsf ${FIXlandda}/restarts/${ATMOS_FORC}/${rfile2} . @@ -266,16 +266,16 @@ if [ "${APP}" = "ATML" ]; then if [ "${COLDSTART}" = "NO" ] || [ "${PDY}${cyc}" != "${DATE_FIRST_CYCLE:0:10}" ]; then # Set path to directory where restart files exist if [ "${COLDSTART}" = "NO" ] && [ "${PDY}${cyc}" = "${DATE_FIRST_CYCLE:0:10}" ]; then - data_dir="${WARMSTART_DIR}" + data_dir="${WARMSTART_DIR}/RESTART" else - data_dir="${COMINm1}" + data_dir="${COMINm1}/RESTART" fi - rst_fns=( "ca_data" "fv_core.res" "fv_srf_wnd.res" "fv_tracer.res" "phy_data" "sfc_data" ) + rst_fns=( "ca_data" "fv_core.res" "fv_srf_wnd.res" "fv_tracer.res" "phy_data" ) for ifn in "${rst_fns[@]}" ; do for itile in {1..6}; do - r_fp="${data_dir}/RESTART/${YYYY}${MM}${DD}.${HH}0000.${ifn}.tile${itile}.nc" + r_fp="${data_dir}/${YYYY}${MM}${DD}.${HH}0000.${ifn}.tile${itile}.nc" if [ -f "${r_fp}" ]; then ln -nsf "${r_fp}" "${ifn}.tile${itile}.nc" else @@ -283,7 +283,7 @@ if [ "${APP}" = "ATML" ]; then fi done if [ "${ifn}" = "fv_core.res" ]; then - r_fp="${data_dir}/RESTART/${YYYY}${MM}${DD}.${HH}0000.${ifn}.nc" + r_fp="${data_dir}/${YYYY}${MM}${DD}.${HH}0000.${ifn}.nc" if [ -f "${r_fp}" ]; then ln -nsf "${r_fp}" "${ifn}.nc" else @@ -291,6 +291,19 @@ if [ "${APP}" = "ATML" ]; then fi fi done + # link sfc_data from COMIN because they were upated by JEDI Analysis task + if [ "${PDY}${cyc}" != "${DATE_FIRST_CYCLE:0:10}" ]; then + data_dir="${COMIN}" + fi + for itile in {1..6}; + do + r_fp="${data_dir}/${YYYY}${MM}${DD}.${HH}0000.sfc_data.tile${itile}.nc" + if [ -f "${r_fp}" ]; then + ln -nsf "${r_fp}" "sfc_data.tile${itile}.nc" + else + err_exit "${r_fp} file does not exist." + fi + done # update coupler.res file settings="\ @@ -395,18 +408,23 @@ elif [ "${APP}" = "ATML" ]; then cp -p "${DATA}/RESTART/${nYYYY}${nMM}${nDD}.${nHH}0000.${ifn}.tile${itile}.nc" ${COMOUT}/RESTART/. done done + # Set sfc_data to DATA_RESTART to trigger ANALYSIS task in next cycle + for itile in {1..6}; + do + cp -p "${COMOUT}/RESTART/${nYYYY}${nMM}${nDD}.${nHH}0000.sfc_data.tile${itile}.nc" ${DATA_RESTART}/. + done fi ########################################################### # WE2E test ########################################################### -if [[ "${WE2E_TEST}" == "YES" ]]; then +if [ "${WE2E_TEST}" == "YES" ]; then path_fbase="${FIXlandda}/test_base/we2e_com/${RUN}.${PDY}/RESTART" fn_res="ufs_land_restart.${nYYYY}-${nMM}-${nDD}_${nHH}-00-00.tile" we2e_log_fp="${LOGDIR}/${WE2E_LOG_FN}" - if [[ ! -e "${we2e_log_fp}" ]]; then + if [ ! -f "${we2e_log_fp}" ]; then touch ${we2e_log_fp} fi # restart files diff --git a/scripts/exlandda_post_anal.sh b/scripts/exlandda_post_anal.sh index 3b87e144..ccec12e7 100755 --- a/scripts/exlandda_post_anal.sh +++ b/scripts/exlandda_post_anal.sh @@ -38,16 +38,24 @@ esac FILEDATE=${YYYY}${MM}${DD}.${HH}0000 for itile in {1..6} do - cp ${DATA_SHARE}/${FILEDATE}.sfc_data.tile${itile}.nc . + cp -p ${COMIN}/${FILEDATE}.sfc_data.tile${itile}.nc . done # convert back to UFS tile echo '************************************************' echo 'calling tile2tile' +# copy restarts into work directory for itile in {1..6} do - cp ${DATA_SHARE}/ufs_land_restart.${YYYY}-${MM}-${DD}_${HH}-00-00.tile${itile}.nc . + rst_fn="ufs_land_restart.${YYYY}-${MM}-${DD}_${HH}-00-00.tile${itile}.nc" + if [ -f ${DATA_RESTART}/${rst_fn} ]; then + cp ${DATA_RESTART}/${rst_fn} . + elif [ -f ${WARMSTART_DIR}/${rst_fn} ]; then + cp ${WARMSTART_DIR}/${rst_fn} . + else + err_exit "Initial restart files do not exist" + fi done # update tile2tile namelist @@ -81,11 +89,11 @@ do done # WE2E test -if [[ "${WE2E_TEST}" == "YES" ]]; then +if [ "${WE2E_TEST}" == "YES" ]; then path_fbase="${FIXlandda}/test_base/we2e_com/${RUN}.${PDY}" fn_res="ufs_land_restart.anal.${YYYY}-${MM}-${DD}_${HH}-00-00.tile" we2e_log_fp="${LOGDIR}/${WE2E_LOG_FN}" - if [[ ! -e "${we2e_log_fp}" ]]; then + if [ ! -f "${we2e_log_fp}" ]; then touch ${we2e_log_fp} fi # restart files diff --git a/scripts/exlandda_pre_anal.sh b/scripts/exlandda_pre_anal.sh index f6822970..4f133568 100755 --- a/scripts/exlandda_pre_anal.sh +++ b/scripts/exlandda_pre_anal.sh @@ -13,15 +13,13 @@ FILEDATE=${YYYY}${MM}${DD}.${HH}0000 for itile in {1..6} do rst_fn="ufs_land_restart.${YYYY}-${MM}-${DD}_${HH}-00-00.tile${itile}.nc" - if [[ -e ${DATA_RESTART}/${rst_fn} ]]; then + if [ -f ${DATA_RESTART}/${rst_fn} ]; then cp ${DATA_RESTART}/${rst_fn} . - elif [[ -e ${WARMSTART_DIR}/${rst_fn} ]]; then + elif [ -f ${WARMSTART_DIR}/${rst_fn} ]; then cp ${WARMSTART_DIR}/${rst_fn} . else err_exit "Initial restart files do not exist" fi - # copy restart to data share dir for post_anal - cp -p ${rst_fn} ${DATA_SHARE} done # update tile2tile namelist @@ -52,6 +50,6 @@ fi #stage restarts for applying JEDI update to intermediate directory for itile in {1..6} do - cp -p ${DATA}/${FILEDATE}.sfc_data.tile${itile}.nc ${DATA_SHARE}/${FILEDATE}.sfc_data.tile${itile}.nc + cp -p ${DATA}/${FILEDATE}.sfc_data.tile${itile}.nc ${DATA_RESTART}/${FILEDATE}.sfc_data.tile${itile}.nc done