From 55da38b2d055d835f8a929bb347f81de050984d7 Mon Sep 17 00:00:00 2001 From: "Jianping.Huang" Date: Fri, 16 Jun 2023 13:27:02 +0000 Subject: [PATCH 1/7] update bias correction scripts and correct airnow data path --- scripts/exregional_bias_correction_o3.sh | 59 +++++++++++----------- scripts/exregional_bias_correction_pm25.sh | 26 +++++----- scripts/exregional_fire_emission.sh | 24 ++++----- ush/config_defaults.yaml | 9 ++-- ush/machine/wcoss2.yaml | 7 +-- 5 files changed, 62 insertions(+), 63 deletions(-) diff --git a/scripts/exregional_bias_correction_o3.sh b/scripts/exregional_bias_correction_o3.sh index c0206933fc..3fec165b91 100755 --- a/scripts/exregional_bias_correction_o3.sh +++ b/scripts/exregional_bias_correction_o3.sh @@ -97,7 +97,7 @@ if [ ${#FCST_LEN_CYCL[@]} -gt 1 ]; then cyc_mod=$(( ${cyc} - ${DATE_FIRST_CYCL:8:2} )) CYCLE_IDX=$(( ${cyc_mod} / ${INCR_CYCL_FREQ} )) FCST_LEN_HRS=${FCST_LEN_CYCL[$CYCLE_IDX]} -fi +fi #----------------------------------------------------------------------------- # STEP 1: Retrieve AIRNOW observation data @@ -108,10 +108,11 @@ mkdir -p "${DATA}/data" if [ -d "${DATA}/data/bcdata.${yyyymm}" ]; then rm -rf "${DATA}/data/bcdata.${yyyymm}" mkdir -p "${DATA}/data/bcdata.${yyyymm}" - cp -rL "${AQM_AIRNOW_HIST_DIR}/bcdata.${yyyymm}/airnow" "${DATA}/data/bcdata.${yyyymm}" - cp -rL "${AQM_AIRNOW_HIST_DIR}/bcdata.${yyyymm}/interpolated" "${DATA}/data/bcdata.${yyyymm}" + cp -rL "${COMINbicor}/bcdata.${yyyymm}/airnow" "${DATA}/data/bcdata.${yyyymm}" + cp -rL "${COMINbicor}/bcdata.${yyyymm}/interpolated" "${DATA}/data/bcdata.${yyyymm}" fi +cd ${DATA} # Retrieve real-time airnow data for the last three days and convert them into netcdf if [ "${DO_REAL_TIME}" = "TRUE" ]; then for ipdym in {1..3}; do @@ -214,31 +215,31 @@ POST_STEP cp ${DATA}/out/ozone/${yyyy}/*nc ${DATA}/data/bcdata.${yyyymm}/interpolated/ozone/${yyyy} -if [ "${DO_AQM_SAVE_AIRNOW_HIST}" = "TRUE" ]; then - mkdir -p ${AQM_AIRNOW_HIST_DIR}/bcdata.${yyyymm}/interpolated/ozone/${yyyy} - cp ${DATA}/out/ozone/${yyyy}/*nc ${AQM_AIRNOW_HIST_DIR}/bcdata.${yyyymm}/interpolated/ozone/${yyyy} +#if [ "${DO_AQM_SAVE_AIRNOW_HIST}" = "TRUE" ]; then + mkdir -p ${COMOUTbicor}/bcdata.${yyyymm}/interpolated/ozone/${yyyy} + cp ${DATA}/out/ozone/${yyyy}/*nc ${COMOUTbicor}/bcdata.${yyyymm}/interpolated/ozone/${yyyy} # CSV files - mkdir -p ${AQM_AIRNOW_HIST_DIR}/bcdata.${yyyymm}/airnow/csv/${yyyy}/${PDY} - mkdir -p ${AQM_AIRNOW_HIST_DIR}/bcdata.${yyyymm_m1}/airnow/csv/${yyyy_m1}/${PDYm1} - mkdir -p ${AQM_AIRNOW_HIST_DIR}/bcdata.${yyyymm_m2}/airnow/csv/${yyyy_m2}/${PDYm2} - mkdir -p ${AQM_AIRNOW_HIST_DIR}/bcdata.${yyyymm_m3}/airnow/csv/${yyyy_m3}/${PDYm3} - cp ${DCOMINairnow}/${PDYm1}/airnow/HourlyAQObs_${PDYm1}*.dat ${AQM_AIRNOW_HIST_DIR}/bcdata.${yyyymm_m1}/airnow/csv/${yyyy_m1}/${PDYm1} - cp ${DCOMINairnow}/${PDYm2}/airnow/HourlyAQObs_${PDYm2}*.dat ${AQM_AIRNOW_HIST_DIR}/bcdata.${yyyymm_m2}/airnow/csv/${yyyy_m2}/${PDYm2} - cp ${DCOMINairnow}/${PDYm3}/airnow/HourlyAQObs_${PDYm3}*.dat ${AQM_AIRNOW_HIST_DIR}/bcdata.${yyyymm_m3}/airnow/csv/${yyyy_m3}/${PDYm3} + mkdir -p ${COMOUTbicor}/bcdata.${yyyymm}/airnow/csv/${yyyy}/${PDY} + mkdir -p ${COMOUTbicor}/bcdata.${yyyymm_m1}/airnow/csv/${yyyy_m1}/${PDYm1} + mkdir -p ${COMOUTbicor}/bcdata.${yyyymm_m2}/airnow/csv/${yyyy_m2}/${PDYm2} + mkdir -p ${COMOUTbicor}/bcdata.${yyyymm_m3}/airnow/csv/${yyyy_m3}/${PDYm3} + cp ${DCOMINairnow}/${PDYm1}/airnow/HourlyAQObs_${PDYm1}*.dat ${COMOUTbicor}/bcdata.${yyyymm_m1}/airnow/csv/${yyyy_m1}/${PDYm1} + cp ${DCOMINairnow}/${PDYm2}/airnow/HourlyAQObs_${PDYm2}*.dat ${COMOUTbicor}/bcdata.${yyyymm_m2}/airnow/csv/${yyyy_m2}/${PDYm2} + cp ${DCOMINairnow}/${PDYm3}/airnow/HourlyAQObs_${PDYm3}*.dat ${COMOUTbicor}/bcdata.${yyyymm_m3}/airnow/csv/${yyyy_m3}/${PDYm3} # NetCDF files - mkdir -p ${AQM_AIRNOW_HIST_DIR}/bcdata.${yyyymm}/airnow/netcdf/${yyyy}/${PDY} - mkdir -p ${AQM_AIRNOW_HIST_DIR}/bcdata.${yyyymm_m1}/airnow/netcdf/${yyyy_m1}/${PDYm1} - mkdir -p ${AQM_AIRNOW_HIST_DIR}/bcdata.${yyyymm_m2}/airnow/netcdf/${yyyy_m2}/${PDYm2} - mkdir -p ${AQM_AIRNOW_HIST_DIR}/bcdata.${yyyymm_m3}/airnow/netcdf/${yyyy_m3}/${PDYm3} - cp ${DATA}/data/bcdata.${yyyymm_m1}/airnow/netcdf/${yyyy_m1}/${PDYm1}/HourlyAQObs.${PDYm1}.nc ${AQM_AIRNOW_HIST_DIR}/bcdata.${yyyymm_m1}/airnow/netcdf/${yyyy_m1}/${PDYm1} - cp ${DATA}/data/bcdata.${yyyymm_m2}/airnow/netcdf/${yyyy_m2}/${PDYm2}/HourlyAQObs.${PDYm2}.nc ${AQM_AIRNOW_HIST_DIR}/bcdata.${yyyymm_m2}/airnow/netcdf/${yyyy_m2}/${PDYm2} - cp ${DATA}/data/bcdata.${yyyymm_m3}/airnow/netcdf/${yyyy_m3}/${PDYm3}/HourlyAQObs.${PDYm3}.nc ${AQM_AIRNOW_HIST_DIR}/bcdata.${yyyymm_m3}/airnow/netcdf/${yyyy_m3}/${PDYm3} - - mkdir -p ${AQM_AIRNOW_HIST_DIR}/bcdata.${yyyymm}/grid/${cyc}z/${PDY} - cp ${COMIN}/${NET}.${cycle}.*sfc*.nc ${AQM_AIRNOW_HIST_DIR}/bcdata.${yyyymm}/grid/${cyc}z/${PDY} -fi + mkdir -p ${COMOUTbicor}/bcdata.${yyyymm}/airnow/netcdf/${yyyy}/${PDY} + mkdir -p ${COMOUTbicor}/bcdata.${yyyymm_m1}/airnow/netcdf/${yyyy_m1}/${PDYm1} + mkdir -p ${COMOUTbicor}/bcdata.${yyyymm_m2}/airnow/netcdf/${yyyy_m2}/${PDYm2} + mkdir -p ${COMOUTbicor}/bcdata.${yyyymm_m3}/airnow/netcdf/${yyyy_m3}/${PDYm3} + cp ${DATA}/data/bcdata.${yyyymm_m1}/airnow/netcdf/${yyyy_m1}/${PDYm1}/HourlyAQObs.${PDYm1}.nc ${COMOUTbicor}/bcdata.${yyyymm_m1}/airnow/netcdf/${yyyy_m1}/${PDYm1} + cp ${DATA}/data/bcdata.${yyyymm_m2}/airnow/netcdf/${yyyy_m2}/${PDYm2}/HourlyAQObs.${PDYm2}.nc ${COMOUTbicor}/bcdata.${yyyymm_m2}/airnow/netcdf/${yyyy_m2}/${PDYm2} + cp ${DATA}/data/bcdata.${yyyymm_m3}/airnow/netcdf/${yyyy_m3}/${PDYm3}/HourlyAQObs.${PDYm3}.nc ${COMOUTbicor}/bcdata.${yyyymm_m3}/airnow/netcdf/${yyyy_m3}/${PDYm3} + + mkdir -p ${COMOUTbicor}/bcdata.${yyyymm}/grid/${cyc}z/${PDY} + cp ${COMIN}/${NET}.${cycle}.*sfc*.nc ${COMOUTbicor}/bcdata.${yyyymm}/grid/${cyc}z/${PDY} +#fi #----------------------------------------------------------------------------- # STEP 4: Performing Bias Correction for Ozone @@ -246,7 +247,7 @@ fi rm -rf ${DATA}/data/bcdata* -ln -sf ${AQM_AIRNOW_HIST_DIR}/bcdata* "${DATA}/data" +ln -sf ${COMINbicor}/bcdata* "${DATA}/data" mkdir -p ${DATA}/data/sites cp ${PARMaqm_utils}/bias_correction/config.ozone.bias_corr_${id_domain}.${cyc}z ${DATA} @@ -381,7 +382,7 @@ EOF1 cp ${DATA}/${NET}.${cycle}.max_*hr_o3_bc.*.grib2 ${COMOUT} - if [ "$SENDDBN" = "TRUE" ]; then + if [ "$SENDDBN" = "YES" ]; then ${DBNROOT}/bin/dbn_alert MODEL AQM_MAX ${job} ${COMOUT}/${NET}.${cycle}.max_1hr_o3_bc.227.grib2 ${DBNROOT}/bin/dbn_alert MODEL AQM_MAX ${job} ${COMOUT}/${NET}.${cycle}.max_8hr_o3_bc.227.grib2 fi @@ -409,7 +410,7 @@ EOF1 cp awpaqm.${cycle}.*o3-max-bc.227.grib2 ${COMOUTwmo} # Distribute Data - if [ "${SENDDBN_NTC}" = "TRUE" ] ; then + if [ "${SENDDBN_NTC}" = "YES" ] ; then ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.1ho3-max-bc.227.grib2 ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.8ho3-max-bc.227.grib2 fi @@ -456,7 +457,7 @@ if [ "${cyc}" = "06" ] || [ "${cyc}" = "12" ]; then cp ${NET}.${cycle}.ave_8hr_o3_bc.227.grib2 ${COMOUT} fi -if [ "${SENDDBN}" = "TRUE" ] ; then +if [ "${SENDDBN}" = "YES" ] ; then ${DBNROOT}/bin/dbn_alert MODEL AQM_CONC ${job} ${COMOUT}/${NET}.${cycle}.ave_1hr_o3_bc.227.grib2 if [ "${cyc}" = "06" ] || [ "${cyc}" = "12" ]; then ${DBNROOT}/bin/dbn_alert MODEL AQM_CONC ${job} ${COMOUT}/${NET}.${cycle}.ave_8hr_o3_bc.227.grib2 @@ -508,7 +509,7 @@ if [ "${cyc}" = "06" ] || [ "${cyc}" = "12" ]; then cp awpaqm.${cycle}.${hr}ho3-max-bc.227.grib2 ${COMOUTwmo} # Distribute Data - if [ "${SENDDBN}" = "TRUE" ]; then + if [ "${SENDDBN}" = "YES" ]; then ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.${hr}ho3-bc.227.grib2 ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.${hr}ho3-max-bc.227.grib2 fi diff --git a/scripts/exregional_bias_correction_pm25.sh b/scripts/exregional_bias_correction_pm25.sh index 6924b4dbf8..996249770b 100755 --- a/scripts/exregional_bias_correction_pm25.sh +++ b/scripts/exregional_bias_correction_pm25.sh @@ -97,7 +97,7 @@ if [ ${#FCST_LEN_CYCL[@]} -gt 1 ]; then cyc_mod=$(( ${cyc} - ${DATE_FIRST_CYCL:8:2} )) CYCLE_IDX=$(( ${cyc_mod} / ${INCR_CYCL_FREQ} )) FCST_LEN_HRS=${FCST_LEN_CYCL[$CYCLE_IDX]} -fi +fi #----------------------------------------------------------------------------- # STEP 1: Retrieve AIRNOW observation data @@ -111,9 +111,9 @@ if [ -d "${DATA}/data/bcdata.${yyyymm}" ]; then cp -rL "${AQM_AIRNOW_HIST_DIR}/bcdata.${yyyymm}/airnow" "${DATA}/data/bcdata.${yyyymm}" cp -rL "${AQM_AIRNOW_HIST_DIR}/bcdata.${yyyymm}/interpolated" "${DATA}/data/bcdata.${yyyymm}" fi - +cd ${DATA} # Retrieve real-time airnow data for the last three days -if [ "${DO_REAL_TIME}" = "TRUE" ]; then +#if [ "${DO_REAL_TIME}" = "TRUE" ]; then for ipdym in {1..3}; do case $ipdym in 1) @@ -156,7 +156,7 @@ if [ "${DO_REAL_TIME}" = "TRUE" ]; then fi POST_STEP done -fi +#fi #----------------------------------------------------------------------------- # STEP 2: Extracting PM2.5, O3, and met variables from CMAQ input and outputs @@ -214,10 +214,10 @@ POST_STEP cp ${DATA}/out/pm25/${yyyy}/*nc ${DATA}/data/bcdata.${yyyymm}/interpolated/pm25/${yyyy} -if [ "${DO_AQM_SAVE_AIRNOW_HIST}" = "TRUE" ]; then - mkdir -p ${AQM_AIRNOW_HIST_DIR}/bcdata.${yyyymm}/interpolated/pm25/${yyyy} - cp ${DATA}/out/pm25/${yyyy}/*nc ${AQM_AIRNOW_HIST_DIR}/bcdata.${yyyymm}/interpolated/pm25/${yyyy} -fi +#if [ "${DO_AQM_SAVE_AIRNOW_HIST}" = "TRUE" ]; then + mkdir -p ${COMOUTbicor}/bcdata.${yyyymm}/interpolated/pm25/${yyyy} + cp ${DATA}/out/pm25/${yyyy}/*nc ${COMOUTbicor}/bcdata.${yyyymm}/interpolated/pm25/${yyyy} +#fi #----------------------------------------------------------------------- # STEP 4: Performing Bias Correction for PM2.5 @@ -225,7 +225,7 @@ fi rm -rf ${DATA}/data/bcdata* -ln -sf ${AQM_AIRNOW_HIST_DIR}/bcdata* "${DATA}/data" +ln -sf ${COMINbicor}/bcdata* "${DATA}/data" mkdir -p ${DATA}/data/sites @@ -280,7 +280,7 @@ fi POST_STEP cp ${DATA}/${NET}.${cycle}.pm25*bc*.grib2 ${COMOUT} -if [ "$SENDDBN" = "TRUE" ]; then +if [ "$SENDDBN" = "YES" ]; then $DBNROOT/bin/dbn_alert MODEL AQM_PM ${job} ${COMOUT} fi @@ -377,7 +377,7 @@ EOF1 cp ${NET}.${cycle}.max_1hr_pm25_bc.227.grib2 ${COMOUT} cp ${NET}.${cycle}.ave_24hr_pm25_bc.227.grib2 ${COMOUT} - if [ "${SENDDBN}" = "TRUE" ]; then + if [ "${SENDDBN}" = "YES" ]; then ${DBNROOT}/bin/dbn_alert MODEL AQM_MAX ${job} ${COMOUT}/${NET}.${cycle}.max_1hr_pm25_bc.227.grib2 ${DBNROOT}/bin/dbn_alert MODEL AQM_PM ${job} ${COMOUT}/${NET}.${cycle}.ave_24hr_pm25_bc.227.grib2 fi @@ -395,7 +395,7 @@ wgrib2 tmpfile_pm25_bc -set_grib_type c3b -new_grid_winds earth -new_grid ${grid cp tmpfile_pm25_bc ${COMOUT}/${NET}.${cycle}.ave_1hr_pm25_bc.${id_domain}.grib2 cp ${NET}.${cycle}.grib2_pm25_bc.227 ${COMOUT}/${NET}.${cycle}.ave_1hr_pm25_bc.227.grib2 -if [ "${SENDDBN}" = "TRUE" ]; then +if [ "${SENDDBN}" = "YES" ]; then ${DBNROOT}/bin/dbn_alert MODEL AQM_PM ${job} ${COMOUT}/${NET}.${cycle}.ave_1hr_pm25_bc.227.grib2 fi @@ -463,7 +463,7 @@ if [ "${cyc}" = "06" ] || [ "${cyc}" = "12" ]; then cp awpaqm.${cycle}.24hr-pm25-ave-bc.227.grib2 ${COMOUTwmo} # Distribute Data - if [ "${SENDDBN_NTC}" = "TRUE" ] ; then + if [ "${SENDDBN_NTC}" = "YES" ] ; then ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.1hpm25-bc.227.grib2 ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.daily-1hr-pm25-max-bc.227.grib2 ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.24hr-pm25-ave-bc.227.grib2 diff --git a/scripts/exregional_fire_emission.sh b/scripts/exregional_fire_emission.sh index 909382d28c..e1d1c913cf 100755 --- a/scripts/exregional_fire_emission.sh +++ b/scripts/exregional_fire_emission.sh @@ -56,12 +56,10 @@ data files. yyyymmdd=${FIRE_FILE_CDATE:0:8} hh=${FIRE_FILE_CDATE:8:2} -CDATE_mh3=$( $DATE_UTIL --utc --date "${yyyymmdd} ${hh} UTC - 3 hours" "+%Y%m%d%H" ) -CDATE_mh2=$( $DATE_UTIL --utc --date "${yyyymmdd} ${hh} UTC - 2 hours" "+%Y%m%d%H" ) CDATE_mh1=$( $DATE_UTIL --utc --date "${yyyymmdd} ${hh} UTC - 1 hours" "+%Y%m%d%H" ) -yyyymmdd_mh3=${CDATE_mh3:0:8} -hh_mh3=${CDATE_mh3:8:2} +yyyymmdd_mh1=${CDATE_mh1:0:8} +hh_mh1=${CDATE_mh1:8:2} # #----------------------------------------------------------------------- # @@ -76,19 +74,19 @@ if [ -e "${DCOMINfire}/${aqm_fire_file_fn}" ]; then cp "${DCOMINfire}/${aqm_fire_file_fn}" "${FIRE_EMISSION_STAGING_DIR}" else # Copy raw data - for ihr in {0..21}; do - download_time=$( $DATE_UTIL --utc --date "${yyyymmdd_mh3} ${hh_mh3} UTC - $ihr hours" "+%Y%m%d%H" ) + for ihr in {0..23}; do + download_time=$( $DATE_UTIL --utc --date "${yyyymmdd_mh1} ${hh_mh1} UTC - $ihr hours" "+%Y%m%d%H" ) FILE_13km="Hourly_Emissions_13km_${download_time}00_${download_time}00.nc" yyyymmdd_dn=${download_time:0:8} hh_dn=${download_time:8:2} missing_download_time=$( $DATE_UTIL --utc --date "${yyyymmdd_dn} ${hh_dn} UTC - 24 hours" "+%Y%m%d%H" ) yyyymmdd_dn_md1=${missing_download_time:0:8} FILE_13km_md1=Hourly_Emissions_13km_${missing_download_time}00_${missing_download_time}00.nc - if [ -e "${DCOMINfire}/RAVE_raw_new/${yyyymmdd_dn}/${FILE_13km}" ]; then - ln -sf "${DCOMINfire}/RAVE_raw_new/${yyyymmdd_dn}/${FILE_13km}" . - elif [ -e "${DCOMINfire}/RAVE_raw_new/${yyyymmdd_dn_md1}/${FILE_13km_md1}" ]; then + if [ -e "${DCOMINfire}/${yyyymmdd_dn}/rave/${FILE_13km}" ]; then + cp -p "${DCOMINfire}/${yyyymmdd_dn}/rave/${FILE_13km}" . + elif [ -e "${DCOMINfire}/${yyyymmdd_dn_md1}/rave/${FILE_13km_md1}" ]; then echo "WARNING: ${FILE_13km} does not exist. Replacing with the file of previous date ..." - ln -sf "${DCOMINfire}/RAVE_raw_new/${yyyymmdd_dn_md1}/${FILE_13km_md1}" "${FILE_13km}" + cp -p "${DCOMINfire}/${yyyymmdd_dn_md1}/rave/${FILE_13km_md1}" "${FILE_13km}" else message_txt="Fire Emission RAW data does not exist: FILE_13km_md1 = \"${FILE_13km_md1}\" @@ -97,7 +95,7 @@ else if [ "${RUN_ENVIR}" = "community" ]; then print_err_msg_exit "${message_txt}" else - ln -sf "${DCOMINfire}/Hourly_Emissions_13km_dummy.nc" "${FILE_13km}" + cp -p "${DCOMINfire}/Hourly_Emissions_13km_dummy.nc" "${FILE_13km}" message_warning="WARNING: ${message_txt}. Replacing with the dummy file :: AQM RUN SOFT FAILED." print_info_msg "${message_warning}" if [ ! -z "${maillist}" ]; then @@ -120,10 +118,6 @@ else mv temp.nc Hourly_Emissions_13km_${download_time}00_${download_time}00.nc - # Extra times - cp Hourly_Emissions_13km_${CDATE_mh3}00_${CDATE_mh3}00.nc Hourly_Emissions_13km_${CDATE_mh2}00_${CDATE_mh2}00.nc - cp Hourly_Emissions_13km_${CDATE_mh3}00_${CDATE_mh3}00.nc Hourly_Emissions_13km_${CDATE_mh1}00_${CDATE_mh1}00.nc - ncrcat -h Hourly_Emissions_13km_*.nc Hourly_Emissions_13km_${yyyymmdd}0000_${yyyymmdd}2300.t${cyc}z.nc export err=$? if [ $err -ne 0 ]; then diff --git a/ush/config_defaults.yaml b/ush/config_defaults.yaml index d72df2cc67..e9b9e46907 100644 --- a/ush/config_defaults.yaml +++ b/ush/config_defaults.yaml @@ -2901,8 +2901,10 @@ cpl_aqm_parm: # DO_AQM_GEFS_LBCS: # Add GEFS aerosol LBCs to chemical LBCs # - # DO_AQM_SAVE_AIRNOW_HIST: - # Save bias-correction airnow training data + # COMINbicor + # Read bias-correction training data + # COMOUTbicor + # Save bias-correction training data # # DO_AQM_SAVE_FIRE: # Archive fire emission file to HPSS @@ -3052,4 +3054,5 @@ cpl_aqm_parm: DCOMINpt_src_dfv: "/path/to/point/source/base/directory" DCOMINairnow_dfv: "/path/to/airnow/obaservation/data" - AQM_AIRNOW_HIST_DIR: "/path/to/historical/airnow/data/dir" + COMINbicor: "/path/to/historical/airnow/data/dir" + COMOUTbicor: "/path/to/historical/airnow/data/dir" diff --git a/ush/machine/wcoss2.yaml b/ush/machine/wcoss2.yaml index 349c279746..c5cfe44743 100644 --- a/ush/machine/wcoss2.yaml +++ b/ush/machine/wcoss2.yaml @@ -42,12 +42,13 @@ cpl_aqm_parm: DCOMINbio_dfv: /lfs/h2/emc/lam/noscrub/RRFS_CMAQ/aqm/bio DCOMINdust_dfv: /lfs/h2/emc/lam/noscrub/RRFS_CMAQ/FENGSHA DCOMINcanopy_dfv: /lfs/h2/emc/lam/noscrub/RRFS_CMAQ/canopy - DCOMINfire_dfv: /lfs/h2/emc/physics/noscrub/kai.wang/RAVE_fire/RAVE_NA_NRT + DCOMINfire_dfv: /lfs/h1/ops/dev/dcom DCOMINchem_lbcs_dfv: /lfs/h2/emc/lam/noscrub/RRFS_CMAQ/LBCS/AQM_NA13km_AM4_v1 - DCOMINgefs_dfv: /lfs/h2/emc/lam/noscrub/RRFS_CMAQ/GEFS_DATA + DCOMINgefs_dfv: /lfs/h1/ops/prod/com/gefs/v12.3 DCOMINpt_src_dfv: /lfs/h2/emc/physics/noscrub/Youhua.Tang/nei2016v1-pt/v2023-01-PT DCOMINairnow_dfv: /lfs/h1/ops/prod/dcom - AQM_AIRNOW_HIST_DIR: /lfs/h2/emc/physics/noscrub/jianping.huang/Bias_correction/aqmv7.0 + COMINbicor: /lfs/h2/emc/physics/noscrub/jianping.huang/Bias_correction/aqmv7.0.81 + COMOUTbicor: /lfs/h2/emc/physics/noscrub/jianping.huang/Bias_correction/aqmv7.0.81 NEXUS_INPUT_DIR: /lfs/h2/emc/lam/noscrub/RRFS_CMAQ/nexus_emissions NEXUS_FIX_DIR: /lfs/h2/emc/lam/noscrub/RRFS_CMAQ/nexus/fix NEXUS_GFS_SFC_DIR: /lfs/h2/emc/lam/noscrub/RRFS_CMAQ/GFS_DATA From cf3b038025774cca796d1e1d3fca2510a041e975 Mon Sep 17 00:00:00 2001 From: "Jianping.Huang" Date: Tue, 20 Jun 2023 17:09:38 +0000 Subject: [PATCH 2/7] update hash numbers for arl_nexus and AQM_utils --- Externals.cfg | 4 ++-- scripts/exregional_bias_correction_o3.sh | 14 +++----------- scripts/exregional_bias_correction_pm25.sh | 11 ++--------- ush/machine/wcoss2.yaml | 7 ++++--- 4 files changed, 11 insertions(+), 25 deletions(-) diff --git a/Externals.cfg b/Externals.cfg index 75f80c599c..c871f9a3ea 100644 --- a/Externals.cfg +++ b/Externals.cfg @@ -30,7 +30,7 @@ protocol = git repo_url = https://github.com/noaa-oar-arl/NEXUS # Specify either a branch name or a hash but not both. #branch = develop -hash = 3842818 +hash = 732a441 local_path = sorc/arl_nexus required = True @@ -39,7 +39,7 @@ protocol = git repo_url = https://github.com/NOAA-EMC/AQM-utils # Specify either a branch name or a hash but not both. #branch = develop -hash = 9b2921c +hash = 694a139 local_path = sorc/AQM-utils required = True diff --git a/scripts/exregional_bias_correction_o3.sh b/scripts/exregional_bias_correction_o3.sh index 3fec165b91..c168671648 100755 --- a/scripts/exregional_bias_correction_o3.sh +++ b/scripts/exregional_bias_correction_o3.sh @@ -97,24 +97,16 @@ if [ ${#FCST_LEN_CYCL[@]} -gt 1 ]; then cyc_mod=$(( ${cyc} - ${DATE_FIRST_CYCL:8:2} )) CYCLE_IDX=$(( ${cyc_mod} / ${INCR_CYCL_FREQ} )) FCST_LEN_HRS=${FCST_LEN_CYCL[$CYCLE_IDX]} -fi +fi #----------------------------------------------------------------------------- # STEP 1: Retrieve AIRNOW observation data #----------------------------------------------------------------------------- -# Link the historical airnow data mkdir -p "${DATA}/data" -if [ -d "${DATA}/data/bcdata.${yyyymm}" ]; then - rm -rf "${DATA}/data/bcdata.${yyyymm}" - mkdir -p "${DATA}/data/bcdata.${yyyymm}" - cp -rL "${COMINbicor}/bcdata.${yyyymm}/airnow" "${DATA}/data/bcdata.${yyyymm}" - cp -rL "${COMINbicor}/bcdata.${yyyymm}/interpolated" "${DATA}/data/bcdata.${yyyymm}" -fi -cd ${DATA} # Retrieve real-time airnow data for the last three days and convert them into netcdf -if [ "${DO_REAL_TIME}" = "TRUE" ]; then +#if [ "${DO_REAL_TIME}" = "TRUE" ]; then for ipdym in {1..3}; do case $ipdym in 1) @@ -157,7 +149,7 @@ if [ "${DO_REAL_TIME}" = "TRUE" ]; then fi POST_STEP done -fi +#fi #----------------------------------------------------------------------------- # STEP 2: Extracting PM2.5, O3, and met variables from CMAQ input and outputs diff --git a/scripts/exregional_bias_correction_pm25.sh b/scripts/exregional_bias_correction_pm25.sh index 996249770b..850e44e95c 100755 --- a/scripts/exregional_bias_correction_pm25.sh +++ b/scripts/exregional_bias_correction_pm25.sh @@ -97,21 +97,14 @@ if [ ${#FCST_LEN_CYCL[@]} -gt 1 ]; then cyc_mod=$(( ${cyc} - ${DATE_FIRST_CYCL:8:2} )) CYCLE_IDX=$(( ${cyc_mod} / ${INCR_CYCL_FREQ} )) FCST_LEN_HRS=${FCST_LEN_CYCL[$CYCLE_IDX]} -fi +fi #----------------------------------------------------------------------------- # STEP 1: Retrieve AIRNOW observation data #----------------------------------------------------------------------------- -# Link the historical airnow data mkdir -p "${DATA}/data" -if [ -d "${DATA}/data/bcdata.${yyyymm}" ]; then - rm -rf "${DATA}/data/bcdata.${yyyymm}" - mkdir -p "${DATA}/data/bcdata.${yyyymm}" - cp -rL "${AQM_AIRNOW_HIST_DIR}/bcdata.${yyyymm}/airnow" "${DATA}/data/bcdata.${yyyymm}" - cp -rL "${AQM_AIRNOW_HIST_DIR}/bcdata.${yyyymm}/interpolated" "${DATA}/data/bcdata.${yyyymm}" -fi -cd ${DATA} + # Retrieve real-time airnow data for the last three days #if [ "${DO_REAL_TIME}" = "TRUE" ]; then for ipdym in {1..3}; do diff --git a/ush/machine/wcoss2.yaml b/ush/machine/wcoss2.yaml index c5cfe44743..c89242a673 100644 --- a/ush/machine/wcoss2.yaml +++ b/ush/machine/wcoss2.yaml @@ -9,9 +9,9 @@ platform: MET_BIN_EXEC: bin MET_INSTALL_DIR: /apps/ops/para/libs/intel/19.1.3.304/met/10.1.1 DOMAIN_PREGEN_BASEDIR: /lfs/h2/emc/lam/noscrub/UFS_SRW_App/develop/FV3LAM_pregen - QUEUE_DEFAULT: dev - QUEUE_FCST: dev - QUEUE_HPSS: dev_transfer + QUEUE_DEFAULT: devhigh + QUEUE_FCST: devhigh + QUEUE_HPSS: devhigh RUN_CMD_FCST: mpiexec -n ${PE_MEMBER01} -ppn ${PPN_RUN_FCST} --cpu-bind core -depth ${OMP_NUM_THREADS_RUN_FCST} RUN_CMD_POST: mpiexec -n ${nprocs} RUN_CMD_PRDGEN: mpiexec -n ${nprocs} --cpu-bind core cfp @@ -47,6 +47,7 @@ cpl_aqm_parm: DCOMINgefs_dfv: /lfs/h1/ops/prod/com/gefs/v12.3 DCOMINpt_src_dfv: /lfs/h2/emc/physics/noscrub/Youhua.Tang/nei2016v1-pt/v2023-01-PT DCOMINairnow_dfv: /lfs/h1/ops/prod/dcom + #DCOMINairnow_dfv: /lfs/h2/emc/physics/noscrub/jianping.huang/dcom COMINbicor: /lfs/h2/emc/physics/noscrub/jianping.huang/Bias_correction/aqmv7.0.81 COMOUTbicor: /lfs/h2/emc/physics/noscrub/jianping.huang/Bias_correction/aqmv7.0.81 NEXUS_INPUT_DIR: /lfs/h2/emc/lam/noscrub/RRFS_CMAQ/nexus_emissions From d6e02bad2ffe930929e945ebee52f93f59c33dcb Mon Sep 17 00:00:00 2001 From: "Jianping.Huang" Date: Thu, 22 Jun 2023 02:58:46 +0000 Subject: [PATCH 3/7] update nexus_emis and nexus_post ex-scripts for fix biogenic emissions --- scripts/exregional_nexus_emission.sh | 24 +++++++++++++-- scripts/exregional_nexus_post_split.sh | 42 +++++++++++++------------- 2 files changed, 42 insertions(+), 24 deletions(-) diff --git a/scripts/exregional_nexus_emission.sh b/scripts/exregional_nexus_emission.sh index a41f11d156..43e4d8ed63 100755 --- a/scripts/exregional_nexus_emission.sh +++ b/scripts/exregional_nexus_emission.sh @@ -147,10 +147,10 @@ else start_del_hr=$(( len_per_split * nspt )) start_date=$( $DATE_UTIL --utc --date "${yyyymmdd} ${hh} UTC + ${start_del_hr} hours " "+%Y%m%d%H" ) if [ "${nsptp}" = "${NUM_SPLIT_NEXUS}" ];then - end_date=$( $DATE_UTIL --utc --date "${yyyymmdd} ${hh} UTC + ${FCST_LEN_HRS} hours" "+%Y%m%d%H" ) + end_date=$( $DATE_UTIL --utc --date "${yyyymmdd} ${hh} UTC + $(expr $FCST_LEN_HRS + 1) hours" "+%Y%m%d%H" ) else end_del_hr=$(( len_per_split * nsptp )) - end_date=$( $DATE_UTIL --utc --date "${yyyymmdd} ${hh} UTC + ${end_del_hr} hours" "+%Y%m%d%H" ) + end_date=$( $DATE_UTIL --utc --date "${yyyymmdd} ${hh} UTC + $(expr $end_del_hr + 1) hours" "+%Y%m%d%H" ) fi fi # @@ -327,6 +327,24 @@ else fi fi POST_STEP + +# +#----------------------------------------------------------------------- +# +# make nexus output pretty and move to INPUT_DATA directory +# +#----------------------------------------------------------------------- +# +python3 ${ARL_NEXUS_DIR}/utils/python/make_nexus_output_pretty.py --src ${DATA}/NEXUS_Expt_split.nc --grid ${DATA}/grid_spec.nc -o ${INPUT_DATA}/${NET}.${cycle}${dot_ensmem}.NEXUS_Expt_split.${nspt}.nc -t ${DATA}/HEMCO_sa_Time.rc +export err=$? +if [ $err -ne 0 ]; then + message_txt="Call to python script \"make_nexus_output_pretty.py\" failed." + if [ "${RUN_ENVIR}" = "community" ]; then + print_err_msg_exit "${message_txt}" + else + err_exit "${message_txt}" + fi +fi # #----------------------------------------------------------------------- # @@ -334,7 +352,7 @@ POST_STEP # #----------------------------------------------------------------------- # -mv ${DATA}/NEXUS_Expt_split.nc ${INPUT_DATA}/${NET}.${cycle}${dot_ensmem}.NEXUS_Expt_split.${nspt}.nc +#mv ${DATA}/NEXUS_Expt_split.nc ${INPUT_DATA}/${NET}.${cycle}${dot_ensmem}.NEXUS_Expt_split.${nspt}.nc # #----------------------------------------------------------------------- diff --git a/scripts/exregional_nexus_post_split.sh b/scripts/exregional_nexus_post_split.sh index f1830092ce..9ac0048649 100755 --- a/scripts/exregional_nexus_post_split.sh +++ b/scripts/exregional_nexus_post_split.sh @@ -99,27 +99,27 @@ fi # #----------------------------------------------------------------------- # -python3 ${ARL_NEXUS_DIR}/utils/python/nexus_time_parser.py -f ${DATA}/HEMCO_sa_Time.rc -s $start_date -e $end_date -export err=$? -if [ $err -ne 0 ]; then - message_txt="Call to python script \"nexus_time_parser.py\" failed." - if [ "${RUN_ENVIR}" = "community" ]; then - print_err_msg_exit "${message_txt}" - else - err_exit "${message_txt}" - fi -fi +# python3 ${ARL_NEXUS_DIR}/utils/python/nexus_time_parser.py -f ${DATA}/HEMCO_sa_Time.rc -s $start_date -e $end_date +# export err=$? +# if [ $err -ne 0 ]; then +# message_txt="Call to python script \"nexus_time_parser.py\" failed." +# if [ "${RUN_ENVIR}" = "community" ]; then +# print_err_msg_exit "${message_txt}" +# else +# err_exit "${message_txt}" +# fi +# fi -python3 ${ARL_NEXUS_DIR}/utils/python/make_nexus_output_pretty.py --src ${DATA}/NEXUS_Expt_combined.nc --grid ${DATA}/grid_spec.nc -o ${DATA}/NEXUS_Expt_pretty.nc -t ${DATA}/HEMCO_sa_Time.rc -export err=$? -if [ $err -ne 0 ]; then - message_txt="Call to python script \"make_nexus_output_pretty.py\" failed." - if [ "${RUN_ENVIR}" = "community" ]; then - print_err_msg_exit "${message_txt}" - else - err_exit "${message_txt}" - fi -fi +# python3 ${ARL_NEXUS_DIR}/utils/python/make_nexus_output_pretty.py --src ${DATA}/NEXUS_Expt_combined.nc --grid ${DATA}/grid_spec.nc -o ${DATA}/NEXUS_Expt_pretty.nc -t ${DATA}/HEMCO_sa_Time.rc +# export err=$? +# if [ $err -ne 0 ]; then +# message_txt="Call to python script \"make_nexus_output_pretty.py\" failed." +# if [ "${RUN_ENVIR}" = "community" ]; then +# print_err_msg_exit "${message_txt}" +# else +# err_exit "${message_txt}" +# fi +# fi # #----------------------------------------------------------------------- # @@ -127,7 +127,7 @@ fi # #----------------------------------------------------------------------- # -python3 ${ARL_NEXUS_DIR}/utils/combine_ant_bio.py ${DATA}/NEXUS_Expt_pretty.nc ${DATA}/NEXUS_Expt.nc +python3 ${ARL_NEXUS_DIR}/utils/combine_ant_bio.py "${DATA}/NEXUS_Expt_combined.nc" ${DATA}/NEXUS_Expt.nc export err=$? if [ $err -ne 0 ]; then message_txt="Call to python script \"NEXUS_Expt_pretty.py\" failed." From 49a692c4d69990d4ca7d62d942923c98dbdc53c9 Mon Sep 17 00:00:00 2001 From: "Jianping.Huang" Date: Fri, 23 Jun 2023 12:47:34 +0000 Subject: [PATCH 4/7] removing uncessary lines with bias-correction ex-scripts --- scripts/exregional_bias_correction_o3.sh | 4 ---- scripts/exregional_bias_correction_pm25.sh | 8 ++------ 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/scripts/exregional_bias_correction_o3.sh b/scripts/exregional_bias_correction_o3.sh index c168671648..a5190a5494 100755 --- a/scripts/exregional_bias_correction_o3.sh +++ b/scripts/exregional_bias_correction_o3.sh @@ -106,7 +106,6 @@ fi mkdir -p "${DATA}/data" # Retrieve real-time airnow data for the last three days and convert them into netcdf -#if [ "${DO_REAL_TIME}" = "TRUE" ]; then for ipdym in {1..3}; do case $ipdym in 1) @@ -149,7 +148,6 @@ mkdir -p "${DATA}/data" fi POST_STEP done -#fi #----------------------------------------------------------------------------- # STEP 2: Extracting PM2.5, O3, and met variables from CMAQ input and outputs @@ -207,7 +205,6 @@ POST_STEP cp ${DATA}/out/ozone/${yyyy}/*nc ${DATA}/data/bcdata.${yyyymm}/interpolated/ozone/${yyyy} -#if [ "${DO_AQM_SAVE_AIRNOW_HIST}" = "TRUE" ]; then mkdir -p ${COMOUTbicor}/bcdata.${yyyymm}/interpolated/ozone/${yyyy} cp ${DATA}/out/ozone/${yyyy}/*nc ${COMOUTbicor}/bcdata.${yyyymm}/interpolated/ozone/${yyyy} @@ -231,7 +228,6 @@ cp ${DATA}/out/ozone/${yyyy}/*nc ${DATA}/data/bcdata.${yyyymm}/interpolated/ozon mkdir -p ${COMOUTbicor}/bcdata.${yyyymm}/grid/${cyc}z/${PDY} cp ${COMIN}/${NET}.${cycle}.*sfc*.nc ${COMOUTbicor}/bcdata.${yyyymm}/grid/${cyc}z/${PDY} -#fi #----------------------------------------------------------------------------- # STEP 4: Performing Bias Correction for Ozone diff --git a/scripts/exregional_bias_correction_pm25.sh b/scripts/exregional_bias_correction_pm25.sh index 850e44e95c..2ae8fb758c 100755 --- a/scripts/exregional_bias_correction_pm25.sh +++ b/scripts/exregional_bias_correction_pm25.sh @@ -106,7 +106,6 @@ fi mkdir -p "${DATA}/data" # Retrieve real-time airnow data for the last three days -#if [ "${DO_REAL_TIME}" = "TRUE" ]; then for ipdym in {1..3}; do case $ipdym in 1) @@ -149,7 +148,6 @@ mkdir -p "${DATA}/data" fi POST_STEP done -#fi #----------------------------------------------------------------------------- # STEP 2: Extracting PM2.5, O3, and met variables from CMAQ input and outputs @@ -207,10 +205,8 @@ POST_STEP cp ${DATA}/out/pm25/${yyyy}/*nc ${DATA}/data/bcdata.${yyyymm}/interpolated/pm25/${yyyy} -#if [ "${DO_AQM_SAVE_AIRNOW_HIST}" = "TRUE" ]; then - mkdir -p ${COMOUTbicor}/bcdata.${yyyymm}/interpolated/pm25/${yyyy} - cp ${DATA}/out/pm25/${yyyy}/*nc ${COMOUTbicor}/bcdata.${yyyymm}/interpolated/pm25/${yyyy} -#fi +mkdir -p ${COMOUTbicor}/bcdata.${yyyymm}/interpolated/pm25/${yyyy} +cp ${DATA}/out/pm25/${yyyy}/*nc ${COMOUTbicor}/bcdata.${yyyymm}/interpolated/pm25/${yyyy} #----------------------------------------------------------------------- # STEP 4: Performing Bias Correction for PM2.5 From 37dab306216b7bc3fb54ad8eb9d219c2cbf4451e Mon Sep 17 00:00:00 2001 From: "Jianping.Huang" Date: Fri, 23 Jun 2023 13:19:39 +0000 Subject: [PATCH 5/7] correct the changes with in ex-scripts for bias correction --- scripts/exregional_bias_correction_o3.sh | 8 +++---- scripts/exregional_bias_correction_pm25.sh | 8 +++---- scripts/exregional_nexus_emission.sh | 9 ------- scripts/exregional_nexus_post_split.sh | 28 ---------------------- ush/config_defaults.yaml | 7 ++++-- ush/machine/wcoss2.yaml | 6 ++--- 6 files changed, 16 insertions(+), 50 deletions(-) diff --git a/scripts/exregional_bias_correction_o3.sh b/scripts/exregional_bias_correction_o3.sh index a5190a5494..a5de1bbb9e 100755 --- a/scripts/exregional_bias_correction_o3.sh +++ b/scripts/exregional_bias_correction_o3.sh @@ -370,7 +370,7 @@ EOF1 cp ${DATA}/${NET}.${cycle}.max_*hr_o3_bc.*.grib2 ${COMOUT} - if [ "$SENDDBN" = "YES" ]; then + if [ "$SENDDBN" = "TRUE" ]; then ${DBNROOT}/bin/dbn_alert MODEL AQM_MAX ${job} ${COMOUT}/${NET}.${cycle}.max_1hr_o3_bc.227.grib2 ${DBNROOT}/bin/dbn_alert MODEL AQM_MAX ${job} ${COMOUT}/${NET}.${cycle}.max_8hr_o3_bc.227.grib2 fi @@ -398,7 +398,7 @@ EOF1 cp awpaqm.${cycle}.*o3-max-bc.227.grib2 ${COMOUTwmo} # Distribute Data - if [ "${SENDDBN_NTC}" = "YES" ] ; then + if [ "${SENDDBN_NTC}" = "TRUE" ] ; then ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.1ho3-max-bc.227.grib2 ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.8ho3-max-bc.227.grib2 fi @@ -445,7 +445,7 @@ if [ "${cyc}" = "06" ] || [ "${cyc}" = "12" ]; then cp ${NET}.${cycle}.ave_8hr_o3_bc.227.grib2 ${COMOUT} fi -if [ "${SENDDBN}" = "YES" ] ; then +if [ "${SENDDBN}" = "TRUE" ] ; then ${DBNROOT}/bin/dbn_alert MODEL AQM_CONC ${job} ${COMOUT}/${NET}.${cycle}.ave_1hr_o3_bc.227.grib2 if [ "${cyc}" = "06" ] || [ "${cyc}" = "12" ]; then ${DBNROOT}/bin/dbn_alert MODEL AQM_CONC ${job} ${COMOUT}/${NET}.${cycle}.ave_8hr_o3_bc.227.grib2 @@ -497,7 +497,7 @@ if [ "${cyc}" = "06" ] || [ "${cyc}" = "12" ]; then cp awpaqm.${cycle}.${hr}ho3-max-bc.227.grib2 ${COMOUTwmo} # Distribute Data - if [ "${SENDDBN}" = "YES" ]; then + if [ "${SENDDBN}" = "TRUE" ]; then ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.${hr}ho3-bc.227.grib2 ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.${hr}ho3-max-bc.227.grib2 fi diff --git a/scripts/exregional_bias_correction_pm25.sh b/scripts/exregional_bias_correction_pm25.sh index 2ae8fb758c..ebefe58002 100755 --- a/scripts/exregional_bias_correction_pm25.sh +++ b/scripts/exregional_bias_correction_pm25.sh @@ -269,7 +269,7 @@ fi POST_STEP cp ${DATA}/${NET}.${cycle}.pm25*bc*.grib2 ${COMOUT} -if [ "$SENDDBN" = "YES" ]; then +if [ "$SENDDBN" = "TRUE" ]; then $DBNROOT/bin/dbn_alert MODEL AQM_PM ${job} ${COMOUT} fi @@ -366,7 +366,7 @@ EOF1 cp ${NET}.${cycle}.max_1hr_pm25_bc.227.grib2 ${COMOUT} cp ${NET}.${cycle}.ave_24hr_pm25_bc.227.grib2 ${COMOUT} - if [ "${SENDDBN}" = "YES" ]; then + if [ "${SENDDBN}" = "TRUE" ]; then ${DBNROOT}/bin/dbn_alert MODEL AQM_MAX ${job} ${COMOUT}/${NET}.${cycle}.max_1hr_pm25_bc.227.grib2 ${DBNROOT}/bin/dbn_alert MODEL AQM_PM ${job} ${COMOUT}/${NET}.${cycle}.ave_24hr_pm25_bc.227.grib2 fi @@ -384,7 +384,7 @@ wgrib2 tmpfile_pm25_bc -set_grib_type c3b -new_grid_winds earth -new_grid ${grid cp tmpfile_pm25_bc ${COMOUT}/${NET}.${cycle}.ave_1hr_pm25_bc.${id_domain}.grib2 cp ${NET}.${cycle}.grib2_pm25_bc.227 ${COMOUT}/${NET}.${cycle}.ave_1hr_pm25_bc.227.grib2 -if [ "${SENDDBN}" = "YES" ]; then +if [ "${SENDDBN}" = "TRUE" ]; then ${DBNROOT}/bin/dbn_alert MODEL AQM_PM ${job} ${COMOUT}/${NET}.${cycle}.ave_1hr_pm25_bc.227.grib2 fi @@ -452,7 +452,7 @@ if [ "${cyc}" = "06" ] || [ "${cyc}" = "12" ]; then cp awpaqm.${cycle}.24hr-pm25-ave-bc.227.grib2 ${COMOUTwmo} # Distribute Data - if [ "${SENDDBN_NTC}" = "YES" ] ; then + if [ "${SENDDBN_NTC}" = "TRUE" ] ; then ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.1hpm25-bc.227.grib2 ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.daily-1hr-pm25-max-bc.227.grib2 ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.24hr-pm25-ave-bc.227.grib2 diff --git a/scripts/exregional_nexus_emission.sh b/scripts/exregional_nexus_emission.sh index 43e4d8ed63..a2aca2a0ee 100755 --- a/scripts/exregional_nexus_emission.sh +++ b/scripts/exregional_nexus_emission.sh @@ -345,15 +345,6 @@ if [ $err -ne 0 ]; then err_exit "${message_txt}" fi fi -# -#----------------------------------------------------------------------- -# -# Move NEXUS output to INPUT_DATA directory. -# -#----------------------------------------------------------------------- -# -#mv ${DATA}/NEXUS_Expt_split.nc ${INPUT_DATA}/${NET}.${cycle}${dot_ensmem}.NEXUS_Expt_split.${nspt}.nc - # #----------------------------------------------------------------------- # diff --git a/scripts/exregional_nexus_post_split.sh b/scripts/exregional_nexus_post_split.sh index 9ac0048649..c4f7b9a739 100755 --- a/scripts/exregional_nexus_post_split.sh +++ b/scripts/exregional_nexus_post_split.sh @@ -95,34 +95,6 @@ fi # #----------------------------------------------------------------------- # -# make nexus output pretty -# -#----------------------------------------------------------------------- -# -# python3 ${ARL_NEXUS_DIR}/utils/python/nexus_time_parser.py -f ${DATA}/HEMCO_sa_Time.rc -s $start_date -e $end_date -# export err=$? -# if [ $err -ne 0 ]; then -# message_txt="Call to python script \"nexus_time_parser.py\" failed." -# if [ "${RUN_ENVIR}" = "community" ]; then -# print_err_msg_exit "${message_txt}" -# else -# err_exit "${message_txt}" -# fi -# fi - -# python3 ${ARL_NEXUS_DIR}/utils/python/make_nexus_output_pretty.py --src ${DATA}/NEXUS_Expt_combined.nc --grid ${DATA}/grid_spec.nc -o ${DATA}/NEXUS_Expt_pretty.nc -t ${DATA}/HEMCO_sa_Time.rc -# export err=$? -# if [ $err -ne 0 ]; then -# message_txt="Call to python script \"make_nexus_output_pretty.py\" failed." -# if [ "${RUN_ENVIR}" = "community" ]; then -# print_err_msg_exit "${message_txt}" -# else -# err_exit "${message_txt}" -# fi -# fi -# -#----------------------------------------------------------------------- -# # run MEGAN NCO script # #----------------------------------------------------------------------- diff --git a/ush/config_defaults.yaml b/ush/config_defaults.yaml index e9b9e46907..6c3ea6430c 100644 --- a/ush/config_defaults.yaml +++ b/ush/config_defaults.yaml @@ -3001,9 +3001,12 @@ cpl_aqm_parm: # DCOMINairnow: # Path to the directory containing AIRNOW observation data # - # AQM_AIRNOW_HIST_DIR: - # Path to the directory where the historical AIRNOW data are located + # COMINbicor: + # Path of reading in historical training data for biascorrection # + # COMOUTbicor: + # Path to save the current cycle's model output and AirNow obs as training data for future use + # $COMINbicor and $COMOUTbicor can be distuigshed by the ${yyyy}${mm}$dd under the same location #----------------------------------------------------------------------- # CPL_AQM: false diff --git a/ush/machine/wcoss2.yaml b/ush/machine/wcoss2.yaml index c89242a673..ba2baee37f 100644 --- a/ush/machine/wcoss2.yaml +++ b/ush/machine/wcoss2.yaml @@ -9,9 +9,9 @@ platform: MET_BIN_EXEC: bin MET_INSTALL_DIR: /apps/ops/para/libs/intel/19.1.3.304/met/10.1.1 DOMAIN_PREGEN_BASEDIR: /lfs/h2/emc/lam/noscrub/UFS_SRW_App/develop/FV3LAM_pregen - QUEUE_DEFAULT: devhigh - QUEUE_FCST: devhigh - QUEUE_HPSS: devhigh + QUEUE_DEFAULT: dev + QUEUE_FCST: dev + QUEUE_HPSS: dev_transfer RUN_CMD_FCST: mpiexec -n ${PE_MEMBER01} -ppn ${PPN_RUN_FCST} --cpu-bind core -depth ${OMP_NUM_THREADS_RUN_FCST} RUN_CMD_POST: mpiexec -n ${nprocs} RUN_CMD_PRDGEN: mpiexec -n ${nprocs} --cpu-bind core cfp From c0b345ad535605a6a41ed9347bfb1b08b534badf Mon Sep 17 00:00:00 2001 From: "Jianping.Huang" Date: Tue, 27 Jun 2023 15:58:11 +0000 Subject: [PATCH 6/7] update nexus harsh number to fix the NEXUS failure with concatenate_nexus_post job --- Externals.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Externals.cfg b/Externals.cfg index c871f9a3ea..e619460e32 100644 --- a/Externals.cfg +++ b/Externals.cfg @@ -30,7 +30,7 @@ protocol = git repo_url = https://github.com/noaa-oar-arl/NEXUS # Specify either a branch name or a hash but not both. #branch = develop -hash = 732a441 +hash = 6a7a994 local_path = sorc/arl_nexus required = True From 6adf28eaf1a0d00c6b62ec4f19dbfde84b2b9047 Mon Sep 17 00:00:00 2001 From: "Jianping.Huang" Date: Wed, 28 Jun 2023 16:04:04 +0000 Subject: [PATCH 7/7] adding DO_AQM_SAVE_AIRNOW_HIST back --- scripts/exregional_bias_correction_o3.sh | 4 +++- scripts/exregional_bias_correction_pm25.sh | 2 ++ ush/config_defaults.yaml | 6 ++---- ush/machine/wcoss2.yaml | 5 ++--- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/scripts/exregional_bias_correction_o3.sh b/scripts/exregional_bias_correction_o3.sh index a5de1bbb9e..ed73509a5f 100755 --- a/scripts/exregional_bias_correction_o3.sh +++ b/scripts/exregional_bias_correction_o3.sh @@ -205,6 +205,7 @@ POST_STEP cp ${DATA}/out/ozone/${yyyy}/*nc ${DATA}/data/bcdata.${yyyymm}/interpolated/ozone/${yyyy} +if [ "${DO_AQM_SAVE_AIRNOW_HIST}" = "TRUE" ]; then mkdir -p ${COMOUTbicor}/bcdata.${yyyymm}/interpolated/ozone/${yyyy} cp ${DATA}/out/ozone/${yyyy}/*nc ${COMOUTbicor}/bcdata.${yyyymm}/interpolated/ozone/${yyyy} @@ -226,8 +227,9 @@ cp ${DATA}/out/ozone/${yyyy}/*nc ${DATA}/data/bcdata.${yyyymm}/interpolated/ozon cp ${DATA}/data/bcdata.${yyyymm_m2}/airnow/netcdf/${yyyy_m2}/${PDYm2}/HourlyAQObs.${PDYm2}.nc ${COMOUTbicor}/bcdata.${yyyymm_m2}/airnow/netcdf/${yyyy_m2}/${PDYm2} cp ${DATA}/data/bcdata.${yyyymm_m3}/airnow/netcdf/${yyyy_m3}/${PDYm3}/HourlyAQObs.${PDYm3}.nc ${COMOUTbicor}/bcdata.${yyyymm_m3}/airnow/netcdf/${yyyy_m3}/${PDYm3} - mkdir -p ${COMOUTbicor}/bcdata.${yyyymm}/grid/${cyc}z/${PDY} + mkdir -p "${COMOUTbicor}/bcdata.${yyyymm}/grid/${cyc}z/${PDY}" cp ${COMIN}/${NET}.${cycle}.*sfc*.nc ${COMOUTbicor}/bcdata.${yyyymm}/grid/${cyc}z/${PDY} +fi #----------------------------------------------------------------------------- # STEP 4: Performing Bias Correction for Ozone diff --git a/scripts/exregional_bias_correction_pm25.sh b/scripts/exregional_bias_correction_pm25.sh index ebefe58002..b704b214ed 100755 --- a/scripts/exregional_bias_correction_pm25.sh +++ b/scripts/exregional_bias_correction_pm25.sh @@ -205,8 +205,10 @@ POST_STEP cp ${DATA}/out/pm25/${yyyy}/*nc ${DATA}/data/bcdata.${yyyymm}/interpolated/pm25/${yyyy} +if [ "${DO_AQM_SAVE_AIRNOW_HIST}" = "TRUE" ]; then mkdir -p ${COMOUTbicor}/bcdata.${yyyymm}/interpolated/pm25/${yyyy} cp ${DATA}/out/pm25/${yyyy}/*nc ${COMOUTbicor}/bcdata.${yyyymm}/interpolated/pm25/${yyyy} +fi #----------------------------------------------------------------------- # STEP 4: Performing Bias Correction for PM2.5 diff --git a/ush/config_defaults.yaml b/ush/config_defaults.yaml index 6c3ea6430c..ca1f252a8f 100644 --- a/ush/config_defaults.yaml +++ b/ush/config_defaults.yaml @@ -2901,10 +2901,8 @@ cpl_aqm_parm: # DO_AQM_GEFS_LBCS: # Add GEFS aerosol LBCs to chemical LBCs # - # COMINbicor - # Read bias-correction training data - # COMOUTbicor - # Save bias-correction training data + # DO_AQM_SAVE_AIRNOW_HIST: + # Save bias-correction airnow training data # # DO_AQM_SAVE_FIRE: # Archive fire emission file to HPSS diff --git a/ush/machine/wcoss2.yaml b/ush/machine/wcoss2.yaml index ba2baee37f..2d167eef94 100644 --- a/ush/machine/wcoss2.yaml +++ b/ush/machine/wcoss2.yaml @@ -47,9 +47,8 @@ cpl_aqm_parm: DCOMINgefs_dfv: /lfs/h1/ops/prod/com/gefs/v12.3 DCOMINpt_src_dfv: /lfs/h2/emc/physics/noscrub/Youhua.Tang/nei2016v1-pt/v2023-01-PT DCOMINairnow_dfv: /lfs/h1/ops/prod/dcom - #DCOMINairnow_dfv: /lfs/h2/emc/physics/noscrub/jianping.huang/dcom - COMINbicor: /lfs/h2/emc/physics/noscrub/jianping.huang/Bias_correction/aqmv7.0.81 - COMOUTbicor: /lfs/h2/emc/physics/noscrub/jianping.huang/Bias_correction/aqmv7.0.81 + COMINbicor: /lfs/h2/emc/physics/noscrub/jianping.huang/Bias_correction/aqmv7.0 + COMOUTbicor: /lfs/h2/emc/physics/noscrub/jianping.huang/Bias_correction/aqmv7.0 NEXUS_INPUT_DIR: /lfs/h2/emc/lam/noscrub/RRFS_CMAQ/nexus_emissions NEXUS_FIX_DIR: /lfs/h2/emc/lam/noscrub/RRFS_CMAQ/nexus/fix NEXUS_GFS_SFC_DIR: /lfs/h2/emc/lam/noscrub/RRFS_CMAQ/GFS_DATA