#! /bin/sh
set -xa

# Dump NPN wind data for MADIS
#
# This script's Variables
#   CDY  (imported)  Current day (like PDY but not based on com/date)
#   HHMM (imported)  Current time
#   RUNDIR     the MADIS Run directory
#   ITIME      initial date and hour for this run
#   MIN        the current minute (MM)
#
#   PROFRAW    output directory for dumped profiler obs
#   

RUNDIR=${DATA}
PROFRAW=${COMOUT}/npnwind60/bufr
mkdir -p ${PROFRAW}
###############################################################################
# Determine the time
###############################################################################

#  By the default below the minutes were rounded back
#  to the nearest hour.

HH=${HHMM:0:2}
ITIME=$CDY$HH
MIN=${HHMM:2:2}

${USHmadis}/FSL_npnwind60.run $RUNDIR $ITIME $MIN $PROFRAW
export err=$?;err_chk
