Skip to content

Commit

Permalink
Ref #7
Browse files Browse the repository at this point in the history
Add changes for wcoss_d.
  • Loading branch information
EdwardSafford-NOAA committed Jul 23, 2020
1 parent b27712f commit 9e66864
Show file tree
Hide file tree
Showing 11 changed files with 52 additions and 48 deletions.
20 changes: 10 additions & 10 deletions util/Conventional_Monitor/data_extract/ush/ConMon_DE.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@
# usage
#--------------------------------------------------------------------
function usage {
echo "Usage: ConMon_DE.sh suffix [-p|--pdate pdate -r|--run gdas|gfs]"
echo "Usage: ConMon_DE.sh suffix [-p|--pdate pdate -r|--run gdas|gfs] -c|-cnv /path/to/cnvstat/dir"
echo " Suffix is the indentifier for this data source."
echo " -p | --pdate yyyymmddcc to specify the cycle to be processed"
echo " if unspecified the last available date will be processed"
echo " -r | --run the gdas|gfs run to be processed"
echo " use only if data in TANKdir stores both runs, otherwise"
echo " gdas is assumed."
echo " -c | --cnv location of the cnvstat and other essential files"
echo " "
}

Expand All @@ -35,7 +36,7 @@ set -ax
echo "Begin ConMon_DE.sh"

nargs=$#
if [[ $nargs -lt 1 || $nargs -gt 5 ]]; then
if [[ $nargs -lt 1 || $nargs -gt 7 ]]; then
usage
exit 1
fi
Expand All @@ -61,6 +62,10 @@ do
export RUN="$2"
shift # past argument
;;
-c|--cnv)
export CNVSTAT_LOCATION="$2"
shift # past argument
;;
*)
#any unspecified key is CONMON_SUFFIX
export CONMON_SUFFIX=$key
Expand Down Expand Up @@ -217,14 +222,9 @@ if [ -s $cnvstat -a -s $pgrbf00 -a -s $pgrbf06 ]; then
rm -f ${logfile}
fi

if [[ $MY_MACHINE = "wcoss" ]]; then
$SUB -q $JOB_QUEUE -P $PROJECT -o $C_LOGDIR/DE.${PDY}.${CYC}.log \
-M 500 -R affinity[core] -W 0:25 -J ${jobname} \
-cwd $PWD ${HOMEgdas_conmon}/jobs/JGDAS_CONMON

elif [[ $MY_MACHINE = "wcoss_d" || $MY_MACHINE = "wcoss_c" ]]; then
$SUB -q $JOB_QUEUE -P $PROJECT -o ${logfile} -M 200 \
-R affinity[core] -W 0:25 -J ${jobname} \
if [[ $MY_MACHINE = "wcoss_d" || $MY_MACHINE = "wcoss_c" ]]; then
$SUB -q $JOB_QUEUE -P $PROJECT -o ${logfile} -M 900 \
-R affinity[core] -W 0:35 -J ${jobname} \
-cwd $PWD ${HOMEgdas_conmon}/jobs/JGDAS_CONMON

