From 860e0fd18a4ece2e6a2bc2cbbe93d3515c149114 Mon Sep 17 00:00:00 2001 From: CoryMartin-NOAA Date: Fri, 23 Oct 2020 18:27:01 +0000 Subject: [PATCH] Commit before test to see if it is working --- ush/JEDI/readme.md | 17 ++++++++--- ush/JEDI/run_gsi_iodaconv.sh | 19 ++++++++++++- ush/JEDI/run_gsi_observer.sh | 2 +- ush/JEDI/submit_run_gsi.sh | 26 ++--------------- ush/JEDI/submit_run_iodaconv.sh | 50 +++++++++++++++++++++++++++++++++ 5 files changed, 84 insertions(+), 30 deletions(-) create mode 100644 ush/JEDI/submit_run_iodaconv.sh diff --git a/ush/JEDI/readme.md b/ush/JEDI/readme.md index cb8f1479cb..9053bf7b36 100644 --- a/ush/JEDI/readme.md +++ b/ush/JEDI/readme.md @@ -26,10 +26,6 @@ Things to change in submit_run_gsi.sh include: - jcap, jcap_b, levs: hopefully self explanatory, set to match your background files - dump: gdas or gfs -Things specific to the IODA-converters portion -- iodaconvbuild: path to the build directory of the ioda-converters -- JEDImodule: path to a modulefile to source to get the JEDI environment - Other things one can change - RootWork: defaults to stmp2 but can be anywhere - obsdir: default is glopara global dump @@ -41,6 +37,19 @@ sbatch submit_run_gsi.sh ### To convert these GSI netCDF diag files to JEDI UFO GeoVaLs files and IODA observation files +At the end of submit_run_gsi.sh, by default, the script will then submit submit_run_iodaconv.sh. +This is to save resources, as the IODA-converters script does not require more than one node. + +Things specific to the IODA-converters portion +- iodaconvbuild: path to the build directory of the ioda-converters +- JEDImodule: path to a modulefile to source to get the JEDI environment +Other things you will still need to change +- adate: YYYYMMDDHH analysis date (or it gets this from $1) +- rootwork: if you changed this before, need to be consistent! + +To run this again, without running GSI, just submit the file to slurm. +sbatch submit_run_iodaconv.sh YYYYMMDDHH + ### Summary of changes made between NOAA-EMC/GSI/release/gfsda.v16.0.0 and this branch feature/jedi_gfsv16 ### Example of where/how to add additional fields to GSI/ioda-converters diff --git a/ush/JEDI/run_gsi_iodaconv.sh b/ush/JEDI/run_gsi_iodaconv.sh index e504f1deb3..cb064b175e 100755 --- a/ush/JEDI/run_gsi_iodaconv.sh +++ b/ush/JEDI/run_gsi_iodaconv.sh @@ -33,7 +33,24 @@ mkdir -p $IODA_data_iodaoutdir # # run script -$IODA_iodaconv_iodaconvbin -n 20 -o $IODA_data_iodaoutdir $IODA_data_gsiindir +python $IODA_iodaconv_iodaconvbin -n 20 -o $IODA_data_iodaoutdir -g $IODA_data_geovaloutdir $IODA_data_gsiindir + +# subset obs +python $IODA_iodaconv_subsetbin -n 24 -m $IODA_data_iodaoutdir -g $IODA_data_geovaloutdir +python $IODA_iodaconv_subsetbin -n 24 -s $IODA_data_iodaoutdir -g $IODA_data_geovaloutdir + +# combine conventional obs +python $IODA_iodaconv_combineconvbin -i $IODA_data_iodaoutdir/sfc_*m.nc4 -o $IODA_data_iodaoutdir/sfc_obs_"$adate"_m.nc4 -g $IODA_data_geovaloutdir/ +python $IODA_iodaconv_combineconvbin -i $IODA_data_iodaoutdir/sfcship_*m.nc4 -o $IODA_data_iodaoutdir/sfcship_obs_"$adate"_m.nc4 -g $IODA_data_geovaloutdir/ +python $IODA_iodaconv_combineconvbin -i $IODA_data_iodaoutdir/aircraft_*m.nc4 -o $IODA_data_iodaoutdir/aircraft_obs_"$adate"_m.nc4 -g $IODA_data_geovaloutdir/ +python $IODA_iodaconv_combineconvbin -i $IODA_data_iodaoutdir/sondes_ps*m.nc4 $IODA_data_iodaoutdir/sondes_q*m.nc4 $IODA_data_iodaoutdir/sondes_tsen*m.nc4 $IODA_data_iodaoutdir/sondes_uv*m.nc4 -o $IODA_data_iodaoutdir/sondes_obs_"$adate"_m.nc4 -g $IODA_data_geovaloutdir/ +python $IODA_iodaconv_combineconvbin -i $IODA_data_iodaoutdir/sondes_ps*m.nc4 $IODA_data_iodaoutdir/sondes_q*m.nc4 $IODA_data_iodaoutdir/sondes_tv*m.nc4 $IODA_data_iodaoutdir/sondes_uv*m.nc4 -o $IODA_data_iodaoutdir/sondes_tvirt_obs_"$adate"_m.nc4 -g $IODA_data_geovaloutdir/ +python $IODA_iodaconv_combineconvbin -i $IODA_data_iodaoutdir/sfc_*s.nc4 -o $IODA_data_iodaoutdir/sfc_obs_"$adate"_s.nc4 -g $IODA_data_geovaloutdir/ +python $IODA_iodaconv_combineconvbin -i $IODA_data_iodaoutdir/sfcship_*s.nc4 -o $IODA_data_iodaoutdir/sfcship_obs_"$adate"_s.nc4 -g $IODA_data_geovaloutdir/ +python $IODA_iodaconv_combineconvbin -i $IODA_data_iodaoutdir/aircraft_*s.nc4 -o $IODA_data_iodaoutdir/aircraft_obs_"$adate"_s.nc4 -g $IODA_data_geovaloutdir/ +python $IODA_iodaconv_combineconvbin -i $IODA_data_iodaoutdir/sondes_ps*s.nc4 $IODA_data_iodaoutdir/sondes_q*s.nc4 $IODA_data_iodaoutdir/sondes_tsen*s.nc4 $IODA_data_iodaoutdir/sondes_uv*s.nc4 -o $IODA_data_iodaoutdir/sondes_obs_"$adate"_s.nc4 -g $IODA_data_geovaloutdir/ +python $IODA_iodaconv_combineconvbin -i $IODA_data_iodaoutdir/sondes_ps*s.nc4 $IODA_data_iodaoutdir/sondes_q*s.nc4 $IODA_data_iodaoutdir/sondes_tv*s.nc4 $IODA_data_iodaoutdir/sondes_uv*s.nc4 -o $IODA_data_iodaoutdir/sondes_tvirt_obs_"$adate"_s.nc4 -g $IODA_data_geovaloutdir/ + if [[ "$IODA_iodaconv_cleanup" = "true" ]]; then cd $IODA_data_iodaoutdir diff --git a/ush/JEDI/run_gsi_observer.sh b/ush/JEDI/run_gsi_observer.sh index fd2db570da..9cf7dab788 100755 --- a/ush/JEDI/run_gsi_observer.sh +++ b/ush/JEDI/run_gsi_observer.sh @@ -35,7 +35,7 @@ export APRUN_GSI=$GSI_env_launcher ## variables for executables gsiexec=$GSIDIR/exec/global_gsi.x -nccat=$GSIDIR/exec/nc_diag_cat_serial.x +nccat=$GSIDIR/exec/ncdiag_cat.x NDATE=${NDATE:-`which ndate`} ncpc=/bin/cp ncpl="ln -fs" diff --git a/ush/JEDI/submit_run_gsi.sh b/ush/JEDI/submit_run_gsi.sh index 62768e44e3..d79f0a602d 100644 --- a/ush/JEDI/submit_run_gsi.sh +++ b/ush/JEDI/submit_run_gsi.sh @@ -16,8 +16,6 @@ jcap=766 jcap_b=1534 levs=64 dump='gdas' -iodaconvbuild=/scratch1/NCEPDEV/da/Cory.R.Martin/JEDI/ioda-converters/build -JEDImodule=/scratch1/NCEPDEV/da/Cory.R.Martin/JEDI/env_jedi_rh ##### things it is not necessary to change but you can RootWork=/scratch1/NCEPDEV/stmp2/$LOGNAME/GSI_forJEDI/ obsdir=/scratch1/NCEPDEV/global/glopara/dump/ @@ -65,25 +63,5 @@ EOF # run GSI observer $MyDir/run_gsi_observer.sh $RootWork/GSI_observer_$adate.yaml || exit 1 -# create YAML for IODA converters -rm -rf $RootWork/GSI_iodaconv_$adate.yaml -cat > $RootWork/GSI_iodaconv_$adate.yaml << EOF -data: - gsiindir: $RootWork/${adate}/GSI_out - iodaoutdir: $RootWork/${adate}/output - iodaworkdir: $RootWork/${adate}/iodaconv_work -env: - launcher: srun --export=ALL - modulefile: $JEDImodule - nthreads: 1 -iodaconv: - iodaconvbin: $iodaconvbuild/bin/proc_gsi_ncdiag.py -time: - cycle: '$Ha' - day: '$Da' - month: '$Ma' - year: '$Ya' -EOF - -# run IODA converters -$MyDir/run_gsi_iodaconv.sh $RootWork/GSI_iodaconv_$adate.yaml || exit 1 +# submit the IODA-converters script, comment out if you do not want to run this +sbatch $MyDir/submit_run_iodaconv.sh $adate diff --git a/ush/JEDI/submit_run_iodaconv.sh b/ush/JEDI/submit_run_iodaconv.sh new file mode 100644 index 0000000000..93c622c836 --- /dev/null +++ b/ush/JEDI/submit_run_iodaconv.sh @@ -0,0 +1,50 @@ +#!/bin/bash +#SBATCH --ntasks-per-node 40 +#SBATCH -A da-cpu +#SBATCH -J run_gsi_iodaconv +#SBATCH -t 00:30:00 +#SBATCH -q debug +#SBATCH --nodes 1 + +##### things you should change/confirm +adate=$1 +iodaconvbuild=/scratch1/NCEPDEV/da/Cory.R.Martin/JEDI/ioda-converters/build +JEDImodule=/scratch1/NCEPDEV/da/Cory.R.Martin/JEDI/env_jedi_rh +##### things it is not necessary to change but you can +RootWork=/scratch1/NCEPDEV/stmp2/$LOGNAME/GSI_forJEDI/ +cleanup='true' + +##### do not modify below here #### +MyDir=$GSIDir/ush/JEDI +Ya=`echo $adate | cut -c1-4` +Ma=`echo $adate | cut -c5-6` +Da=`echo $adate | cut -c7-8` +Ha=`echo $adate | cut -c9-10` + +mkdir -p $RootWork + +# create YAML for IODA converters +rm -rf $RootWork/GSI_iodaconv_$adate.yaml +cat > $RootWork/GSI_iodaconv_$adate.yaml << EOF +data: + gsiindir: $RootWork/${adate}/GSI_out + iodaoutdir: $RootWork/${adate}/ioda + geovaloutdir: $RootWork/${adate}/geovals + iodaworkdir: $RootWork/${adate}/iodaconv_work +env: + launcher: srun --export=ALL + modulefile: $JEDImodule + nthreads: 1 +iodaconv: + iodaconvbin: $iodaconvbuild/bin/proc_gsi_ncdiag.py + subsetbin: $iodaconvbuild/bin/subset_files.py + combineconvbin: $iodaconvbuild/bin/combine_conv.py +time: + cycle: '$Ha' + day: '$Da' + month: '$Ma' + year: '$Ya' +EOF + +# run IODA converters +$MyDir/run_gsi_iodaconv.sh $RootWork/GSI_iodaconv_$adate.yaml || exit 1