From a762c54ba0fee5b0b0df416dff4b6d43e4b41d1d Mon Sep 17 00:00:00 2001 From: Guillaume Vernieres Date: Thu, 2 May 2024 16:45:17 -0400 Subject: [PATCH 1/5] wip --- jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_POST | 5 +++-- parm/config/gfs/config.com | 1 + ush/forecast_postdet.sh | 6 +++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_POST b/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_POST index ef2f07cfe5f..daaffa16231 100755 --- a/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_POST +++ b/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_POST @@ -13,9 +13,10 @@ export CDATE=${CDATE:-${PDY}${cyc}} export GDUMP=${GDUMP:-"gdas"} # Generate COM variables from templates -YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_OCEAN_ANALYSIS COM_ICE_RESTART +YMD=${PDY} HH=${cyc} declare_from_tmpl -rx COM_OCEAN_ANALYSIS COM_ICE_ANALYSIS COM_ICE_RESTART mkdir -p "${COM_OCEAN_ANALYSIS}" +mkdir -p "${COM_ICE_ANALYSIS}" mkdir -p "${COM_ICE_RESTART}" ############################################## @@ -40,6 +41,6 @@ status=$? # Remove the Temporary working directory ########################################## cd "${DATAROOT}" || exit 1 -[[ "${KEEPDATA}" = "NO" ]] && rm -rf "${DATA}" +#[[ "${KEEPDATA}" = "NO" ]] && rm -rf "${DATA}" exit 0 diff --git a/parm/config/gfs/config.com b/parm/config/gfs/config.com index 5d63a499ed7..004ca1affba 100644 --- a/parm/config/gfs/config.com +++ b/parm/config/gfs/config.com @@ -84,6 +84,7 @@ declare -rx COM_OCEAN_NETCDF_TMPL=${COM_BASE}'/products/ocean/netcdf' declare -rx COM_OCEAN_GRIB_TMPL=${COM_BASE}'/products/ocean/grib2' declare -rx COM_OCEAN_GRIB_GRID_TMPL=${COM_OCEAN_GRIB_TMPL}'/${GRID}' +declare -rx COM_ICE_ANALYSIS_TMPL=${COM_BASE}'/analysis/ice' declare -rx COM_ICE_INPUT_TMPL=${COM_BASE}'/model_data/ice/input' declare -rx COM_ICE_HISTORY_TMPL=${COM_BASE}'/model_data/ice/history' declare -rx COM_ICE_RESTART_TMPL=${COM_BASE}'/model_data/ice/restart' diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index 120f563730a..60de64c4a5c 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -531,7 +531,11 @@ CICE_postdet() { else restart_date="${current_cycle}" fi - cice_restart_file="${COM_ICE_RESTART_PREV}/${restart_date:0:8}.${restart_date:8:2}0000.cice_model.res.nc" + if [[ "${DO_JEDIOCNVAR:-NO}" = "YES" ]]; then + cice_restart_file="${COM_ICE_ANALYSIS}/${PDY}.${cyc}0000.cice_model_anl.res.nc" + else + cice_restart_file="${COM_ICE_RESTART_PREV}/${restart_date:0:8}.${restart_date:8:2}0000.cice_model.res.nc" + fi fi # Copy CICE ICs From d61adc8ce1fcf7139de29a823b6112a64e3569d5 Mon Sep 17 00:00:00 2001 From: Guillaume Vernieres Date: Mon, 6 May 2024 13:44:08 +0000 Subject: [PATCH 2/5] re-run case --- ush/forecast_postdet.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index d70ef3385a7..40f33ce742e 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -524,12 +524,14 @@ CICE_postdet() { local seconds seconds=$(to_seconds "${restart_date:8:2}0000") # convert HHMMSS to seconds cice_restart_file="${DATArestart}/CICE_RESTART/cice_model.res.${restart_date:0:4}-${restart_date:4:2}-${restart_date:6:2}-${seconds}.nc" + if [[ "${DO_JEDIOCNVAR:-NO}" = "YES" && "${restart_date}" = "${sdate_current_cycle}" ]]; then + cice_restart_file="${COM_ICE_ANALYSIS}/${restart_date:0:8}.${restart_date:8:2}0000.cice_model_anl.res.nc" + fi else # "${RERUN}" == "NO" restart_date="${sdate_current_cycle}" + cice_restart_file="${COM_ICE_RESTART_PREV}/${restart_date:0:8}.${restart_date:8:2}0000.cice_model.res.nc" if [[ "${DO_JEDIOCNVAR:-NO}" = "YES" ]]; then - cice_restart_file="${COM_ICE_ANALYSIS}/${restart_date:0:8}.${restart_date:8:2}0000.cice_model_anl.res.nc" - else - cice_restart_file="${COM_ICE_RESTART_PREV}/${restart_date:0:8}.${restart_date:8:2}0000.cice_model.res.nc" + cice_restart_file="${COM_ICE_ANALYSIS}/${restart_date:0:8}.${restart_date:8:2}0000.cice_model_anl.res.nc" fi fi From e648686c058c3deed85051de1c363c98664e7c31 Mon Sep 17 00:00:00 2001 From: Guillaume Vernieres Date: Mon, 6 May 2024 13:51:44 +0000 Subject: [PATCH 3/5] ... --- jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_POST | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_POST b/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_POST index daaffa16231..c87dc6b34fe 100755 --- a/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_POST +++ b/jobs/JGDAS_GLOBAL_OCEAN_ANALYSIS_POST @@ -41,6 +41,6 @@ status=$? # Remove the Temporary working directory ########################################## cd "${DATAROOT}" || exit 1 -#[[ "${KEEPDATA}" = "NO" ]] && rm -rf "${DATA}" +[[ "${KEEPDATA}" = "NO" ]] && rm -rf "${DATA}" exit 0 From 0ad47001bfe7b6f0beb6a9e688715e51b8e5f0f4 Mon Sep 17 00:00:00 2001 From: Guillaume Vernieres Date: Mon, 6 May 2024 17:32:09 +0000 Subject: [PATCH 4/5] ... --- ush/forecast_postdet.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/ush/forecast_postdet.sh b/ush/forecast_postdet.sh index 40f33ce742e..d0dfd4570d9 100755 --- a/ush/forecast_postdet.sh +++ b/ush/forecast_postdet.sh @@ -524,11 +524,8 @@ CICE_postdet() { local seconds seconds=$(to_seconds "${restart_date:8:2}0000") # convert HHMMSS to seconds cice_restart_file="${DATArestart}/CICE_RESTART/cice_model.res.${restart_date:0:4}-${restart_date:4:2}-${restart_date:6:2}-${seconds}.nc" - if [[ "${DO_JEDIOCNVAR:-NO}" = "YES" && "${restart_date}" = "${sdate_current_cycle}" ]]; then - cice_restart_file="${COM_ICE_ANALYSIS}/${restart_date:0:8}.${restart_date:8:2}0000.cice_model_anl.res.nc" - fi else # "${RERUN}" == "NO" - restart_date="${sdate_current_cycle}" + restart_date="${model_start_date_current_cycle}" cice_restart_file="${COM_ICE_RESTART_PREV}/${restart_date:0:8}.${restart_date:8:2}0000.cice_model.res.nc" if [[ "${DO_JEDIOCNVAR:-NO}" = "YES" ]]; then cice_restart_file="${COM_ICE_ANALYSIS}/${restart_date:0:8}.${restart_date:8:2}0000.cice_model_anl.res.nc" From 342d92c61b92a037313f858eaa0132d53a372905 Mon Sep 17 00:00:00 2001 From: Guillaume Vernieres Date: Mon, 6 May 2024 18:37:16 +0000 Subject: [PATCH 5/5] forgot com ice ana --- jobs/JGLOBAL_FORECAST | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jobs/JGLOBAL_FORECAST b/jobs/JGLOBAL_FORECAST index 8d91be8a571..9ae247cdca3 100755 --- a/jobs/JGLOBAL_FORECAST +++ b/jobs/JGLOBAL_FORECAST @@ -36,7 +36,7 @@ declare -rx gcyc="${GDATE:8:2}" # Construct COM variables from templates (see config.com) YMD="${PDY}" HH="${cyc}" declare_from_tmpl -rx COM_ATMOS_RESTART COM_ATMOS_INPUT COM_ATMOS_ANALYSIS \ - COM_ATMOS_HISTORY COM_ATMOS_MASTER COM_TOP COM_CONF + COM_ICE_ANALYSIS COM_ATMOS_HISTORY COM_ATMOS_MASTER COM_TOP COM_CONF RUN="${rCDUMP}" YMD="${gPDY}" HH="${gcyc}" declare_from_tmpl -rx \ COM_ATMOS_RESTART_PREV:COM_ATMOS_RESTART_TMPL