From fb584ef76bf0690a888995e3bb9d81be253d5e38 Mon Sep 17 00:00:00 2001 From: "Donald.E.Lippi" Date: Fri, 24 Jan 2025 17:23:45 +0000 Subject: [PATCH 1/3] Add logic for running offline IODA tools. --- scripts/exrrfs_ioda_bufr.sh | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/scripts/exrrfs_ioda_bufr.sh b/scripts/exrrfs_ioda_bufr.sh index 8dff7448f..460c71009 100755 --- a/scripts/exrrfs_ioda_bufr.sh +++ b/scripts/exrrfs_ioda_bufr.sh @@ -13,20 +13,16 @@ execfile=${HOMErrfs}/sorc/RDASApp/build/bin/bufr2ioda.x # generate the namelist on the fly REFERENCE_TIME="${CDATE:0:4}-${CDATE:4:2}-${CDATE:6:2}T${CDATE:8:2}:00:00Z" yaml_list=( -"prepbufr_aircraft.yaml" +"prepbufr_aircraft.yaml" +#"prepbufr_ascatw.yaml" +#"prepbufr_gpsipw.yaml" +#"prepbufr_mesonet.yaml" +#"prepbufr_profiler.yaml" +#"prepbufr_rassda.yaml" +#"prepbufr_satwnd.yaml" +#"prepbufr_adpsfc.yaml" "prepbufr_adpupa.yaml" ) -#yaml_list=( -#"prepbufr_aircraft.yaml" -#"prepbufr_ascatw.yaml" -#"prepbufr_gpsipw.yaml" -#"prepbufr_mesonet.yaml" -#"prepbufr_profiler.yaml" -#"prepbufr_rassda.yaml" -#"prepbufr_satwnd.yaml" -#"prepbufr_adpsfc.yaml" -#"prepbufr_adpupa.yaml" -#) # run bufr2ioda.x for yaml in ${yaml_list[@]}; do @@ -35,9 +31,19 @@ for yaml in ${yaml_list[@]}; do ${MPI_RUN_CMD} ${execfile} ${yaml} # some data may not be available at all cycles, so we don't check whether bufr2ioda.x runs successfully done -ls ./ioda*nc + +# run offline IODA tools +${cpreq} ${HOMErrfs}/sorc/RDASApp/rrfs-test/IODA/offline_add_var_to_ioda.py . +ioda_files=$(ls ioda*nc) +for ioda_file in ${ioda_files[@]}; do + python offline_add_var_to_ioda.py -o ${ioda_file} + base_name=$(basename "$ioda_file" .nc) + mv ${base_name}_llp.nc ${base_name}.nc +done + +# file count sanity check and copy to COMOUT +ls ./ioda*nc if (( $? == 0 )); then - # copy ioda*.nc to COMOUT ${cpreq} ${DATA}/ioda*.nc ${COMOUT}/ioda_bufr/ else echo "WARNING: no ioda files generated." From 8d06d4029946f01e84527901f3b9c2faaaa2c30e Mon Sep 17 00:00:00 2001 From: "Donald.E.Lippi" Date: Fri, 24 Jan 2025 20:04:48 +0000 Subject: [PATCH 2/3] remove leading "python" to run *.py tool --- scripts/exrrfs_ioda_bufr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/exrrfs_ioda_bufr.sh b/scripts/exrrfs_ioda_bufr.sh index 460c71009..cf8b9c78c 100755 --- a/scripts/exrrfs_ioda_bufr.sh +++ b/scripts/exrrfs_ioda_bufr.sh @@ -36,7 +36,7 @@ done ${cpreq} ${HOMErrfs}/sorc/RDASApp/rrfs-test/IODA/offline_add_var_to_ioda.py . ioda_files=$(ls ioda*nc) for ioda_file in ${ioda_files[@]}; do - python offline_add_var_to_ioda.py -o ${ioda_file} + offline_add_var_to_ioda.py -o ${ioda_file} base_name=$(basename "$ioda_file" .nc) mv ${base_name}_llp.nc ${base_name}.nc done From a7b5660fba2d75217f6002334d28cd7f34a8df42 Mon Sep 17 00:00:00 2001 From: "Donald.E.Lippi" Date: Fri, 24 Jan 2025 20:56:46 +0000 Subject: [PATCH 3/3] Add "./" before executing python script --- scripts/exrrfs_ioda_bufr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/exrrfs_ioda_bufr.sh b/scripts/exrrfs_ioda_bufr.sh index cf8b9c78c..5fa6562a6 100755 --- a/scripts/exrrfs_ioda_bufr.sh +++ b/scripts/exrrfs_ioda_bufr.sh @@ -36,7 +36,7 @@ done ${cpreq} ${HOMErrfs}/sorc/RDASApp/rrfs-test/IODA/offline_add_var_to_ioda.py . ioda_files=$(ls ioda*nc) for ioda_file in ${ioda_files[@]}; do - offline_add_var_to_ioda.py -o ${ioda_file} + ./offline_add_var_to_ioda.py -o ${ioda_file} base_name=$(basename "$ioda_file" .nc) mv ${base_name}_llp.nc ${base_name}.nc done