diff --git a/ush/ozn_xtrct.sh b/ush/ozn_xtrct.sh index 3303cab2d1..3f6b3fed19 100755 --- a/ush/ozn_xtrct.sh +++ b/ush/ozn_xtrct.sh @@ -102,7 +102,7 @@ ozn_ptype=${ozn_ptype:-"ges anl"} # a problem, reported by an iret value of 2 # -avail_satype=$(ls -l d*ges* | sed -e 's/_/ /g;s/\./ /' | gawk '{ print $11 "_" $12 }') +avail_satype=$(ls -1 d*ges* | sed -e 's/_/ /g;s/\./ /' | gawk '{ print $2 "_" $3 }') if [[ ${DO_DATA_RPT} -eq 1 ]]; then if [[ -e ${SATYPE_FILE} ]]; then @@ -147,102 +147,97 @@ else #--------------------------------------------------------------------------- # Outer loop over $ozn_ptype (default values 'ges', 'anl') # - echo "ozn_ptype = ${ozn_ptype}" for ptype in ${ozn_ptype}; do - echo "ptype = ${ptype}" + iyy=$(echo ${PDATE} | cut -c1-4) + imm=$(echo ${PDATE} | cut -c5-6) + idd=$(echo ${PDATE} | cut -c7-8) + ihh=$(echo ${PDATE} | cut -c9-10) for type in ${avail_satype}; do if [[ -f "diag_${type}_${ptype}.${PDATE}.gz" ]]; then mv diag_${type}_${ptype}.${PDATE}.gz ${type}.${ptype}.gz gunzip ./${type}.${ptype}.gz - fi - done - - - #-------------------------------------------------------------------- - # Run programs for given time - - iyy=$(echo ${PDATE} | cut -c1-4) - imm=$(echo ${PDATE} | cut -c5-6) - idd=$(echo ${PDATE} | cut -c7-8) - ihh=$(echo ${PDATE} | cut -c9-10) - for type in ${avail_satype}; do - echo "processing ptype, type: ${ptype}, ${type}" - rm -f input + echo "processing ptype, type: ${ptype}, ${type}" + rm -f input cat << EOF > input - &INPUT - satname='${type}', - iyy=${iyy}, - imm=${imm}, - idd=${idd}, - ihh=${ihh}, - idhh=-720, - incr=6, - nregion=${nregion}, - region(1)='global', rlonmin(1)=-180.0,rlonmax(1)=180.0,rlatmin(1)=-90.0,rlatmax(1)= 90.0, - region(2)='70N-90N', rlonmin(2)=-180.0,rlonmax(2)=180.0,rlatmin(2)= 70.0,rlatmax(2)= 90.0, - region(3)='20N-70N', rlonmin(3)=-180.0,rlonmax(3)=180.0,rlatmin(3)= 20.0,rlatmax(3)= 70.0, - region(4)='20S-20N', rlonmin(4)=-180.0,rlonmax(4)=180.0,rlatmin(4)=-20.0,rlatmax(4)= 20.0, - region(5)='20S-70S', rlonmin(5)=-180.0,rlonmax(5)=180.0,rlatmin(5)=-70.0,rlatmax(5)=-20.0, - region(6)='70S-90S', rlonmin(6)=-180.0,rlonmax(6)=180.0,rlatmin(6)=-90.0,rlatmax(6)=-70.0, - validate=${validate}, - new_hdr=${new_hdr}, - ptype=${ptype}, - netcdf=${netcdf_boolean} - / + &INPUT + satname='${type}', + iyy=${iyy}, + imm=${imm}, + idd=${idd}, + ihh=${ihh}, + idhh=-720, + incr=6, + nregion=${nregion}, + region(1)='global', rlonmin(1)=-180.0,rlonmax(1)=180.0,rlatmin(1)=-90.0,rlatmax(1)= 90.0, + region(2)='70N-90N', rlonmin(2)=-180.0,rlonmax(2)=180.0,rlatmin(2)= 70.0,rlatmax(2)= 90.0, + region(3)='20N-70N', rlonmin(3)=-180.0,rlonmax(3)=180.0,rlatmin(3)= 20.0,rlatmax(3)= 70.0, + region(4)='20S-20N', rlonmin(4)=-180.0,rlonmax(4)=180.0,rlatmin(4)=-20.0,rlatmax(4)= 20.0, + region(5)='20S-70S', rlonmin(5)=-180.0,rlonmax(5)=180.0,rlatmin(5)=-70.0,rlatmax(5)=-20.0, + region(6)='70S-90S', rlonmin(6)=-180.0,rlonmax(6)=180.0,rlatmin(6)=-90.0,rlatmax(6)=-70.0, + validate=${validate}, + new_hdr=${new_hdr}, + ptype=${ptype}, + netcdf=${netcdf_boolean} + / EOF - echo "oznmon_time.x HAS STARTED ${type}" + echo "oznmon_time.x HAS STARTED ${type}" - ./oznmon_time.x < input > stdout.time.${type}.${ptype} - - echo "oznmon_time.x HAS ENDED ${type}" + ./oznmon_time.x < input > stdout.time.${type}.${ptype} - if [[ ! -d ${TANKverf_ozn}/time ]]; then - mkdir -p ${TANKverf_ozn}/time - fi - $NCP ${type}.${ptype}.ctl ${TANKverf_ozn}/time/ - $NCP ${type}.${ptype}.${PDATE}.ieee_d ${TANKverf_ozn}/time/ - - $NCP bad* ${TANKverf_ozn}/time/ + echo "oznmon_time.x HAS ENDED ${type}" - rm -f input + if [[ ! -d ${TANKverf_ozn}/time ]]; then + mkdir -p ${TANKverf_ozn}/time + fi + $NCP ${type}.${ptype}.ctl ${TANKverf_ozn}/time/ + $NCP ${type}.${ptype}.${PDATE}.ieee_d ${TANKverf_ozn}/time/ + + $NCP bad* ${TANKverf_ozn}/time/ + + rm -f input cat << EOF > input - &INPUT - satname='${type}', - iyy=${iyy}, - imm=${imm}, - idd=${idd}, - ihh=${ihh}, - idhh=-18, - incr=6, - new_hdr=${new_hdr}, - ptype=${ptype}, - netcdf=${netcdf_boolean} - / + &INPUT + satname='${type}', + iyy=${iyy}, + imm=${imm}, + idd=${idd}, + ihh=${ihh}, + idhh=-18, + incr=6, + new_hdr=${new_hdr}, + ptype=${ptype}, + netcdf=${netcdf_boolean} + / EOF - echo "oznmon_horiz.x HAS STARTED ${type}" + echo "oznmon_horiz.x HAS STARTED ${type}" - ./oznmon_horiz.x < input > stdout.horiz.${type}.${ptype} + ./oznmon_horiz.x < input > stdout.horiz.${type}.${ptype} - echo "oznmon_horiz.x HAS ENDED ${type}" + echo "oznmon_horiz.x HAS ENDED ${type}" - if [[ ! -d ${TANKverf_ozn}/horiz ]]; then - mkdir -p ${TANKverf_ozn}/horiz - fi - $NCP ${type}.${ptype}.ctl ${TANKverf_ozn}/horiz/ + if [[ ! -d ${TANKverf_ozn}/horiz ]]; then + mkdir -p ${TANKverf_ozn}/horiz + fi + $NCP ${type}.${ptype}.ctl ${TANKverf_ozn}/horiz/ - $COMPRESS ${type}.${ptype}.${PDATE}.ieee_d - $NCP ${type}.${ptype}.${PDATE}.ieee_d.${Z} ${TANKverf_ozn}/horiz/ + $COMPRESS ${type}.${ptype}.${PDATE}.ieee_d + $NCP ${type}.${ptype}.${PDATE}.ieee_d.${Z} ${TANKverf_ozn}/horiz/ - echo "finished processing ptype, type: $ptype, $type" + echo "finished processing ptype, type: ${ptype}, ${type}" + + else + echo "diag file for ${type}.${ptype} not found" + fi + done # type in satype done # ptype in $ozn_ptype