elif [[ $MY_MACHINE = "hera" ]]; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ subroutine read_diag_file_uv_nc( input_file, return_all, ftin, ctype, intype, ex
integer(i_kind) :: idate

print *, ' '
print *, ' --> read_diag_file_ps_nc'
print *, ' --> read_diag_file_uv_nc'


!--- get NetCDF file dimensions
Expand Down Expand Up @@ -1307,6 +1307,7 @@ subroutine read_diag_file_uv_nc( input_file, return_all, ftin, ctype, intype, ex
!
nobs = 0
do ii = 1, total_obs


!------------------------------------------------------------------------
! Check on Observation_Class to ctype is a sanity check --
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ subroutine read_diag_file_uv_nc( input_file, return_all, ftin, ctype, intype, ex
integer(i_kind) :: idate

print *, ' '
print *, ' --> read_diag_file_ps_nc'
print *, ' --> read_diag_file_uv_nc'


!--- get NetCDF file dimensions
Expand Down Expand Up @@ -1307,6 +1307,7 @@ subroutine read_diag_file_uv_nc( input_file, return_all, ftin, ctype, intype, ex
!
nobs = 0
do ii = 1, total_obs


!------------------------------------------------------------------------
! Check on Observation_Class to ctype is a sanity check --
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ subroutine read_diag_file_uv_nc( input_file, return_all, ftin, ctype, intype, ex
integer(i_kind) :: idate

print *, ' '
print *, ' --> read_diag_file_ps_nc'
print *, ' --> read_diag_file_uv_nc'


!--- get NetCDF file dimensions
Expand Down Expand Up @@ -1307,6 +1307,7 @@ subroutine read_diag_file_uv_nc( input_file, return_all, ftin, ctype, intype, ex
!
nobs = 0
do ii = 1, total_obs


!------------------------------------------------------------------------
! Check on Observation_Class to ctype is a sanity check --
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ subroutine read_diag_file_uv_nc( input_file, return_all, ftin, ctype, intype, ex
integer(i_kind) :: idate

print *, ' '
print *, ' --> read_diag_file_ps_nc'
print *, ' --> read_diag_file_uv_nc'


!--- get NetCDF file dimensions
Expand Down Expand Up @@ -1307,6 +1307,7 @@ subroutine read_diag_file_uv_nc( input_file, return_all, ftin, ctype, intype, ex
!
nobs = 0
do ii = 1, total_obs


!------------------------------------------------------------------------
! Check on Observation_Class to ctype is a sanity check --
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ subroutine read_diag_file_uv_nc( input_file, return_all, ftin, ctype, intype, ex
integer(i_kind) :: idate

print *, ' '
print *, ' --> read_diag_file_ps_nc'
print *, ' --> read_diag_file_uv_nc'


!--- get NetCDF file dimensions
Expand Down Expand Up @@ -1307,6 +1307,7 @@ subroutine read_diag_file_uv_nc( input_file, return_all, ftin, ctype, intype, ex
!
nobs = 0
do ii = 1, total_obs


!------------------------------------------------------------------------
! Check on Observation_Class to ctype is a sanity check --
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ subroutine read_diag_file_uv_nc( input_file, return_all, ftin, ctype, intype, ex
integer(i_kind) :: idate

print *, ' '
print *, ' --> read_diag_file_ps_nc'
print *, ' --> read_diag_file_uv_nc'


!--- get NetCDF file dimensions
Expand Down Expand Up @@ -1307,6 +1307,7 @@ subroutine read_diag_file_uv_nc( input_file, return_all, ftin, ctype, intype, ex
!
nobs = 0
do ii = 1, total_obs


!------------------------------------------------------------------------
! Check on Observation_Class to ctype is a sanity check --
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@
write(6,*)' User input below'
write(6,input)

print *,nregion,np

call set_netcdf_flag( netcdf )

dtype_ps='ps'
Expand Down Expand Up @@ -78,40 +76,26 @@
ptopq(13) = 0.0; pbotq(13) = 299.9


print *,'start to call convinfo'
call convinfo(iotype_ps,iotype_q,iotype_t,iotype_uv,ntype_ps,ntype_q,ntype_t,ntype_uv,&
varqc_ps,varqc_q,varqc_t,varqc_uv,&
ituse_ps,ituse_q,ituse_t,ituse_uv,&
iosubtype_ps,iosubtype_q,iosubtype_t,iosubtype_uv)

print *, 'ntype_ps, ntype_q, ntype_t, ntype_uv = ', ntype_ps,ntype_q,ntype_t,ntype_uv
print *, 'iotype_ps = ', iotype_ps
print *, 'iosubtype_ps = ', iosubtype_ps
print *, 'iosubtype_q = ', iosubtype_q
print *, 'iosubtype_t = ', iosubtype_t
print *, 'iosubtype_uv = ', iosubtype_uv
print *, ' '
print *,'after call convinfo'

print *,'call process_conv_diag'
call process_conv_diag(input_file,ctype,mregion,nregion,np,ptop,pbot,ptopq,pbotq,&
rlatmin,rlatmax,rlonmin,rlonmax,iotype_ps,iotype_q,&
iotype_t,iotype_uv,varqc_ps,varqc_q,varqc_t,varqc_uv,&
ntype_ps,ntype_q,ntype_t,ntype_uv,&
iosubtype_ps,iosubtype_q,iosubtype_t,iosubtype_uv)

print *,'finish to call read_conv'

! call creatstas_ctl(dtype_ps,iotype_ps,ituse_ps,100,ntype_ps,1,nregion,18,region,&
! rlatmin,rlatmax,rlonmin,rlonmax,iosubtype_ps)
! call creatstas_ctl(dtype_q,iotype_q,ituse_q,100,ntype_q,np,nregion,18,region,&
! rlatmin,rlatmax,rlonmin,rlonmax,iosubtype_q)
! call creatstas_ctl(dtype_t,iotype_t,ituse_t,100,ntype_t,np,nregion,18,&
! region,rlatmin,rlatmax,rlonmin,rlonmax,iosubtype_t)
!! call creatstas_ctl(dtype_u,iotype_uv,ituse_uv,100,ntype_uv,np,nregion,18)
!! call creatstas_ctl(dtype_v,iotype_uv,ituse_uv,100,ntype_uv,np,nregion,18)
! call creatstas_ctl(dtype_uv,iotype_uv,ituse_uv,100,ntype_uv,np,nregion,18,&
! region,rlatmin,rlatmax,rlonmin,rlonmax,iosubtype_uv)

call creatstas_ctl(dtype_ps,iotype_ps,ituse_ps,100,ntype_ps,1,nregion,18,region,&
rlatmin,rlatmax,rlonmin,rlonmax,iosubtype_ps)
call creatstas_ctl(dtype_q,iotype_q,ituse_q,100,ntype_q,np,nregion,18,region,&
rlatmin,rlatmax,rlonmin,rlonmax,iosubtype_q)
call creatstas_ctl(dtype_t,iotype_t,ituse_t,100,ntype_t,np,nregion,18,&
region,rlatmin,rlatmax,rlonmin,rlonmax,iosubtype_t)
call creatstas_ctl(dtype_uv,iotype_uv,ituse_uv,100,ntype_uv,np,nregion,18,&
region,rlatmin,rlatmax,rlonmin,rlonmax,iosubtype_uv)

stop

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,19 +141,33 @@ EOF
mv -f ${file}.${Z} ${savedir}/${run}_${file}.${PDATE}.${Z}
done


if [ $type == 'uv' ]; then
file=u_stas
${COMPRESS} ${file}
mv -f ${file}.${Z} ${savedir}/${run}_${file}.${PDATE}.${Z}
cp uv_stas.ctl u_stas.ctl

file=v_stas
${COMPRESS} ${file}
mv -f ${file}.${Z} ${savedir}/${run}_${file}.${PDATE}.${Z}
cp uv_stas.ctl v_stas.ctl
fi

for file in *stas.ctl; do
${COMPRESS} ${file}
mv -f ${file}.${Z} ${savedir}/${run}_${file}.${Z}
done

done

done

${COMPRESS} stdout*
tar -cf stdout.tar stdout*
${COMPRESS} stdout.tar
mv -f stdout.tar.${Z} ${savedir}/.

fi


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
#BSUB -q dev_shared
#BSUB -n 1
#BSUB -R affinity[core]
#BSUB -M 160
#BSUB -M 900
#BSUB -W 00:30
#BSUB -P GFS-T2O
#BSUB -P GFS-DEV

set -x

export PDATE=${PDATE:-2019111006}
export PDATE=${PDATE:-2020072006}


#############################################################
Expand Down Expand Up @@ -60,7 +60,7 @@ export POE=YES
#############################################################
export CONMON_SUFFIX=${CONMON_SUFFIX:-test_conmon}

export NWTEST=${NWTEST:-/gpfs/dell2/emc/modeling/noscrub/Edward.Safford/ProdGSI/util/Conventional_Monitor/nwprod}
export NWTEST=${NWTEST:-/gpfs/dell2/emc/modeling/noscrub/Edward.Safford/GSI/util/Conventional_Monitor/nwprod}
export HOMEconmon=${HOMEconmon:-${NWTEST}/conmon_shared.${conmon_shared_ver}}

export HOMEgdas_conmon=${HOMEgdas_conmon:-${NWTEST}/gdas_conmon.${gdas_conmon_ver}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,9 @@
#---------------------------------------
# run the horz-hist extraction script
#
# ${USHconmon}/horz_hist.sh # ${PDATE}
# rc_horz_hist=$?
# echo "rc_horz_hist = $rc_horz_hist"
${USHconmon}/horz_hist.sh
rc_horz_hist=$?
echo "rc_horz_hist = $rc_horz_hist"

#---------------------------------------
# run the time-vert extraction script
Expand Down

0 comments on commit 9e66864

Please sign in to comment.