Skip to content

Commit

Permalink
Commit before test to see if it is working
Browse files Browse the repository at this point in the history
  • Loading branch information
CoryMartin-NOAA committed Oct 23, 2020
1 parent f461eb2 commit 860e0fd
Show file tree
Hide file tree
Showing 5 changed files with 84 additions and 30 deletions.
17 changes: 13 additions & 4 deletions ush/JEDI/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
19 changes: 18 additions & 1 deletion ush/JEDI/run_gsi_iodaconv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ush/JEDI/run_gsi_observer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
26 changes: 2 additions & 24 deletions ush/JEDI/submit_run_gsi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down Expand Up @@ -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
50 changes: 50 additions & 0 deletions ush/JEDI/submit_run_iodaconv.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 860e0fd

Please sign in to comment.