From b7b745e3914798075a9914dc7dadda8809c63f11 Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Tue, 1 Mar 2022 23:42:21 -0500 Subject: [PATCH] remove ush/EnKF directory with obsolete scripts GitHub Issue NOAA-EMC/GSI#318 --- ush/EnKF/analupdate.sh | 208 ---- ush/EnKF/arch.sh | 98 -- ush/EnKF/check_fgfiles_serial.sh | 121 -- ush/EnKF/check_obsfiles_serial.sh | 99 -- ush/EnKF/current.enkfparms | 169 --- ush/EnKF/dateutils.py | 144 --- ush/EnKF/drive_gfs | 205 ---- ush/EnKF/drive_gsi | 369 ------ ush/EnKF/enkfa5.parms | 172 --- ush/EnKF/enkfdriver.sh | 17 - ush/EnKF/firstges_multi.sh | 169 --- ush/EnKF/get_enkf_ic.sh | 325 ------ ush/EnKF/gfscontrol.sh | 138 --- ush/EnKF/global_chgres.sh | 433 ------- ush/EnKF/global_chgresp.sh | 436 ------- ush/EnKF/global_cycle.sh | 369 ------ ush/EnKF/global_cyclep.sh | 373 ------ ush/EnKF/global_postgp.sh | 282 ----- ush/EnKF/global_postgpp.sh | 286 ----- ush/EnKF/incdate | 8 - ush/EnKF/obsproc_ensmean.sh | 115 -- ush/EnKF/obsproc_multi.sh | 110 -- ush/EnKF/para_config.gdas_enkf_fcst | 63 - .../para_config.gdas_enkf_inflate_recenter | 28 - ush/EnKF/para_config.gdas_enkf_innovate_obs | 65 -- ush/EnKF/para_config.gdas_enkf_post | 27 - ush/EnKF/para_config.gdas_enkf_select_obs | 28 - ush/EnKF/para_config.gdas_enkf_update | 28 - ush/EnKF/randates.py | 10 - ush/EnKF/rerun_fg.sh | 90 -- ush/EnKF/rhist_saveenkf.sh | 227 ---- ush/EnKF/run_enkf | 101 -- ush/EnKF/run_enkfupdate_convonly.sh | 141 --- ush/EnKF/run_enkfupdate_testcase.sh | 140 --- ush/EnKF/run_fg_gfs | 79 -- ush/EnKF/run_fg_gfs_multi.sh | 92 -- ush/EnKF/run_gfs | 765 ------------ ush/EnKF/run_gsi | 1039 ----------------- ush/EnKF/runenkf_trunk.sh | 209 ---- ush/EnKF/runobs_multi.csh | 151 --- ush/EnKF/sub_gfsctrlhigh.sh | 75 -- ush/EnKF/test.py | 7 - ush/EnKF/test_gdas_enkf_fcst.sh | 92 -- ush/EnKF/test_gdas_enkf_inflate_recenter.sh | 85 -- ush/EnKF/test_gdas_enkf_innovate_obs.sh | 102 -- ush/EnKF/test_gdas_enkf_post.sh | 80 -- ush/EnKF/test_gdas_enkf_select_obs.sh | 96 -- ush/EnKF/test_gdas_enkf_update.sh | 87 -- ush/EnKF/verifec.py | 238 ---- 49 files changed, 8791 deletions(-) delete mode 100755 ush/EnKF/analupdate.sh delete mode 100755 ush/EnKF/arch.sh delete mode 100755 ush/EnKF/check_fgfiles_serial.sh delete mode 100755 ush/EnKF/check_obsfiles_serial.sh delete mode 100755 ush/EnKF/current.enkfparms delete mode 100755 ush/EnKF/dateutils.py delete mode 100755 ush/EnKF/drive_gfs delete mode 100755 ush/EnKF/drive_gsi delete mode 100755 ush/EnKF/enkfa5.parms delete mode 100755 ush/EnKF/enkfdriver.sh delete mode 100755 ush/EnKF/firstges_multi.sh delete mode 100755 ush/EnKF/get_enkf_ic.sh delete mode 100755 ush/EnKF/gfscontrol.sh delete mode 100755 ush/EnKF/global_chgres.sh delete mode 100755 ush/EnKF/global_chgresp.sh delete mode 100755 ush/EnKF/global_cycle.sh delete mode 100755 ush/EnKF/global_cyclep.sh delete mode 100755 ush/EnKF/global_postgp.sh delete mode 100755 ush/EnKF/global_postgpp.sh delete mode 100755 ush/EnKF/incdate delete mode 100755 ush/EnKF/obsproc_ensmean.sh delete mode 100755 ush/EnKF/obsproc_multi.sh delete mode 100755 ush/EnKF/para_config.gdas_enkf_fcst delete mode 100755 ush/EnKF/para_config.gdas_enkf_inflate_recenter delete mode 100755 ush/EnKF/para_config.gdas_enkf_innovate_obs delete mode 100755 ush/EnKF/para_config.gdas_enkf_post delete mode 100755 ush/EnKF/para_config.gdas_enkf_select_obs delete mode 100755 ush/EnKF/para_config.gdas_enkf_update delete mode 100755 ush/EnKF/randates.py delete mode 100755 ush/EnKF/rerun_fg.sh delete mode 100755 ush/EnKF/rhist_saveenkf.sh delete mode 100755 ush/EnKF/run_enkf delete mode 100755 ush/EnKF/run_enkfupdate_convonly.sh delete mode 100755 ush/EnKF/run_enkfupdate_testcase.sh delete mode 100755 ush/EnKF/run_fg_gfs delete mode 100755 ush/EnKF/run_fg_gfs_multi.sh delete mode 100755 ush/EnKF/run_gfs delete mode 100755 ush/EnKF/run_gsi delete mode 100755 ush/EnKF/runenkf_trunk.sh delete mode 100755 ush/EnKF/runobs_multi.csh delete mode 100755 ush/EnKF/sub_gfsctrlhigh.sh delete mode 100755 ush/EnKF/test.py delete mode 100755 ush/EnKF/test_gdas_enkf_fcst.sh delete mode 100755 ush/EnKF/test_gdas_enkf_inflate_recenter.sh delete mode 100755 ush/EnKF/test_gdas_enkf_innovate_obs.sh delete mode 100755 ush/EnKF/test_gdas_enkf_post.sh delete mode 100755 ush/EnKF/test_gdas_enkf_select_obs.sh delete mode 100755 ush/EnKF/test_gdas_enkf_update.sh delete mode 100644 ush/EnKF/verifec.py diff --git a/ush/EnKF/analupdate.sh b/ush/EnKF/analupdate.sh deleted file mode 100755 index 4e9ea66a09..0000000000 --- a/ush/EnKF/analupdate.sh +++ /dev/null @@ -1,208 +0,0 @@ -#!/bin/tcsh -#@ shell = /usr/bin/tcsh -#@ job_name = enkfa_update -#@ output = $(job_name).$(jobid).out -#@ error = $(job_name).$(jobid).err -#@ notification = never -#@ job_type = parallel -#@ wall_clock_limit = 01:30:00 -#@ class = dev -#@ group = devonprod -#@ account_no = GDAS-T2O -#@ tasks_per_node = 48 -#@ environment = COPY_ALL -#@ node = 8 -#@ node_usage = not_shared -#@ node_resources = ConsumableMemory(110GB) -#@ task_affinity = cpu(1) -#@ network.MPI = csss,shared,us -#@ queue - -# Set environment variables for NCEP IBM -export MEMORY_AFFINITY=MCM -export MP_SHARED_MEMORY=yes - -# Set environment variables for no threads -export AIXTHREAD_SCOPE=S -export XLSMPOPTS="parthds=1:stack=128000000" - -# Environment variables from Carolyn -export LAPI_DEBUG_ENABLE_AFFINITY=YES -export MP_FIFO_MTU=4K -export MP_SYNC_QP=YES -export MP_RFIFO_SIZE=16777216 -export MP_SHM_ATTACH_THRESH=500000 # default is better sometimes -export MP_EUIDEVELOP=min -#RDMA specific tunables: -export MP_USE_BULK_XFER=yes -export MP_BULK_MIN_MSG_SIZE=64k -export MP_RC_MAX_QP=8192 -export LAPI_DEBUG_RC_DREG_THRESHOLD=1000000 -export LAPI_DEBUG_QP_NOTIFICATION=no -export LAPI_DEBUG_RC_INIT_SETUP=yes - -source /global/save/${LOGNAME}/enkf/work/scripts_ncep/current.enkfparms - -########################################################################## -# current cycle starts - -set username = `whoami` - -setenv startupenv "${datapath}/analdate.csh" -source $startupenv - -#------------------------------------------------------------------------ -mkdir -p $datapath -mkdir -p $logdir - -echo "BaseDir: ${basedir}" -echo "EnKFBin: ${enkfbin}" -echo "DataPath: ${datapath}" -echo "LogDir: ${logdir}" - -############################################################################ -# Main Program -# Please do not edit the code below; it is not recommended except lines relevant to getsfcensmean.csh. - -env -echo "starting the cycle" - -set ncycles=10 -set ncycle=1 -echo "ncycle = " $ncycle "and ncycles = " $ncycles - -# substringing to get yr, mon, day, hr info -setenv yr `echo $analdate | cut -c1-4` -setenv mon `echo $analdate | cut -c5-6` -setenv day `echo $analdate | cut -c7-8` -setenv hr `echo $analdate | cut -c9-10` -setenv ANALHR $hr -# set environment analdate -setenv datapath2 "${datapath}/${analdate}/" -# copy hostfileall to working dir. - -# current analysis time. -setenv analdate $analdate -# previous analysis time. -setenv analdatem1 `${incdate} $analdate -$ANALINC` -# next analysis time. -setenv analdatep1 `${incdate} $analdate $ANALINC` -setenv datapathprev "${datapath}/${analdatem1}/" -setenv hrp1 `echo $analdatep1 | cut -c9-10` -setenv hrm1 `echo $analdatem1 | cut -c9-10` -setenv datapathp1 "${datapath}/${analdatep1}/" -setenv datapathm1 "${datapath}/${analdatem1}/" -mkdir -p $datapathp1 - -date -echo "analdate minus 1: $analdatem1" -echo "analdate: $analdate" -echo "analdate plus 1: $analdatep1" - -# make log dir for analdate -setenv current_logdir "${logdir}/ensda_out_${analdate}" -echo "Current LogDir: ${current_logdir}" -mkdir -p ${current_logdir} - -set niter=1 -set alldone='no' -echo "${analdate} compute analysis increment `date`" -# need symlinks for satbias_angle, satbias_in, satinfo - -##ln -fs ${datapath2}/abias ${datapath2}/satbias_in - -setenv COMINGES /global/noscrub/${LOGNAME}/bias_prd09q1o -setenv ABIAS ${COMINGES}/biascr.${datdump}.${analdate} -ln -fs ${COMINGES}/biascr.${datdump}.${analdate} ${datapath2}/satbias_in -ln -fs ${datapath2}/satang ${datapath2}/satbias_angle -##setenv ABIAS ${datapathp1}/${PREINP1}abias - -ln -fs ${CONVINFO} ${datapath2}/convinfo -ln -fs ${SATINFO} ${datapath2}/satinfo -ln -fs ${OZINFO} ${datapath2}/ozinfo - -set nanal=1 -set filemissing='no' -while ($nanal <= $nanals) - set charnanal="mem"`printf %03i $nanal` - set analfile="${datapath2}/sanl_${analdate}_${charnanal}" - if { /bin/test ! -s $analfile } set filemissing='yes' - @ nanal = $nanal + 1 -end -##if { /bin/test ! -s $ABIAS } set filemissing='yes' - -if($filemissing == 'yes') then - while ($alldone == 'no' && $niter <= $nitermax) - if ($niter == 1) then - csh ${enkfscripts}/${ensda} >&! ${current_logdir}/ensda.out - set exitstat=$status - echo "exit status $exitstat" - else - csh ${enkfscripts}/${ensda} >>& ${current_logdir}/ensda.out - set exitstat=$status - endif - if ($exitstat == 0) then - set alldone='yes' - else - echo "some files missing, try again .." - @ niter = $niter + 1 - endif - end -else - set alldone='yes' -endif - -if($alldone == 'no') then - echo "Tried ${nitermax} times to run ensda and failed: ${analdate}" - exit 1 -endif -echo "${analdate} done computing analysis increment `date`" - -# create ensemble mean sig anal files (runobs.csh creates -# ensemble mean surface file). - -if ($cleanup_ensmean == 'true' || ($cleanup_ensmean == 'false' && { /bin/test ! -s ${datapath}/${analdate}/sanl_${analdate}_ensmean })) then - ${enkfexec}/getsigensmean.x ${datapath}/${analdate}/ sanl_${analdate}_ensmean sanl_${analdate} ${nanals} anal -endif - -##setenv PGMOUT ${current_logdir}/chgres_sfccycle_control.out -# ps tend diagnostics on ensemble member 1 -###time ${enkfexec}/getpstend.x ${datapath}/${analdate}/ ${analdate} 1 - -## DTK This has been moved back to "gfscontrol.sh" -#set LONB_save=$LONB -#set LATB_save=$LATB -#set JCAP_save=$JCAP -#setenv LONB $LONB_HIGH -#setenv LATB $LATB_HIGH -#setenv JCAP $JCAP_HIGH -# Run surface cycle and chgres -#time sh $CYCLESH ${datapathm1}/enkf.t${hrm1}z.bf06 ${datapath2}/sfcanl_${analdate}_control -#$CHGRESSH ${datapath2}/sanl_${analdate}_ensmean /dev/null ${datapath2}/sanl_${analdate}_control /dev/null - -#setenv LONB $LONB_save -#setenv LATB $LATB_save -#setenv JCAP $JCAP_save - -set nanal=1 -set filemissing='no' -while ($nanal <= $nanals) - set charnanal="mem"`printf %03i $nanal` - set analfile="${datapath2}/sanl_${analdate}_${charnanal}" - if { /bin/test ! -s $analfile } set filemissing='yes' - @ nanal = $nanal + 1 -end - -#set charnanal=control -#set analfile="${datapath2}/sanl_${analdate}_${charnanal}" -#set sfcanlfile="${datapath2}/sfcanl_${analdate}_${charnanal}" -#if { /bin/test ! -s $analfile } set filemissing='yes' -#if { /bin/test ! -s $sfcanlfile } set filemissing='yes' - -if($filemissing == 'yes') then - echo "FILES ARE MISSING, CANNOT SUBMIT FIRST GUESS FOR NEXT CYCLE. STOPPING HERE!" -else - tcsh ${enkfscripts}/firstges_multi.sh -endif - -exit 0 diff --git a/ush/EnKF/arch.sh b/ush/EnKF/arch.sh deleted file mode 100755 index 6dd64b0e68..0000000000 --- a/ush/EnKF/arch.sh +++ /dev/null @@ -1,98 +0,0 @@ -#!/bin/tcsh - -## PASS IN ANALDATE and ARCH-HOUR VIA PSUB -echo "IN ARCHIVE AND CLEANUP SCRIPT" - -# import parameters -source ${CONFIG} - -# current analysis time. -echo "analdate = $analdate" - -# substringing to get yr, mon, day, hr info -setenv yr `echo $analdate | cut -c1-4` -setenv mon `echo $analdate | cut -c5-6` -setenv day `echo $analdate | cut -c7-8` -setenv hr `echo $analdate | cut -c9-10` - -# previous analysis time. -setenv analdatem1 `${incdate} $analdate -$ANALINC` -# next analysis time. -setenv analdatep1 `${incdate} $analdate $ANALINC` -setenv datapathprev "${datapath}/${analdatem1}/" -setenv hrp1 `echo $analdatep1 | cut -c9-10` -setenv hrm1 `echo $analdatem1 | cut -c9-10` -setenv datapathp1 "${datapath}/${analdatep1}/" -setenv datapathm1 "${datapath}/${analdatem1}/" -# make log dir for analdate -setenv current_logdir "${logdir}/ensda_out_${analdate}" -echo "Current LogDir: ${current_logdir}" -mkdir -p ${current_logdir} - -echo "SET MORE PARMS" -setenv datapath2 "${datapath}/${analdate}/" -setenv hpsstar "/nwprod/util/ush/hpsstar" - -setenv archdate `${incdate} $analdate -$ARCHLAG` -setenv hrar `echo $archdate | cut -c9-10` - -echo "ARCHDATE = $archdate" -echo "hrar = $hrar" - -if ($do_cleanup == 'true') then - echo "PERFORM CLEANUP OF DIRECTORY" - echo "make tar files, then clean up files `date`" - cd $datapath2 - tar -cvf sanl_ens_${analdate}.tar sanl*${analdate}*mem* - tar -cvf sfhr06_ens_${analdate}.tar sfg*${analdate}*fhr06*mem* - tar -cvf bfhr06_ens_${analdate}.tar bfg*${analdate}*fhr06*mem* - tar -cvf sfcanl_ens_${analdate}.tar sfcanl*${analdate}*mem* - - /bin/rm -f diag*a*${analdate}*mem* - /bin/rm -f diag*conv*${analdate}*mem* - /bin/rm -f diag*s*${analdate}*mem* - /bin/rm -f diag*${analdate}*mem* - - /bin/rm -f sfg*${analdate}*mem* - /bin/rm -f gfg_${analdate}*mem* - /bin/rm -f sanl*${analdate}*mem* - /bin/rm -f ganl*${analdate}*mem* - /bin/rm -f sfcanl*${analdate}*mem* - /bin/rm -f sflxgrb*${analdate}*mem* - /bin/rm -f bfg*${analdate}*mem* - - /bin/rm -f *${yr}${mon}${day}_mem*.t${hr}z* - /bin/rm -f *.sigr1 *.sigr2 *.sfcr *.log* - /bin/rm -rf gsitmp* - /bin/rm -rf gfs.* - /bin/rm -f *.nml - /bin/rm -f hxprime* - - cd $current_logdir - tar -cvf run_fg_logs.tgz run_fg_mem* - tar -cvf run_obs_logs.tgz run_obs_mem* - tar -cvf run_cycle_logs.tgz run_cycle_mem* - tar -cvf chgres_logs.tgz chgres_mem* - /bin/rm -f *mem* - echo "${analdate} done cleanup `date`" - -### exit 0 -endif - -echo "hpssfile = ${hpssdir}/${archdate}enkfanl.tar" -echo "from directory : ${datapath}/${archdate}/" - -mkdir -p ${archdiskdir} -/bin/rcp ${datapath}/${archdate}/*.tar ${archdiskdir}/ -/bin/rcp ${datapath}/${archdate}/enkf.t${hrar}z.sf06 ${archdiskdir}/sf06_${archdate}_control -/bin/rcp ${datapath}/${archdate}/sanl_*_control ${archdiskdir}/ -/bin/rcp ${datapath}/${archdate}/sfcanl_*_control ${archdiskdir}/ - - -cd ${datapath} -${hpsstar} put ${hpssdir}/${archdate}enkfanl.tar ${archdate}/* - -rm -rf ${datapath}/${archdate} - -echo "DONE WITH CLEANUP AND ARCHIVING" -exit 0 diff --git a/ush/EnKF/check_fgfiles_serial.sh b/ush/EnKF/check_fgfiles_serial.sh deleted file mode 100755 index 1a79859041..0000000000 --- a/ush/EnKF/check_fgfiles_serial.sh +++ /dev/null @@ -1,121 +0,0 @@ -#!/bin/tcsh - -# import parameters -setenv CONFIG /global/save/${LOGNAME}/enkf/work/scripts_ncep/current.enkfparms -source ${CONFIG} - -setenv startupenv "${datapath}/analdate.csh" -source $startupenv - -# current analysis time. -setenv analdate $analdate - -echo "analdate = $analdate" - -# substringing to get yr, mon, day, hr info -setenv yr `echo $analdate | cut -c1-4` -setenv mon `echo $analdate | cut -c5-6` -setenv day `echo $analdate | cut -c7-8` -setenv hr `echo $analdate | cut -c9-10` - -echo "SET DATE PARAMETERS" -setenv SUB "/u/wx23sm/bin/sub_vapor" -echo "SUB= ${SUB}" - - -# previous analysis time. -setenv analdatem1 `${incdate} $analdate -$ANALINC` -# next analysis time. -setenv analdatep1 `${incdate} $analdate $ANALINC` -setenv datapathprev "${datapath}/${analdatem1}/" -setenv hrp1 `echo $analdatep1 | cut -c9-10` -setenv hrm1 `echo $analdatem1 | cut -c9-10` -setenv datapathp1 "${datapath}/${analdatep1}/" -setenv datapathm1 "${datapath}/${analdatem1}/" -# make log dir for analdate - -setenv current_logdir "${logdir}/ensda_out_${analdate}" -echo "Current LogDir: ${current_logdir}" -mkdir -p ${current_logdir} - -setenv DATOUT "${datapath}${analdatep1}" -setenv datapath2 "${datapath}/${analdate}/" - -echo "set DATOUT" -@ nanalsp1 = $nanals + 1 -echo "nanalsp1=",$nanalsp1 - -# Check every minute, for a maximum of 90 minutes -set ncheck=1 -set ncheckmax=90 - -while ($ncheck <= $ncheckmax) - set nanal2=1 - set anyfilemissing='no' - while ($nanal2 <= $nanals) - setenv charnanal "mem`printf %03i $nanal2`" - set fhr=$FHMIN - set outfiles="" - while ($fhr <= $FHMAX) - set charhr="fhr`printf %02i $fhr`" - set outfiles = "${outfiles} ${datapath}${analdatep1}/sfg_${analdatep1}_${charhr}_${charnanal} ${datapath}${analdatep1}/bfg_${analdatep1}_${charhr}_${charnanal}" - @ fhr = $fhr + $FHOUT - end - set filemissing='no' - foreach outfile ($outfiles) -## ls -l $outfile - if (-e $outfile) then -## echo "${outfile} is OK" - else - echo "${outfile} is missing" - set filemissing='yes' - set anyfilemissing='yes' - endif - end - @ nanal2 = $nanal2 + 1 - end - - if ($anyfilemissing == 'yes') then - echo 'there are output files missing...wait another minute' - sleep 60 - @ ncheck = $ncheck + 1 - if ($ncheck == $ncheckmax) then - echo 'SOMETHING FAILED IN FG STEP, JOB STOPPING' - exit 1 - endif - else - echo "all output files seem OK" -## CALL ARCHIVE SCRIPT HERE - echo "analdate=$analdate" - echo "CONFIG=$CONFIG" - $SUB -a GDAS-T2O -e analdate,CONFIG -g devonprod -j enkf_archive -o ${current_logdir}/enkf_archive.out -p 1 -q 1 -r 1000 -t 00:45:00 -u ${LOGNAME} -w +0000 ${enkfscripts}/arch.sh -## EXIT OUT OF CHECK LOOP - @ ncheck = $ncheckmax + 1 - endif - -end -## end check < checkmax - -# CHECK SURFACE FILE -set filemissing='no' -set sfcffile="${datapath2}/enkf.t${hr}z.bf06" -if { /bin/test ! -s $sfcffile } set filemissing='yes' - -#if($filemissing == 'yes') then -# echo "SURFACE F06 FILE MISSING, WAIT 5 MINUTES" -# sleep 300 -#else -# echo "SURFACE F06 FILE IS READY, CONTINUE ON TO NEXT CYCLE" -#endif - - -## next analdate: increment by $ANALINC - setenv analdate `${incdate} $analdate $ANALINC` - echo "setenv analdate ${analdate}" >! $startupenv - -## SUBMIT NEXT CYCLE - echo "submit cycle for ${analdate}" - ${enkfscripts}/enkfdriver.sh - - exit 0 - diff --git a/ush/EnKF/check_obsfiles_serial.sh b/ush/EnKF/check_obsfiles_serial.sh deleted file mode 100755 index edd4935081..0000000000 --- a/ush/EnKF/check_obsfiles_serial.sh +++ /dev/null @@ -1,99 +0,0 @@ -#!/bin/tcsh - -# import parameters -setenv CONFIG /global/save/${LOGNAME}/enkf/work/scripts_ncep/current.enkfparms -source ${CONFIG} - -setenv startupenv "${datapath}/analdate.csh" -source $startupenv - -# current analysis time. -setenv analdate $analdate - -echo "analdate = $analdate" - -# substringing to get yr, mon, day, hr info -setenv yr `echo $analdate | cut -c1-4` -setenv mon `echo $analdate | cut -c5-6` -setenv day `echo $analdate | cut -c7-8` -setenv hr `echo $analdate | cut -c9-10` - -echo "SET DATE PARAMETERS" -setenv SUB "/u/wx23sm/bin/sub_vapor" -echo "SUB= ${SUB}" - - -# previous analysis time. -setenv analdatem1 `${incdate} $analdate -$ANALINC` -# next analysis time. -setenv analdatep1 `${incdate} $analdate $ANALINC` -setenv datapathprev "${datapath}/${analdatem1}/" -setenv hrp1 `echo $analdatep1 | cut -c9-10` -setenv hrm1 `echo $analdatem1 | cut -c9-10` -setenv datapathp1 "${datapath}/${analdatep1}/" -setenv datapathm1 "${datapath}/${analdatem1}/" -# make log dir for analdate - -setenv current_logdir "${logdir}/ensda_out_${analdate}" -echo "Current LogDir: ${current_logdir}" -mkdir -p ${current_logdir} - -setenv DATOUT "${datapath}${analdatep1}" -setenv datapath2 "${datapath}/${analdate}/" - -echo "set DATOUT" -@ nanalsp1 = $nanals + 1 -echo "nanalsp1=",$nanalsp1 - -# Check every minute, for a maximum of 90 minutes -set ncheck=1 -set ncheckmax=90 - -while ($ncheck <= $ncheckmax) - set nanal=0 - set anyfilemissing='no' - set filemissing='no' - while ($nanal <= $nanals) - if ($nanal == '0') then - setenv charnanal2 "ensmean" - else - setenv charnanal2 "mem"`printf %03i $nanal` - endif - - echo $nanal - echo $charnanal2 - set obsfiles = "${datapath2}/diag_conv_ges.${analdate}_${charnanal2} ${datapath2}/sfcanl_${analdate}_${charnanal2}" - - foreach obsfile ($obsfiles) - ls -l $obsfile - if { /bin/test ! -s $obsfile } then - set filemissing='yes' - set anyfilemissing='yes' - endif - end - if ($filemissing == 'yes') then - echo "file missing .." - else - echo "files ok .." - endif - @ nanal = $nanal + 1 - end - - if ($anyfilemissing == 'yes') then - echo 'there are output files missing...wait another minute' - sleep 120 - @ ncheck = $ncheck + 1 - if ($ncheck == $ncheckmax) then - echo 'SOMETHING FAILED IN OBS STEP, JOB STOPPING' - exit 1 - endif - else - echo "all output files seem OK" - echo "Submit EnKF update step now" - llsubmit ${enkfscripts}/analupdate.sh - exit 0 - endif - -end - -## end check < checkmax diff --git a/ush/EnKF/current.enkfparms b/ush/EnKF/current.enkfparms deleted file mode 100755 index 160d38dc24..0000000000 --- a/ush/EnKF/current.enkfparms +++ /dev/null @@ -1,169 +0,0 @@ -setenv MP_SHARED_MEMORY=yes -setenv MEMORY_AFFINITY=MCM -setenv enddate 2008080118 - -set ensda = "run_enkf" -set runobs = 'runobs_multi.csh' -set fg_gfs = "run_fg_gfs_multi.sh" -set ctrl_gfs = 'gfscontrol.sh' -set drive_ensmean = "drive_gfs" -set cleanup_obs = 'false' # remove existing obs files -set cleanup_anal = 'false' # remove existing anal files -set cleanup_fg = 'false' # remove existing first guess files -set cleanup_ensmean = 'false' # remove existing ensmean files -set fg_only = 'false' # if true, just run first guess forecast -set do_cleanup = 'false' # if true, create tar files, delete *mem* files. - -##setenv basedir `dirname $PWD` -setenv basedir "/global/save/wx20kd/enkf/work/" -set datadir="${basedir}" - -# where the data will be created -setenv datapath "/global/noscrub/wx20kd/enkf_a5/" - -# Data reside in obs directory set dynamically in loop below ${obsdir} -# log directory -setenv logdir "/global/noscrub/wx20kd/logs/enkf_a5/" - -# some scripts reside here -# also need to make this dependent on user or a group writeable area -compo - -setenv enkfscripts "${basedir}/scripts/ncep" -setenv enkfexec "${basedir}/src/" - -# name of enkf executable. -setenv enkfbin "${enkfexec}/global_enkf.x" - -# Set archive directories -setenv archdiskdir ${datapath}/archive -setenv hpssdir /hpssuser/g01/wx20kd/enkfa5 -# remove 24hr old directories and put stuff to tape -setenv ARCHLAG 24 - -setenv incdate "${enkfscripts}/incdate" - -setenv homedir $PWD -setenv qcomp ecomp - -########################################################################## -# enkf parameters. -setenv corrlengthnh 1500 -setenv corrlengthtr 1500 -setenv corrlengthsh 1500 -setenv lnsigcutoffnh 1.5 -setenv lnsigcutofftr 1.5 -setenv lnsigcutoffsh 1.5 -setenv lnsigcutoffpsnh 2.2 -setenv lnsigcutoffpstr 2.2 -setenv lnsigcutoffpssh 2.2 -setenv lnsigcutoffsatnh 3.3 -setenv lnsigcutoffsattr 3.3 -setenv lnsigcutoffsatsh 3.3 -setenv obtimelnh 15. -setenv obtimeltr 15. -setenv obtimelsh 15. - -# Assimilation parameters -setenv JCAP 190 -setenv JCAP_HIGH 382 -setenv LEVS 64 -setenv LEVS_ges 64 -setenv LONB 576 -setenv LATB 288 -setenv LONA 576 -setenv LATA 288 -setenv SMOOTHINF 24 -setenv LONB_HIGH 1152 -setenv LATB_HIGH 576 -setenv npts `expr \( $LONA \) \* \( $LATA \)` -setenv LSOIL 4 -setenv RUN "gdas1" - -## DTK FIX OBS PATH -setenv obs_datapath "/global/shared/dump/" -##setenv datdump gfs -setenv datdump gdas - -setenv NTRAC 3 -setenv nvars 4 -setenv ntrac_update 2 -setenv LANDICE_OPT 2 -# parameters for additive inflation -setenv scalefact 40 -setenv addpertpath "/global/noscrub/wx20kd/sig190/" -setenv lonscramble 1 -setenv runprefix "gdas1" - -setenv random_partition .false. -setenv simple_partition .false. -setenv iassim_order 0 -setenv use_height .false. -setenv use_letkf .false. - -setenv covinflatemax 1.e2 -setenv covinflatemin 1.0 -setenv covinflatenh 0.0 -setenv covinflatetr 0.0 -setenv covinflatesh 0.0 -setenv lnsigcovinfcutoff 6.0 - -setenv analpertwtnh 0.9 -setenv analpertwtsh 0.9 -setenv analpertwttr 0.9 - -setenv pseudo_rh .true. - -setenv sprd_tol 1.e30 - -setenv nanals 60 -## DTK : specifiy number of members to process per job/node for first ges (GFS) and obs (GSI) processing -setenv nmem_per_node 4 - -setenv paoverpb_thresh 1.0 -setenv saterrfact 1.0 -setenv deterministic .true. -setenv sortinc .true. - -setenv numiter 1 -setenv nitermax 3 - -########################################################################## -# Some binaries and scripts reside here -# - -setenv HOMEGLOBAL ${basedir} -setenv FIXGLOBAL /nwprod/fix -setenv FIXGSI /global/save/wx20kd/ensda/ersl/fixgsi -setenv EXECGLOBAL /global/save/wx20kd/ensda/ersl/bin -setenv SIGLEVEL ${FIXGLOBAL}/global_hyblev.l64.txt -setenv GSIEXEC /global/save/wx20kd/gsi/hybrid/src/global_gsi.x -setenv CHGRESEXEC ${EXECGLOBAL}/global_chgres_thread_moorthi -setenv USHGLOBAL $EXECGLOBAL -setenv CHGRESSH ${enkfscripts}/global_chgres.sh -setenv CYCLESH ${enkfscripts}/global_cycle.sh -setenv POSTGPSH ${enkfscripts}/global_postgpp.sh -setenv POSTGPLIST ${FIXGLOBAL}/global_kplist.1d.txt -setenv POSTGPEXEC $EXECGLOBAL/global_postgs -setenv POSTPROC "YES" # if yes, compute pgrb files for 6-h forecast for every member. -setenv IO 360 -setenv JO 181 - -setenv SATINFO ${FIXGSI}/global_satinfo.txt.n19_off.r2008 - -# 6-h cycle -setenv FHMAX 9 -setenv FHMIN 3 -setenv FHDFI 3 -setenv FHOUT 1 -setenv FHLWR $FHOUT - -setenv ANALINC 6 -setenv DELTSFC $ANALINC - -setenv PARMFILE=/global/save/wx20kd/enkf/work/scripts/ncep/enkfa5.parms -setenv NODEOBS=1 -setenv NODEENKF=5 -setenv NODEFG=2 - -# TO GET RID OF EVENTUALLY -setenv nbackground_max 32 diff --git a/ush/EnKF/dateutils.py b/ush/EnKF/dateutils.py deleted file mode 100755 index e6c12d5761..0000000000 --- a/ush/EnKF/dateutils.py +++ /dev/null @@ -1,144 +0,0 @@ -import datetime, calendar - -""" -utilities for working with dates using datetime module (Python 2.3 or later) - -Jeff Whitaker -""" - - -hrsgregstart = 13865688 # hrs from 00010101 to 15821015 in Julian calendar. -# times in many datasets use mixed Gregorian/Julian calendar, datetime -# module uses a proleptic Gregorian calendar. So, I use datetime to compute -# hours since start of Greg. calendar (15821015) and add this constant to -# get hours since 1-Jan-0001 in the mixed Gregorian/Julian calendar. -gregstart = datetime.datetime(1582,10,15) # datetime.datetime instance -day1 = datetime.datetime(1,1,1) # datetime.datetime instance - -def dateto_hrs_since_day1CE(curdate,mixedcal=True): - """given datetime.datetime instance, compute hours since 1-Jan-0001""" - if mixedcal: - if curdate < gregstart: - msg = 'date must be after start of gregorian calendar (15821015)!' - raise ValueError, msg - difftime = curdate-gregstart - hrsdiff = 24*difftime.days + difftime.seconds/3600 - return hrsdiff+hrsgregstart - else: - difftime = curdate-day1 - return 24.*(difftime.days+1)+difftime.seconds/3600. - -def hrs_since_day1CE_todate(hrs,mixedcal=True): - """return datetime.datetime instance given hours since 1-Jan-0001""" - if hrs < 0.0: - msg = "hrs must be positive!" - raise ValueError, msg - delta = datetime.timedelta(hours=1) - if mixedcal: - hrs_sincegreg = hrs - hrsgregstart - curdate = gregstart + hrs_sincegreg*delta - else: - curdate = hrs*delta - return curdate - -def dateshift(analdate,fcsthr): - """ - verifdate = incdate(analdate, fcsthr) - - compute verification date given analysis date string (yyyymmddhh) and - fcst hour. - """ - yyyy,mm,dd,hh = splitdate(analdate) - analdate = datetime.datetime(yyyy,mm,dd,hh) - verifdate = analdate + fcsthr*datetime.timedelta(hours=1) - verifdate = makedate(verifdate.year,verifdate.month,verifdate.day,verifdate.hour) - return verifdate - - -def splitdate(yyyymmddhh): - """ - yyyy,mm,dd,hh = splitdate(yyyymmddhh) - - give an date string (yyyymmddhh) return integers yyyy,mm,dd,hh. - """ - yyyy = int(yyyymmddhh[0:4]) - mm = int(yyyymmddhh[4:6]) - dd = int(yyyymmddhh[6:8]) - hh = int(yyyymmddhh[8:10]) - return yyyy,mm,dd,hh - -def makedate(yyyy,mm,dd,hh): - """ - yyyymmddhh = makedate(yyyy,mm,dd,hh) - - return a date string of the form yyyymmddhh given integers yyyy,mm,dd,hh. - """ - return '%0.4i'%(yyyy)+'%0.2i'%(mm)+'%0.2i'%(dd)+'%0.2i'%(hh) - -def hrstodate(hrs,mixedcal=True): - """ - yyyymmddhh = hrstodate(hrs) - - return a date string of the form yyyymmddhh given hrs since day 1 CE. - """ - date = hrs_since_day1CE_todate(hrs,mixedcal=mixedcal) - return makedate(date.year,date.month,date.day,date.hour) - -def datetohrs(yyyymmddhh,mixedcal=True): - """ - hrs = hrstodate(yyyymmddhh) - - return hrs since day 1 CE given a date string of the form yyyymmddhh. - """ - yyyy,mm,dd,hh = splitdate(yyyymmddhh) - return dateto_hrs_since_day1CE(datetime.datetime(yyyy,mm,dd,hh),mixedcal=mixedcal) - -def daterange(date1,date2,hrinc): - """ - date_list = daterange(date1,date2,hrinc) - - return of list of date strings of the form yyyymmddhh given - a starting date, ending date and an increment in hours. - """ - date = date1 - delta = datetime.timedelta(hours=1) - yyyy,mm,dd,hh = splitdate(date) - d = datetime.datetime(yyyy,mm,dd,hh) - n = 0 - dates = [date] - while date < date2: - d = d + hrinc*delta - date = makedate(d.year,d.month,d.day,d.hour) - dates.append(date) - n = n + 1 - return dates - -def dayofyear(yyyy,mm,dd): - """ - return integer day of year given yyyy,mm,dd - """ - d = datetime.datetime(yyyy,mm,dd) - d0 = datetime.datetime(yyyy,1,1) - return (d-d0).days - -def getyrmon(day_of_year,yyyy=2001): - d1 = datetime.datetime(yyyy,1,1) - if calendar.isleap(d1.year) and day_of_year > 366: - raise ValueError, 'not that many days in the year' - if not calendar.isleap(d1.year) and day_of_year > 365: - raise ValueError, 'not that many days in the year' - d2 = d1 + (day_of_year-1)*datetime.timedelta(days=1) - return d2.month,d2.day - -def daysinmonth(yyyy,mm): - """ - return number of days in month given yyyy,mm - """ - return calendar.monthrange(yyyy,mm)[1] - -if __name__ == "__main__": - print dayofyear(2000,2,29) - print daysinmonth(2000,2) - print datetohrs('0001010100',mixedcal=False) - print datetohrs('2001010100',mixedcal=False) - print datetohrs('2001010100',mixedcal=True) diff --git a/ush/EnKF/drive_gfs b/ush/EnKF/drive_gfs deleted file mode 100755 index 27c9347271..0000000000 --- a/ush/EnKF/drive_gfs +++ /dev/null @@ -1,205 +0,0 @@ -#!/bin/bash - -# needed env vars: SIGI, SFCI, HOMEGLOBAL, ANALHR, RUN, JCAP, LEVS -# DATOUT, FHOUT, FHMAX, FHDFI, datapath, analdate, analdatep1, charnanal -# HOSTFILE, nprocs - -echo "starting drive_gfs at `date`" -export ANALHR=`echo $analdate | cut -c9-10` -export cyc=$ANALHR - -#set -xa - -# #### 05/05/99 ############################### -# SETUP GFS FCST PROCESSING VARIABLES -# ############################################# - -#################################### -# obtain unique process id (pid) and make temp directory -#################################### -export pid=$$ -export DATA=$datapath2/gfstmp.${pid} -homedir=$PWD -mkdir $DATA -cd $DATA - -export cycle=t${cyc}z - -#################################### -# Specify NET and RUN Name and model -#################################### -export NET=$RUN - -#################################### -# SENDSMS - Flag Events on SMS -# SENDCOM - Copy Files From TMPDIR to $DATOUT -# SENDDBN - Issue DBNet Client Calls -# RERUN - Rerun fcst from beginning (default no) -# VERBOSE - Specify Verbose Output in exglobal_fcst.sh -#################################### -export SENDSMS=YES -export SENDCOM=YES -export SENDDBN=NO -export RERUN=YES -export VERBOSE=NO - -#################################### -# Specify Execution Areas -#################################### -#export EXECGLOBAL=$HOMEGLOBAL/bin -#export FIXGLOBAL=$HOMEGLOBAL/fix - -############################################## -# Define COM directories -############################################## -mkdir -m 775 -p $DATOUT - -#################################### -# Specify Special Fcst Vars -#################################### -# -# Forecast Horizontal Resolution -# -# JCAP from env -# -# Forecast Vertical Resolution -# -# LEVS from env -# export added by Grant and Rich 11/13/2003 -# for T382 -if [[ $JCAP == '382' ]]; then -export DELTIM=180 #Added to compensate for failure - #due to 'unphysical max speed' error. -fi - -export CO2CON=$FIXGLOBAL/global_co2con.l${LEVS}.f77 -export MTNVAR=$FIXGLOBAL/global_mtnvar.t${JCAP}.f77 -export CLTUNE=$FIXGLOBAL/global_cldtune.f77 -export DTBTHE=$FIXGLOBAL/global_tbthe.f77 -export O3FORC=$FIXGLOBAL/global_o3prdlos.f77 -export O3CLIM=$FIXGLOBAL/global_o3clim.txt -export OROGRAPHY=$FIXGLOBAL/global_orography.t$JCAP.grb -export CHGRESEXEC=$EXEGLOBAL/global_chgres -# -# Restart File Names -# -export SIGR1=$DATOUT/${RUN}.${cycle}.sigr1.t${JCAP}l${LEVS} -export SIGR2=$DATOUT/${RUN}.${cycle}.sigr2.t${JCAP}l${LEVS} -export SFCR=$DATOUT/${RUN}.${cycle}.sfcr.t${JCAP}l${LEVS} - -msg="HAS BEGUN on `hostname`" - -env - -export NTHREADS=1 -#export OMP_NUM_THREADS=1 - -#################################### -# Check if this is a restart -# -# Define Initialization File Names -# -# Run Forecast -# -#################################### -if test -f $SIGR1 -a -f $SIGR2 -a -f $SFCR -a $RERUN = "NO" -then - cp $SIGR1 $DATA/sigr1 - cp $SIGR2 $DATA/sigr2 - cp $SFCR $DATA/sfcr - - export SIGI=$SIGR1 - export SIGI2=$SIGR2 - export SFCI=$SFCR - - msg="Forecast Starting with Restart files in $GESdir" -else - # - # Forecast Start Hour - # - export FHINI=0 - - # SIGI, SFCI must be specified as env vars. - - if test -f $SIGI -a -f $SFCI - then - echo "Forecast Starting with Initial Guess Fields" - else - echo "Initial Guess Fields Not Available/No Guess from J920" - fi - -fi - -############################################################ -# Start Section 2 of the GFS Forecast 180-384 Hours -############################################################ -# -# Forecast hour to Read One Time level -# -export FHROT=0 -# -# Forecast Hour Output Frequency -# -#export FHOUT=12 -# -# Forecast Length (Hours) -# -#export FHMAX=240 -# -# Forecast Hour Restart Frequency -# -#export FHRES=$FHMAX -# -# Interval to Zero out precip field,etc. -# Should not be less that FHOUT -# -export FHZER=$FHOUT -# -# Half number of hours of digital filter initialization -# -#export FHDFI=3 -# -# Surface cycling boundary condition update frequency in hours -# -#export FHCYC=24 -# -# PDS Grid Designator -# -export IGEN=96 -export LIOPE=.false. # no IO server node (default is .true.) -# -# Output File Names -# -#export SIGO=${SIGO:-$DATOUT/${RUN}.${cycle}.sf'${FH}'} -#export SFCO=${SFCO:-$DATOUT/${RUN}.${cycle}.bf'${FH}'} -#export FLXO=${FLXO:-$DATOUT/${RUN}.${cycle}.sfluxgrbf'${FH}'} -#export LOGO=${LOGO:-$DATOUT/${RUN}.${cycle}.logf'${FH}'} -export SIGO=${SIGO:-${DATOUT}/sfg_${analdatep1}_fhr'${FH}'_${charnanal}} -export SFCO=${SFCO:-${DATOUT}/bfg_${analdatep1}_fhr'${FH}'_${charnanal}} -export FLXO=${FLXO:-${DATOUT}/sflxgrb_${analdatep1}_fhr'${FH}'_${charnanal}} -#export LOGO=${LOGO:-${DATOUT}/log_${analdatep1}_fhr'${FH}'_${charnanal}} -# don't need flux and log files. -#export FLXO=/dev/null -export LOGO=/dev/null - -#cp $SIGR1 $DATA/sigr1 -#cp $SIGR2 $DATA/sigr2 -#cp $SFCR $DATA/sfcr - -# -# Execute the Forecast script -# -echo "executing run_gfs at `date`" -sh ${homedir}/run_gfs - -msg="ENDED NORMALLY." - -############################## -# Remove the Temporary working directory -############################## -cd $homedir -rm -rf $DATA - -# remove *.fh00 files -/bin/rm -rf $DATOUT/*_fhr00_${charnanal} -echo "ending run_gfs at `date`" diff --git a/ush/EnKF/drive_gsi b/ush/EnKF/drive_gsi deleted file mode 100755 index ade5ccff6f..0000000000 --- a/ush/EnKF/drive_gsi +++ /dev/null @@ -1,369 +0,0 @@ -#!/bin/sh -# env vars used: -# ANALHR, datapath datapath2, obs_datapath, HXONLY, DIAGCONV, SAVEHX -# HOMEGLOBAL, charnanal - -echo "starting gsi at `date`" -export cyc=$ANALHR -homedir=$PWD -export CDATE=$analdate - -#date - -#export PS4='$SECONDS + ' -#date -set -xa - -# #### 05/05/99 ############################### -# SETUP GFS ANALYSIS PROCESSING VARIABLES -# ############################################# - -#################################### -# obtain unique process id (pid) and make temp directory -#################################### -export pid=$$ -job='gsitmp' -export DATA=$datapath2/${job}.${pid} -mkdir $DATA -cd $DATA - -export cycle=t${cyc}z - -#################################### -# Specify NET and RUN Name and model -#################################### -export NET=$RUN -#export RUN=gdas1 -# output diagnostic file for conventional obs. -#export DIAGCONV=.true. -# only do forward operator, exit GSI before minimization. -#export HXONLY=.true. - -#################################### -# File To Log Msgs -#################################### -export jlogfile=/com/logs/para/jlogfile - -#################################### -# Determine Job Output Name on System -#################################### -export outid="LL$job" -export jobid="${outid}.o${pid}" -export pgmout="OUTPUT.${pid}" -export pgmerr=$logdir/errfile - -#################################### -# SENDSMS - Flag Events on SMS -# SENDCOM - Copy Files From TMPDIR to $COMOUT -# SENDDBN - Issue DBNet Client Calls -# VERBOSE - Specify Verbose Output in exglobal_fcst.sh -#################################### -export SENDSMS=YES -export SENDCOM=YES -export SAVEGES=YES -export SENDDBN=NO -export VERBOSE=YES - -#################################### -# Specify Execution Areas -#################################### -#export EXECGLOBAL=$HOMEGLOBAL/bin -#export FIXGLOBAL=$HOMEGLOBAL/fix -#export USHGLOBAL=$HOMEGLOBAL/ush - -export ERRSCRIPT=err_chk -export LOGSCRIPT=startmsg -export FILESTYLE='L' - -############################## -# Set up the UTILITIES -############################## -#export utilscript=/nwprod/util/ush -#export utilexec=/nwprod/util/exec - -############################## -# Run setup to initialize working directory and utility scripts -############################## -#sh $utilscript/setup.sh - -############################## -# Run setpdy and initialize PDY variables -############################## -#sh $utilscript/setpdy.sh -#. PDY - -############################################## -# Define COM directories -############################################## -export COMIN=$obs_datapath/${analdate}/gdas -export COMOUT=$datapath2 -mkdir -m 775 -p $COMOUT - -############################################## -# Define GES directories -############################################## -gespath=$COMIN -export GESdir=$gespath -##mkdir -m 775 -p $GESdir - -#################################### -# Specify Special Fcst Vars -#################################### -# -# Forecast Horizontal Resolution -# -#export JCAP=126 -#export JCAP_ges=126 -#export JCAP=126 -#export JCAP_ges=126 -# -# Forecast Vertical Resolution -# -#export LEVS=64 -#export LEVS_ges=64 -# -# These are for the T382L64 -# -#export LONA=768 -#export LATA=384 -#export LONB=1152 -#export LATB=576 -# t254 -#export LONA=512 -#export LATA=256 -#export LONB=768 -#export LATB=384 -# t126 -#export LONA=256 -#export LATA=128 -#export LONB=384 -#export LATB=190 -#export LSOIL=4 -export NLAT=$((${LATA}+2)) -# -# Analysis Fix Fields -# -export FNGLAC=${FIXGLOBAL}/global_glacier.2x2.grb -export FNMXIC=${FIXGLOBAL}/global_maxice.2x2.grb -export FNTSFC=${FIXGLOBAL}/cfs_oi2sst1x1monclim19822001.grb -export FNSNOC=${FIXGLOBAL}/global_snoclim.1.875.grb -export FNZORC=${FIXGLOBAL}/global_zorclim.1x1.grb -export FNALBC=${FIXGLOBAL}/global_albedo4.1x1.grb -export FNAISC=${FIXGLOBAL}/cfs_ice1x1monclim19822001.grb -export FNTG3C=${FIXGLOBAL}/global_tg3clim.2.6x1.5.grb -export FNVEGC=${FIXGLOBAL}/global_vegfrac.0.144.decpercent.grb -export FNVETC=${FIXGLOBAL}/global_vegtype.1x1.grb -export FNSOTC=${FIXGLOBAL}/global_soiltype.1x1.grb -export FNSMCC=${FIXGLOBAL}/global_soilmcpc.1x1.grb -export FNOROG=${FIXGLOBAL}/global_orography.t${JCAP}.grb -export FNMASK=${FIXGLOBAL}/global_slmask.t${JCAP}.grb - -export BERROR=${FIXGSI}/global_berror.l${LEVS}y${NLAT}.f77 - -export SATANGL=${FIXGSI}/global_satangbias.txt -export SATINFO=${FIXGSI}/global_satinfo.txt.n19_off.r2008 -export RTMSPEC=${FIXGSI}/global_CRTM_SpcCoeff.f77 -export RTMTRAN=${FIXGSI}/global_CRTM_TauCoeff.f77 -export RTMEMIS=${FIXGSI}/crtm_gfsgsi/EmisCoeff/Big_Endian/EmisCoeff.bin -export RTMAERO=${FIXGSI}/crtm_gfsgsi/AerosolCoeff/Big_Endian/AerosolCoeff.bin -export RTMCLDS=${FIXGSI}/crtm_gfsgsi/CloudCoeff/Big_Endian/CloudCoeff.bin - -export CONVINFO=${FIXGSI}/global_convinfo.txt -export OZINFO=${FIXGSI}/global_ozinfo.txt.r2008 -export PCPINFO=${FIXGSI}/global_pcpinfo.txt - - -# -# Analysis Input Fields -# -export PREINP=${RUN}.${cycle}. -export PREINPm1=${RUN}.${cyclem1}. -export FNTSFA=${COMIN}/sstgrb.gdas.$analdate -export FNACNA=${COMIN}/icegrb.gdas.$analdate -export FNSNOA=${COMIN}/snogrb_t382.gdas.$analdate - -#export SIGGES=${COMIN}/${PREINP}sgesprep -#export SIGG03=${COMIN}/${PREINP}sgm3prep -#export SIGG09=${COMIN}/${PREINP}sgp3prep - -#export PREPQC=${COMIN}/${PREINP}prepbufr -#export B1HRS2=${COMIN}/${PREINP}1bhrs2.tm00.bufr_d -#export B1MSU=${COMIN}/${PREINP}1bmsu.tm00.bufr_d -#export B1HRS3=${COMIN}/${PREINP}1bhrs3.tm00.bufr_d -#export B1AMUA=${COMIN}/${PREINP}1bamua.tm00.bufr_d -#export B1AMUB=${COMIN}/${PREINP}1bamub.tm00.bufr_d -#export B1HRS4=${COMIN}/${PREINP}1bhrs4.tm00.bufr_d -#export B1MHS=${COMIN}/${PREINP}1bmhs.tm00.bufr_d -#export AIRSBF=${COMIN}/${PREINP}airsev.tm00.bufr_d -#export SBUVBF=${COMIN}/${PREINP}osbuv.tm00.bufr_d -#export SMIPCP=${COMIN}/${PREINP}spssmi.tm00.bufr_d -#export TMIPCP=${COMIN}/${PREINP}sptrmm.tm00.bufr_d -#export GPSBF=${COMIN}/${PREINP}gpsro.tm00.bufr_d - -############################################################################ -# -# Check grib date of current snogrb vs that of prev cycle -# -# if cdate_of_snogrb -le cdate_of_snoprv, i.e. file has not been updated -# then set namelist input to CYCLEXEC to use the snow from the guess -# FNSNOA=" ";CYCLVARS="FSNOL=99999.,FSNOS=99999.," -# FNSNOA is the name of the snow depth analysis file -# when not supplied, signals to CYCLEXEC to blend guess and climatology -# (Note: file must be " ", not "" or the shell syntax for default -# values X=${X:-default} will reset to default if X="") -# FSNOL=99999.,FSNOS=99999., sets the blending of guess and climo to -# use 100% guess -# -#################################### -#prev_cdate=$($utilexec/ndate -6 $PDY$cyc) -#snoprv=`$utilscript/getges.sh -q -t snogrb_high -v $prev_cdate` -#if [ `$utilexec/wgrib -4yr ${FNSNOA} 2>/dev/null|grep -i snowc |\ -# awk -F: '{print $3}'|awk -F= '{print $2}'` -le \ -# `$utilexec/wgrib -4yr $snoprv 2>/dev/null |grep -i snowc |\ -# awk -F: '{print $3}'|awk -F= '{print $2}'` ] ; then -# export FNSNOA=" " -# export CYCLVARS="FSNOL=99999.,FSNOS=99999.," -#fi -############################################################################ -# -# Output File Names -# -export SIGANL=${SIGANL:-$COMOUT/siganl_gsi} -export SFCANL=${SFCANL:-$COMOUT/sfcanl_gsi} -export ABIAS=${ABIAS:-$COMOUT/abias} -export SATANGO=${SATANGO:-$COMOUT/satang} -#export GINCOUT=$COMOUT/${RUN}.${cycle}.gesfile -export GINCOUT=/dev/null -#export PCPSTAT=${COMOUT}/${RUN}.${cycle}.pcpstat -#export RADSTAT=${COMOUT}/${RUN}.${cycle}.radstat -#export GSISTAT=${COMOUT}/${RUN}.${cycle}.gsistat -#export CNVSTAT=${COMOUT}/${RUN}.${cycle}.cnvstat -#export OZNSTAT=${COMOUT}/${RUN}.${cycle}.oznstat -export PCPSTAT=/dev/null -export RADSTAT=/dev/null -export GSISTAT=/dev/null -export CNVSTAT=/dev/null -export OZNSTAT=/dev/null - -# -# PDS Grid Designator -# -export IGEN=81 - -msg="HAS BEGUN on `hostname`" -#postmsg "$jlogfile" "$msg" - -#################################### -# Check if this is a restart -# -# Define Previous Guess File Names -#################################### -#gesenvir=${envir} -# -## $utilscript/getges.sh -t sfcges -r ${JCAP_ges}${LEVS_ges} -v $PDY$cyc \ -# -e $gesenvir bges -#err1=$? -## $utilscript/getges.sh -t sfcgm3 -r ${JCAP_ges}${LEVS_ges} -v $PDY$cyc \ -# -e $gesenvir sfcf03 -##$utilscript/getges.sh -t sfcgp3 -r ${JCAP_ges}${LEVS_ges} -v $PDY$cyc \ -# -e $gesenvir sfcf09 -##$utilscript/getges.sh -t biascr -r ${JCAP_ges}${LEVS_ges} -v $PDY$cyc \ -# -e $gesenvir gbias -##$utilscript/getges.sh -t satang -r ${JCAP_ges}${LEVS_ges} -v $PDY$cyc \ -# -e $gesenvir gsatang - - -#if test "$err1" -eq '0' -##if [ -s $GBIAS ] && [ -s $GSATANG ] && [ -s $SFCGES ] && [ -s $SFCG03 ] && [ -s $SFCG09 ] && [ -s $SIGGES ] && [ -s $SIGG03 ] && [ -s $SIGG09 ]; -if [ -s $GBIAS ] && [ -s $GSATANG ] && [ -s $SFCG06a ] && [ -s $SFCG03a ] && [ -s $SFCG09a ] && [ -s $SIGGES ] && [ -s $SIGG03 ] && [ -s $SIGG09 ]; -then - echo "Analysis Starting/Guess Fields Found" - #postmsg "$jlogfile" "$msg" - -else - echo "Analysis Cannot Start/Guess Fields Not Available" - exit 1 - #postmsg "$jlogfile" "$msg" - #export pgm=$job - #export err=911 - #err_chk -fi - -############################ -# Make use of updated angle dependent bias file, if it exists. -if [[ -s $GSATANG ]]; then - export SATANGL=$GSATANG -fi - -env - -############################ -# Added for pmdv hang trace -# -Item T44 Problem on Technical List -############################ -#export MP_PMDLOG=yes -#export MP_INFOLEVEL=6 -############################ - -############################ -# Added to reduce wall time when running more than one task per node -#export MP_SHARED_MEMORY=YES - -#NOTE: BIND_TASKS=YES requires running 16 tasks/node -#export MP_USE_BULK_XFER=yes -#export BIND_TASKS=YES - - - -############################################################# -# Execute the script -echo "executing run_gsi at `date`" -sh ${homedir}/run_gsi -############################################################# - -#export MP_PMDLOG=no -#poe rm /tmp/mplog* - -########## -# NOTES: 1) script exglobal_analysis.sh compresses the contents of -# RADSTAT, PCPSTAT, OZNSTAT, and CNVSTAT. These stat files -# files are tarballs of compressed files. -# 2) SFCANL, SIGANL are input to the GFS forecast following the analysis -# 3) ABIAS, and SATANGO are used in the following analysis cycle -# 4) GINCOUT from the GFS early cycle (GFS) is used as input in the -# GFS late (GDAS) cycle -# 5) GSISTAT, RADSTAT, PCPSTAT, OZNSTAT, CNVSTAT are diagnostic output -########## - -#if test "$SAVEGES" = "YES" -#then -# cp $SFCANL $GESdir/${RUN}.${cycle}.sfcanl -# cp $SIGANL $GESdir/${RUN}.${cycle}.sanl -# cp $ABIAS $GESdir/${RUN}.${cycle}.abias -# cp $SATANGO $GESdir/${RUN}.${cycle}.satang -# cp $GINCOUT $GESdir/${RUN}.${cycle}.gesfile -#fi -#if test "$SENDCOM" = "YES" -#then -# cp $SFCANL $COMOUT/${RUN}.${cycle}.sfcanl -# cp $SIGANL $COMOUT/${RUN}.${cycle}.sanl -# cp $ABIAS $COMOUT/${RUN}.${cycle}.abias -# cp $SATANGO $COMOUT/${RUN}.${cycle}.satang -# cp $GINCOUT $COMOUT/${RUN}.${cycle}.gesfile -#fi -# -#cat $pgmout -# -#grep resident $DATA/mpi* -# -#echo "`hostname` -- `date`" > $COMOUT/where_ibm_${RUN}_anal_ran.${cycle} - -msg="ENDED NORMALLY." -#postmsg "$jlogfile" "$msg" - -############################## -# Remove the Temporary working directory -############################## -cd $homedir -rm -rf $DATA -echo "ending gsi at `date`" diff --git a/ush/EnKF/enkfa5.parms b/ush/EnKF/enkfa5.parms deleted file mode 100755 index f6a94cfcc7..0000000000 --- a/ush/EnKF/enkfa5.parms +++ /dev/null @@ -1,172 +0,0 @@ -setenv MP_SHARED_MEMORY=yes -setenv MEMORY_AFFINITY=MCM -setenv enddate 2008080118 - -set ensda = "run_enkf" -set runobs = 'runobs_multi.csh' -set fg_gfs = "run_fg_gfs_multi.sh" -set ctrl_gfs = 'gfscontrol.sh' -set drive_ensmean = "drive_gfs" -set cleanup_obs = 'false' # remove existing obs files -set cleanup_anal = 'false' # remove existing anal files -set cleanup_fg = 'false' # remove existing first guess files -set cleanup_ensmean = 'false' # remove existing ensmean files -set fg_only = 'false' # if true, just run first guess forecast -set do_cleanup = 'false' # if true, create tar files, delete *mem* files. - -##setenv basedir `dirname $PWD` -setenv basedir "/global/save/wx20kd/enkf/work/" -set datadir="${basedir}" - -# where the data will be created -setenv datapath "/global/noscrub/wx20kd/enkf_a5/" - -# Data reside in obs directory set dynamically in loop below ${obsdir} -# log directory -setenv logdir "/global/noscrub/wx20kd/logs/enkf_a5/" - -# some scripts reside here -# also need to make this dependent on user or a group writeable area -compo - -setenv enkfscripts "${basedir}/scripts_ncep" -setenv enkfexec "${basedir}/src/" - -# name of enkf executable. -setenv enkfbin "${enkfexec}/global_enkf.x" - -# Set archive directories -setenv archdiskdir ${datapath}/archive -setenv hpssdir /hpssuser/g01/wx20kd/enkfa5 -# remove 24hr old directories and put stuff to tape -setenv ARCHLAG 24 - -setenv incdate "${enkfscripts}/incdate" - -setenv homedir $PWD -setenv qcomp ecomp - -########################################################################## -# enkf parameters. -setenv corrlengthnh 1500 -setenv corrlengthtr 1500 -setenv corrlengthsh 1500 -setenv lnsigcutoffnh 1.5 -setenv lnsigcutofftr 1.5 -setenv lnsigcutoffsh 1.5 -setenv lnsigcutoffpsnh 2.2 -setenv lnsigcutoffpstr 2.2 -setenv lnsigcutoffpssh 2.2 -setenv lnsigcutoffsatnh 3.3 -setenv lnsigcutoffsattr 3.3 -setenv lnsigcutoffsatsh 3.3 -setenv obtimelnh 15. -setenv obtimeltr 15. -setenv obtimelsh 15. - -# Assimilation parameters -setenv JCAP 190 -setenv JCAP_HIGH 382 -setenv LEVS 64 -setenv LEVS_ges 64 -setenv LONB 576 -setenv LATB 288 -setenv LONA 576 -setenv LATA 288 -setenv SMOOTHINF 24 -setenv LONB_HIGH 1152 -setenv LATB_HIGH 576 -setenv npts `expr \( $LONA \) \* \( $LATA \)` -setenv LSOIL 4 -setenv RUN "gdas1" - -## DTK FIX OBS PATH -setenv obs_datapath "/global/shared/dump/" -##setenv datdump gfs -setenv datdump gdas - -setenv NTRAC 3 -setenv nvars 3 -setenv ntrac_update 2 -setenv LANDICE_OPT 2 -# parameters for additive inflation -setenv scalefact 40 -setenv addpertpath "/global/noscrub/wx20kd/sig190/" -setenv lonscramble 1 -setenv runprefix "gdas1" - -setenv random_partition .false. -setenv simple_partition .false. -setenv iassim_order 0 -setenv use_height .false. -setenv use_letkf .false. - -setenv covinflatemax 1.e2 -setenv covinflatemin 1.0 -setenv covinflatenh 0.0 -setenv covinflatetr 0.0 -setenv covinflatesh 0.0 -setenv lnsigcovinfcutoff 6.0 - -setenv analpertwtnh 0.9 -setenv analpertwtsh 0.9 -setenv analpertwttr 0.9 - -setenv pseudo_rh .true. - -setenv sprd_tol 1.e30 - -setenv nanals 60 -## DTK : specifiy number of members to process per job/node for first ges (GFS) and obs (GSI) processing -setenv nmem_per_node 4 - -setenv paoverpb_thresh 1.0 -setenv saterrfact 1.0 -setenv deterministic .true. -setenv sortinc .true. - -setenv numiter 1 -setenv nitermax 3 - -########################################################################## -# Some binaries and scripts reside here -# - -setenv HOMEGLOBAL ${basedir} -setenv FIXGLOBAL /nwprod/fix -setenv FIXGSI /global/save/wx20kd/ensda/ersl/fixgsi -setenv EXECGLOBAL /global/save/wx20kd/ensda/ersl/bin -setenv SIGLEVEL ${FIXGLOBAL}/global_hyblev.l64.txt -setenv GSIEXEC /global/save/wx20kd/gsi/hybrid/src/global_gsi.x -setenv CHGRESEXEC ${EXECGLOBAL}/global_chgres_thread_moorthi -setenv USHGLOBAL $EXECGLOBAL -setenv CHGRESSH ${enkfscripts}/global_chgres.sh -setenv CYCLESH ${enkfscripts}/global_cycle.sh -setenv POSTGPSH ${enkfscripts}/global_postgpp.sh -setenv POSTGPLIST ${FIXGLOBAL}/global_kplist.1d.txt -setenv POSTGPEXEC $EXECGLOBAL/global_postgs -setenv POSTPROC "YES" # if yes, compute pgrb files for 6-h forecast for every member. -setenv IO 360 -setenv JO 181 - -setenv PREPDATA /global/noscrub/${LOGNAME}/prepqc08/ -setenv CONVINFO ${FIXGSI}/global_convinfo.txt -setenv SATINFO ${FIXGSI}/global_satinfo.txt.n19_off.r2008 -setenv OZINFO ${FIXGSI}/global_ozinfo.txt.r2008 - -# 6-h cycle -setenv FHMAX 9 -setenv FHMIN 3 -setenv FHDFI 3 -setenv FHOUT 1 -setenv FHLWR $FHOUT - -setenv ANALINC 6 -setenv DELTSFC $ANALINC - -setenv PARMFILE=/global/save/wx20kd/enkf/work/scripts_ncep/enkfa5.parms -setenv NODEOBS=1 -setenv NODEENKF=5 -setenv NODEFG=2 - -# TO GET RID OF EVENTUALLY -setenv nbackground_max 32 diff --git a/ush/EnKF/enkfdriver.sh b/ush/EnKF/enkfdriver.sh deleted file mode 100755 index 7d7cc43980..0000000000 --- a/ush/EnKF/enkfdriver.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/tcsh - -source /global/save/${LOGNAME}/enkf/work/scripts_ncep/current.enkfparms -setenv startupenv "${datapath}/analdate.csh" -source $startupenv - -if ($analdate >= $enddate) then - echo "***********" - echo "end of experiment reached" - echo "***********" -else - if ($fg_only == "false") then - tcsh ${enkfscripts}/obsproc_ensmean.sh - else - tcsh ${enkfscripts}/firstges_multi.sh - endif -endif diff --git a/ush/EnKF/firstges_multi.sh b/ush/EnKF/firstges_multi.sh deleted file mode 100755 index 7607782817..0000000000 --- a/ush/EnKF/firstges_multi.sh +++ /dev/null @@ -1,169 +0,0 @@ -#!/bin/tcsh - -source /global/save/${LOGNAME}/enkf/work/scripts_ncep/current.enkfparms - -########################################################################## -# current cycle starts - -set username = `whoami` - -setenv startupenv "${datapath}/analdate.csh" -source $startupenv - -setenv SUB "/u/wx23sm/bin/sub_vapor" -echo "SUB= ${SUB}" -#------------------------------------------------------------------------ -mkdir -p $datapath -mkdir -p $logdir - -echo "BaseDir: ${basedir}" -echo "EnKFBin: ${enkfbin}" -echo "DataPath: ${datapath}" -echo "LogDir: ${logdir}" - -############################################################################ -# Main Program -# Please do not edit the code below; it is not recommended except lines relevant to getsfcensmean.csh. - -env -echo "starting the cycle" - -set ncycle=1 - -# substringing to get yr, mon, day, hr info -setenv yr `echo $analdate | cut -c1-4` -setenv mon `echo $analdate | cut -c5-6` -setenv day `echo $analdate | cut -c7-8` -setenv hr `echo $analdate | cut -c9-10` -setenv ANALHR $hr -# set environment analdate -setenv datapath2 "${datapath}/${analdate}/" -# copy hostfileall to working dir. -##/bin/cp -f ${datapath}/hostfileall ${datapath2} - -# current analysis time. -setenv analdate $analdate -# previous analysis time. -setenv analdatem1 `${incdate} $analdate -$ANALINC` -# next analysis time. -setenv analdatep1 `${incdate} $analdate $ANALINC` -setenv datapathprev "${datapath}/${analdatem1}/" -setenv hrp1 `echo $analdatep1 | cut -c9-10` -setenv hrm1 `echo $analdatem1 | cut -c9-10` -setenv datapathp1 "${datapath}/${analdatep1}/" -setenv datapathm1 "${datapath}/${analdatem1}/" -mkdir -p $datapathp1 - -date -echo "analdate minus 1: $analdatem1" -echo "analdate: $analdate" -echo "analdate plus 1: $analdatep1" - -# make log dir for analdate -setenv current_logdir "${logdir}/ensda_out_${analdate}" -echo "Current LogDir: ${current_logdir}" -mkdir -p ${current_logdir} - - -# run ensemble first guess. -# first, clean up old first guesses. -if ($cleanup_fg == 'true') then -set fhr=$FHMIN -while ( $fhr <= $FHMAX) - set charfhr="fhr`printf %02i $fhr`" - /bin/rm -f ${datapath}${analdatep1}/sfg_${analdatep1}_${charfhr}*_* - /bin/rm -f ${datapath}${analdatep1}/bfg_${analdatep1}_${charfhr}*_* - @ fhr = $fhr + $FHOUT -end -endif -mkdir -p ${datapath}${analdatep1} - -## BITS FOR (HIRES) CONTROL FORECAST JOB -set LONB_save=$LONB -set LATB_save=$LATB -set JCAP_save=$JCAP -setenv LONB $LONB_HIGH -setenv LATB $LATB_HIGH -setenv JCAP $JCAP_HIGH - -## FILES FOR SFC CYCLE ETC -setenv COMIN "${obs_datapath}/${analdate}/${datdump}" -setenv FNTSFA "${COMIN}/sstgrb.${datdump}.${analdate}" -setenv FNACNA "${COMIN}/icegrb.${datdump}.${analdate}" -setenv FNSNOA "${COMIN}/snogrb.${datdump}.${analdate}" - - -set filemissing='no' -set charnanal=control -set analfile="${datapath2}/sanl_${analdate}_${charnanal}" -set sfcanlfile="${datapath2}/sfcanl_${analdate}_${charnanal}" -if { /bin/test ! -s $analfile } set filemissing='yes' -if { /bin/test ! -s $sfcanlfile } set filemissing='yes' - -if($filemissing == 'yes') then -# Run surface cycle and chgres - cd ${datapath2} - setenv PGMOUT ${current_logdir}/chgres_sfccycle_control.out - time sh $CYCLESH ${datapathm1}/enkf.t${hrm1}z.bf06 ${datapath2}/sfcanl_${analdate}_control - $CHGRESSH ${datapath2}/sanl_${analdate}_ensmean /dev/null ${datapath2}/sanl_${analdate}_control /dev/null - cd ${enkfscripts} -else - echo "FILES ALREADY APPEAR TO EXIST" -endif - -setenv LONB $LONB_save -setenv LATB $LATB_save -setenv JCAP $JCAP_save - -# CHECK AGAIN -set filemissing='no' -set charnanal=control -set analfile="${datapath2}/sanl_${analdate}_${charnanal}" -set sfcanlfile="${datapath2}/sfcanl_${analdate}_${charnanal}" -if { /bin/test ! -s $analfile } set filemissing='yes' -if { /bin/test ! -s $sfcanlfile } set filemissing='yes' - -if($filemissing == 'yes') then - echo "FILES ARE MISSING, CANNOT SUBMIT CTRL FCST JOB" -else - echo "SUBMIT HI-RES GFS CNTRL" - $SUB -a GDAS-T2O -g devonprod -j enkf_gfsctrl -o ${current_logdir}/run_gfsctrl.out -p 64/6/N -q dev -r 1640/1 -t 00:20:00 -u ${LOGNAME} -w +0000 ${enkfscripts}/${ctrl_gfs} -endif - -## Submit chunks of jobs based on nanals/nmem_per_node settings - @ num_jobs = $nanals / $nmem_per_node - set max_jobs=50 - if ($num_jobs >= $max_jobs) then - echo "THERE ARE TOO MANY JOB STEPS REQUIRED, NUM_JOBS = $num_jobs" - echo "CHECK NANALS & NMEM_PER_NODE IN CONFIG" - echo "STOPPING SCRIPTS HERE" - exit 1 - else - echo "there are $num_jobs job steps required for first ges processing" - endif - - set job=1 - set n1=1 - set n2=$nmem_per_node - - while ($job <= $num_jobs) - setenv NSTART $n1 - setenv NEND $n2 - echo "NSTART=$NSTART" - echo "NEND=$NEND" - $SUB -a GDAS-T2O -e NSTART,NEND -g devonprod -j enkf_fg$job -o ${current_logdir}/run_fg$job.out -p 32 -q dev -r 1000 -t 00:45:00 -u ${LOGNAME} -w +0000 ${enkfscripts}/${fg_gfs} - - @ job = $job + 1 - @ n1 = $n1 + $nmem_per_node - @ n2 = $n2 + $nmem_per_node - - if ($n2 > $nanals) then - @ n2 = $nanals - else -## - endif - end - -# submit script to do file checking, set to wait 10 minutes before checking files -$SUB -a GDAS-T2O -g devonprod -j enkf_check_fgfiles -o ${current_logdir}/check_fg_files.out -q dev -r 1000 -t 03:00:00 -u ${LOGNAME} -w +0010 ${enkfscripts}/check_fgfiles_serial.sh -exit 0 diff --git a/ush/EnKF/get_enkf_ic.sh b/ush/EnKF/get_enkf_ic.sh deleted file mode 100755 index 94f2e691ad..0000000000 --- a/ush/EnKF/get_enkf_ic.sh +++ /dev/null @@ -1,325 +0,0 @@ -#!/bin/ksh - -## Below are LoadLeveler (IBM queueing system) commands -#@ error=$(job_name).e$(jobid) -#@ job_type=parallel -#@ class=devhigh -#@ group=devonprod -#@ account_no = GDAS-T2O -#@ job_name=get_enkf_ic -#@ network.MPI=sn_all,shared,us -#@ tasks_per_node=1 -#@ node = 1 -#@ node_usage=not_shared -#@ task_affinity = core(32) -#@ parallel_threads = 32 -#@ node_resources = ConsumableMemory (110 GB) -#@ wall_clock_limit = 3:00:00 -#@ startdate = 09/27/06 05:00 -#@ notification=error -#@ restart=no -#@ queue - -## Below are PBS (Linux queueing system) commands -#PBS -o get_enkf_ic.e${jobid} -#PBS -N get_enkf_ic -#PBS -q service -#PBS -l walltime=12:00:00 -#PBS -l nodes=1:ppn=1 -#PBS -j eo -#PBS -A ada -#PBS -V - - -set -ax - -# Set user parameters -CDATE=2012061218 # date for which to get initial conditions (ic) - # For CDATE < 2012052100, get ensemble ic from operational GEFS - # For CDATE >= 2012052100, get ensemble ic from operational EnKF - - -machine=IBMP6 # platform (only two machine currently supported) - # machine = IBMP6 for NCEP CCS (cirrus/stratus) - # machine = ZEUS for NOAA R&D machine - - -SAVDIR=ensic.$CDATE # name of directory to which ics are copied - # full path is OUTDIR=$PRETMP/ptmp/$LOGNAME/$SAVDIR - - -NMEM_ENKF=80 # number of ensemble members (do not change) - - -# Specific spectral / grid dimension to which to chgres ensemble members -# NOTE: This script does NOT run chgres for CDATE >= 2012052100 -# -JCAP_ENKF=254 # spectral truncation -LEVS_ENKF=64 # number of vertical levels -LONB_ENKF=768 # number of longitude points -LATB_ENKF=384 # number of gaussian latitude points - - -#---------- Users should not need to edit anything below this line ----------# - -# Set paths -machine=$(echo $machine|tr '[a-z]' '[A-Z]') -if [ $machine = IBMP6 ] ; then - PRETMP="" -elif [ $machine = ZEUS ]; then - PREPTMP=/scratch2/portfolios/NCEPDEV -else - echo "***WARNING*** $machine not supported" - exit -fi -OUTDIR=$PRETMP/ptmp/$LOGNAME/$SAVDIR -TMPDIR=$PRETMP/stmp/$LOGNAME/get_enkf_ic.$CDATE - -# Set script variables -export NCP=${NCP:-cp} - -if [ $machine = IBMP6 ] ; then - export MEMORY_AFFINITY=MCM - export MP_SHARED_MEMORY=yes - export XLFRTEOPTS="nlwidth=80" - export MP_LABELIO=yes - export MP_INFOLEVEL=1 - export CHGRESSH=${CHGRESSH:-/nwprod/ush/global_chgres.sh} - export NDATE=${NDATE:-/nwprod/util/exec/ndate} - export HTAR=${HTAR:-/usr/bin/htar} -elif [ $machine = ZEUS ]; then - /bin/ksh --login - module load intel - module load mpt - module load hpss - export paradir="/scratch2/portfolios/NCEPDEV/global/save" - export HOMEDIR=${HOMEDIR:-$paradir/Shrinivas.Moorthi/para} - export EXECDIR=$HOMEDIR/exec - export FIXGLOBAL=$HOMEDIR/fix/fix_am - export USHDIR=$HOMEDIR/ush - export CHGRESEXEC=$EXECDIR/global_chgres - export CHGRESSH=$USHDIR/global_chgres_uf_gaea.sh - export NDATE=${NDATE:-$UTILDIR/exec/ndate} - export HTAR=${HTAR:-/apps/hpss/htar} -fi - -# Set, create, cd to temporary work directory. Make OUTDIR -rm -rf $TMPDIR -mkdir -p $TMPDIR -cd $TMPDIR - -mkdir -p $OUTDIR - - -# Set date and GDAS/GEFS paths -sdate=`echo $CDATE | cut -c1-8` -hha=`echo $CDATE | cut -c9-10` - -prodgdas=/com/gfs/prod/gdas.$sdate -comgdas=$prodgdas -PREFIX=gdas1.t${hha}z - -prodenkf=/com/gfs/prod/enkf.$sdate/$hha -comenkf=$prodenkf - -prodgefs=/com/gens/prod/gefs.${sdate}/${hha} -comgefs=$prodgefs - - -# If GDAS files are not online, retrieve from tape. -if [[ ! -s $prodgdas/$PREFIX.sanl || ! -s $prodgdas/$PREFIX.sfcanl ]]; then - YYYY=`echo $CDATE | cut -c1-4` - MM=`echo $CDATE | cut -c5-6` - DD=`echo $CDATE | cut -c7-8` - HH=`echo $CDATE | cut -c9-10` - - comgdas=$TMPDIR$prodgdas - mkdir -p $comgdas - cd $comgdas - - hpssfile=/NCEPPROD/hpssprod/runhistory/rh${YYYY}/${YYYY}${MM}/${YYYY}${MM}${DD}/com_gfs_prod_gdas.${YYYY}${MM}${DD}${HH}.tar - $HTAR -xvf $hpssfile ./$PREFIX.sanl - $HTAR -xvf $hpssfile ./$PREFIX.sfcanl - rc=$? - if [[ "$rc" != "0" ]]; then - echo "***WARNING*** can not retrieve GDAS initial conditions for $CDATE" - exit - fi -fi - -# Copy GDAS initial condtions to OUTDIR -comdir=$comgdas -$NCP $comdir/$PREFIX.sanl $OUTDIR/siganl.gdas.$CDATE -$NCP $comdir/$PREFIX.sfcanl $OUTDIR/sfcanl.gdas.$CDATE - - -# If CDATE >= 2012052100, look for EnKF files. If not online, retrieve from tape. -if [[ $CDATE -ge 2012052100 ]]; then - if [[ ! -s $prodenkf/siganl_${CDATE}_mem001 || ! -s $prodenkf/sfcanl_${CDATE}_mem001 ]]; then - YYYY=`echo $CDATE | cut -c1-4` - MM=`echo $CDATE | cut -c5-6` - DD=`echo $CDATE | cut -c7-8` - HH=`echo $CDATE | cut -c9-10` - - comenkf=$TMPDIR$prodenkf - mkdir -p $comenkf - cd $comenkf - - hpssfile=/NCEPPROD/hpssprod/runhistory/rh${YYYY}/${YYYY}${MM}/${YYYY}${MM}${DD}/com_gfs_prod_enkf.${YYYY}${MM}${DD}_${HH}.anl.tar - $HTAR -xvf $hpssfile - rc=$? - if [[ "$rc" != "0" ]]; then - echo "***WARNING*** can not retrieve GEFS initial conditions for $CDATE" - exit - fi - fi - -# Copy EnKF initial conditions to OUTDIR - comdir=$comenkf - imem=1 - while [[ $imem -le $NMEM_ENKF ]]; do - member="mem"`printf %03i $imem` - $NCP $comdir/siganl_${CDATE}_$member $OUTDIR/ - $NCP $comdir/sfcanl_${CDATE}_$member $OUTDIR/ - (( imem = $imem + 1 )) - done -fi - - -# If CDATE before operational EnKF, use GEFS. -if [[ $CDATE -lt 2012052100 ]]; then - -# If GEFS files are not online, retrieve from tape - if [[ ! -s $prodgefs/init/gec00.t${hha}z.sanl || ! -s $prodgefs/init/gec00.t${hha}z.sfcanl ]]; then - YYYY=`echo $CDATE | cut -c1-4` - MM=`echo $CDATE | cut -c5-6` - DD=`echo $CDATE | cut -c7-8` - HH=`echo $CDATE | cut -c9-10` - - comgefs=$TMPDIR$prodgefs - mkdir -p $comgefs - cd $comgefs - - hpssfile=/NCEPPROD/hpssprod/runhistory/rh${YYYY}/${YYYY}${MM}/${YYYY}${MM}${DD}/com_gens_prod_gefs.${YYYY}${MM}${DD}_${HH}.init.tar - $HTAR -xvf $hpssfile - rc=$? - if [[ "$rc" != "0" ]]; then - echo "***WARNING*** can not retrieve GEFS initial conditions for $CDATE" - exit - fi - fi - -# Copy GEFS control files to TMPDIR - comdir=$comgefs/init - $NCP $comdir/gec00.t${hha}z.sanl $TMPDIR/siganl_${CDATE}_control.gefs - $NCP $comdir/gec00.t${hha}z.sfcanl $TMPDIR/sfcanl_${CDATE}_control.gefs - -# Chgres GEFS control to EnKF resolution - export SIGI=$TMPDIR/siganl_${CDATE}_control.gefs - export SFCI=$TMPDIR/sfcanl_${CDATE}_control.gefs - export SIGO=$TMPDIR/siganl_${CDATE}_control - export SFCO=$TMPDIR/sfcanl_${CDATE}_control - export SIGLEVEL=/nwprod/fix/global_hyblev.l64.txt - export VERBOSE=YES - export DATA=$TMPDIR/chgres_control - - export JCAP_ens=$JCAP_ENKF - export LEVS_ens=$LEVS_ENKF - export LONB_ens=$LONB_ENKF - export LATB_ens=$LATB_ENKF - export NTRAC=3 - export IDVC=2 - export IDSL=1 - export LSOIL=4 - export CHGRESVARS="IDVT=21,IDVM=0" - export OUTTYP=2 - - if [ $machine = IBMP6 ]; then - export CHGRESTHREAD=32 - elif [ $machine = ZEUS ]; then - export CHGRESTHREAD=1 # service queue can only use 1 core - fi - export OMP_NUM_THREADS=$CHGRESTHREAD - export NTHREADS=$OMP_NUM_THREADS - - $CHGRESSH $SIGI $SFCI $SIGO $SFCO $JCAP_ens $LEVS_ens $LONB_ens $LATB_ens - rc=$? - if [[ "$rc" != "0" ]]; then - echo "***WARNING*** chgres of GEFS initial conditions failed with return code $rc" - exit - fi - - export OMP_NUM_THREADS=1 - export NTHREADS=$OMP_NUM_THREADS - -# Loop to replicate control surface analysis as ensemble member -# surface analyses. This means initial surface analyses are -# identical. Only the atmospheric files are perturbed. - - imem=1 - while [[ $imem -le $NMEM_ENKF ]]; do - member="mem"`printf %03i $imem` - $NCP $TMPDIR/sfcanl_${CDATE}_control $OUTDIR/sfcanl_${CDATE}_${member} - (( imem = $imem + 1 )) - done - - -# Loop to rename GEFS atmospheric initial conditions - imem=1 - cd $comdir - for file in `ls gep*sanl*`; do - member="mem"`printf %03i $imem` - $NCP $comdir/$file $TMPDIR/sanl_${CDATE}_${member}.gefs - (( imem = $imem + 1 )) - done - -# Loop to chgres GEFS atmospheric initial conditions to EnKF resolution - imem=1 - while [[ $imem -le $NMEM_ENKF ]]; do - member="mem"`printf %03i $imem` - export SIGI=$TMPDIR/sanl_${CDATE}_${member}.gefs - export SFCI=/dev/null - export SIGO=$TMPDIR/sanl_${CDATE}_${member} - export SFCO=/dev/null - export SIGLEVEL=/nwprod/fix/global_hyblev.l64.txt - export VERBOSE=YES - export DATA=$TMPDIR/chgres_${member} - - export JCAP_ens=$JCAP_ENKF - export LEVS_ens=$LEVS_ENKF - export LONB_ens=$LONB_ENKF - export LATB_ens=$LATB_ENKF - export NTRAC=3 - export IDVC=2 - export IDSL=1 - export LSOIL=4 - export CHGRESVARS="IDVT=21,IDVM=0" - export OUTTYP=2 - - if [ $machine = IBMP6 ]; then - export CHGRESTHREAD=32 - elif [ $machine = ZEUS ]; then - export CHGRESTHREAD=1 # service queue can only use 1 core - fi - export OMP_NUM_THREADS=$CHGRESTHREAD - export NTHREADS=$OMP_NUM_THREADS - - $CHGRESSH $SIGI $SFCI $SIGO $SFCO $JCAP_ens $LEVS_ens $LONB_ens $LATB_ens - rc=$? - if [[ "$rc" != "0" ]]; then - echo "***WARNING*** chgres of GEFS ensemble members failed with return code $rc" - exit - fi - - export OMP_NUM_THREADS=1 - export NTHREADS=$OMP_NUM_THREADS - -# Copy chgres'd GEFS to OUTDIR - $NCP $SIGO $OUTDIR/siganl_${CDATE}_${member} - - (( imem = $imem + 1 )) - done -fi - -exit - diff --git a/ush/EnKF/gfscontrol.sh b/ush/EnKF/gfscontrol.sh deleted file mode 100755 index e583d7861f..0000000000 --- a/ush/EnKF/gfscontrol.sh +++ /dev/null @@ -1,138 +0,0 @@ -#!/bin/tcsh - -source /global/save/${LOGNAME}/enkf/work/scripts_ncep/current.enkfparms - -########################################################################## -# current cycle starts - -set username = `whoami` - -setenv startupenv "${datapath}/analdate.csh" -source $startupenv - -setenv SUB "/u/wx23sm/bin/sub_vapor" -echo "SUB= ${SUB}" -#------------------------------------------------------------------------ -mkdir -p $datapath -mkdir -p $logdir - -echo "BaseDir: ${basedir}" -echo "EnKFBin: ${enkfbin}" -echo "DataPath: ${datapath}" -echo "LogDir: ${logdir}" - -############################################################################ -# Main Program -# Please do not edit the code below; it is not recommended except lines relevant to getsfcensmean.csh. - -env -echo "starting the cycle" - -set ncycles=10 -set ncycle=1 -##while ($ncycle <= $ncycles) -echo "ncycle = " $ncycle "and ncycles = " $ncycles - -# substringing to get yr, mon, day, hr info -setenv yr `echo $analdate | cut -c1-4` -setenv mon `echo $analdate | cut -c5-6` -setenv day `echo $analdate | cut -c7-8` -setenv hr `echo $analdate | cut -c9-10` -setenv ANALHR $hr -# set environment analdate -setenv datapath2 "${datapath}/${analdate}/" -# copy hostfileall to working dir. -##/bin/cp -f ${datapath}/hostfileall ${datapath2} - -# current analysis time. -setenv analdate $analdate -# previous analysis time. -setenv analdatem1 `${incdate} $analdate -$ANALINC` -# next analysis time. -setenv analdatep1 `${incdate} $analdate $ANALINC` -setenv datapathprev "${datapath}/${analdatem1}/" -setenv hrp1 `echo $analdatep1 | cut -c9-10` -setenv hrm1 `echo $analdatem1 | cut -c9-10` -setenv datapathp1 "${datapath}/${analdatep1}/" -setenv datapathm1 "${datapath}/${analdatem1}/" -mkdir -p $datapathp1 - -date -echo "analdate minus 1: $analdatem1" -echo "analdate: $analdate" -echo "analdate plus 1: $analdatep1" - -# make log dir for analdate -setenv current_logdir "${logdir}/ensda_out_${analdate}" -echo "Current LogDir: ${current_logdir}" -mkdir -p ${current_logdir} - -# run high res forecast. -set FHMAX_save=$FHMAX -set RUN_save=$RUN -set POSTPROC_save=$POSTPROC -set JCAP_save=$JCAP -set FHOUT_save=$FHOUT -set LONB_save=$LONB -set LATB_save=$LATB -setenv FHMAX 9 -setenv FHOUT 1 -setenv RUN enkf -setenv POSTPROC NO -setenv DATOUT ${datapath2} -setenv DATA ${datapath2}/chgrestmp.$$ - -setenv JCAP $JCAP_HIGH -setenv LONB $LONB_HIGH -setenv LATB $LATB_HIGH - -#### IC is either just enkf ens mean (which res changed).. -####if ($JCAP_HIGH != $JCAP_save) then -##### Run surface cycle and chgres -####time sh $CYCLESH ${datapathm1}/enkf.t${hrm1}z.bf06 ${datapath2}/sfcanl_${analdate}_control -####$CHGRESSH ${datapath2}/sanl_${analdate}_ensmean /dev/null ${datapath2}/sanl_${analdate}_control /dev/null - - -setenv SIGO ${DATOUT}/${RUN}.t${hr}z.sf'${FH}' -setenv SFCO ${DATOUT}/${RUN}.t${hr}z.bf'${FH}' -setenv FLXO ${DATOUT}/${RUN}.t${hr}z.sfluxgrbf'${FH}' -setenv SIGI ${datapath}${analdate}/sanl_${analdate}_control -setenv SFCI ${datapath}${analdate}/sfcanl_${analdate}_control -setenv RERUN YES -echo "${analdate} run ${FHMAX} hour single forecast from eda solution `date`" -sh ${enkfscripts}/${drive_ensmean} >&! ${current_logdir}/gfs_fcst.out - -unsetenv SIGO -unsetenv SFCO -unsetenv FLXO -echo "${analdate} done running ${FHMAX} hour single forecast `date`" - -# do postprocessing -set nbackground = 0 -setenv DATA ${datapath2}/postgptmp_00.$$ -sh ${enkfscripts}/global_postgp.sh ${datapath2}/sanl_${analdate}_control /dev/null /dev/null ${datapath2}/${RUN}.t${hr}z.pgrbanl /dev/null $IO $JO >&! ${current_logdir}\ -/gfs_fcst_pgrbanl.out & -@ nbackground = $nbackground + 1 -set fh=$FHOUT -while ($fh <= $FHMAX) - if ($fh < 10) then - set fh=`printf %02i $fh` - endif - setenv DATA ${datapath2}/postgptmp_${fh}.$$ - sh ${enkfscripts}/global_postgp.sh ${datapath2}/${RUN}.t${hr}z.sf${fh} ${datapath2}/${RUN}.t${hr}z.sfluxgrbf${fh} /dev/null ${datapath2}/${RUN}.t${hr}z.pgrbf${fh} /de\ -v/null $IO $JO >&! ${current_logdir}/gfs_fcst_pgrbf${fh}.out & - @ nbackground = $nbackground + 1 - if ($nbackground == $nbackground_max) then - echo "waiting at forecast hour $fh" - wait - set nbackground = 1 - endif - @ fh = $fh + $FHOUT -end -sleep 45 -wait -/bin/rm -f ${datapath}/postgptmp_* - -endif - -exit 0 diff --git a/ush/EnKF/global_chgres.sh b/ush/EnKF/global_chgres.sh deleted file mode 100755 index 698307314f..0000000000 --- a/ush/EnKF/global_chgres.sh +++ /dev/null @@ -1,433 +0,0 @@ - -################################################################################ -#### UNIX Script Documentation Block -# . . -# Script name: chgres_global.sh -# Script description: Changes resolution of global restart files. -# -# Author: Mark Iredell Org: NP23 Date: 1999-03-01 -# -# Abstract: This script changes the resolution of the global restart files, -# namely the sigma file or the surface file or both. The resolution -# of the output files is given in the argument list or as imported -# environment variables. The resolution of the input files are taken -# from the header records in the respective files. Resolution is -# given as spectral truncation, number of levels, number of longitudes -# and number of latitudes. The names of the input and output restart files -# are also given in the argument list or as imported environment variables. -# Other control variables may be specified in the imported environment, too. -# For example, an alternate orography and sigma level structure may be -# specified for the output sigma file, while an alternate sea-land mask -# may be specified for the surface file. -# -# Script history log: -# 1999-03-01 Mark Iredell -# -# Usage: chgres_global.sh JCAP LEVS LONB LATB SIGINP SFCINP SIGOUT SFCOUT -# -# Input script positional parameters: -# 1 Input sigma file -# defaults to $SIGINP; skip sigma conversion if missing -# 2 Input surface file -# defaults to $SFCINP; skip surface conversion if missing -# 3 Output sigma file -# defaults to $SIGOUT, then to sigout -# 4 Output sigma file -# defaults to $SFCOUT, then to sfcout -# 5 New spectral truncation -# defaults to $JCAP; one or the other is required -# 6 New number of levels -# defaults to $LEVS; one or the other is required -# 7 New number of longitudes -# defaults to $LONB; one or the other is required -# 8 New number of latitudes -# defaults to $LATB; one or the other is required -# 9 Output gfsio file -# defaults to $GFSOUT, then to gfsout -# 10 Output file type -# defaults to $OUTTYP, then to 2 -# 11 Grid output file type -# defaults to $IDRT, then to 4 -# -# Imported Shell Variables: -# SIGINP Input sigma file -# overridden by $1; skip sigma conversion if missing -# SFCINP Input surface file -# overridden by $2; skip surface conversion if missing -# OUTTYP Output file type -# 1: gfsio ; 2: sigio sigma (default); 0: both -# IDRT Grid output file type -# 4: guassian(default); 0: lat-lon -# SIGOUT Output sigma file -# overridden by $3; defaults to sigout -# GFSOUT Output gfsio file -# overridden by $9; defaults to gfsout -# SFCOUT Output surface file -# overridden by $4; defaults to sfcout -# JCAP New spectral truncation -# overridden by $5; one or the other is required -# LEVS New number of levels -# overridden by $6; one or the other is required -# LONB New number of longitudes -# overridden by $7; one or the other is required -# LATB New number of latitudes -# overridden by $8; one or the other is required -# NTRAC New number of tracers -# defaults to input sigma file value -# IDVC New vertical coordinate id (1 for sigma, 2 for hybrid) -# defaults to input sigma file value -# IDSL New midlayer pressure id (1 for phillips, 2 for mean) -# defaults to input sigma file value -# FIXGLOBAL Directory for global fixed files -# defaults to /nwprod/fix -# EXECGLOBAL Directory for global executables -# defaults to /nwprod/exec -# DATA working directory -# (if nonexistent will be made, used and deleted) -# defaults to current working directory -# XC Suffix to add to executables -# defaults to none -# OROGRAPHY New orography ("NULL" to use from input sigma file) -# defaults to ${FIXGLOBAL}/global_orography.t${JCAP}.grb -# SIGLEVEL New sigma levels ("NULL" to use from input sigma file) -# defaults to ${FIXGLOBAL}/global_siglevel.l${LEVS}.txt -# O3CLIM New ozone climatology (required if adding ozone) -# defaults to ${FIXGLOBAL}/global_o3clim.txt -# SLMASK New sea-land mask ("NULL" to use from input surface file) -# defaults to ${FIXGLOBAL}/global_slmask.t${JCAP}.grb -# FNGLAC Input glacier climatology GRIB file -# defaults to ${FIXGLOBAL}/global_glacier.2x2.grb -# FNMXIC Input maximum sea ice climatology GRIB file -# defaults to ${FIXGLOBAL}/global_maxice.2x2.grb -# FNTSFC Input SST climatology GRIB file -# defaults to ${FIXGLOBAL}/global_sstclim.2x2.grb -# FNSNOC Input snow climatology GRIB file -# defaults to ${FIXGLOBAL}/global_snoclim.1.875.grb -# FNZORC Input roughness climatology GRIB file -# defaults to ${FIXGLOBAL}/global_zorclim.1x1.grb -# FNALBC Input albedo climatology GRIB file -# defaults to ${FIXGLOBAL}/global_albedo4.1x1.grb -# FNAISC Input sea ice climatology GRIB file -# defaults to ${FIXGLOBAL}/global_iceclim.2x2.grb -# FNTG3C Input deep soil temperature climatology GRIB file -# defaults to ${FIXGLOBAL}/global_tg3clim.2.6x1.5.grb -# FNVEGC Input vegetation fraction climatology GRIB file -# defaults to ${FIXGLOBAL}/global_vegfrac.1x1.grb -# FNVETC Input vegetation type climatology GRIB file -# defaults to ${FIXGLOBAL}/global_vegtype.1x1.grb -# FNSOTC Input soil type climatology GRIB file -# defaults to ${FIXGLOBAL}/global_soiltype.1x1.grb -# FNSMCC Input soil moisture climatology GRIB file -# defaults to ${FIXGLOBAL}/global_soilmcpc.1x1.grb -# FNVMNC Input min veg frac climatology GRIB file -# defaults to ${FIXGLOBAL}/global_shdmin.0.144x0.144.grb -# FNVMXC Input max veg frac climatology GRIB file -# defaults to ${FIXGLOBAL}/global_shdmax.0.144x0.144.grb -# FNSLPC Input slope type climatology GRIB file -# defaults to ${FIXGLOBAL}/global_slope.1x1.grb -# FNABSC Input max snow albedo climatology GRIB file -# defaults to ${FIXGLOBAL}/global_snoalb.1x1.grb -# FNMSKH Input high resolution land mask GRIB file -# defaults to ${FIXGLOBAL}/seaice_newland.grb -# CLIMO_ -# FIELDS_OPT 1-Climo/static fields (albedo, soil type, greenness, etc.) -# interpolated from input grid. -# 2-Vegetation, slope and soil type interpolated from input -# grid. All other climo/static fields from sfccycle. -# 3-All climo/static fields from sfccycle. -# LANDICE_OPT 1-Input no landice => output landice -# 2-Input landice => output landice. -# 3-Input no landice => output no landice -# 4-Input landice => output no landice -# 5-Output landice regardless of input -# LSOIL 2-Output file with 2 soil layers -# 4-Output file with 4 soil layers -# 0-Default, number of soil layers same as input file -# IVSSFC Version number of surface restart file -# 0-Default, same as input file. -# LONSPERLAT New lonsperlat ("NULL" to use from input surface file) -# defaults to ${FIXGLOBAL}/global_lonsperlat.t${JCAP}.txt -# CHGRESEXEC Change resolution executable -# defaults to ${EXECGLOBAL}/global_chgres -# INISCRIPT Preprocessing script -# defaults to none -# LOGSCRIPT Log posting script -# defaults to none -# ERRSCRIPT Error processing script -# defaults to 'eval [[ $err = 0 ]]' -# ENDSCRIPT Postprocessing script -# defaults to none -# CHGRESVARS Other namelist inputs to the change resolution executable -# such as LONBI,LATBI,IGEN,MGG,JC,MQUICK -# defaults to none set -# NTHREADS Number of threads -# defaults to 1 -# NTHSTACK Size of stack per thread -# defaults to 64000000 -# PGMOUT Executable standard output -# defaults to $pgmout, then to '&1' -# PGMERR Executable standard error -# defaults to $pgmerr, then to '&1' -# pgmout Executable standard output default -# pgmerr Executable standard error default -# REDOUT standard output redirect ('1>' or '1>>') -# defaults to '1>', or to '1>>' to append if $PGMOUT is a file -# REDERR standard error redirect ('2>' or '2>>') -# defaults to '2>', or to '2>>' to append if $PGMERR is a file -# VERBOSE Verbose flag (YES or NO) -# defaults to NO -# -# Exported Shell Variables: -# PGM Current program name -# pgm -# ERR Last return code -# err -# -# Modules and files referenced: -# scripts : $INISCRIPT -# $LOGSCRIPT -# $ERRSCRIPT -# $ENDSCRIPT -# -# programs : $CHGRESEXEC -# -# input data : $1 or $SIGINP -# $2 or $SFCINP -# $OROGRAPHY -# $SIGLEVEL -# $O3CLIM -# $SLMASK -# $LONSPERLAT -# -# output data: $3 or $SIGOUT -# $4 or $SFCOUT -# $9 or $GFSOUT -# $PGMOUT -# $PGMERR -# -# scratch : ${DATA}/chgres.inp.sig -# ${DATA}/chgres.inp.orogb -# ${DATA}/chgres.inp.siglevel -# ${DATA}/chgres.inp.sfc -# ${DATA}/chgres.inp.slmgb -# ${DATA}/chgres.out.sig -# ${DATA}/chgres.out.sfc -# ${DATA}/fort.35 -# ${DATA}/fort.81 -# ${DATA}/NULL -# -# Remarks: -# -# Condition codes -# 0 - no problem encountered -# >0 - some problem encountered -# -# Control variable resolution priority -# 1 Command line argument. -# 2 Environment variable. -# 3 Inline default. -# -# Attributes: -# Language: POSIX shell -# Machine: IBM SP -# -#### -################################################################################ -# Set environment. -export VERBOSE=${VERBOSE:-"NO"} -if [[ "$VERBOSE" = "YES" ]] -then - echo $(date) EXECUTING $0 $* >&2 - set -x -fi -# Command line arguments. -export SIGINP=${1:-${SIGINP:-NULL}} -export SFCINP=${2:-${SFCINP:-NULL}} -export OUTTYP=${10:-${OUTTYP:-2}} -export SIGOUT=${3:-${SIGOUT:-sigout}} -export GFSOUT=${9:-${GFSOUT:-gfsout}} -export SFCOUT=${4:-${SFCOUT:-sfcout}} -export JCAP=${5:-${JCAP:?}} -export LEVS=${6:-${LEVS:?}} -export LONB=${7:-${LONB:?}} -export LATB=${8:-${LATB:?}} -export IDRT=${11:-${IDRT:-4}} -# Directories. -export FIXGLOBAL=${FIXGLOBAL:-/nwprod/fix} -export EXECGLOBAL=${EXECGLOBAL:-/nwprod/exec} -export DATA=${DATA:-$(pwd)} -# Filenames. -export XC=${XC} -export CHGRESEXEC=${CHGRESEXEC:-${EXECGLOBAL}/global_chgres$XC} -export OROGRAPHY=${OROGRAPHY:-${FIXGLOBAL}/global_orography.t${JCAP}.grb} -export SIGLEVEL=${SIGLEVEL:-${FIXGLOBAL}/global_siglevel.l${LEVS}.txt} -export O3CLIM=${O3CLIM:-${FIXGLOBAL}/global_o3clim.txt} -export SLMASK=${SLMASK:-${FIXGLOBAL}/global_slmask.t${JCAP}.grb} -export FNGLAC=${FNGLAC:-${FIXGLOBAL}/global_glacier.2x2.grb} -export FNMXIC=${FNMXIC:-${FIXGLOBAL}/global_maxice.2x2.grb} -export FNTSFC=${FNTSFC:-${FIXGLOBAL}/cfs_oi2sst1x1monclim19822001.grb} -export FNSNOC=${FNSNOC:-${FIXGLOBAL}/global_snoclim.1.875.grb} -export FNZORC=${FNZORC:-${FIXGLOBAL}/global_zorclim.1x1.grb} -export FNALBC=${FNALBC:-${FIXGLOBAL}/global_albedo4.1x1.grb} -export FNAISC=${FNAISC:-${FIXGLOBAL}/cfs_ice1x1monclim19822001.grb} -export FNTG3C=${FNTG3C:-${FIXGLOBAL}/global_tg3clim.2.6x1.5.grb} -export FNVEGC=${FNVEGC:-${FIXGLOBAL}/global_vegfrac.0.144.decpercent.grb} -export FNVETC=${FNVETC:-${FIXGLOBAL}/global_vegtype.1x1.grb} -export FNSOTC=${FNSOTC:-${FIXGLOBAL}/global_soiltype.1x1.grb} -export FNSMCC=${FNSMCC:-${FIXGLOBAL}/global_soilmcpc.1x1.grb} -export FNVMNC=${FNVMNC:-${FIXGLOBAL}/global_shdmin.0.144x0.144.grb} -export FNVMXC=${FNVMXC:-${FIXGLOBAL}/global_shdmax.0.144x0.144.grb} -export FNSLPC=${FNSLPC:-${FIXGLOBAL}/global_slope.1x1.grb} -export FNABSC=${FNABSC:-${FIXGLOBAL}/global_snoalb.1x1.grb} -export FNMSKH=${FNMSKH:-${FIXGLOBAL}/seaice_newland.grb} -export LANDICE_OPT=${LANDICE_OPT:-2} -export CLIMO_FIELDS_OPT=${CLIMO_FIELDS_OPT:-2} -export LONSPERLAT=${LONSPERLAT:-${FIXGLOBAL}/global_lonsperlat.t${JCAP}.txt} -export INISCRIPT=${INISCRIPT} -export ERRSCRIPT=${ERRSCRIPT:-'eval [[ $err = 0 ]]'} -export LOGSCRIPT=${LOGSCRIPT} -export ENDSCRIPT=${ENDSCRIPT} -# Other variables. -export NTRAC=${NTRAC:-0} -export IDVC=${IDVC:-0} -export IDSL=${IDSL:-0} -export LSOIL=${LSOIL:-0} -export IVSSFC=${IVSSFC:-0} -export CHGRESVARS=${CHGRESVARS} -export NTHREADS=${NTHREADS:-1} -export NTHSTACK=${NTHSTACK:-64000000} -export XLSMPOPTS=${XLSMPOPTS:-"parthds=$NTHREADS:stack=NTHSTACK"} -export PGMOUT=${PGMOUT:-${pgmout:-'&1'}} -export PGMERR=${PGMERR:-${pgmerr:-'&2'}} -typeset -L1 l=$PGMOUT -[[ $l = '&' ]]&&a=''||a='>' -export REDOUT=${REDOUT:-'1>'$a} -typeset -L1 l=$PGMERR -[[ $l = '&' ]]&&a=''||a='>' -export REDERR=${REDERR:-'2>'$a} -################################################################################ -# Preprocessing -$INISCRIPT -pwd=$(pwd) -if [[ -d $DATA ]] -then - mkdata=NO -else - mkdir -p $DATA - mkdata=YES -fi -cd $DATA||exit 99 -################################################################################ -# Change resolution -export XLSMPOPTS="parthds=$NTHREADS:stack=$NTHSTACK" -export PGM=$CHGRESEXEC -export pgm=$PGM -$LOGSCRIPT -rm -f NULL -ln -sf $SIGINP chgres.inp.sig -ln -sf $OROGRAPHY chgres.inp.orogb -ln -sf $SIGLEVEL chgres.inp.siglevel -ln -sf $O3CLIM chgres.inp.o3clim -ln -sf $SFCINP chgres.inp.sfc -ln -sf $SLMASK chgres.inp.slmgb -ln -sf $LONSPERLAT chgres.inp.lonsperlat -ln -sf $SIGOUT chgres.out.sig -ln -sf $GFSOUT chgres.out.grd -ln -sf $SFCOUT chgres.out.sfc - -if [[ $LANDICE_OPT = 3 || $LANDICE_OPT = 4 ]] -then - LANDICE=.false. -else - LANDICE=.true. -fi - -cat << EOF > fort.35 - &NAMSFC - FNGLAC='${FNGLAC}' - FNMXIC='${FNMXIC}' - FNTSFC='${FNTSFC}' - FNSNOC='${FNSNOC}' - FNZORC='${FNZORC}' - FNALBC='${FNALBC}' - FNAISC='${FNAISC}' - FNTG3C='${FNTG3C}' - FNVEGC='${FNVEGC}' - FNVETC='${FNVETC}' - FNSOTC='${FNSOTC}' - FNSMCC='${FNSMCC}' - FNVMNC='${FNVMNC}' - FNVMXC='${FNVMXC}' - FNSLPC='${FNSLPC}' - FNABSC='${FNABSC}' - FNMSKH='${FNMSKH}' - FNTSFA='' - FNACNA='' - FNSNOA='' - LDEBUG=.false. - LANDICE=$LANDICE -/ -EOF - -cat << EOF > fort.81 - &soil_parameters - soil_src_input = "zobler" - smclow_input = 0.5 - smchigh_input = 6.0 - smcmax_input= 0.421, 0.464, 0.468, 0.434, 0.406, 0.465, - 0.404, 0.439, 0.421 - beta_input = 4.26, 8.72, 11.55, 4.74, 10.73, 8.17, - 6.77, 5.25, 4.26 - psis_input = 0.040, 0.620, 0.470, 0.140, 0.100, 0.260, - 0.140, 0.360, 0.040 - satdk_input = 1.41e-5, 0.20e-5, 0.10e-5, 0.52e-5, 0.72e-5, - 0.25e-5, 0.45e-5, 0.34e-5, 1.41e-5 - soil_src_output = "zobler" - smclow_output = 0.5 - smchigh_output = 6.0 - smcmax_output= 0.421, 0.464, 0.468, 0.434, 0.406, 0.465, - 0.404, 0.439, 0.421 - beta_output = 4.26, 8.72, 11.55, 4.74, 10.73, 8.17, - 6.77, 5.25, 4.26 - psis_output = 0.040, 0.620, 0.470, 0.140, 0.100, 0.260, - 0.140, 0.360, 0.040 - satdk_output = 1.41e-5, 0.20e-5, 0.10e-5, 0.52e-5, 0.72e-5, - 0.25e-5, 0.45e-5, 0.34e-5, 1.41e-5 - / - &veg_parameters - veg_src_input = "sib" - veg_src_output = "sib" - salp_output= -999. - snup_output= -999. - / - &options - CLIMO_FIELDS_OPT=${CLIMO_FIELDS_OPT} - LANDICE_OPT=${LANDICE_OPT} - / -EOF - -eval $CHGRESEXEC <&2 -fi -exit $err diff --git a/ush/EnKF/global_chgresp.sh b/ush/EnKF/global_chgresp.sh deleted file mode 100755 index fdb72786be..0000000000 --- a/ush/EnKF/global_chgresp.sh +++ /dev/null @@ -1,436 +0,0 @@ - -################################################################################ -#### UNIX Script Documentation Block -# . . -# Script name: chgres_global.sh -# Script description: Changes resolution of global restart files. -# -# Author: Mark Iredell Org: NP23 Date: 1999-03-01 -# -# Abstract: This script changes the resolution of the global restart files, -# namely the sigma file or the surface file or both. The resolution -# of the output files is given in the argument list or as imported -# environment variables. The resolution of the input files are taken -# from the header records in the respective files. Resolution is -# given as spectral truncation, number of levels, number of longitudes -# and number of latitudes. The names of the input and output restart files -# are also given in the argument list or as imported environment variables. -# Other control variables may be specified in the imported environment, too. -# For example, an alternate orography and sigma level structure may be -# specified for the output sigma file, while an alternate sea-land mask -# may be specified for the surface file. -# -# Script history log: -# 1999-03-01 Mark Iredell -# -# Usage: chgres_global.sh JCAP LEVS LONB LATB SIGINP SFCINP SIGOUT SFCOUT -# -# Input script positional parameters: -# 1 Input sigma file -# defaults to $SIGINP; skip sigma conversion if missing -# 2 Input surface file -# defaults to $SFCINP; skip surface conversion if missing -# 3 Output sigma file -# defaults to $SIGOUT, then to sigout -# 4 Output sigma file -# defaults to $SFCOUT, then to sfcout -# 5 New spectral truncation -# defaults to $JCAP; one or the other is required -# 6 New number of levels -# defaults to $LEVS; one or the other is required -# 7 New number of longitudes -# defaults to $LONB; one or the other is required -# 8 New number of latitudes -# defaults to $LATB; one or the other is required -# 9 Output gfsio file -# defaults to $GFSOUT, then to gfsout -# 10 Output file type -# defaults to $OUTTYP, then to 2 -# 11 Grid output file type -# defaults to $IDRT, then to 4 -# -# Imported Shell Variables: -# SIGINP Input sigma file -# overridden by $1; skip sigma conversion if missing -# SFCINP Input surface file -# overridden by $2; skip surface conversion if missing -# OUTTYP Output file type -# 1: gfsio ; 2: sigio sigma (default); 0: both -# IDRT Grid output file type -# 4: guassian(default); 0: lat-lon -# SIGOUT Output sigma file -# overridden by $3; defaults to sigout -# GFSOUT Output gfsio file -# overridden by $9; defaults to gfsout -# SFCOUT Output surface file -# overridden by $4; defaults to sfcout -# JCAP New spectral truncation -# overridden by $5; one or the other is required -# LEVS New number of levels -# overridden by $6; one or the other is required -# LONB New number of longitudes -# overridden by $7; one or the other is required -# LATB New number of latitudes -# overridden by $8; one or the other is required -# NTRAC New number of tracers -# defaults to input sigma file value -# IDVC New vertical coordinate id (1 for sigma, 2 for hybrid) -# defaults to input sigma file value -# IDSL New midlayer pressure id (1 for phillips, 2 for mean) -# defaults to input sigma file value -# FIXGLOBAL Directory for global fixed files -# defaults to /nwprod/fix -# EXECGLOBAL Directory for global executables -# defaults to /nwprod/exec -# DATA working directory -# (if nonexistent will be made, used and deleted) -# defaults to current working directory -# XC Suffix to add to executables -# defaults to none -# OROGRAPHY New orography ("NULL" to use from input sigma file) -# defaults to ${FIXGLOBAL}/global_orography.t${JCAP}.grb -# SIGLEVEL New sigma levels ("NULL" to use from input sigma file) -# defaults to ${FIXGLOBAL}/global_siglevel.l${LEVS}.txt -# O3CLIM New ozone climatology (required if adding ozone) -# defaults to ${FIXGLOBAL}/global_o3clim.txt -# SLMASK New sea-land mask ("NULL" to use from input surface file) -# defaults to ${FIXGLOBAL}/global_slmask.t${JCAP}.grb -# FNGLAC Input glacier climatology GRIB file -# defaults to ${FIXGLOBAL}/global_glacier.2x2.grb -# FNMXIC Input maximum sea ice climatology GRIB file -# defaults to ${FIXGLOBAL}/global_maxice.2x2.grb -# FNTSFC Input SST climatology GRIB file -# defaults to ${FIXGLOBAL}/global_sstclim.2x2.grb -# FNSNOC Input snow climatology GRIB file -# defaults to ${FIXGLOBAL}/global_snoclim.1.875.grb -# FNZORC Input roughness climatology GRIB file -# defaults to ${FIXGLOBAL}/global_zorclim.1x1.grb -# FNALBC Input albedo climatology GRIB file -# defaults to ${FIXGLOBAL}/global_albedo4.1x1.grb -# FNAISC Input sea ice climatology GRIB file -# defaults to ${FIXGLOBAL}/global_iceclim.2x2.grb -# FNTG3C Input deep soil temperature climatology GRIB file -# defaults to ${FIXGLOBAL}/global_tg3clim.2.6x1.5.grb -# FNVEGC Input vegetation fraction climatology GRIB file -# defaults to ${FIXGLOBAL}/global_vegfrac.1x1.grb -# FNVETC Input vegetation type climatology GRIB file -# defaults to ${FIXGLOBAL}/global_vegtype.1x1.grb -# FNSOTC Input soil type climatology GRIB file -# defaults to ${FIXGLOBAL}/global_soiltype.1x1.grb -# FNSMCC Input soil moisture climatology GRIB file -# defaults to ${FIXGLOBAL}/global_soilmcpc.1x1.grb -# FNVMNC Input min veg frac climatology GRIB file -# defaults to ${FIXGLOBAL}/global_shdmin.0.144x0.144.grb -# FNVMXC Input max veg frac climatology GRIB file -# defaults to ${FIXGLOBAL}/global_shdmax.0.144x0.144.grb -# FNSLPC Input slope type climatology GRIB file -# defaults to ${FIXGLOBAL}/global_slope.1x1.grb -# FNABSC Input max snow albedo climatology GRIB file -# defaults to ${FIXGLOBAL}/global_snoalb.1x1.grb -# FNMSKH Input high resolution land mask GRIB file -# defaults to ${FIXGLOBAL}/seaice_newland.grb -# CLIMO_ -# FIELDS_OPT 1-Climo/static fields (albedo, soil type, greenness, etc.) -# interpolated from input grid. -# 2-Vegetation, slope and soil type interpolated from input -# grid. All other climo/static fields from sfccycle. -# 3-All climo/static fields from sfccycle. -# LANDICE_OPT 1-Input no landice => output landice -# 2-Input landice => output landice. -# 3-Input no landice => output no landice -# 4-Input landice => output no landice -# 5-Output landice regardless of input -# LSOIL 2-Output file with 2 soil layers -# 4-Output file with 4 soil layers -# 0-Default, number of soil layers same as input file -# IVSSFC Version number of surface restart file -# 0-Default, same as input file. -# LONSPERLAT New lonsperlat ("NULL" to use from input surface file) -# defaults to ${FIXGLOBAL}/global_lonsperlat.t${JCAP}.txt -# CHGRESEXEC Change resolution executable -# defaults to ${EXECGLOBAL}/global_chgres -# INISCRIPT Preprocessing script -# defaults to none -# LOGSCRIPT Log posting script -# defaults to none -# ERRSCRIPT Error processing script -# defaults to 'eval [[ $err = 0 ]]' -# ENDSCRIPT Postprocessing script -# defaults to none -# CHGRESVARS Other namelist inputs to the change resolution executable -# such as LONBI,LATBI,IGEN,MGG,JC,MQUICK -# defaults to none set -# NTHREADS Number of threads -# defaults to 1 -# NTHSTACK Size of stack per thread -# defaults to 64000000 -# PGMOUT Executable standard output -# defaults to $pgmout, then to '&1' -# PGMERR Executable standard error -# defaults to $pgmerr, then to '&1' -# pgmout Executable standard output default -# pgmerr Executable standard error default -# REDOUT standard output redirect ('1>' or '1>>') -# defaults to '1>', or to '1>>' to append if $PGMOUT is a file -# REDERR standard error redirect ('2>' or '2>>') -# defaults to '2>', or to '2>>' to append if $PGMERR is a file -# VERBOSE Verbose flag (YES or NO) -# defaults to NO -# -# Exported Shell Variables: -# PGM Current program name -# pgm -# ERR Last return code -# err -# -# Modules and files referenced: -# scripts : $INISCRIPT -# $LOGSCRIPT -# $ERRSCRIPT -# $ENDSCRIPT -# -# programs : $CHGRESEXEC -# -# input data : $1 or $SIGINP -# $2 or $SFCINP -# $OROGRAPHY -# $SIGLEVEL -# $O3CLIM -# $SLMASK -# $LONSPERLAT -# -# output data: $3 or $SIGOUT -# $4 or $SFCOUT -# $9 or $GFSOUT -# $PGMOUT -# $PGMERR -# -# scratch : ${DATA}/chgres.inp.sig -# ${DATA}/chgres.inp.orogb -# ${DATA}/chgres.inp.siglevel -# ${DATA}/chgres.inp.sfc -# ${DATA}/chgres.inp.slmgb -# ${DATA}/chgres.out.sig -# ${DATA}/chgres.out.sfc -# ${DATA}/fort.35 -# ${DATA}/fort.81 -# ${DATA}/NULL -# -# Remarks: -# -# Condition codes -# 0 - no problem encountered -# >0 - some problem encountered -# -# Control variable resolution priority -# 1 Command line argument. -# 2 Environment variable. -# 3 Inline default. -# -# Attributes: -# Language: POSIX shell -# Machine: IBM SP -# -#### -################################################################################ -# Set environment. -export VERBOSE=${VERBOSE:-"NO"} -if [[ "$VERBOSE" = "YES" ]] -then - echo $(date) EXECUTING $0 $* >&2 - set -x -fi -# Command line arguments. -export SIGINP=${1:-${SIGINP:-NULL}} -export SFCINP=${2:-${SFCINP:-NULL}} -export OUTTYP=${10:-${OUTTYP:-2}} -export SIGOUT=${3:-${SIGOUT:-sigout}} -export GFSOUT=${9:-${GFSOUT:-gfsout}} -export SFCOUT=${4:-${SFCOUT:-sfcout}} -export JCAP=${5:-${JCAP:?}} -export LEVS=${6:-${LEVS:?}} -export LONB=${7:-${LONB:?}} -export LATB=${8:-${LATB:?}} -export IDRT=${11:-${IDRT:-4}} -# Directories. -export FIXGLOBAL=${FIXGLOBAL:-/nwprod/fix} -export EXECGLOBAL=${EXECGLOBAL:-/nwprod/exec} -export DATA=${DATA:-$(pwd)} -# Filenames. -export XC=${XC} -export CHGRESEXEC=${CHGRESEXEC:-${EXECGLOBAL}/global_chgres$XC} -export OROGRAPHY=${OROGRAPHY:-${FIXGLOBAL}/global_orography.t${JCAP}.grb} -export SIGLEVEL=${SIGLEVEL:-${FIXGLOBAL}/global_siglevel.l${LEVS}.txt} -export O3CLIM=${O3CLIM:-${FIXGLOBAL}/global_o3clim.txt} -export SLMASK=${SLMASK:-${FIXGLOBAL}/global_slmask.t${JCAP}.grb} -export FNGLAC=${FNGLAC:-${FIXGLOBAL}/global_glacier.2x2.grb} -export FNMXIC=${FNMXIC:-${FIXGLOBAL}/global_maxice.2x2.grb} -export FNTSFC=${FNTSFC:-${FIXGLOBAL}/cfs_oi2sst1x1monclim19822001.grb} -export FNSNOC=${FNSNOC:-${FIXGLOBAL}/global_snoclim.1.875.grb} -export FNZORC=${FNZORC:-${FIXGLOBAL}/global_zorclim.1x1.grb} -export FNALBC=${FNALBC:-${FIXGLOBAL}/global_albedo4.1x1.grb} -export FNAISC=${FNAISC:-${FIXGLOBAL}/cfs_ice1x1monclim19822001.grb} -export FNTG3C=${FNTG3C:-${FIXGLOBAL}/global_tg3clim.2.6x1.5.grb} -export FNVEGC=${FNVEGC:-${FIXGLOBAL}/global_vegfrac.0.144.decpercent.grb} -export FNVETC=${FNVETC:-${FIXGLOBAL}/global_vegtype.1x1.grb} -export FNSOTC=${FNSOTC:-${FIXGLOBAL}/global_soiltype.1x1.grb} -export FNSMCC=${FNSMCC:-${FIXGLOBAL}/global_soilmcpc.1x1.grb} -export FNVMNC=${FNVMNC:-${FIXGLOBAL}/global_shdmin.0.144x0.144.grb} -export FNVMXC=${FNVMXC:-${FIXGLOBAL}/global_shdmax.0.144x0.144.grb} -export FNSLPC=${FNSLPC:-${FIXGLOBAL}/global_slope.1x1.grb} -export FNABSC=${FNABSC:-${FIXGLOBAL}/global_snoalb.1x1.grb} -export FNMSKH=${FNMSKH:-${FIXGLOBAL}/seaice_newland.grb} -export LANDICE_OPT=${LANDICE_OPT:-2} -export CLIMO_FIELDS_OPT=${CLIMO_FIELDS_OPT:-2} -export LONSPERLAT=${LONSPERLAT:-${FIXGLOBAL}/global_lonsperlat.t${JCAP}.txt} -export INISCRIPT=${INISCRIPT} -export ERRSCRIPT=${ERRSCRIPT:-'eval [[ $err = 0 ]]'} -export LOGSCRIPT=${LOGSCRIPT} -export ENDSCRIPT=${ENDSCRIPT} -# Other variables. -export NTRAC=${NTRAC:-0} -export IDVC=${IDVC:-0} -export IDSL=${IDSL:-0} -export LSOIL=${LSOIL:-0} -export IVSSFC=${IVSSFC:-0} -export CHGRESVARS=${CHGRESVARS} -export NTHREADS=${NTHREADS:-1} -export NTHSTACK=${NTHSTACK:-64000000} -export XLSMPOPTS=${XLSMPOPTS:-"parthds=$NTHREADS:stack=NTHSTACK"} -export PGMOUT=${PGMOUT:-${pgmout:-'&1'}} -export PGMERR=${PGMERR:-${pgmerr:-'&2'}} -#typeset -L1 l=$PGMOUT -[[ $l = '&' ]]&&a=''||a='>' -export REDOUT=${REDOUT:-'1>'$a} -#typeset -L1 l=$PGMERR -[[ $l = '&' ]]&&a=''||a='>' -export REDERR=${REDERR:-'2>'$a} -################################################################################ -# Preprocessing -#$INISCRIPT -pwd=$(pwd) -if [[ -d $DATA ]] -then - mkdata=NO -else - mkdir -p $DATA - mkdata=YES -fi -cd $DATA||exit 99 -################################################################################ -# Change resolution -export XLSMPOPTS="parthds=$NTHREADS:stack=$NTHSTACK" -export PGM=$CHGRESEXEC -export pgm=$PGM -#$LOGSCRIPT -rm -f NULL -ln -sf $SIGINP chgres.inp.sig -ln -sf $OROGRAPHY chgres.inp.orogb -ln -sf $SIGLEVEL chgres.inp.siglevel -ln -sf $O3CLIM chgres.inp.o3clim -ln -sf $SFCINP chgres.inp.sfc -ln -sf $SLMASK chgres.inp.slmgb -ln -sf $LONSPERLAT chgres.inp.lonsperlat -ln -sf $SIGOUT chgres.out.sig -ln -sf $GFSOUT chgres.out.grd -ln -sf $SFCOUT chgres.out.sfc - -if [[ $LANDICE_OPT = 3 || $LANDICE_OPT = 4 ]] -then - LANDICE=.false. -else - LANDICE=.true. -fi - -cat << EOF > fort.35 - &NAMSFC - FNGLAC='${FNGLAC}' - FNMXIC='${FNMXIC}' - FNTSFC='${FNTSFC}' - FNSNOC='${FNSNOC}' - FNZORC='${FNZORC}' - FNALBC='${FNALBC}' - FNAISC='${FNAISC}' - FNTG3C='${FNTG3C}' - FNVEGC='${FNVEGC}' - FNVETC='${FNVETC}' - FNSOTC='${FNSOTC}' - FNSMCC='${FNSMCC}' - FNVMNC='${FNVMNC}' - FNVMXC='${FNVMXC}' - FNSLPC='${FNSLPC}' - FNABSC='${FNABSC}' - FNMSKH='${FNMSKH}' - FNTSFA='' - FNACNA='' - FNSNOA='' - LDEBUG=.false. - LANDICE=$LANDICE -/ -EOF - -cat << EOF > fort.81 - &soil_parameters - soil_src_input = "zobler" - smclow_input = 0.5 - smchigh_input = 6.0 - smcmax_input= 0.421, 0.464, 0.468, 0.434, 0.406, 0.465, - 0.404, 0.439, 0.421 - beta_input = 4.26, 8.72, 11.55, 4.74, 10.73, 8.17, - 6.77, 5.25, 4.26 - psis_input = 0.040, 0.620, 0.470, 0.140, 0.100, 0.260, - 0.140, 0.360, 0.040 - satdk_input = 1.41e-5, 0.20e-5, 0.10e-5, 0.52e-5, 0.72e-5, - 0.25e-5, 0.45e-5, 0.34e-5, 1.41e-5 - soil_src_output = "zobler" - smclow_output = 0.5 - smchigh_output = 6.0 - smcmax_output= 0.421, 0.464, 0.468, 0.434, 0.406, 0.465, - 0.404, 0.439, 0.421 - beta_output = 4.26, 8.72, 11.55, 4.74, 10.73, 8.17, - 6.77, 5.25, 4.26 - psis_output = 0.040, 0.620, 0.470, 0.140, 0.100, 0.260, - 0.140, 0.360, 0.040 - satdk_output = 1.41e-5, 0.20e-5, 0.10e-5, 0.52e-5, 0.72e-5, - 0.25e-5, 0.45e-5, 0.34e-5, 1.41e-5 - / - &veg_parameters - veg_src_input = "sib" - veg_src_output = "sib" - salp_output= -999. - snup_output= -999. - / - &options - CLIMO_FIELDS_OPT=${CLIMO_FIELDS_OPT} - LANDICE_OPT=${LANDICE_OPT} - / -EOF - -cat << EOF > fort.912 - &NAMCHG JCAP=$JCAP, LEVS=$LEVS, LONB=$LONB, LATB=$LATB, - NTRAC=$NTRAC, IDVC=$IDVC, IDSL=$IDSL, - LSOIL=$LSOIL, IVSSFC=$IVSSFC, OUTTYP=$OUTTYP, IDRT=$IDRT, $CHGRESVARS - / -EOF -cat $HOSTFILE -$MPICH/bin/mpirun_rsh -hostfile $HOSTFILE -np 1 $CHGRESEXEC -#$MPICH/bin/mpiexec -hostfile $HOSTFILE -n 1 $CHGRESEXEC - -export ERR=$? -export err=$ERR -#$ERRSCRIPT||exit 2 -rm -f NULL -rm -f chgres.inp.sig chgres.inp.orogb chgres.inp.siglevel chgres.inp.o3clim -rm -f chgres.inp.sfc chgres.inp.slmgb chgres.inp.lonsperlat -rm -f chgres.out.sig chgres.out.sfc fort.35 fort.81 -################################################################################ -# Postprocessing -cd $pwd -[[ $mkdata = YES ]]&&rmdir $DATA -#$ENDSCRIPT -set +x -if [[ "$VERBOSE" = "YES" ]] -then - echo $(date) EXITING $0 with return code $err >&2 -fi -exit $err diff --git a/ush/EnKF/global_cycle.sh b/ush/EnKF/global_cycle.sh deleted file mode 100755 index 8f43b5f402..0000000000 --- a/ush/EnKF/global_cycle.sh +++ /dev/null @@ -1,369 +0,0 @@ -#!/bin/sh -################################################################################ -#### UNIX Script Documentation Block -# . . -# Script name: global_cycle.sh -# Script description: Makes a global spectral model surface analysis -# -# Author: Mark Iredell Org: NP23 Date: 2005-02-03 -# -# Abstract: This script makes a global spectral model surface analysis. -# -# Script history log: -# 2005-02-03 Iredell extracted from global_analysis.sh -# -# Usage: global_cycle.sh SFCGES SFCANL -# -# Input script positional parameters: -# 1 Input surface guess -# defaults to $SFCGES; required -# 2 Output surface analysis -# defaults to $SFCANL, then to ${COMOUT}/sfcanl -# -# Imported Shell Variables: -# SFCGES Input surface guess -# overridden by $1; required -# SFCANL Output surface analysis -# overridden by $5; defaults to ${COMOUT}/sfcanl -# FIXGLOBAL Directory for global fixed files -# defaults to /nwprod/fix -# EXECGLOBAL Directory for global executables -# defaults to /nwprod/exec -# USHGLOBAL Directory for global scripts -# defaults to /nwprod/ush -# DATA working directory -# (if nonexistent will be made, used and deleted) -# defaults to current working directory -# COMIN input directory -# defaults to current working directory -# COMOUT output directory -# (if nonexistent will be made) -# defaults to current working directory -# XC Suffix to add to executables -# defaults to none -# PREINP Prefix to add to input observation files -# defaults to none -# SUFINP Suffix to add to input observation files -# defaults to none -# NCP Copy command -# defaults to cp -# SFCHDR Command to read surface header -# defaults to ${EXECGLOBAL}/global_sfchdr$XC -# CYCLEXEC Surface cycle executable -# defaults to ${EXECGLOBAL}/global_cycle$XC -# FNGLAC Input glacier climatology GRIB file -# defaults to ${FIXGLOBAL}/global_glacier.2x2.grb -# FNMXIC Input maximum sea ice climatology GRIB file -# defaults to ${FIXGLOBAL}/global_maxice.2x2.grb -# FNTSFC Input SST climatology GRIB file -# defaults to ${FIXGLOBAL}/global_sstclim.2x2.grb -# FNSNOC Input snow climatology GRIB file -# defaults to ${FIXGLOBAL}/global_snoclim.1.875.grb -# FNZORC Input roughness climatology GRIB file -# defaults to ${FIXGLOBAL}/global_zorclim.1x1.grb -# FNALBC Input albedo climatology GRIB file -# defaults to ${FIXGLOBAL}/global_albedo4.1x1.grb -# FNAISC Input sea ice climatology GRIB file -# defaults to ${FIXGLOBAL}/global_iceclim.2x2.grb -# FNTG3C Input deep soil temperature climatology GRIB file -# defaults to ${FIXGLOBAL}/global_tg3clim.2.6x1.5.grb -# FNVEGC Input vegetation fraction climatology GRIB file -# defaults to ${FIXGLOBAL}/global_vegfrac.1x1.grb -# FNVETC Input vegetation type climatology GRIB file -# defaults to ${FIXGLOBAL}/global_vegtype.1x1.grb -# FNSOTC Input soil type climatology GRIB file -# defaults to ${FIXGLOBAL}/global_soiltype.1x1.grb -# FNSMCC Input soil moisture climatology GRIB file -# defaults to ${FIXGLOBAL}/global_soilmcpc.1x1.grb -# FNVMNC Input min veg frac climatology GRIB file -# defaults to ${FIXGLOBAL}/global_shdmin.0.144x0.144.grb -# FNVMXC Input max veg frac climatology GRIB file -# defaults to ${FIXGLOBAL}/global_shdmax.0.144x0.144.grb -# FNSLPC Input slope type climatology GRIB file -# defaults to ${FIXGLOBAL}/global_slope.1x1.grb -# FNABSC Input max snow albedo climatology GRIB file -# defaults to ${FIXGLOBAL}/global_snoalb.1x1.grb -# FNMSKH Input high resolution land mask GRIB file -# defaults to ${FIXGLOBAL}/seaice_newland.grb -# FNOROG Input orography GRIB file (horiz resolution dependent) -# defaults to ${FIXGLOBAL}/global_orography.t$JCAP.grb -# FNMASK Input land mask GRIB file (horiz resolution dependent) -# defaults to ${FIXGLOBAL}/global_slmask.t$JCAP.grb -# FNTSFA Input SST analysis GRIB file -# defaults to ${COMIN}/${PREINP}sstgrb${SUFINP} -# FNACNA Input sea ice analysis GRIB file -# defaults to ${COMIN}/${PREINP}engicegrb${SUFINP} -# FNSNOA Input snow analysis GRIB file -# defaults to ${COMIN}/${PREINP}snogrb${SUFINP} -# INISCRIPT Preprocessing script -# defaults to none -# LOGSCRIPT Log posting script -# defaults to none -# ERRSCRIPT Error processing script -# defaults to 'eval [[ $err = 0 ]]' -# ENDSCRIPT Postprocessing script -# defaults to none -# KEEPFH Flag to keep fhour the same (YES or NO) -# defaults to NO -# JCAP Spectral truncation -# defaults to 382 -# CDATE Output analysis date in yyyymmddhh format -# defaults to the value in the input surface file header -# FHOUR Output forecast hour -# defaults to the value in the input surface file header -# LATB Number of latitudes in surface cycling -# defaults to the value in the input surface file header -# LONB Number of longitudes in surface cycling -# defaults to the value in the input surface file header -# LSOIL Number of soil layers -# defaults to 4 -# FSMCL2 Scale in days to relax to soil moisture climatology -# defaults to 60 -# DELTSFC Cycling frequency in hours -# defaults to forecast hour of $SFCGES -# CYCLVARS Other namelist inputs to the cycle executable -# defaults to none set -# NTHREADS Number of threads -# defaults to 1 -# NTHSTACK Size of stack per thread -# defaults to 64000000 -# FILESTYLE File management style flag -# ('C' to copy to/from $DATA, 'L' for symbolic links in $DATA, -# 'X' to use XLFUNIT or symbolic links where appropriate) -# defaults to 'X' -# PGMOUT Executable standard output -# defaults to $pgmout, then to '&1' -# PGMERR Executable standard error -# defaults to $pgmerr, then to '&1' -# pgmout Executable standard output default -# pgmerr Executable standard error default -# REDOUT standard output redirect ('1>' or '1>>') -# defaults to '1>', or to '1>>' to append if $PGMOUT is a file -# REDERR standard error redirect ('2>' or '2>>') -# defaults to '2>', or to '2>>' to append if $PGMERR is a file -# VERBOSE Verbose flag (YES or NO) -# defaults to NO -# -# Exported Shell Variables: -# PGM Current program name -# pgm -# ERR Last return code -# err -# -# Modules and files referenced: -# scripts : $INISCRIPT -# $LOGSCRIPT -# $ERRSCRIPT -# $ENDSCRIPT -# -# programs : $CYCLEXEC -# -# fixed data : $FNGLAC -# $FNMXIC -# $FNTSFC -# $FNSNOC -# $FNZORC -# $FNALBC -# $FNAISC -# $FNTG3C -# $FNVEGC -# $FNVETC -# $FNSOTC -# $FNSMCC -# $FNVMNC -# $FNVMXC -# $FNSLPC -# $FNABSC -# $FNMSKH -# $FNOROG -# $FNMASK -# -# input data : $SFCGES -# $FNTSFA -# $FNACNA -# $FNSNOA -# -# output data: $SFCANL -# $PGMOUT -# $PGMERR -# -# Remarks: -# -# Condition codes -# 0 - no problem encountered -# >0 - some problem encountered -# -# Control variable resolution priority -# 1 Command line argument. -# 2 Environment variable. -# 3 Inline default. -# -# Attributes: -# Language: POSIX shell -# Machine: IBM SP -# -################################################################################ -# Set environment. -export VERBOSE=${VERBOSE:-"NO"} -if [[ "$VERBOSE" = "YES" ]] -then - echo $(date) EXECUTING $0 $* >&2 - set -x -fi -# Command line arguments. -export SFCGES=${1:-${SFCGES:?}} -export SFCANL=${2:-${SFCANL}} -# Directories. -export FIXGLOBAL=${FIXGLOBAL:-/nwprod/fix} -export EXECGLOBAL=${EXECGLOBAL:-/nwprod/exec} -export USHGLOBAL=${USHGLOBAL:-/nwprod/ush} -export DATA=${DATA:-$(pwd)} -export COMIN=${COMIN:-$(pwd)} -export COMOUT=${COMOUT:-$(pwd)} -# Filenames. -export XC=${XC} -export PREINP=${PREINP} -export SUFINP=${SUFINP} -export KEEPFH=${KEEPFH:-NO} -export JCAP=${JCAP:-382} -export SFCHDR=${SFCHDR:-${EXECGLOBAL}/global_sfchdr$XC} -export CYCLEXEC=${CYCLEXEC:-${EXECGLOBAL}/global_cycle$XC} -export FNGLAC=${FNGLAC:-${FIXGLOBAL}/global_glacier.2x2.grb} -export FNMXIC=${FNMXIC:-${FIXGLOBAL}/global_maxice.2x2.grb} -export FNTSFC=${FNTSFC:-${FIXGLOBAL}/cfs_oi2sst1x1monclim19822001.grb} -export FNSNOC=${FNSNOC:-${FIXGLOBAL}/global_snoclim.1.875.grb} -export FNZORC=${FNZORC:-${FIXGLOBAL}/global_zorclim.1x1.grb} -export FNALBC=${FNALBC:-${FIXGLOBAL}/global_albedo4.1x1.grb} -export FNAISC=${FNAISC:-${FIXGLOBAL}/cfs_ice1x1monclim19822001.grb} -export FNTG3C=${FNTG3C:-${FIXGLOBAL}/global_tg3clim.2.6x1.5.grb} -export FNVEGC=${FNVEGC:-${FIXGLOBAL}/global_vegfrac.0.144.decpercent.grb} -export FNVETC=${FNVETC:-${FIXGLOBAL}/global_vegtype.1x1.grb} -export FNSOTC=${FNSOTC:-${FIXGLOBAL}/global_soiltype.1x1.grb} -export FNSMCC=${FNSMCC:-${FIXGLOBAL}/global_soilmcpc.1x1.grb} -export FNVMNC=${FNVMNC:-${FIXGLOBAL}/global_shdmin.0.144x0.144.grb} -export FNVMXC=${FNVMXC:-${FIXGLOBAL}/global_shdmax.0.144x0.144.grb} -export FNSLPC=${FNSLPC:-${FIXGLOBAL}/global_slope.1x1.grb} -export FNABSC=${FNABSC:-${FIXGLOBAL}/global_snoalb.1x1.grb} -export FNMSKH=${FNMSKH:-${FIXGLOBAL}/seaice_newland.grb} -export FNOROG=${FNOROG:-${FIXGLOBAL}/global_orography.t$JCAP.grb} -export FNMASK=${FNMASK:-${FIXGLOBAL}/global_slmask.t$JCAP.grb} -export FNTSFA=${FNTSFA:-${COMIN}/${PREINP}sstgrb${SUFINP}} -export FNACNA=${FNACNA:-${COMIN}/${PREINP}engicegrb${SUFINP}} -export FNSNOA=${FNSNOA:-${COMIN}/${PREINP}snogrb${SUFINP}} -export SFCANL=${SFCANL:-${COMIN}/${PREINP}sfcanl} -export INISCRIPT=${INISCRIPT} -export ERRSCRIPT=${ERRSCRIPT:-'eval [[ $err = 0 ]]'} -export LOGSCRIPT=${LOGSCRIPT} -export ENDSCRIPT=${ENDSCRIPT} -# Other variables. -if [[ $KEEPFH = YES ]];then -export CDATE=${CDATE:-$($SFCHDR $SFCGES IDATE||echo 0)} -export FHOUR=${FHOUR:-$($SFCHDR $SFCGES FHOUR||echo 0)} -else -export CDATE=${CDATE:-$($SFCHDR $SFCGES VDATE||echo 0)} -export FHOUR=${FHOUR:-0} -fi -export LATB=${LATB:-$($SFCHDR $SFCGES LATB||echo 0)} -export LONB=${LONB:-$($SFCHDR $SFCGES LONB||echo 0)} -export LSOIL=${LSOIL:-4} -export FSMCL2=${FSMCL2:-60} -export DELTSFC=${DELTSFC:-$($SFCHDR $SFCGES FHOUR||echo 0)} -export CYCLVARS=${CYCLVARS} -export NTHREADS=${NTHREADS:-1} -export NTHSTACK=${NTHSTACK:-64000000} -export FILESTYLE=${FILESTYLE:-'X'} -export PGMOUT=${PGMOUT:-${pgmout:-'&1'}} -export PGMERR=${PGMERR:-${pgmerr:-'&2'}} -typeset -L1 l=$PGMOUT -[[ $l = '&' ]]&&a=''||a='>' -export REDOUT=${REDOUT:-'1>'$a} -typeset -L1 l=$PGMERR -[[ $l = '&' ]]&&a=''||a='>' -export REDERR=${REDERR:-'2>'$a} -# Set defaults -################################################################################ -# Preprocessing -$INISCRIPT -pwd=$(pwd) -echo "pwd = $pwd" -echo "DATA = $DATA" -if [[ -d $DATA ]] -then - mkdata=NO -else - mkdir -p $DATA - mkdata=YES -fi -cd $DATA||exit 99 -[[ -d $COMOUT ]]||mkdir -p $COMOUT - -################################################################################ -# Make surface analysis -export XLSMPOPTS="parthds=$NTHREADS:stack=$NTHSTACK" -export PGM=$CYCLEXEC -export pgm=$PGM -###$LOGSCRIPT - -rm $SFCANL -iy=$(echo $CDATE|cut -c1-4) -im=$(echo $CDATE|cut -c5-6) -id=$(echo $CDATE|cut -c7-8) -ih=$(echo $CDATE|cut -c9-10) -eval $CYCLEXEC <&2 -fi -exit $err diff --git a/ush/EnKF/global_cyclep.sh b/ush/EnKF/global_cyclep.sh deleted file mode 100755 index 0620537e77..0000000000 --- a/ush/EnKF/global_cyclep.sh +++ /dev/null @@ -1,373 +0,0 @@ -#!/bin/sh -################################################################################ -#### UNIX Script Documentation Block -# . . -# Script name: global_cycle.sh -# Script description: Makes a global spectral model surface analysis -# -# Author: Mark Iredell Org: NP23 Date: 2005-02-03 -# -# Abstract: This script makes a global spectral model surface analysis. -# -# Script history log: -# 2005-02-03 Iredell extracted from global_analysis.sh -# -# Usage: global_cycle.sh SFCGES SFCANL -# -# Input script positional parameters: -# 1 Input surface guess -# defaults to $SFCGES; required -# 2 Output surface analysis -# defaults to $SFCANL, then to ${COMOUT}/sfcanl -# -# Imported Shell Variables: -# SFCGES Input surface guess -# overridden by $1; required -# SFCANL Output surface analysis -# overridden by $5; defaults to ${COMOUT}/sfcanl -# FIXGLOBAL Directory for global fixed files -# defaults to /nwprod/fix -# EXECGLOBAL Directory for global executables -# defaults to /nwprod/exec -# USHGLOBAL Directory for global scripts -# defaults to /nwprod/ush -# DATA working directory -# (if nonexistent will be made, used and deleted) -# defaults to current working directory -# COMIN input directory -# defaults to current working directory -# COMOUT output directory -# (if nonexistent will be made) -# defaults to current working directory -# XC Suffix to add to executables -# defaults to none -# PREINP Prefix to add to input observation files -# defaults to none -# SUFINP Suffix to add to input observation files -# defaults to none -# NCP Copy command -# defaults to cp -# SFCHDR Command to read surface header -# defaults to ${EXECGLOBAL}/global_sfchdr$XC -# CYCLEXEC Surface cycle executable -# defaults to ${EXECGLOBAL}/global_cycle$XC -# FNGLAC Input glacier climatology GRIB file -# defaults to ${FIXGLOBAL}/global_glacier.2x2.grb -# FNMXIC Input maximum sea ice climatology GRIB file -# defaults to ${FIXGLOBAL}/global_maxice.2x2.grb -# FNTSFC Input SST climatology GRIB file -# defaults to ${FIXGLOBAL}/global_sstclim.2x2.grb -# FNSNOC Input snow climatology GRIB file -# defaults to ${FIXGLOBAL}/global_snoclim.1.875.grb -# FNZORC Input roughness climatology GRIB file -# defaults to ${FIXGLOBAL}/global_zorclim.1x1.grb -# FNALBC Input albedo climatology GRIB file -# defaults to ${FIXGLOBAL}/global_albedo4.1x1.grb -# FNAISC Input sea ice climatology GRIB file -# defaults to ${FIXGLOBAL}/global_iceclim.2x2.grb -# FNTG3C Input deep soil temperature climatology GRIB file -# defaults to ${FIXGLOBAL}/global_tg3clim.2.6x1.5.grb -# FNVEGC Input vegetation fraction climatology GRIB file -# defaults to ${FIXGLOBAL}/global_vegfrac.1x1.grb -# FNVETC Input vegetation type climatology GRIB file -# defaults to ${FIXGLOBAL}/global_vegtype.1x1.grb -# FNSOTC Input soil type climatology GRIB file -# defaults to ${FIXGLOBAL}/global_soiltype.1x1.grb -# FNSMCC Input soil moisture climatology GRIB file -# defaults to ${FIXGLOBAL}/global_soilmcpc.1x1.grb -# FNVMNC Input min veg frac climatology GRIB file -# defaults to ${FIXGLOBAL}/global_shdmin.0.144x0.144.grb -# FNVMXC Input max veg frac climatology GRIB file -# defaults to ${FIXGLOBAL}/global_shdmax.0.144x0.144.grb -# FNSLPC Input slope type climatology GRIB file -# defaults to ${FIXGLOBAL}/global_slope.1x1.grb -# FNABSC Input max snow albedo climatology GRIB file -# defaults to ${FIXGLOBAL}/global_snoalb.1x1.grb -# FNMSKH Input high resolution land mask GRIB file -# defaults to ${FIXGLOBAL}/seaice_newland.grb -# FNOROG Input orography GRIB file (horiz resolution dependent) -# defaults to ${FIXGLOBAL}/global_orography.t$JCAP.grb -# FNMASK Input land mask GRIB file (horiz resolution dependent) -# defaults to ${FIXGLOBAL}/global_slmask.t$JCAP.grb -# FNTSFA Input SST analysis GRIB file -# defaults to ${COMIN}/${PREINP}sstgrb${SUFINP} -# FNACNA Input sea ice analysis GRIB file -# defaults to ${COMIN}/${PREINP}engicegrb${SUFINP} -# FNSNOA Input snow analysis GRIB file -# defaults to ${COMIN}/${PREINP}snogrb${SUFINP} -# INISCRIPT Preprocessing script -# defaults to none -# LOGSCRIPT Log posting script -# defaults to none -# ERRSCRIPT Error processing script -# defaults to 'eval [[ $err = 0 ]]' -# ENDSCRIPT Postprocessing script -# defaults to none -# KEEPFH Flag to keep fhour the same (YES or NO) -# defaults to NO -# JCAP Spectral truncation -# defaults to 382 -# CDATE Output analysis date in yyyymmddhh format -# defaults to the value in the input surface file header -# FHOUR Output forecast hour -# defaults to the value in the input surface file header -# LATB Number of latitudes in surface cycling -# defaults to the value in the input surface file header -# LONB Number of longitudes in surface cycling -# defaults to the value in the input surface file header -# LSOIL Number of soil layers -# defaults to 4 -# FSMCL2 Scale in days to relax to soil moisture climatology -# defaults to 60 -# DELTSFC Cycling frequency in hours -# defaults to forecast hour of $SFCGES -# CYCLVARS Other namelist inputs to the cycle executable -# defaults to none set -# NTHREADS Number of threads -# defaults to 1 -# NTHSTACK Size of stack per thread -# defaults to 64000000 -# FILESTYLE File management style flag -# ('C' to copy to/from $DATA, 'L' for symbolic links in $DATA, -# 'X' to use XLFUNIT or symbolic links where appropriate) -# defaults to 'X' -# PGMOUT Executable standard output -# defaults to $pgmout, then to '&1' -# PGMERR Executable standard error -# defaults to $pgmerr, then to '&1' -# pgmout Executable standard output default -# pgmerr Executable standard error default -# REDOUT standard output redirect ('1>' or '1>>') -# defaults to '1>', or to '1>>' to append if $PGMOUT is a file -# REDERR standard error redirect ('2>' or '2>>') -# defaults to '2>', or to '2>>' to append if $PGMERR is a file -# VERBOSE Verbose flag (YES or NO) -# defaults to NO -# -# Exported Shell Variables: -# PGM Current program name -# pgm -# ERR Last return code -# err -# -# Modules and files referenced: -# scripts : $INISCRIPT -# $LOGSCRIPT -# $ERRSCRIPT -# $ENDSCRIPT -# -# programs : $CYCLEXEC -# -# fixed data : $FNGLAC -# $FNMXIC -# $FNTSFC -# $FNSNOC -# $FNZORC -# $FNALBC -# $FNAISC -# $FNTG3C -# $FNVEGC -# $FNVETC -# $FNSOTC -# $FNSMCC -# $FNVMNC -# $FNVMXC -# $FNSLPC -# $FNABSC -# $FNMSKH -# $FNOROG -# $FNMASK -# -# input data : $SFCGES -# $FNTSFA -# $FNACNA -# $FNSNOA -# -# output data: $SFCANL -# $PGMOUT -# $PGMERR -# -# Remarks: -# -# Condition codes -# 0 - no problem encountered -# >0 - some problem encountered -# -# Control variable resolution priority -# 1 Command line argument. -# 2 Environment variable. -# 3 Inline default. -# -# Attributes: -# Language: POSIX shell -# Machine: IBM SP -# -################################################################################ -# Set environment. -export VERBOSE=${VERBOSE:-"NO"} -if [[ "$VERBOSE" = "YES" ]] -then - echo $(date) EXECUTING $0 $* >&2 - set -x -fi -# Command line arguments. -export SFCGES=${1:-${SFCGES:?}} -export SFCANL=${2:-${SFCANL}} -# Directories. -export FIXGLOBAL=${FIXGLOBAL:-/nwprod/fix} -export EXECGLOBAL=${EXECGLOBAL:-/nwprod/exec} -export USHGLOBAL=${USHGLOBAL:-/nwprod/ush} -export DATA=${DATA:-$(pwd)} -export COMIN=${COMIN:-$(pwd)} -export COMOUT=${COMOUT:-$(pwd)} -# Filenames. -export XC=${XC} -export PREINP=${PREINP} -export SUFINP=${SUFINP} -export KEEPFH=${KEEPFH:-NO} -export JCAP=${JCAP:-382} -export SFCHDR=${SFCHDR:-${EXECGLOBAL}/global_sfchdr$XC} -export CYCLEXEC=${CYCLEXEC:-${EXECGLOBAL}/global_cycle$XC} -export FNGLAC=${FNGLAC:-${FIXGLOBAL}/global_glacier.2x2.grb} -export FNMXIC=${FNMXIC:-${FIXGLOBAL}/global_maxice.2x2.grb} -export FNTSFC=${FNTSFC:-${FIXGLOBAL}/cfs_oi2sst1x1monclim19822001.grb} -export FNSNOC=${FNSNOC:-${FIXGLOBAL}/global_snoclim.1.875.grb} -export FNZORC=${FNZORC:-${FIXGLOBAL}/global_zorclim.1x1.grb} -export FNALBC=${FNALBC:-${FIXGLOBAL}/global_albedo4.1x1.grb} -export FNAISC=${FNAISC:-${FIXGLOBAL}/cfs_ice1x1monclim19822001.grb} -export FNTG3C=${FNTG3C:-${FIXGLOBAL}/global_tg3clim.2.6x1.5.grb} -export FNVEGC=${FNVEGC:-${FIXGLOBAL}/global_vegfrac.0.144.decpercent.grb} -export FNVETC=${FNVETC:-${FIXGLOBAL}/global_vegtype.1x1.grb} -export FNSOTC=${FNSOTC:-${FIXGLOBAL}/global_soiltype.1x1.grb} -export FNSMCC=${FNSMCC:-${FIXGLOBAL}/global_soilmcpc.1x1.grb} -export FNVMNC=${FNVMNC:-${FIXGLOBAL}/global_shdmin.0.144x0.144.grb} -export FNVMXC=${FNVMXC:-${FIXGLOBAL}/global_shdmax.0.144x0.144.grb} -export FNSLPC=${FNSLPC:-${FIXGLOBAL}/global_slope.1x1.grb} -export FNABSC=${FNABSC:-${FIXGLOBAL}/global_snoalb.1x1.grb} -export FNMSKH=${FNMSKH:-${FIXGLOBAL}/seaice_newland.grb} -export FNOROG=${FNOROG:-${FIXGLOBAL}/global_orography.t$JCAP.grb} -export FNMASK=${FNMASK:-${FIXGLOBAL}/global_slmask.t$JCAP.grb} -export FNTSFA=${FNTSFA:-${COMIN}/${PREINP}sstgrb${SUFINP}} -export FNACNA=${FNACNA:-${COMIN}/${PREINP}engicegrb${SUFINP}} -export FNSNOA=${FNSNOA:-${COMIN}/${PREINP}snogrb${SUFINP}} -export SFCANL=${SFCANL:-${COMIN}/${PREINP}sfcanl} -export INISCRIPT=${INISCRIPT} -export ERRSCRIPT=${ERRSCRIPT:-'eval [[ $err = 0 ]]'} -export LOGSCRIPT=${LOGSCRIPT} -export ENDSCRIPT=${ENDSCRIPT} -# Other variables. -if [[ $KEEPFH = YES ]];then -export CDATE=${CDATE:-$($SFCHDR $SFCGES IDATE||echo 0)} -export FHOUR=${FHOUR:-$($SFCHDR $SFCGES FHOUR||echo 0)} -else -export CDATE=${CDATE:-$($SFCHDR $SFCGES VDATE||echo 0)} -export FHOUR=${FHOUR:-0} -fi -export LATB=${LATB:-$($SFCHDR $SFCGES LATB||echo 0)} -export LONB=${LONB:-$($SFCHDR $SFCGES LONB||echo 0)} -export LSOIL=${LSOIL:-4} -export FSMCL2=${FSMCL2:-60} -export DELTSFC=${DELTSFC:-$($SFCHDR $SFCGES FHOUR||echo 0)} -export CYCLVARS=${CYCLVARS} -export NTHREADS=${NTHREADS:-1} -export NTHSTACK=${NTHSTACK:-64000000} -export FILESTYLE=${FILESTYLE:-'X'} -export PGMOUT=${PGMOUT:-${pgmout:-'&1'}} -export PGMERR=${PGMERR:-${pgmerr:-'&2'}} -#typeset -L1 l=$PGMOUT -[[ $l = '&' ]]&&a=''||a='>' -export REDOUT=${REDOUT:-'1>'$a} -#typeset -L1 l=$PGMERR -[[ $l = '&' ]]&&a=''||a='>' -export REDERR=${REDERR:-'2>'$a} -# Set defaults -################################################################################ -# Preprocessing -$INISCRIPT -pwd=$(pwd) -if [[ -d $DATA ]] -then - mkdata=NO -else - mkdir -p $DATA - mkdata=YES -fi -cd $DATA||exit 99 -[[ -d $COMOUT ]]||mkdir -p $COMOUT - -################################################################################ -# Make surface analysis -export XLSMPOPTS="parthds=$NTHREADS:stack=$NTHSTACK" -export PGM=$CYCLEXEC -export pgm=$PGM -#$LOGSCRIPT - -rm $SFCANL -iy=$(echo $CDATE|cut -c1-4) -im=$(echo $CDATE|cut -c5-6) -id=$(echo $CDATE|cut -c7-8) -ih=$(echo $CDATE|cut -c9-10) - -cat $HOSTFILE -#echo "$MPICH/bin/mpirun_rsh -hostfile $HOSTFILE -np 1 $CYCLEXEC" -#eval $CYCLEXEC < fort.912 - &NAMCYC - idim=$LONB, jdim=$LATB, lsoil=$LSOIL, - iy=$iy, im=$im, id=$id, ih=$ih, fh=$FHOUR, - DELTSFC=$DELTSFC, - / - &NAMSFCD - FNBGSI="$SFCGES", - FNBGSO="$SFCANL", - FNOROG="$FNOROG", - FNMASK="$FNMASK", - LDEBUG=.false., - / - &NAMSFC - FNGLAC="$FNGLAC", - FNMXIC="$FNMXIC", - FNTSFC="$FNTSFC", - FNSNOC="$FNSNOC", - FNZORC="$FNZORC", - FNALBC="$FNALBC", - FNAISC="$FNAISC", - FNTG3C="$FNTG3C", - FNVEGC="$FNVEGC", - FNVETC="$FNVETC", - FNSOTC="$FNSOTC", - FNSMCC="$FNSMCC", - FNVMNC="$FNVMNC", - FNVMXC="$FNVMXC", - FNSLPC="$FNSLPC", - FNABSC="$FNABSC", - FNMSKH="$FNMSKH", - FNTSFA="$FNTSFA", - FNACNA="$FNACNA", - FNSNOA="$FNSNOA", - LDEBUG=.false., - FSMCL(2)=$FSMCL2, - FSMCL(3)=$FSMCL2, - FSMCL(4)=$FSMCL2, - $CYCLVARS - / -EOF -cat fort.912 -$MPICH/bin/mpirun_rsh -hostfile $HOSTFILE -np 1 $CYCLEXEC -#$MPICH/bin/mpiexec -hostfile $HOSTFILE -n 1 $CYCLEXEC - -export ERR=$? -export err=$ERR -#$ERRSCRIPT||exit 2 - -################################################################################ -# Postprocessing -cd $pwd -[[ $mkdata = YES ]]&&rmdir $DATA -#$ENDSCRIPT -set +x -if [[ "$VERBOSE" = "YES" ]] -then - echo $(date) EXITING $0 with return code $err >&2 -fi -exit $err diff --git a/ush/EnKF/global_postgp.sh b/ush/EnKF/global_postgp.sh deleted file mode 100755 index 2d2682b9ef..0000000000 --- a/ush/EnKF/global_postgp.sh +++ /dev/null @@ -1,282 +0,0 @@ - -################################################################################ -#### UNIX Script Documentation Block -# . . -# Script name: global_postgp.sh -# Script description: Posts the global pressure GRIB file -# -# Author: Mark Iredell Org: NP23 Date: 1999-05-01 -# -# Abstract: This script reads a single global sigma file and (optionally) -# a global flux file and creates a global pressure GRIB file. -# The resolution and generating code of the output GRIB file can also -# be set in the argument list. -# -# Script history log: -# 1999-05-01 Mark Iredell -# -# Usage: global_postgp.sh SIGINP FLXINP FLXIOUT PGBOUT PGIOUT IO JO IGEN -# -# Input script positional parameters: -# 1 Input sigma file -# defaults to $SIGINP -# 2 Input flux file -# defaults to $FLXINP -# 3 Output flux index file -# defaults to $FLXIOUT -# 4 Output pressure GRIB file -# defaults to $PGBOUT -# 5 Output pressure GRIB index file -# defaults to $PGIOUT, then to none -# 6 Number of longitudes -# defaults to $IO, then to resolution-dependent defaults -# 7 Number of latitudes -# defaults to $JO, then to resolution-dependent defaults -# 8 Model generating code, -# defaults to $IGEN, then to input sigma generating code -# -# Imported Shell Variables: -# SIGINP Input sigma file -# overridden by $1 -# FLXINP Input flux file -# overridden by $2 -# FLXIOUT Output flux index file -# overridden by $3 -# PGBOUT Output pressure GRIB file -# overridden by $4 -# PGIOUT Output pressure GRIB index file -# overridden by $5; defaults to none -# IO Number of longitudes -# overridden by $6; default is resolution-dependent -# JO Number of latitudes -# overridden by $7; default is resolution-dependent -# IGEN Model generating code -# overridden by $8; defaults to input sigma generating code -# EXECUTIL Directory for utility executables -# defaults to /nwprod/util/exec -# USHUTIL Directory for utility scripts -# defaults to /nwprod/util/ush -# EXECGLOBAL Directory for global executables -# defaults to /nwprod/exec -# USHGLOBAL Directory for global scripts -# defaults to /nwprod/ush -# DATA working directory -# (if nonexistent will be made, used and deleted) -# defaults to current working directory -# MP Multi-processing type ("p" or "s") -# defaults to "p", or "s" if LOADL_STEP_TYPE is not PARALLEL -# XC Suffix to add to executables -# defaults to none -# POSTGPEXEC Global post executable -# defaults to ${EXECGLOBAL}/global_postg$MP$XC -# GRBINDEX GRIB index maker -# defaults to ${EXECUTIL}/grbindex$XC -# ANOMCATSH Global anomaly GRIB script -# defaults to ${USHGLOBAL}/global_anomcat.sh -# POSTGPLIST File containing further namelist inputs -# defaults to /dev/null -# INISCRIPT Preprocessing script -# defaults to none -# LOGSCRIPT Log posting script -# defaults to none -# ERRSCRIPT Error processing script -# defaults to 'eval [[ $err = 0 ]]' -# ENDSCRIPT Postprocessing script -# defaults to none -# POSTGPVARS Other namelist inputs to the global post executable -# such as IDRT,KO,PO,KTT,KT,PT,KZZ,ZZ, -# NCPUS,MXBIT,IDS,POB,POT,MOO,MOOA,MOW,MOWA, -# ICEN,ICEN2,IENST,IENSI -# defaults to none set -# NTHREADS Number of threads -# defaults to 1 -# NTHSTACK Size of stack per thread -# defaults to 64000000 -# VERBOSE Verbose flag (YES or NO) -# defaults to NO -# PGMOUT Executable standard output -# defaults to $pgmout, then to '&1' -# PGMERR Executable standard error -# defaults to $pgmerr, then to '&1' -# pgmout Executable standard output default -# pgmerr Executable standard error default -# REDOUT standard output redirect ('1>' or '1>>') -# defaults to '1>', or to '1>>' to append if $PGMOUT is a file -# REDERR standard error redirect ('2>' or '2>>') -# defaults to '2>', or to '2>>' to append if $PGMERR is a file -# -# Exported Shell Variables: -# PGM Current program name -# pgm -# ERR Last return code -# err -# -# Modules and files referenced: -# scripts : $INISCRIPT -# $LOGSCRIPT -# $ERRSCRIPT -# $ENDSCRIPT -# $ANOMCATSH -# -# programs : $POSTGPEXEC -# $GRBINDEX -# -# input data : $1 or $SIGINP -# $2 or $SFCINP -# $POSTGPLIST -# -# output data: $3 or $FLXIOUT -# $4 or $PGBOUT -# $5 or $PGIOUT -# $PGMOUT -# $PGMERR -# -# scratch : ${DATA}/postgp.inp.sig -# ${DATA}/postgp.inp.flx -# ${DATA}/postgp.out.pgb -# -# Remarks: -# -# Condition codes -# 0 - no problem encountered -# >0 - some problem encountered -# -# Control variable resolution priority -# 1 Command line argument. -# 2 Environment variable. -# 3 Inline default. -# -# Attributes: -# Language: POSIX shell -# Machine: IBM SP -# -#### -################################################################################ -# Set environment. -export VERBOSE=${VERBOSE:-"NO"} -if [[ "$VERBOSE" = "YES" ]] -then - echo $(date) EXECUTING $0 $* >&2 - set -x -fi -# Command line arguments. -export SIGINP=${1:-${SIGINP}} -export FLXINP=${2:-${FLXINP}} -export FLXIOUT=${3:-${FLXIOUT}} -export PGBOUT=${4:-${PGBOUT}} -export PGIOUT=${5:-${PGIOUT}} -export IO=${6:-${IO:-0}} -export JO=${7:-${JO:-0}} -export IGEN=${8:-${IGEN:-0}} -# Directories. -export EXECUTIL=${EXECUTIL:-/nwprod/util/exec} -export USHUTIL=${USHUTIL:-/nwprod/util/ush} -export EXECGLOBAL=${EXECGLOBAL:-/nwprod/exec} -export USHGLOBAL=${USHGLOBAL:-/nwprod/ush} -export DATA=${DATA:-$(pwd)} -# Filenames. -export MP=${MP:-$([[ $LOADL_STEP_TYPE = PARALLEL ]]&&echo "p"||echo "s")} -export XC=${XC} -export POSTGPEXEC=${POSTGPEXEC:-${EXECGLOBAL}/global_postg$MP$XC} -export GRBINDEX=${GRBINDEX:-${EXECUTIL}/grbindex$XC} -export ANOMCATSH=${ANOMCATSH:-${USHGLOBAL}/global_anomcat.sh} -export POSTGPLIST=${POSTGPLIST:-/dev/null} -export INISCRIPT=${INISCRIPT} -export ERRSCRIPT=${ERRSCRIPT:-'eval [[ $err = 0 ]]'} -export LOGSCRIPT=${LOGSCRIPT} -export ENDSCRIPT=${ENDSCRIPT} -# Other variables. -export POSTGPVARS=${POSTGPVARS} -export NTHREADS=${NTHREADS:-1} -export NTHSTACK=${NTHSTACK:-64000000} -export PGMOUT=${PGMOUT:-${pgmout:-'&1'}} -export PGMERR=${PGMERR:-${pgmerr:-'&2'}} -typeset -L1 l=$PGMOUT -[[ $l = '&' ]]&&a=''||a='>' -export REDOUT=${REDOUT:-'1>'$a} -typeset -L1 l=$PGMERR -[[ $l = '&' ]]&&a=''||a='>' -export REDERR=${REDERR:-'2>'$a} -################################################################################ -# Preprocessing -$INISCRIPT -pwd=$(pwd) -if [[ -d $DATA ]] -then - mkdata=NO -else - mkdir -p $DATA - mkdata=YES -fi -cd $DATA||exit 99 -################################################################################ -# Post GRIB -export XLSMPOPTS="parthds=$NTHREADS:stack=$NTHSTACK" -export PGM=$POSTGPEXEC -export pgm=$PGM -$LOGSCRIPT -cat <postgp.inp.nml$$ - &NAMPGB - DDSIG='postgp.inp.sig$$', - DDFLX='postgp.inp.flx$$', - DDPGB='postgp.out.pgb$$', - IO=$IO, JO=$JO, IGEN=$IGEN, - $POSTGPVARS -EOF -cat $POSTGPLIST >>postgp.inp.nml$$ -cat <>postgp.inp.nml$$ - / -EOF -if [[ "$VERBOSE" = "YES" ]] -then - cat postgp.inp.nml$$ -fi -ln -sf $SIGINP postgp.inp.sig$$ -ln -sf $FLXINP postgp.inp.flx$$ -ln -sf $PGBOUT postgp.out.pgb$$ - -eval $POSTGPEXEC &2 -fi -exit $err diff --git a/ush/EnKF/global_postgpp.sh b/ush/EnKF/global_postgpp.sh deleted file mode 100755 index 6083863591..0000000000 --- a/ush/EnKF/global_postgpp.sh +++ /dev/null @@ -1,286 +0,0 @@ - -################################################################################ -#### UNIX Script Documentation Block -# . . -# Script name: global_postgp.sh -# Script description: Posts the global pressure GRIB file -# -# Author: Mark Iredell Org: NP23 Date: 1999-05-01 -# -# Abstract: This script reads a single global sigma file and (optionally) -# a global flux file and creates a global pressure GRIB file. -# The resolution and generating code of the output GRIB file can also -# be set in the argument list. -# -# Script history log: -# 1999-05-01 Mark Iredell -# -# Usage: global_postgp.sh SIGINP FLXINP FLXIOUT PGBOUT PGIOUT IO JO IGEN -# -# Input script positional parameters: -# 1 Input sigma file -# defaults to $SIGINP -# 2 Input flux file -# defaults to $FLXINP -# 3 Output flux index file -# defaults to $FLXIOUT -# 4 Output pressure GRIB file -# defaults to $PGBOUT -# 5 Output pressure GRIB index file -# defaults to $PGIOUT, then to none -# 6 Number of longitudes -# defaults to $IO, then to resolution-dependent defaults -# 7 Number of latitudes -# defaults to $JO, then to resolution-dependent defaults -# 8 Model generating code, -# defaults to $IGEN, then to input sigma generating code -# -# Imported Shell Variables: -# SIGINP Input sigma file -# overridden by $1 -# FLXINP Input flux file -# overridden by $2 -# FLXIOUT Output flux index file -# overridden by $3 -# PGBOUT Output pressure GRIB file -# overridden by $4 -# PGIOUT Output pressure GRIB index file -# overridden by $5; defaults to none -# IO Number of longitudes -# overridden by $6; default is resolution-dependent -# JO Number of latitudes -# overridden by $7; default is resolution-dependent -# IGEN Model generating code -# overridden by $8; defaults to input sigma generating code -# EXECUTIL Directory for utility executables -# defaults to /nwprod/util/exec -# USHUTIL Directory for utility scripts -# defaults to /nwprod/util/ush -# EXECGLOBAL Directory for global executables -# defaults to /nwprod/exec -# USHGLOBAL Directory for global scripts -# defaults to /nwprod/ush -# DATA working directory -# (if nonexistent will be made, used and deleted) -# defaults to current working directory -# MP Multi-processing type ("p" or "s") -# defaults to "p", or "s" if LOADL_STEP_TYPE is not PARALLEL -# XC Suffix to add to executables -# defaults to none -# POSTGPEXEC Global post executable -# defaults to ${EXECGLOBAL}/global_postg$MP$XC -# GRBINDEX GRIB index maker -# defaults to ${EXECUTIL}/grbindex$XC -# ANOMCATSH Global anomaly GRIB script -# defaults to ${USHGLOBAL}/global_anomcat.sh -# POSTGPLIST File containing further namelist inputs -# defaults to /dev/null -# INISCRIPT Preprocessing script -# defaults to none -# LOGSCRIPT Log posting script -# defaults to none -# ERRSCRIPT Error processing script -# defaults to 'eval [[ $err = 0 ]]' -# ENDSCRIPT Postprocessing script -# defaults to none -# POSTGPVARS Other namelist inputs to the global post executable -# such as IDRT,KO,PO,KTT,KT,PT,KZZ,ZZ, -# NCPUS,MXBIT,IDS,POB,POT,MOO,MOOA,MOW,MOWA, -# ICEN,ICEN2,IENST,IENSI -# defaults to none set -# NTHREADS Number of threads -# defaults to 1 -# NTHSTACK Size of stack per thread -# defaults to 64000000 -# VERBOSE Verbose flag (YES or NO) -# defaults to NO -# PGMOUT Executable standard output -# defaults to $pgmout, then to '&1' -# PGMERR Executable standard error -# defaults to $pgmerr, then to '&1' -# pgmout Executable standard output default -# pgmerr Executable standard error default -# REDOUT standard output redirect ('1>' or '1>>') -# defaults to '1>', or to '1>>' to append if $PGMOUT is a file -# REDERR standard error redirect ('2>' or '2>>') -# defaults to '2>', or to '2>>' to append if $PGMERR is a file -# -# Exported Shell Variables: -# PGM Current program name -# pgm -# ERR Last return code -# err -# -# Modules and files referenced: -# scripts : $INISCRIPT -# $LOGSCRIPT -# $ERRSCRIPT -# $ENDSCRIPT -# $ANOMCATSH -# -# programs : $POSTGPEXEC -# $GRBINDEX -# -# input data : $1 or $SIGINP -# $2 or $SFCINP -# $POSTGPLIST -# -# output data: $3 or $FLXIOUT -# $4 or $PGBOUT -# $5 or $PGIOUT -# $PGMOUT -# $PGMERR -# -# scratch : ${DATA}/postgp.inp.sig -# ${DATA}/postgp.inp.flx -# ${DATA}/postgp.out.pgb -# -# Remarks: -# -# Condition codes -# 0 - no problem encountered -# >0 - some problem encountered -# -# Control variable resolution priority -# 1 Command line argument. -# 2 Environment variable. -# 3 Inline default. -# -# Attributes: -# Language: POSIX shell -# Machine: IBM SP -# -#### -################################################################################ -# Set environment. -export VERBOSE=${VERBOSE:-"NO"} -if [[ "$VERBOSE" = "YES" ]] -then - echo $(date) EXECUTING $0 $* >&2 - set -x -fi -# Command line arguments. -export SIGINP=${1:-${SIGINP}} -export FLXINP=${2:-${FLXINP}} -export FLXIOUT=${3:-${FLXIOUT}} -export PGBOUT=${4:-${PGBOUT}} -export PGIOUT=${5:-${PGIOUT}} -export IO=${6:-${IO:-0}} -export JO=${7:-${JO:-0}} -export IGEN=${8:-${IGEN:-0}} -# Directories. -export EXECUTIL=${EXECUTIL:-/tg4/projects/reanl/whitaker/ncepgfs/bin} -export USHUTIL=${USHUTIL:-/tg4/projects/reanl/whitaker/ncepgfs/scripts} -export EXECGLOBAL=${EXECGLOBAL:-/tg4/projects/reanl/whitaker/ncepgfs/bin} -export USHGLOBAL=${USHGLOBAL:-/tg4/projects/reanl/whitaker/ncepgfs/scripts} -export DATA=${DATA:-$(pwd)} -# Filenames. -export MP=${MP:-$([[ $LOADL_STEP_TYPE = PARALLEL ]]&&echo "p"||echo "s")} -export XC=${XC} -export POSTGPEXEC=${POSTGPEXEC:-${EXECGLOBAL}/global_postgs} -export GRBINDEX=${GRBINDEX:-${EXECUTIL}/grbindex$XC} -export ANOMCATSH=${ANOMCATSH:-${USHGLOBAL}/global_anomcat.sh} -export POSTGPLIST=${POSTGPLIST:-/dev/null} -export INISCRIPT=${INISCRIPT} -export ERRSCRIPT=${ERRSCRIPT:-'eval [[ $err = 0 ]]'} -export LOGSCRIPT=${LOGSCRIPT} -export ENDSCRIPT=${ENDSCRIPT} -# Other variables. -export POSTGPVARS=${POSTGPVARS} -export NTHREADS=${NTHREADS:-1} -export NTHSTACK=${NTHSTACK:-64000000} -export PGMOUT=${PGMOUT:-${pgmout:-'&1'}} -export PGMERR=${PGMERR:-${pgmerr:-'&2'}} -#typeset -L1 l=$PGMOUT -[[ $l = '&' ]]&&a=''||a='>' -export REDOUT=${REDOUT:-'1>'$a} -#typeset -L1 l=$PGMERR -[[ $l = '&' ]]&&a=''||a='>' -export REDERR=${REDERR:-'2>'$a} -################################################################################ -# Preprocessing -$INISCRIPT -pwd=$(pwd) -if [[ -d $DATA ]] -then - mkdata=NO -else - mkdir -p $DATA - mkdata=YES -fi -cd $DATA||exit 99 -################################################################################ -# Post GRIB -export XLSMPOPTS="parthds=$NTHREADS:stack=$NTHSTACK" -export PGM=$POSTGPEXEC -export pgm=$PGM -$LOGSCRIPT -cat <global_postgp.nml - &NAMPGB - DDSIG='postgp.inp.sig$$', - DDFLX='postgp.inp.flx$$', - DDPGB='postgp.out.pgb$$', - IO=$IO, JO=$JO, IGEN=$IGEN, - $POSTGPVARS -EOF - cat $POSTGPLIST >>global_postgp.nml - cat <>global_postgp.nml - / -EOF -#if [[ "$VERBOSE" = "YES" ]] -#then - cat global_postgp.nml -#fi -ln -sf $SIGINP postgp.inp.sig$$ -ls -l postgp.inp.sig$$ -ln -sf $FLXINP postgp.inp.flx$$ -ls -l postgp.inp.flx$$ -ln -sf $PGBOUT postgp.out.pgb$$ - -#eval $POSTGPEXEC -$MPICH/bin/mpirun_rsh -hostfile $HOSTFILE -np 1 $POSTGPEXEC -#$MPICH/bin/mpiexec -hostfile $HOSTFILE -n 1 $POSTGPEXEC - -export ERR=$? -export err=$ERR -$ERRSCRIPT||exit 2 -rm global_postgp.nml postgp.inp.sig$$ postgp.inp.flx$$ postgp.out.pgb$$ -################################################################################ -# Anomaly concatenation -if [[ -x $ANOMCATSH ]] -then - if [[ -n $PGIOUT ]] - then - $GRBINDEX $PGBOUT $PGIOUT - fi - export PGM=$ANOMCATSH - export pgm=$PGM - $LOGSCRIPT - - eval $ANOMCATSH $PGBOUT $PGIOUT $REDOUT$PGMOUT $REDERR$PGMERR - - export ERR=$? - export err=$ERR - $ERRSCRIPT||exit 3 -fi -################################################################################ -# Make GRIB index file -#if [[ -n $PGIOUT ]] -#then -# $GRBINDEX $PGBOUT $PGIOUT -#fi -#if [[ -r $FLXINP && -n $FLXIOUT ]] -#then -# $GRBINDEX $FLXINP $FLXIOUT -#fi -################################################################################ -# Postprocessing -cd $pwd -[[ $mkdata = YES ]]&&rmdir $DATA -$ENDSCRIPT -set +x -if [[ "$VERBOSE" = "YES" ]] -then - echo $(date) EXITING $0 with return code $err >&2 -fi -exit $err diff --git a/ush/EnKF/incdate b/ush/EnKF/incdate deleted file mode 100755 index 7a55acbd0f..0000000000 --- a/ush/EnKF/incdate +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -if [ $# != 2 ]; then - echo "usage: incdate YYYYMMDDHH hrs" - echo "where YYYYMMDDHH is a 10 character date string (e.g. 2002050312)" - echo "and hrs is integer number of hours to increment YYYMMDDHH" - exit 1 -fi -/opt/freeware/bin/date -u -d "${1:0:4}-${1:4:2}-${1:6:2} ${1:8:2}:00:00 UTC $2 hour" +%Y%m%d%H diff --git a/ush/EnKF/obsproc_ensmean.sh b/ush/EnKF/obsproc_ensmean.sh deleted file mode 100755 index 602fa1c8e7..0000000000 --- a/ush/EnKF/obsproc_ensmean.sh +++ /dev/null @@ -1,115 +0,0 @@ -#!/bin/tcsh - -# import parameters -source /global/save/${LOGNAME}/enkf/work/scripts_ncep/current.enkfparms -########################################################################## -# current cycle starts - -set username = `whoami` - -setenv startupenv "${datapath}/analdate.csh" -source $startupenv - -setenv SUB "/u/wx23sm/bin/sub_vapor" -echo "SUB= ${SUB}" - -#------------------------------------------------------------------------ -mkdir -p $datapath -mkdir -p $logdir - -echo "BaseDir: ${basedir}" -echo "EnKFBin: ${enkfbin}" -echo "DataPath: ${datapath}" -echo "LogDir: ${logdir}" - -############################################################################ -# Main Program -# Please do not edit the code below; it is not recommended except lines relevant to getsfcensmean.csh. - -env -echo "starting the cycle" - -set ncycles=10 -set ncycle=1 -echo "ncycle = " $ncycle "and ncycles = " $ncycles - -# substringing to get yr, mon, day, hr info -setenv yr `echo $analdate | cut -c1-4` -setenv mon `echo $analdate | cut -c5-6` -setenv day `echo $analdate | cut -c7-8` -setenv hr `echo $analdate | cut -c9-10` -setenv ANALHR $hr -# set environment analdate -setenv datapath2 "${datapath}/${analdate}/" - -# current analysis time. -setenv analdate $analdate -# previous analysis time. -setenv analdatem1 `${incdate} $analdate -$ANALINC` -# next analysis time. -setenv analdatep1 `${incdate} $analdate $ANALINC` -setenv datapathprev "${datapath}/${analdatem1}/" -setenv hrp1 `echo $analdatep1 | cut -c9-10` -setenv hrm1 `echo $analdatem1 | cut -c9-10` -setenv datapathp1 "${datapath}/${analdatep1}/" -setenv datapathm1 "${datapath}/${analdatem1}/" -mkdir -p $datapathp1 - -date -echo "analdate minus 1: $analdatem1" -echo "analdate: $analdate" -echo "analdate plus 1: $analdatep1" - -# make log dir for analdate -setenv current_logdir "${logdir}/ensda_out_${analdate}" -echo "Current LogDir: ${current_logdir}" -mkdir -p ${current_logdir} - -echo "starting ens mean computation `date`" -set fh=${FHMIN} -while ($fh <= $FHMAX) - set charfhr="fhr`printf %02i $fh`" - if ($cleanup_ensmean == 'true' || ($cleanup_ensmean == 'false' && { /bin/test ! -s ${datapath}/${analdate}/bfg_${analdate}_${charfhr}_ensmean })) then - ${enkfexec}/getsfcensmean.x ${datapath}/${analdate}/ bfg_${analdate}_${charfhr}_ensmean bfg_${analdate}_${charfhr} ${nanals} - endif - @ fh = $fh + $FHOUT -end -wait - -set fh=$FHOUT # use this if getpstend is run -while ($fh <= $FHMAX) - set charfhr="fhr`printf %02i $fh`" - if ($cleanup_ensmean == 'true' || ($cleanup_ensmean == 'false' && { /bin/test ! -s ${datapath}/${analdate}/sfg_${analdate}_${charfhr}_ensmean })) then - ${enkfexec}/getsigensmean.x ${datapath}/${analdate}/ sfg_${analdate}_${charfhr}_ensmean sfg_${analdate}_${charfhr} ${nanals} ${charfhr} - endif - @ fh = $fh + $FHOUT -end -wait -echo "done ens mean computation `date`" - -# remove obsfiles from the previous cycle -if ($cleanup_obs == 'true') then - /bin/rm -f ${datapathp1}/*abias - /bin/rm -f ${datapathp1}/*satang - /bin/rm -f ${datapath2}/diag*ensmean - set nanal=1 - while ($nanal <= $nanals) - set charnanal="mem`printf %03i $nanal`" - /bin/rm -f ${datapath2}/diag*${charnanal} - @ nanal = $nanal + 1 - end - /bin/rm -f ${datapath2}/hxprime* -endif - -set niter=1 -set alldone='no' -echo "${analdate} compute forward operator `date`" - -setenv NSTART 61 -setenv NEND 61 -setenv SETUP "lread_obs_save=.true.,lread_obs_skip=.false.,lwrite_predterms=.true.," -echo "NSTART=$NSTART" -echo "NEND=$NEND" -$SUB -a GDAS-T2O -e NSTART,NEND,SETUP -g devonprod -j enkf_a5_obsensmean -o ${current_logdir}/run_obsensmean.out -p 32/1/N -q dev -r 4096/1 -t 00:40:00 -u ${LOGNAME} -w +0000 ${enkfscripts}/${runobs} - -exit 0 diff --git a/ush/EnKF/obsproc_multi.sh b/ush/EnKF/obsproc_multi.sh deleted file mode 100755 index 2ad2d9eaf4..0000000000 --- a/ush/EnKF/obsproc_multi.sh +++ /dev/null @@ -1,110 +0,0 @@ -#!/bin/tcsh - -# import parameters -source /global/save/${LOGNAME}/enkf/work/scripts_ncep/current.enkfparms -########################################################################## -# current cycle starts - -set username = `whoami` - -setenv startupenv "${datapath}/analdate.csh" -source $startupenv - -setenv SUB "/u/wx23sm/bin/sub_vapor" -echo "SUB= ${SUB}" - -#------------------------------------------------------------------------ -mkdir -p $datapath -mkdir -p $logdir - -echo "BaseDir: ${basedir}" -echo "EnKFBin: ${enkfbin}" -echo "DataPath: ${datapath}" -echo "LogDir: ${logdir}" - -############################################################################ -# Main Program -# Please do not edit the code below; it is not recommended except lines relevant to getsfcensmean.csh. - -env -echo "starting the cycle" - -set ncycles=10 -set ncycle=1 -echo "ncycle = " $ncycle "and ncycles = " $ncycles - -# substringing to get yr, mon, day, hr info -setenv yr `echo $analdate | cut -c1-4` -setenv mon `echo $analdate | cut -c5-6` -setenv day `echo $analdate | cut -c7-8` -setenv hr `echo $analdate | cut -c9-10` -setenv ANALHR $hr -# set environment analdate -setenv datapath2 "${datapath}/${analdate}/" - -# current analysis time. -setenv analdate $analdate -# previous analysis time. -setenv analdatem1 `${incdate} $analdate -$ANALINC` -# next analysis time. -setenv analdatep1 `${incdate} $analdate $ANALINC` -setenv datapathprev "${datapath}/${analdatem1}/" -setenv hrp1 `echo $analdatep1 | cut -c9-10` -setenv hrm1 `echo $analdatem1 | cut -c9-10` -setenv datapathp1 "${datapath}/${analdatep1}/" -setenv datapathm1 "${datapath}/${analdatem1}/" -mkdir -p $datapathp1 - -date -echo "analdate minus 1: $analdatem1" -echo "analdate: $analdate" -echo "analdate plus 1: $analdatep1" - -# make log dir for analdate -setenv current_logdir "${logdir}/ensda_out_${analdate}" -echo "Current LogDir: ${current_logdir}" -mkdir -p ${current_logdir} - -set alldone='no' -echo "${analdate} compute forward operator `date`" - -setenv SETUP "lread_obs_save=.false.,lread_obs_skip=.true.,lwrite_predterms=.true.," - -## Submit chunks of jobs based on nanals/nmem_per_node settings - @ num_jobs = $nanals / $nmem_per_node - set max_jobs=50 - if ($num_jobs >= $max_jobs) then - echo "THERE ARE TOO MANY JOB STEPS REQUIRED, NUM_JOBS = $num_jobs" - echo "CHECK NANALS & NMEM_PER_NODE IN CONFIG" - echo "STOPPING SCRIPTS HERE" - exit 1 - else - echo "there are $num_jobs job steps required for first ges processing" - endif - - set job=1 - set n1=1 - set n2=$nmem_per_node - - while ($job <= $num_jobs) - setenv NSTART $n1 - setenv NEND $n2 - echo "NSTART=$NSTART" - echo "NEND=$NEND" - $SUB -a GDAS-T2O -e NSTART,NEND,SETUP -g devonprod -j enkf_obs$job -o ${current_logdir}/run_obs$job.out -p 32/1/N -q dev -r 4096/1 -t 00:40:00 -u ${LOGNAME} -w +0000 ${enkfscripts}/${runobs} - - @ job = $job + 1 - @ n1 = $n1 + $nmem_per_node - @ n2 = $n2 + $nmem_per_node - - if ($n2 > $nanals) then - @ n2 = $nanals - else -## - endif - end - -# submit script to do file checking, setup to wait 15 minutes for now -$SUB -a GDAS-T2O -g devonprod -j enkf_check_obsfiles -o ${current_logdir}/check_obs_files.out -q dev -r 1000 -t 03:00:00 -u ${LOGNAME} -w +0015 ${enkfscripts}/check_obsfiles_serial.sh - -exit 0 diff --git a/ush/EnKF/para_config.gdas_enkf_fcst b/ush/EnKF/para_config.gdas_enkf_fcst deleted file mode 100755 index bca0d190d8..0000000000 --- a/ush/EnKF/para_config.gdas_enkf_fcst +++ /dev/null @@ -1,63 +0,0 @@ -# Set variables -export NWROOT=/nwprod -export COM_IN=/global/noscrub/$LOGNAME/com/gfs/para -export SENDDBN=NO -export SAVEGES=NO -export GETGES_NWG=/global/noscrub/$LOGNAME -export gesenvir=para -export GETGES_COM=/global/noscrub/$LOGNAME/com -export GESROOT=/ptmpd3/$LOGNAME/nwges -export KEEPDATA=YES - - -# Set paths -export HOMEgdas=$NWTEST/gdas.${gdas_ver} -export HOMEgsm=$NWTEST/global_shared.${global_shared_ver} - - -# Set fix files - - -# Set script and executable - - -# Dev para jobs -export PEND=/global/save/emc.glopara/svn/gfs/trunk/para/bin/pend -export ERRSCRIPT='eval [[ $err = 0 ]]' - - -# Set beginning and ending ensemble member on EnKF group. -if [[ $ENSGRP -eq 1 ]]; then - export ENSBEG=1 - export ENSEND=8 -elif [[ $ENSGRP -eq 2 ]]; then - export ENSBEG=9 - export ENSEND=16 -elif [[ $ENSGRP -eq 3 ]]; then - export ENSBEG=17 - export ENSEND=24 -elif [[ $ENSGRP -eq 4 ]]; then - export ENSBEG=25 - export ENSEND=32 -elif [[ $ENSGRP -eq 5 ]]; then - export ENSBEG=33 - export ENSEND=40 -elif [[ $ENSGRP -eq 6 ]]; then - export ENSBEG=41 - export ENSEND=48 -elif [[ $ENSGRP -eq 7 ]]; then - export ENSBEG=49 - export ENSEND=56 -elif [[ $ENSGRP -eq 8 ]]; then - export ENSBEG=57 - export ENSEND=64 -elif [[ $ENSGRP -eq 9 ]]; then - export ENSBEG=65 - export ENSEND=72 -elif [[ $ENSGRP -eq 10 ]]; then - export ENSBEG=73 - export ENSEND=80 -else - echo "***ERROR*** INVALID ENSGRP=$ENSGRP" - exit -fi diff --git a/ush/EnKF/para_config.gdas_enkf_inflate_recenter b/ush/EnKF/para_config.gdas_enkf_inflate_recenter deleted file mode 100755 index ea92bdf641..0000000000 --- a/ush/EnKF/para_config.gdas_enkf_inflate_recenter +++ /dev/null @@ -1,28 +0,0 @@ -# Set variables -export NWROOT=/nwprod -export COM_IN=/global/noscrub/$LOGNAME/com/gfs/para -export SENDDBN=NO -export SAVEGES=NO -export SENDCOM=YES -export GETGES_NWG=/global/noscrub/$LOGNAME -export gesenvir=para -export GETGES_COM=/global/noscrub/$LOGNAME/com -export GESROOT=/ptmpd3/$LOGNAME/nwges -export KEEPDATA=YES - - -# Set paths -export HOMEgsi=$NWTEST/global_shared.${global_shared_ver} -export HOMEgsm=$NWTEST/global_shared.${global_shared_ver} -export HOMEgdas=$NWTEST/gdas.${gdas_ver} - - -# Set fix files - - -# Set scripts and executables - - -# Dev para jobs -export PEND=/global/save/emc.glopara/svn/gfs/trunk/para/bin/pend -export ERRSCRIPT='eval [[ $err = 0 ]]' diff --git a/ush/EnKF/para_config.gdas_enkf_innovate_obs b/ush/EnKF/para_config.gdas_enkf_innovate_obs deleted file mode 100755 index 70fd8f6643..0000000000 --- a/ush/EnKF/para_config.gdas_enkf_innovate_obs +++ /dev/null @@ -1,65 +0,0 @@ -# Set variables -export NWROOT=/nwprod -export COM_IN=/global/noscrub/$LOGNAME/com/gfs/para -export SENDDBN=NO -export SAVEGES=NO -export SENDCOM=NO -export GETGES_NWG=/global/noscrub/$LOGNAME -export gesenvir=para -export GETGES_COM=/global/noscrub/$LOGNAME/com -export GESROOT=/ptmpd3/$LOGNAME/nwges -export KEEPDATA=YES - - -# Set paths -export HOMEgsi=$NWTEST/global_shared.${global_shared_ver} -export HOMEgsm=$NWTEST/global_shared.${global_shared_ver} -export HOMEgdas=$NWTEST/gdas.${gdas_ver} - - -# Set fix files - - -# Set script and executable - - -# Dev para jobs -export PEND=/global/save/emc.glopara/svn/gfs/trunk/para/bin/pend -export ERRSCRIPT='eval [[ $err = 0 ]]' - - -# Set beginning and ending ensemble member on EnKF group. -if [[ $ENSGRP -eq 1 ]]; then - export ENSBEG=1 - export ENSEND=8 -elif [[ $ENSGRP -eq 2 ]]; then - export ENSBEG=9 - export ENSEND=16 -elif [[ $ENSGRP -eq 3 ]]; then - export ENSBEG=17 - export ENSEND=24 -elif [[ $ENSGRP -eq 4 ]]; then - export ENSBEG=25 - export ENSEND=32 -elif [[ $ENSGRP -eq 5 ]]; then - export ENSBEG=33 - export ENSEND=40 -elif [[ $ENSGRP -eq 6 ]]; then - export ENSBEG=41 - export ENSEND=48 -elif [[ $ENSGRP -eq 7 ]]; then - export ENSBEG=49 - export ENSEND=56 -elif [[ $ENSGRP -eq 8 ]]; then - export ENSBEG=57 - export ENSEND=64 -elif [[ $ENSGRP -eq 9 ]]; then - export ENSBEG=65 - export ENSEND=72 -elif [[ $ENSGRP -eq 10 ]]; then - export ENSBEG=73 - export ENSEND=80 -else - echo "***ERROR*** INVALID ENSGRP=$ENSGRP" - exit -fi diff --git a/ush/EnKF/para_config.gdas_enkf_post b/ush/EnKF/para_config.gdas_enkf_post deleted file mode 100755 index dde456f501..0000000000 --- a/ush/EnKF/para_config.gdas_enkf_post +++ /dev/null @@ -1,27 +0,0 @@ -# Set variables -export NWROOT=/nwprod -export COM_IN=/global/noscrub/$LOGNAME/com/gfs/para -export SENDDBN=NO -export SAVEGES=NO -export SENDCOM=YES -export GETGES_NWG=/global/noscrub/$LOGNAME -export gesenvir=para -export GETGES_COM=/global/noscrub/$LOGNAME/com -export GESROOT=/ptmpd3/$LOGNAME/nwges -export KEEPDATA=YES - - -# Set paths -export HOMEgdas=$NWTEST/gdas.${gdas_ver} -export HOMEgsm=$NWTEST/global_shared.${global_shared_ver} - - -# Set fix files - - -# Set scripts and executables - - -# Dev para jobs -export PEND=/global/save/emc.glopara/svn/gfs/trunk/para/bin/pend -export ERRSCRIPT='eval [[ $err = 0 ]]' diff --git a/ush/EnKF/para_config.gdas_enkf_select_obs b/ush/EnKF/para_config.gdas_enkf_select_obs deleted file mode 100755 index 48430fec26..0000000000 --- a/ush/EnKF/para_config.gdas_enkf_select_obs +++ /dev/null @@ -1,28 +0,0 @@ -# Set variables -export NWROOT=/nwprod -export COM_IN=/global/noscrub/$LOGNAME/com/gfs/para -export SENDDBN=NO -export SAVEGES=NO -export SENDCOM=NO -export GETGES_NWG=/global/noscrub/$LOGNAME -export gesenvir=para -export GETGES_COM=/global/noscrub/$LOGNAME/com -export GESROOT=/ptmpd3/$LOGNAME/nwges -export KEEPDATA=YES - - -# Set paths -export HOMEgsi=$NWTEST/global_shared.${global_shared_ver} -export HOMEgsm=$NWTEST/global_shared.${global_shared_ver} -export HOMEgdas=$NWTEST/gdas.${gdas_ver} - - -# Set fix files - - -# Set script and executable - - -# Dev para jobs -export PEND=/global/save/emc.glopara/svn/gfs/trunk/para/bin/pend -export ERRSCRIPT='eval [[ $err = 0 ]]' diff --git a/ush/EnKF/para_config.gdas_enkf_update b/ush/EnKF/para_config.gdas_enkf_update deleted file mode 100755 index ea92bdf641..0000000000 --- a/ush/EnKF/para_config.gdas_enkf_update +++ /dev/null @@ -1,28 +0,0 @@ -# Set variables -export NWROOT=/nwprod -export COM_IN=/global/noscrub/$LOGNAME/com/gfs/para -export SENDDBN=NO -export SAVEGES=NO -export SENDCOM=YES -export GETGES_NWG=/global/noscrub/$LOGNAME -export gesenvir=para -export GETGES_COM=/global/noscrub/$LOGNAME/com -export GESROOT=/ptmpd3/$LOGNAME/nwges -export KEEPDATA=YES - - -# Set paths -export HOMEgsi=$NWTEST/global_shared.${global_shared_ver} -export HOMEgsm=$NWTEST/global_shared.${global_shared_ver} -export HOMEgdas=$NWTEST/gdas.${gdas_ver} - - -# Set fix files - - -# Set scripts and executables - - -# Dev para jobs -export PEND=/global/save/emc.glopara/svn/gfs/trunk/para/bin/pend -export ERRSCRIPT='eval [[ $err = 0 ]]' diff --git a/ush/EnKF/randates.py b/ush/EnKF/randates.py deleted file mode 100755 index e0b28b0528..0000000000 --- a/ush/EnKF/randates.py +++ /dev/null @@ -1,10 +0,0 @@ -import sys -from dateutils import * -import random -date1 = sys.argv[1] -date2 = sys.argv[2] -nanals = int(sys.argv[3]) -dates = random.sample(daterange(date1,date2,6),nanals) -for date in dates: - datem1 = dateshift(date,-24) - print '%s %s' % (date,datem1) diff --git a/ush/EnKF/rerun_fg.sh b/ush/EnKF/rerun_fg.sh deleted file mode 100755 index 22a849fd87..0000000000 --- a/ush/EnKF/rerun_fg.sh +++ /dev/null @@ -1,90 +0,0 @@ -#!/bin/tcsh - -source /global/save/${LOGNAME}/enkf/work/scripts_ncep/current.enkfparms - -########################################################################## -# current cycle starts - -set username = `whoami` - -setenv startupenv "${datapath}/analdate.csh" -source $startupenv - -setenv SUB "/u/wx23sm/bin/sub_vapor" -echo "SUB= ${SUB}" -#------------------------------------------------------------------------ -mkdir -p $datapath -mkdir -p $logdir - -echo "BaseDir: ${basedir}" -echo "EnKFBin: ${enkfbin}" -echo "DataPath: ${datapath}" -echo "LogDir: ${logdir}" - -############################################################################ -# Main Program -# Please do not edit the code below; it is not recommended except lines relevant to getsfcensmean.csh. - -env -echo "starting the cycle" - -set ncycles=10 -set ncycle=1 -##while ($ncycle <= $ncycles) -echo "ncycle = " $ncycle "and ncycles = " $ncycles - -# substringing to get yr, mon, day, hr info -setenv yr `echo $analdate | cut -c1-4` -setenv mon `echo $analdate | cut -c5-6` -setenv day `echo $analdate | cut -c7-8` -setenv hr `echo $analdate | cut -c9-10` -setenv ANALHR $hr -# set environment analdate -setenv datapath2 "${datapath}/${analdate}/" -# copy hostfileall to working dir. -##/bin/cp -f ${datapath}/hostfileall ${datapath2} - -# current analysis time. -setenv analdate $analdate -# previous analysis time. -setenv analdatem1 `${incdate} $analdate -$ANALINC` -# next analysis time. -setenv analdatep1 `${incdate} $analdate $ANALINC` -setenv datapathprev "${datapath}/${analdatem1}/" -setenv hrp1 `echo $analdatep1 | cut -c9-10` -setenv hrm1 `echo $analdatem1 | cut -c9-10` -setenv datapathp1 "${datapath}/${analdatep1}/" -setenv datapathm1 "${datapath}/${analdatem1}/" -mkdir -p $datapathp1 - -date -echo "analdate minus 1: $analdatem1" -echo "analdate: $analdate" -echo "analdate plus 1: $analdatep1" - -# make log dir for analdate -setenv current_logdir "${logdir}/ensda_out_${analdate}" -echo "Current LogDir: ${current_logdir}" -mkdir -p ${current_logdir} - - -# run ensemble first guess. -# first, clean up old first guesses. -if ($cleanup_fg == 'true') then -set fhr=$FHMIN -while ( $fhr <= $FHMAX) - set charfhr="fhr`printf %02i $fhr`" - /bin/rm -f ${datapath}${analdatep1}/sfg_${analdatep1}_${charfhr}*_* - /bin/rm -f ${datapath}${analdatep1}/bfg_${analdatep1}_${charfhr}*_* - @ fhr = $fhr + $FHOUT -end -endif -mkdir -p ${datapath}${analdatep1} - -setenv NSTART 1 -setenv NEND 60 -echo "NSTART=$NSTART" -echo "NEND=$NEND" -$SUB -a GDAS-T2O -e NSTART,NEND -g devonprod -j enkf_a5_fg_rerun -o ${current_logdir}/run_fg_rerun.out -p 32 -q dev -r 1000 -t 02:00:00 -u ${LOGNAME} -w +0000 ${enkfscripts}/${fg_gfs} - -exit 0 diff --git a/ush/EnKF/rhist_saveenkf.sh b/ush/EnKF/rhist_saveenkf.sh deleted file mode 100755 index 784d26ed23..0000000000 --- a/ush/EnKF/rhist_saveenkf.sh +++ /dev/null @@ -1,227 +0,0 @@ -#!/bin/sh -################################################################3 -# -# This script will tar up all the data for a given forecast cycle for -# the directory specified by the first -# argument ($1) and place the tar files on the HPSS server, -# under ${HPSSOUT}. The tar file is put in the directory -# appropriate for data valid for the day specified as the second -# command line argument ($2). -# -# This script breaks up the enkf data directory into three separate -# tar files ( that is, three tar files per cycle ). -# The data files are broken up as proposed by EMC/GMB. -# -# Usage: rhist_saveenkf.sh Directory Date(YYYYMMDDHH format) -# -# Where: Directory = Directory to be tarred. -# Date(YYYYMMDDHH format) = Day that the tar file should be saved under. -# -################################################################3 -set -x - -if [ $# -ne 2 ] -then - echo "Usage: rhist_saveenkf.sh Directory Date(YYYYMMDDHH format) " - exit 1 -fi - -# -# Get directory to be tarred from the first command line argument, -# and check to make sure that the directory exists. -# - -dir=$1 -if [ ! -d $dir ] -then - echo "rhist_saveenkf.sh: Directory $dir does not exist." - exit 2 -fi - -# -# Determine the directory where the tar file will be stored -# and make sure that it exists in HPSS. -# - -year=`echo $2 | cut -c 1-4` -yearmo=`echo $2 | cut -c 1-6` -yrmoday=`echo $2 | cut -c 1-8` -rhcyc=`echo $2 | cut -c 9-10` -rhcycle=t${rhcyc}z - -if [ $TSM_FLAG = 'NO' ] -then - hpssdir0=${HPSSOUT}/rh${year}/${yearmo}/$yrmoday - hpssdir1=${HPSSOUT}/1year/rh${year}/${yearmo}/$yrmoday - hpssdir2=${HPSSOUT}/2year/rh${year}/${yearmo}/$yrmoday - -elif [ $TSM_FLAG = 'YES' ] -then - rhistdir0=${TSMOUT}/rh${year}/${yearmo}/$yrmoday - rhistdir1=${TSMOUT}/1year/rh${year}/${yearmo}/$yrmoday - rhistdir2=${TSMOUT}/2year/rh${year}/${yearmo}/$yrmoday - - ssh ibmtsm1.ncep.noaa.gov "mkdir -p -m 755 $rhistdir0; mkdir -p -m 755 $rhistdir1; mkdir -p -m 755 $rhistdir2" -fi - -# -# Get a listing of all files in the directory to be tarred -# and break the file list up into groups of files. -# Each list of files names the contents of its associated tar file. -# - -cd $DATA - -ls -1 ${dir}/${rhcyc} | grep ${yrmoday}${rhcyc} | awk ' - /^gsistat/ { print "./"$0 > "omg" ; next } - /^omgstat/ { print "./"$0 > "omg" ; next } - /^obsinput/ { print "./"$0 > "omg" ; next } - /^cnvstat/ { print "./"$0 > "omg" ; next } - /^oznstat/ { print "./"$0 > "omg" ; next } - /^radstat/ { print "./"$0 > "omg" ; next } - /^enkfstat/ { print "./"$0 > "anl" ; next } - /^ensstat/ { print "./"$0 > "anl" ; next } - /^pertdates/ { print "./"$0 > "anl" ; next } - /^sfcanl/ { print "./"$0 > "anl" ; next } - /^siganl/ { print "./"$0 > "anl" ; next } - /^sanl/ { print "./"$0 > "anl" ; next } - /^sanl_/&&/_ensmean$/ { print "./"$0 > "anl" ; next } - /^bfg_/&&/_ensmean$/ { print "./"$0 > "fcs" ; next } - /^sfg_/&&/_ensmean$/ { print "./"$0 > "fcs" ; next } - /^fcsstat/ { print "./"$0 > "fcs" ; next } - /^bfg_/&&/_fhr06_/ { print "./"$0 > "fcs" ; next } - /^sfg_/&&/_fhr06s_/ { print "./"$0 > "fcs" ; next } - /^sfg_/&&/_fhr06_/ { print "./"$0 > "fcs" ; next } - /^bfg_/&&/_fhr03_/ { print "./"$0 > "fcs03" ; next } - /^sfg_/&&/_fhr03s_/ { print "./"$0 > "fcs03" ; next } - /^sfg_/&&/_fhr03_/ { print "./"$0 > "fcs03" ; next } - /^bfg_/&&/_fhr09_/ { print "./"$0 > "fcs09" ; next } - /^sfg_/&&/_fhr09s_/ { print "./"$0 > "fcs09" ; next } - /^sfg_/&&/_fhr09_/ { print "./"$0 > "fcs09" ; next } ' - -cd $dir/${rhcyc} - -# Now create a tar file for each group of files - -for file in omg anl fcs fcs03 fcs09 -do - - # - # Pick 1year, 2year, or permanent archive. - # - case $file in - omg) hpssdir=$hpssdir0 - rhistdir=$rhistdir0;; - anl) hpssdir=$hpssdir0 - rhistdir=$rhistdir0;; - fcs) hpssdir=$hpssdir0 - rhistdir=$rhistdir0;; - fcs03) hpssdir=$hpssdir0 - rhistdir=$rhistdir0;; - fcs09) hpssdir=$hpssdir0 - rhistdir=$rhistdir0;; - *) hpssdir=$hpssdir0 - rhistdir=$rhistdir0;; - esac - - # - # Generate the name of the tarfile, which should be the same - # as the absolute path name of the directory being - # tarred, except that "/" are replaced with "_". - # - - tarfile=`echo $PWD | cut -c 2- | tr "/" "_"` - tarfile=${tarfile}.${file}.tar - - # - # Check if the tarfile index exists. If it does, assume that - # the data for the corresponding directory has already been - # tarred and saved. - # - - if [ $TSM_FLAG = 'NO' ] - then - hsi "ls -l ${hpssdir}/${tarfile}.idx" - tar_file_exists=$? - if [ $tar_file_exists -eq 0 ] - then - echo "File $tarfile already saved." - continue - fi - elif [ $TSM_FLAG = 'YES' ] - then - size=`ssh ibmtsm1.ncep.noaa.gov ls -l ${rhistdir}/${tarfile} | awk '{print \$5}'` - if [ -n "$size" ] - then - if [ $size -gt 0 ] - then - echo "File $tarfile already saved." - continue - fi - fi - fi - - # If on Stratus: - # htar is used to create the archive, -P creates - # the directory path if it does not already exist, - # and an index file is also made. - # - - if [ $TSM_FLAG = 'NO' ] - then - date - htar -P -cvf ${hpssdir}/$tarfile -L ${DATA}/$file - err=$? - if [ $err -ne 0 ] - then - echo "rhist_saveenkf.sh: File $tarfile was not successfully created." - exit 3 - fi - date - - # - # Read the tarfile and save a list of files that are in the tar file. - # - - htar -tvf $hpssdir/$tarfile - err=$? - if [ $err -ne 0 ] - then - echo "rhist_saveenkf.sh: Tar file $tarfile was not successfully read to" - echo " generate a list of the files." - exit 4 - fi - - # - # Restrict tar file, if it contains restricted data. - # - ${USHrhist}/rhist_restrict.sh ${hpssdir}/$tarfile - - # - # If on Cirrus send to HSM - # - elif [ $TSM_FLAG = 'YES' ] - then - - # - # Tar up the directory and put the tarred file in the - # appropriate directory in ${TSMOUT}. - # - - date - gtar -cvf ${DATA}/$tarfile -T ${DATA}/$file - err=$? - if [ $err -ne 0 ] - then - echo "rhist_saveenkf.sh: File $tarfile was not successfully created." - exit 3 - fi - date - $SCP $SCP_CONFIG ${DATA}/${tarfile} ibmtsm1.ncep.noaa.gov:${rhistdir}/${tarfile} - - fi -rm ${DATA}/$file - -done - -exit 0 diff --git a/ush/EnKF/run_enkf b/ush/EnKF/run_enkf deleted file mode 100755 index 4365d0df6b..0000000000 --- a/ush/EnKF/run_enkf +++ /dev/null @@ -1,101 +0,0 @@ -#!/bin/csh -#set verbose - -cd ${datapath2} -setenv OMP_NUM_THREADS 1 -setenv MEMORY_AFFINITY MCM -setenv BIND_TASKS yes -setenv MP_PULSE 0 -setenv MP_SHARED_MEMORY yes -setenv MP_BULK_MIN_MSG_SIZE 10k -setenv MP_USE_BULK_XFER yes -setenv XLSMPOPTS "parthds=1:stack=128000000" -setenv XLFRTEOPTS "nlwidth=80" -setenv MP_LABELIO yes - -@ nanalsp1 = $nanals + 1 -echo "nanalsp1=",$nanalsp1 - -echo $enkfbin - -cat <! enkf.nml - &nam_enkf - datestring="$analdate",datapath="$datapath2",random_partition=$random_partition, - analpertwtnh=$analpertwtnh,analpertwtsh=$analpertwtsh,analpertwttr=$analpertwttr, - simple_partition=$simple_partition,ntrac_update=$ntrac_update, - covinflatemax=$covinflatemax,covinflatemin=$covinflatemin,pseudo_rh=$pseudo_rh, - corrlengthnh=$corrlengthnh,corrlengthsh=$corrlengthsh,corrlengthtr=$corrlengthtr, - obtimelnh=$obtimelnh,obtimelsh=$obtimelsh,obtimeltr=$obtimeltr,iassim_order=$iassim_order, - lnsigcutoffnh=$lnsigcutoffnh,lnsigcutoffsh=$lnsigcutoffsh,lnsigcutofftr=$lnsigcutofftr, - lnsigcutoffsatnh=$lnsigcutoffsatnh,lnsigcutoffsatsh=$lnsigcutoffsatsh,lnsigcutoffsattr=$lnsigcutoffsattr, - lnsigcutoffpsnh=$lnsigcutoffpsnh,lnsigcutoffpssh=$lnsigcutoffpssh,lnsigcutoffpstr=$lnsigcutoffpstr, - use_height=$use_height,saterrfact=$saterrfact,numiter=$numiter, - sprd_tol=$sprd_tol,paoverpb_thresh=$paoverpb_thresh, - npts=$npts,nlevs=$LEVS,nanals=$nanals,ntrac=$NTRAC,nvars=$nvars,deterministic=$deterministic, - sortinc=$sortinc - / - &END -EOF1 - -cat enkf.nml -# check to see if output files already created. -set nanal=1 -set filemissing='no' -while ($nanal <= $nanals) - set charnanal="mem"`printf %03i $nanal` - set analfile="${datapath2}/ganl_${analdate}_${charnanal}" - if { /bin/test ! -s $analfile } set filemissing='yes' - @ nanal = $nanal + 1 -end -if { /bin/test ! -s $ABIAS } set filemissing='yes' - -if ($filemissing == 'yes') then -## Run EnKF here - poe $enkfbin - - /bin/cp ${datapath2}/satbias_out ${datapath2}/abias - /bin/cp ${datapath2}/satbias_out $ABIAS -endif - - # compute ensemble mean analysis files. - time ${enkfexec}/getsigensmean.x ${datapath2}/ sanl_${analdate}_ensmean sanl_${analdate} ${nanals} - - cd ${enkfscripts} - /global/save/wx20kd/python/Python-2.5.1-32/bin/python test.py 450 $nanals >&! ${datapath2}/sigpairs.dat - cd ${datapath2} - - if ($scalefact == 0) then - echo "NO INFLATION NECESSARY" - else - echo "CALL ADDERRSPEC_NMC TO ADD NMC-BASED INFLATION TO ENSEMBLE" - poe ${enkfexec}/adderrspec_nmcmeth.x $nanals $analdate $LONA $LATA $scalefact $addpertpath $lonscramble $runprefix - - # recenter perturbed ensemble on original mean - time ${enkfexec}/getsigensmean.x ${datapath2}/ sanlp_${analdate}_ensmean sanl_${analdate} ${nanals} - - set filename_meanin=${datapath2}/sanlp_${analdate}_ensmean - set filename_meanout=${datapath2}/sanl_${analdate}_ensmean - set filenamein="${datapath2}/sanl_${analdate}" - set filenameout="${datapath2}/sanl_${analdate}" - - poe ${enkfexec}/recentersigp.x $filenamein $filename_meanin $filename_meanout $filenameout $nanals - endif - -# check output files again. - set nanal=1 - set filemissing='no' - while ($nanal <= $nanals) - set charnanal="mem"`printf %03i $nanal` - set analfile="${datapath2}/sanl_${analdate}_${charnanal}" - if { /bin/test ! -s $analfile } set filemissing='yes' - @ nanal = $nanal + 1 - end - - -if ($filemissing == 'yes') then - echo "there are output files missing!" - exit 1 -else - echo "all output files seem OK" - exit 0 -endif diff --git a/ush/EnKF/run_enkfupdate_convonly.sh b/ush/EnKF/run_enkfupdate_convonly.sh deleted file mode 100755 index b5b3ba1394..0000000000 --- a/ush/EnKF/run_enkfupdate_convonly.sh +++ /dev/null @@ -1,141 +0,0 @@ -#!/bin/sh -## Below are LoadLeveler (IBM queueing system) commands -#@ job_name=enkf_update -#@ error=enkf_update.e$(jobid) -#@ job_type=parallel -#@ network.MPI=sn_all,shared,us -#@ node_usage = not_shared -#@ tasks_per_node = 32 -#@ node = 4 -#@ node_resources = ConsumableMemory(110 GB) -#@ task_affinity = core(1) -#@ parallel_threads = 2 -#@ class= devhigh -#@ group= devonprod -#@ account_no = GDAS-T2O -#@ wall_clock_limit = 0:30:00 -#@ startdate = 07/06/09 10:15 -#@ notification=error -#@ queue - -set -x - - -## NOT SURE WHICH OF THESE TO KEEP ?!?!?! - -# Set environment variables for NCEP IBM -export MEMORY_AFFINITY=MCM -export MP_SHARED_MEMORY=yes -# Set environment variables for no threads -export AIXTHREAD_SCOPE=S -export XLSMPOPTS="parthds=1:stack=128000000" - -# Environment variables from Carolyn -export LAPI_DEBUG_ENABLE_AFFINITY=YES -export MP_FIFO_MTU=4K -export MP_SYNC_QP=YES -export MP_RFIFO_SIZE=16777216 -export MP_SHM_ATTACH_THRESH=500000 # default is better sometimes -export MP_EUIDEVELOP=min -#RDMA specific tunables: -export MP_USE_BULK_XFER=yes -export MP_BULK_MIN_MSG_SIZE=64k -export MP_RC_MAX_QP=8192 -export LAPI_DEBUG_RC_DREG_THRESHOLD=1000000 -export LAPI_DEBUG_QP_NOTIFICATION=no -export LAPI_DEBUG_RC_INIT_SETUP=yes - -# Set environment variables for user preferences -export XLFRTEOPTS="nlwidth=80" -export MP_LABELIO=yes -export MP_INFOLEVEL=1 - -# Variables for debugging (don't always need) -##export XLFRTEOPTS="buffering=disable_all" -export MP_COREFILE_FORMAT=lite - -# Set experiment name and analysis date -adate=2008080112 -exp=test_conv_prof_2thrds - -# Set path/file for enkf executable -basedir=/global/save -enkfpath=$basedir/wx20kd/enkf/work/src -enkfexec=$enkfpath/global_enkf.x - -# directories for case -dirges=/global/noscrub/wx20kd/CASES/$adate/ensges -dirobs=/global/noscrub/wx20kd/CASES/$adate/obs - -# fixed files -FIXGSI=/global/save/wx20kd/ensda/ersl/fixgsi -CONVINFO=${FIXGSI}/global_convinfo.txt -SATINFO=${FIXGSI}/global_satinfo.txt.n19_off.r2008 -OZINFO=${FIXGSI}/global_ozinfo.txt.r2008 - -# temporary directory -tmpdir=/ptmp/wx20kd/enkf/${exp}/ - -# Set up $tmpdir -rm -rf $tmpdir -mkdir -p $tmpdir -cd $tmpdir - -ncp=/bin/cp - -# Set up paramters, options and namelist here -# nanals = # of ensemble members -nanals=60 -JCAP=190 -LEVS=64 -LONA=576 -LATA=288 -SMOOTHINF=24 -npts=`expr \( $LONA \) \* \( $LATA \)` -LSOIL=4 -# Number of tracers & dynamic variables -NTRAC=3 -nvars=3 - -cat << EOF > enkf.nml - &nam_enkf - datestring="$adate",datapath="$tmpdir",random_partition=.false., - analpertwtnh=0.9,analpertwtsh=0.9,analpertwttr=0.9, - simple_partition=.false.,ntrac_update=2, - covinflatemax=1.e2,covinflatemin=1,pseudo_rh=.true., - corrlengthnh=1500,corrlengthsh=1500,corrlengthtr=1500, - obtimelnh=15,obtimelsh=15,obtimeltr=15,iassim_order=0, - lnsigcutoffnh=1.5,lnsigcutoffsh=1.5,lnsigcutofftr=1.5, - lnsigcutoffsatnh=3.3,lnsigcutoffsatsh=3.3,lnsigcutoffsattr=3.3, - lnsigcutoffpsnh=2.2,lnsigcutoffpssh=2.2,lnsigcutoffpstr=2.2, - use_height=.false.,saterrfact=1.0,numiter=3, - sprd_tol=1.e30,paoverpb_thresh=1.0, - npts=$npts,nlevs=$LEVS,nanals=$nanals,ntrac=$NTRAC,nvars=$nvars, - deterministic=.true.,sortinc=.true., - / - &END -EOF - -cat enkf.nml - -$ncp $enkfexec ./enkf.x -$ncp $CONVINFO ./convinfo -$ncp $SATINFO ./satinfo -$ncp $OZINFO ./ozinfo -$ncp $dirobs/abias ./abias -$ncp $dirobs/satang ./satang - -ln -fs ./abias ./satbias_in -ln -fs ./satang ./satbias_angle -ln -fs $dirges/sfg* ./ -###ln -fs $dirobs/diag* ./ -ln -fs $dirobs/diag_conv* ./ - -poe hpmcount $tmpdir/enkf.x < enkf.nml > stdout - -rm $tmpdir/diag* -rm $tmpdir/sfg* - -exit - - diff --git a/ush/EnKF/run_enkfupdate_testcase.sh b/ush/EnKF/run_enkfupdate_testcase.sh deleted file mode 100755 index 040b6813f5..0000000000 --- a/ush/EnKF/run_enkfupdate_testcase.sh +++ /dev/null @@ -1,140 +0,0 @@ -#!/bin/sh -## Below are LoadLeveler (IBM queueing system) commands -#@ job_name=enkf_update -#@ error=enkf_update.e$(jobid) -#@ job_type=parallel -#@ network.MPI=sn_all,shared,us -#@ node_usage = not_shared -#@ tasks_per_node = 32 -#@ node = 10 -#@ node_resources = ConsumableMemory(110 GB) -#@ task_affinity = core(1) -#@ parallel_threads = 2 -#@ class= devhigh -#@ group= devonprod -#@ account_no = GDAS-T2O -#@ wall_clock_limit = 1:30:00 -#@ startdate = 07/06/09 10:15 -#@ notification=error -#@ queue - -set -x - - -## NOT SURE WHICH OF THESE TO KEEP ?!?!?! - -# Set environment variables for NCEP IBM -export MEMORY_AFFINITY=MCM -export MP_SHARED_MEMORY=yes -# Set environment variables for no threads -export AIXTHREAD_SCOPE=S -export XLSMPOPTS="parthds=1:stack=128000000" - -# Environment variables from Carolyn -export LAPI_DEBUG_ENABLE_AFFINITY=YES -export MP_FIFO_MTU=4K -export MP_SYNC_QP=YES -export MP_RFIFO_SIZE=16777216 -export MP_SHM_ATTACH_THRESH=500000 # default is better sometimes -export MP_EUIDEVELOP=min -#RDMA specific tunables: -export MP_USE_BULK_XFER=yes -export MP_BULK_MIN_MSG_SIZE=64k -export MP_RC_MAX_QP=8192 -export LAPI_DEBUG_RC_DREG_THRESHOLD=1000000 -export LAPI_DEBUG_QP_NOTIFICATION=no -export LAPI_DEBUG_RC_INIT_SETUP=yes - -# Set environment variables for user preferences -export XLFRTEOPTS="nlwidth=80" -export MP_LABELIO=yes -export MP_INFOLEVEL=1 - -# Variables for debugging (don't always need) -##export XLFRTEOPTS="buffering=disable_all" -export MP_COREFILE_FORMAT=lite - -# Set experiment name and analysis date -adate=2008080112 -exp=test - -# Set path/file for enkf executable -basedir=/global/save -enkfpath=$basedir/wx20kd/enkf/work/src -enkfexec=$enkfpath/global_enkf.x - -# directories for case -dirges=/global/noscrub/wx20kd/CASES/$adate/ensges -dirobs=/global/noscrub/wx20kd/CASES/$adate/obs - -# fixed files -FIXGSI=/global/save/wx20kd/ensda/ersl/fixgsi -CONVINFO=${FIXGSI}/global_convinfo.txt -SATINFO=${FIXGSI}/global_satinfo.txt.n19_off.r2008 -OZINFO=${FIXGSI}/global_ozinfo.txt.r2008 - -# temporary directory -tmpdir=/ptmp/wx20kd/enkf/${exp}/ - -# Set up $tmpdir -rm -rf $tmpdir -mkdir -p $tmpdir -cd $tmpdir - -ncp=/bin/cp - -# Set up paramters, options and namelist here -# nanals = # of ensemble members -nanals=60 -JCAP=190 -LEVS=64 -LONA=576 -LATA=288 -SMOOTHINF=24 -npts=`expr \( $LONA \) \* \( $LATA \)` -LSOIL=4 -# Number of tracers & dynamic variables -NTRAC=3 -nvars=3 - -cat << EOF > enkf.nml - &nam_enkf - datestring="$adate",datapath="$tmpdir",random_partition=.false., - analpertwtnh=0.9,analpertwtsh=0.9,analpertwttr=0.9, - simple_partition=.false.,ntrac_update=2, - covinflatemax=1.e2,covinflatemin=1,pseudo_rh=.true., - corrlengthnh=1500,corrlengthsh=1500,corrlengthtr=1500, - obtimelnh=15,obtimelsh=15,obtimeltr=15,iassim_order=0, - lnsigcutoffnh=1.5,lnsigcutoffsh=1.5,lnsigcutofftr=1.5, - lnsigcutoffsatnh=3.3,lnsigcutoffsatsh=3.3,lnsigcutoffsattr=3.3, - lnsigcutoffpsnh=2.2,lnsigcutoffpssh=2.2,lnsigcutoffpstr=2.2, - use_height=.false.,saterrfact=1.0,numiter=3, - sprd_tol=1.e30,paoverpb_thresh=1.0, - npts=$npts,nlevs=$LEVS,nanals=$nanals,ntrac=$NTRAC,nvars=$nvars, - deterministic=.true.,sortinc=.true., - / - &END -EOF - -cat enkf.nml - -$ncp $enkfexec ./enkf.x -$ncp $CONVINFO ./convinfo -$ncp $SATINFO ./satinfo -$ncp $OZINFO ./ozinfo -$ncp $dirobs/abias ./abias -$ncp $dirobs/satang ./satang - -ln -fs ./abias ./satbias_in -ln -fs ./satang ./satbias_angle -ln -fs $dirges/sfg* ./ -ln -fs $dirobs/diag* ./ - -poe hpmcount $tmpdir/enkf.x < enkf.nml > stdout - -rm $tmpdir/diag* -rm $tmpdir/sfg* - -exit - - diff --git a/ush/EnKF/run_fg_gfs b/ush/EnKF/run_fg_gfs deleted file mode 100755 index 499be52453..0000000000 --- a/ush/EnKF/run_fg_gfs +++ /dev/null @@ -1,79 +0,0 @@ -#!/usr/bin/sh - -# run model -setenv DATOUT ${datapath}${analdatep1} - -set nanal=1 - -while ($nanal <= $nanals) - setenv charnanal "mem`printf %03i $nanal`" - setenv SFCI ${datapath}/${analdate}/sfcanl_${analdate}_${charnanal} - setenv SIGI ${datapath}/${analdate}/sanl_${analdate}_${charnanal} - -# check to see if output files already created. - set fhr=$FHMIN - set outfiles="" - while ($fhr <= $FHMAX) - set charhr="fhr`printf %02i $fhr`" - set outfiles = "${outfiles} ${datapath}${analdatep1}/sfg_${analdatep1}_${charhr}_${charnanal} ${datapath}${analdatep1}/bfg_${analdatep1}_${charhr}_${charnanal}" - @ fhr = $fhr + $FHOUT - end - echo "run_fg_fgs outfiles = " $outfiles - - set filemissing='no' - foreach outfile ($outfiles) - if (-e "${outfile}" ) then - echo "${outfile} is OK" - else - echo "${outfile} is missing" - set filemissing='yes' - endif - end - - if ($filemissing == 'yes') then - echo "nanal = ${nanal}" - time sh ${enkfscripts}/drive_gfs >&! ${current_logdir}/run_fg_${charnanal}.out - else - echo "skipping nanal = ${nanal}, output files already created" - endif - -@ nanal = $nanal + 1 -end - -echo "all done `date`" - -# check to see all files created -echo "checking output files .."`date` - -set nanal=1 -set anyfilemissing='no' -while ($nanal <= $nanals) - setenv charnanal "mem`printf %03i $nanal`" - set fhr=$FHMIN - set outfiles="" - while ($fhr <= $FHMAX) - set charhr="fhr`printf %02i $fhr`" - set outfiles = "${outfiles} ${datapath}${analdatep1}/sfg_${analdatep1}_${charhr}_${charnanal} ${datapath}${analdatep1}/bfg_${analdatep1}_${charhr}_${charnanal}" - @ fhr = $fhr + $FHOUT - end - set filemissing='no' - foreach outfile ($outfiles) - ls -l $outfile - if (-e $outfile) then - echo "${outfile} is OK" - else - echo "${outfile} is missing" - set filemissing='yes' - set anyfilemissing='yes' - endif - end - @ nanal = $nanal + 1 -end - -if ($anyfilemissing == 'yes') then - echo "there are output files missing!" - exit 1 -else - echo "all output files seem OK" - exit 0 -endif diff --git a/ush/EnKF/run_fg_gfs_multi.sh b/ush/EnKF/run_fg_gfs_multi.sh deleted file mode 100755 index f97f8e82ea..0000000000 --- a/ush/EnKF/run_fg_gfs_multi.sh +++ /dev/null @@ -1,92 +0,0 @@ -#!/bin/tcsh - -# import parameters -setenv CONFIG /global/save/${LOGNAME}/enkf/work/scripts_ncep/current.enkfparms -source ${CONFIG} - -echo "IN RUN_FG SCRIPT" - -setenv startupenv "${datapath}/analdate.csh" -source $startupenv - -# current analysis time. -setenv analdate $analdate - -echo "analdate = $analdate" - -# substringing to get yr, mon, day, hr info -setenv yr `echo $analdate | cut -c1-4` -setenv mon `echo $analdate | cut -c5-6` -setenv day `echo $analdate | cut -c7-8` -setenv hr `echo $analdate | cut -c9-10` - -echo "SET DATE PARAMETERS" -setenv SUB "/u/wx23sm/bin/sub_vapor" -echo "SUB= ${SUB}" - - -vv# previous analysis time. -setenv analdatem1 `${incdate} $analdate -$ANALINC` -# next analysis time. -setenv analdatep1 `${incdate} $analdate $ANALINC` -setenv datapathprev "${datapath}/${analdatem1}/" -setenv hrp1 `echo $analdatep1 | cut -c9-10` -setenv hrm1 `echo $analdatem1 | cut -c9-10` -setenv datapathp1 "${datapath}/${analdatep1}/" -setenv datapathm1 "${datapath}/${analdatem1}/" -# make log dir for analdate - -setenv current_logdir "${logdir}/ensda_out_${analdate}" -echo "Current LogDir: ${current_logdir}" -mkdir -p ${current_logdir} - -echo "SET MORE PARMETERS" - -# run model -setenv DATOUT "${datapath}${analdatep1}" -setenv datapath2 "${datapath}/${analdate}/" - -echo "set DATOUT" - -set nanal=$NSTART -@ nanalsp1 = $nanals + 1 -echo "nanalsp1=",$nanalsp1 - -while ($nanal <= $NEND) - setenv charnanal "mem`printf %03i $nanal`" - setenv SFCI "${datapath}/${analdate}/sfcanl_${analdate}_${charnanal}" - setenv SIGI "${datapath}/${analdate}/sanl_${analdate}_${charnanal}" - -# check to see if output files already created. - set fhr=$FHMIN - set outfiles="" - while ($fhr <= $FHMAX) - set charhr="fhr`printf %02i $fhr`" - set outfiles = "${outfiles} ${datapath}${analdatep1}/sfg_${analdatep1}_${charhr}_${charnanal} ${datapath}${analdatep1}/bfg_${analdatep1}_${charhr}_${charnanal}" - @ fhr = $fhr + $FHOUT - end - echo "run_fg_fgs outfiles = " $outfiles - - set filemissing='no' - foreach outfile ($outfiles) - if (-e "${outfile}" ) then - echo "${outfile} is OK" - else - echo "${outfile} is missing" - set filemissing='yes' - endif - end - - if ($filemissing == 'yes') then - echo "nanal = ${nanal}" - time sh ${enkfscripts}/drive_gfs >&! ${current_logdir}/run_fg_${charnanal}.out - else - echo "skipping nanal = ${nanal}, output files already created" - endif - -@ nanal = $nanal + 1 -end - -echo "all done `date`" - -exit 0 diff --git a/ush/EnKF/run_gfs b/ush/EnKF/run_gfs deleted file mode 100755 index 13ab2a1528..0000000000 --- a/ush/EnKF/run_gfs +++ /dev/null @@ -1,765 +0,0 @@ -#!/bin/sh -################################################################################ -#### UNIX Script Documentation Block -# . . -# Script name: global_forecast.sh -# Script description: Runs a global spectral model forecast -# -# Author: Mark Iredell Org: NP23 Date: 1999-05-01 -# -# Abstract: This script runs a single global spectral model forecast. -# The initial conditions and run parameters are passed in the argument list. -# -# Script history log: -# 1999-05-01 Mark Iredell -# 2005-01-03 Cheng-Hsuan Lu :add namelist SOIL_VEG -# set FSMCL(2:4) = FSMCL2 -# add FNVMNC,FNVMXC,FNSLPC,FNABSC -# 2006-02 Shrinivas Moorthi Modified to run ESMF - Stand Alone -# version of GFS - Only filestyle "L" -# allowed - Added a ESMF config file -# The script can run up to 21 ENS members -# concurrently. -# 2006-06 Shrinivas Moorthi : Added default PE$n values to 0 -# -# Usage: global_forecast.sh SIGI SFCI SIGO FLXO FHOUT FHMAX IGEN D3DO -# -# Input script positional parameters: -# 1 Input sigma file 1 -# defaults to $SIGI; one or the other is required -# 2 Input surface file -# defaults to $SFCI; one or the other is required -# 3 Output sigma file with embedded forecast hour '${FH}' -# defaults to $SIGO, then to ${COMOUT}/sigf'${FH}'$SUFOUT -# 4 Output flux file with embedded forecast hour '${FH}' -# defaults to $FLXO, then to ${COMOUT}/flxf'${FH}'$SUFOUT -# 5 Output frequency in hours -# defaults to $FHOUT, then to 3 -# 6 Length of forecast in hours -# defaults to $FHMAX; otherwise FHSEG is required to be set -# 7 Output generating code -# defaults to $IGEN, defaults to 0 -# 8 Output flux file with embedded forecast hour '${FH}' -# defaults to $D3DO, then to ${COMOUT}/d3df'${FH}'$SUFOUT -# -# Imported Shell Variables: -# SIGI Input sigma file -# overridden by $1; one or the other is required -# SFCI Input surface file -# overridden by $2; one or the other is required -# SIGO Output sigma file with embedded forecast hour '${FH}' -# overridden by $3; defaults to ${COMOUT}/sigf'${FH}'$SUFOUT -# FLXO Output flux file with embedded forecast hour '${FH}' -# overridden by $4; defaults to ${COMOUT}/flxf'${FH}'$SUFOUT -# FHOUT Output frequency in hours -# overridden by $5; defaults to 3 -# FHMAX Length of forecast in hours -# overridden by $6; either FHMAX or FHSEG must be set -# IGEN Output generating code -# overridden by $7; defaults to 0 -# FIXGLOBAL Directory for global fixed files -# defaults to /nwprod/fix -# EXECGLOBAL Directory for global executables -# defaults to /nwprod/exec -# DATA working directory -# (if nonexistent will be made, used and deleted) -# defaults to current working directory -# COMOUT output directory -# (if nonexistent will be made) -# defaults to current working directory -# XC Suffix to add to executables -# defaults to none -# SUFOUT Suffix to add to output filenames -# defaults to none -# NCP Copy command -# defaults to cp -# SIGHDR Command to read sigma header -# (required if JCAP, LEVS, or FHINI are not specified) -# defaults to ${EXECGLOBAL}/global_sighdr$XC -# JCAP Spectral truncation -# defaults to the value in the input sigma file header -# LEVS Number of levels -# defaults to the value in the input sigma file header -# FCSTEXEC Forecast executable -# defaults to ${EXECGLOBAL}/global_fcst$XC -# SIGI2 Second time level sigma restart file -# defaults to NULL -# CO2CON Input CO2 radiation (vertical resolution dependent) -# defaults to ${FIXGLOBAL}/global_co2con.l${LEVS}.f77 -# MTNVAR Input mountain variance (horizontal resolution dependent) -# defaults to ${FIXGLOBAL}/global_mtnvar.t${JCAP}.f77 -# CLTUNE Input cloud tuning file -# defaults to ${FIXGLOBAL}/global_cldtune.f77 -# DTBTHE Input equivalent potential temperature file -# defaults to ${FIXGLOBAL}/global_tbthe.f77 -# O3FORC Input ozone forcing (production/loss) climatology -# defaults to ${FIXGLOBAL}/global_o3prdlos.f77 -# O3CLIM Input ozone climatology -# defaults to ${FIXGLOBAL}/global_o3clim.txt -# FNGLAC Input glacier climatology GRIB file -# defaults to ${FIXGLOBAL}/global_glacier.2x2.grb -# FNMXIC Input maximum sea ice climatology GRIB file -# defaults to ${FIXGLOBAL}/global_maxice.2x2.grb -# FNTSFC Input SST climatology GRIB file -# defaults to ${FIXGLOBAL}/global_sstclim.2x2.grb -# FNSNOC Input snow climatology GRIB file -# defaults to ${FIXGLOBAL}/global_snoclim.1.875.grb -# FNZORC Input roughness climatology GRIB file -# defaults to ${FIXGLOBAL}/global_zorclim.1x1.grb -# FNALBC Input albedo climatology GRIB file -# defaults to ${FIXGLOBAL}/global_albedo4.1x1.grb -# FNAISC Input sea ice climatology GRIB file -# defaults to ${FIXGLOBAL}/global_iceclim.2x2.grb -# FNTG3C Input deep soil temperature climatology GRIB file -# defaults to ${FIXGLOBAL}/global_tg3clim.2.6x1.5.grb -# FNVEGC Input vegetation fraction climatology GRIB file -# defaults to ${FIXGLOBAL}/global_vegfrac.1x1.grb -# FNVETC Input vegetation type climatology GRIB file -# defaults to ${FIXGLOBAL}/global_vegtype.1x1.grb -# FNSOTC Input soil type climatology GRIB file -# defaults to ${FIXGLOBAL}/global_soiltype.1x1.grb -# FNSMCC Input soil moisture climatology GRIB file -# defaults to ${FIXGLOBAL}/global_soilmcpc.1x1.grb -# FNVMNC Input min veg frac climatology GRIB file -# defaults to ${FIXGLOBAL}/global_shdmin.0.144x0.144.grb -# FNVMXC Input max veg frac climatology GRIB file -# defaults to ${FIXGLOBAL}/global_shdmax.0.144x0.144.grb -# FNSLPC Input slope type climatology GRIB file -# defaults to ${FIXGLOBAL}/global_slope.1x1.grb -# FNABSC Input max snow albedo climatology GRIB file -# defaults to ${FIXGLOBAL}/global_snoalb.1x1.grb -# OROGRAPHY Input orography GRIB file (horiz resolution dependent) -# defaults to ${FIXGLOBAL}/global_orography.t$JCAP.grb -# FNMSKH Input high resolution land mask GRIB file -# defaults to ${FIXGLOBAL}/seaice_newland.grb -# FNTSFA Input SST analysis GRIB file -# defaults to none -# FNACNA Input sea ice analysis GRIB file -# defaults to none -# FNSNOA Input snow analysis GRIB file -# defaults to none -# AERODIR Input aersol climatology directory -# defaults to ${FIXGLOBAL} -# EMISDIR Input earth's surface emissivity data directory -# defaults to ${FIXGLOBAL} -# SIGR1 Output first time level sigma restart file -# defaults to ${DATA}/sigr1 which is deleted -# SIGR2 Output second time level sigma restart file -# defaults to ${DATA}/sigr2 which is deleted -# SFCR Output surface restart file -# defaults to ${DATA}/sfcr which is deleted -# SFCO Output surface file with embedded forecast hour '${FH}' -# defaults to ${COMOUT}/sfcf'${FH}'$SUFOUT -# LOGO Output log file with embedded forecast hour '${FH}' -# defaults to ${COMOUT}/logf'${FH}'$SUFOUT -# INISCRIPT Preprocessing script -# defaults to none -# LOGSCRIPT Log posting script -# defaults to none -# ERRSCRIPT Error processing script -# defaults to 'eval [[ $err = 0 ]]' -# ENDSCRIPT Postprocessing script -# defaults to none -# FHINI Starting forecast hour -# defaults to the value in the input sigma file header -# FHSEG Number of hours to integrate -# (only required if FHMAX is not specified) -# defaults to 0 -# DELTIM Timestep in seconds -# defaults to 3600/($JCAP/20) -# FHRES Restart frequency in hours -# defaults to 24 -# FHZER Zeroing frequency in hours -# defaults to 6 -# FHLWR Longwave radiation frequency in hours -# defaults to 3 -# FHSWR Shortwave radiation frequency in hours -# defaults to 1 -# FHROT Forecast hour to Read One Time level -# defaults to 0 -# FHDFI Half number of hours of digital filter initialization -# defaults to 0 -# FHCYC Surface cycling frequency in hours -# defaults to 0 for no cycling -# IDVC Integer ID of the vertical coordinate type -# defaults to that in the header for the input upperair -# file. IDVC=1 for sigma; IDVC=2 for pressure/sigma hybrid -# TFILTC Time filter coefficient -# defaults to 0.85 -# FCSTVARS Other namelist inputs to the forecast executable -# defaults to none set -# FSMCL2 Scale in days to relax to soil moisture climatology -# defaults to 99999 for no relaxation -# FTSFS Scale in days to relax to SST anomaly to zero -# defaults to 90 -# FAISS Scale in days to relax to sea ice to climatology -# defaults to 99999 -# FSNOL Scale in days to relax to snow to climatology -# defaults to 99999 -# FSICL Scale in days to relax to sea ice to climatology -# defaults to 99999 -# CYCLEVARS Other namelist inputs to the surface cycling -# defaults to none set -# NTHREADS Number of threads -# defaults to 1 -# NTHSTACK Size of stack per thread -# defaults to 64000000 -# FILESTYLE File management style flag -# ('L' for symbolic links in $DATA is the only allowed style), -# PGMOUT Executable standard output -# defaults to $pgmout, then to '&1' -# PGMERR Executable standard error -# defaults to $pgmerr, then to '&1' -# pgmout Executable standard output default -# pgmerr Executable standard error default -# REDOUT standard output redirect ('1>' or '1>>') -# defaults to '1>', or to '1>>' to append if $PGMOUT is a file -# REDERR standard error redirect ('2>' or '2>>') -# defaults to '2>', or to '2>>' to append if $PGMERR is a file -# VERBOSE Verbose flag (YES or NO) -# defaults to NO -# -# Exported Shell Variables: -# PGM Current program name -# pgm -# ERR Last return code -# err -# -# Modules and files referenced: -# scripts : $INISCRIPT -# $LOGSCRIPT -# $ERRSCRIPT -# $ENDSCRIPT -# -# programs : $FCSTEXEC -# -# input data : $1 or $SIGI -# $2 or $SFCI -# $SIGI2 -# $FNTSFA -# $FNACNA -# $FNSNOA -# -# fixed data : $CO2CON -# $MTNVAR -# $CLTUNE -# $DTBTHE -# $O3FORC -# $O3CLIM -# $FNGLAC -# $FNMXIC -# $FNTSFC -# $FNSNOC -# $FNZORC -# $FNALBC -# $FNAISC -# $FNTG3C -# $FNVEGC -# $FNVETC -# $FNSOTC -# $FNSMCC -# $FNVMNC -# $FNVMXC -# $FNSLPC -# $FNABSC -# $FNMSKH -# $OROGRAPHY -# -# output data: $3 or $SIGO -# $4 or $FLXO -# $SFCO -# $LOGO -# $SIGR1 -# $SIGR2 -# $SFCR -# $PGMOUT -# $PGMERR -# -# scratch : ${DATA}/fort.11 -# ${DATA}/fort.12 -# ${DATA}/fort.14 -# ${DATA}/fort.15 -# ${DATA}/fort.24 -# ${DATA}/fort.27 -# ${DATA}/fort.28 -# ${DATA}/fort.29 -# ${DATA}/fort.43 -# ${DATA}/fort.48 -# ${DATA}/fort.51 -# ${DATA}/fort.52 -# ${DATA}/fort.53 -# ${DATA}/SIG.F* -# ${DATA}/SFC.F* -# ${DATA}/FLX.F* -# ${DATA}/LOG.F* -# ${DATA}/sigr1 -# ${DATA}/sigr2 -# ${DATA}/sfcr -# ${DATA}/NULL -# -# Remarks: -# -# Condition codes -# 0 - no problem encountered -# >0 - some problem encountered -# -# Control variable resolution priority -# 1 Command line argument. -# 2 Environment variable. -# 3 Inline default. -# -# Attributes: -# Language: POSIX shell -# Machine: IBM SP -# -#### -################################################################################ -# Set environment. -export VERBOSE=${VERBOSE:-"NO"} -if [[ "$VERBOSE" = "YES" ]] -then - echo $(date) EXECUTING $0 $* >&2 - set -x -fi -# Command line arguments. -export ENS_NUM=${ENS_NUM:-1} -export FM=${FM} -export SIGI=${1:-${SIGI:-?}} -export SFCI=${2:-${SFCI:-?}} -export SIGO=${3:-${SIGO}} -export FLXO=${4:-${FLXO}} -export FHOUT=${5:-${FHOUT:-3}} -export FHMAX=${6:-${FHMAX:-0}} -export IGEN=${7:-${IGEN:-0}} -export D3DO=${8:-${D3DO}} -# Directories. -export FIXGLOBAL=${FIXGLOBAL:-/nwprod/fix} -export EXECGLOBAL=${EXECGLOBAL:-/nwprod/exec} -export DATA=${DATA:-$(pwd)} -export COMOUT=${COMOUT:-$(pwd)} -# Filenames. -export XC=${XC} -export SUFOUT=${SUFOUT} -export SIGHDR=${SIGHDR:-${EXECGLOBAL}/global_sighdr$XC} -export JCAP=${JCAP:-$(echo jcap|$SIGHDR ${SIGI}$FM)} -export LEVS=${LEVS:-$(echo levs|$SIGHDR ${SIGI}$FM)} -export LONR=${LONR:-$(echo lonr|$SIGHDR ${SIGI}$FM)} -export LATR=${LATR:-$(echo latr|$SIGHDR ${SIGI}$FM)} -export LONF=${LONF:-$(echo lonf|$SIGHDR ${SIGI}$FM)} -export LATG=${LATG:-$(echo latf|$SIGHDR ${SIGI}$FM)} -export NTRAC=${NTRAC:-$(echo ntrac|$SIGHDR ${SIGI}$FM)} -export IDVC=${IDVC:-$(echo idvc|$SIGHDR ${SIGI}$FM)} -export NMTVR=${NMTVR:-14} -export LSOIL=${LSOIL:-4} -export NTOZ=${NTOZ:-2} -export NTCW=${NTCW:-3} -export NCLD=${NCLD:-1} -export NGPTC=${NGPTC:-30} -export ADIAB=${ADIAB:-.false.} -export pre_rad=${pre_rad:-.false.} -export random_xkt2=${random_xkt2:-.true.} -export FCSTEXEC=${FCSTEXEC:-${EXECGLOBAL}/global_fcst$XC} -#export FCSTEXEC=${FCSTEXEC:-/nw${envir}/exec/global_fcst$XC} -export SIGI2=${SIGI2:-NULL} -export CO2CON=${CO2CON:-${FIXGLOBAL}/global_co2con.l${LEVS}.f77} -export MTNVAR=${MTNVAR:-${FIXGLOBAL}/global_mtnvar.t${JCAP}.f77} -export CLTUNE=${CLTUNE:-${FIXGLOBAL}/global_cldtune.f77} -export DTBTHE=${DTBTHE:-${FIXGLOBAL}/global_tbthe.f77} -export O3FORC=${O3FORC:-${FIXGLOBAL}/global_o3prdlos.f77} -export O3CLIM=${O3CLIM:-${FIXGLOBAL}/global_o3clim.txt} -export FNGLAC=${FNGLAC:-${FIXGLOBAL}/global_glacier.2x2.grb} -export FNMXIC=${FNMXIC:-${FIXGLOBAL}/global_maxice.2x2.grb} -export FNTSFC=${FNTSFC:-${FIXGLOBAL}/cfs_oi2sst1x1monclim19822001.grb} -export FNSNOC=${FNSNOC:-${FIXGLOBAL}/global_snoclim.1.875.grb} -export FNZORC=${FNZORC:-${FIXGLOBAL}/global_zorclim.1x1.grb} -export FNALBC=${FNALBC:-${FIXGLOBAL}/global_albedo4.1x1.grb} -export FNAISC=${FNAISC:-${FIXGLOBAL}/cfs_ice1x1monclim19822001.grb} -export FNTG3C=${FNTG3C:-${FIXGLOBAL}/global_tg3clim.2.6x1.5.grb} -export FNVEGC=${FNVEGC:-${FIXGLOBAL}/global_vegfrac.0.144.decpercent.grb} -export FNVETC=${FNVETC:-${FIXGLOBAL}/global_vegtype.1x1.grb} -export FNSOTC=${FNSOTC:-${FIXGLOBAL}/global_soiltype.1x1.grb} -export FNSMCC=${FNSMCC:-${FIXGLOBAL}/global_soilmcpc.1x1.grb} -export FNVMNC=${FNVMNC:-${FIXGLOBAL}/global_shdmin.0.144x0.144.grb} -export FNVMXC=${FNVMXC:-${FIXGLOBAL}/global_shdmax.0.144x0.144.grb} -export FNSLPC=${FNSLPC:-${FIXGLOBAL}/global_slope.1x1.grb} -export FNABSC=${FNABSC:-${FIXGLOBAL}/global_snoalb.1x1.grb} -export FNMSKH=${FNMSKH:-${FIXGLOBAL}/seaice_newland.grb} -export OROGRAPHY=${OROGRAPHY:-${FIXGLOBAL}/global_orography.t$JCAP.grb} -export FNTSFA=${FNTSFA} -export FNACNA=${FNACNA} -export FNSNOA=${FNSNOA} -export AERODIR=${AERODIR:-${FIXGLOBAL}} -export EMISDIR=${EMISDIR:-${FIXGLOBAL}} -export SIGR1=${SIGR1:-${DATA}/sigr1} -export SIGR2=${SIGR2:-${DATA}/sigr2} -export SFCR=${SFCR:-${DATA}/sfcr} -export SIGO=${SIGO:-${COMOUT}/sigf'${FH}''${MN}'$SUFOUT} -export SFCO=${SFCO:-${COMOUT}/sfcf'${FH}''${MN}'$SUFOUT} -export FLXO=${FLXO:-${COMOUT}/flxf'${FH}''${MN}'$SUFOUT} -export LOGO=${LOGO:-${COMOUT}/logf'${FH}''${MN}'$SUFOUT} -export D3DO=${D3DO:-${COMOUT}/d3df'${FH}''${MN}'$SUFOUT} -export INISCRIPT=${INISCRIPT} -export ERRSCRIPT=${ERRSCRIPT:-'eval [[ $err = 0 ]]'} -export LOGSCRIPT=${LOGSCRIPT} -export ENDSCRIPT=${ENDSCRIPT} -# Other variables. -export FHINI=${FHINI:-$(echo ifhr|$SIGHDR ${SIGI}$FM)} -export FHSEG=${FHSEG:-0} -export FHMAX=${FHMAX:-$((10#$FHINI+10#$FHSEG))} -export DELTIM=${DELTIM:-$((3600/(JCAP/20)))} -export FHRES=${FHRES:-24} -export FHZER=${FHZER:-6} -export FHLWR=${FHLWR:-3} -export FHSWR=${FHSWR:-1} -export FHROT=${FHROT:-0} -export FHDFI=${FHDFI:-0} -export FHCYC=${FHCYC:-0} -export LIOPE=${LIOPE:-.true.} -if [ $IDVC = 1 ] ; then - export HYBRID=.false. - export GEN_COORD_HYBRID=.false. -elif [ $IDVC = 2 ] ; then - export HYBRID=.true. - export GEN_COORD_HYBRID=.false. -elif [ $IDVC = 3 ] ; then - export HYBRID=.false. - export GEN_COORD_HYBRID=.true. -fi -export TFILTC=${TFILTC:-0.85} -export FCSTVARS=${FCSTVARS:-""} -export FSMCL2=${FSMCL2:-99999} -export FTSFS=${FTSFS:-90} -export FAISS=${FAISS:-99999} -export FSNOL=${FSNOL:-99999} -export FSICL=${FSICL:-99999} -export CYCLVARS=${CYCLVARS} -#export NTHREADS=${NTHREADS:-1} -export OMP_NUM_THREADS=${OMP_NUM_THREADS:-1} -export NTHSTACK=${NTHSTACK:-128000000} -export XLSMPOPTS=${XLSMPOPTS:-"parthds=$NTHREADS:stack=$NTHSTACK"} -export FILESTYLE=${FILESTYLE:-'L'} -export PGMOUT=${PGMOUT:-${pgmout:-'&1'}} -export PGMERR=${PGMERR:-${pgmerr:-'&2'}} -export MEMBER_NAMES=${MEMBER_NAMES:-''} -export BIND_TASKS=${BIND_TASKS:-no} -#typeset -L1 l=$PGMOUT -[[ $l = '&' ]]&&a=''||a='>' -export REDOUT=${REDOUT:-'1>'$a} -#typeset -L1 l=$PGMERR -[[ $l = '&' ]]&&a=''||a='>' -export REDERR=${REDERR:-'2>'$a} -################################################################################ -# Preprocessing -$INISCRIPT -pwd=$(pwd) -if [[ -d $DATA ]] -then - mkdata=NO -else - mkdir -p $DATA - mkdata=YES -fi -cd $DATA||exit 99 -[[ -d $COMOUT ]]||mkdir -p $COMOUT -################################################################################ -# Make forecast -export XLFRTEOPTS="unit_vars=yes" -export PGM=$DATA/$(basename $FCSTEXEC) -export pgm=$PGM -$LOGSCRIPT -${NCP:-cp} $FCSTEXEC $DATA -rm -f NULL -FH=$((10#$FHINI)) -[[ $FH -lt 10 ]]&&FH=0$FH -if [[ $FHINI -gt 0 ]] -then - FH=$((10#$FHINI+10#$FHOUT)) - [[ $FH -lt 10 ]]&&FH=0$FH -fi -while [[ $FH -le $FHMAX ]] -do - eval rm -f $LOGO - ((FH=10#$FH+10#$FHOUT)) - [[ $FH -lt 10 ]]&&FH=0$FH -done -if [[ $FILESTYLE = "L" ]] -then - ln -fs $CO2CON fort.15 - ln -fs $MTNVAR fort.24 - ln -fs $DTBTHE fort.27 - ln -fs $O3FORC fort.28 - ln -fs $CLTUNE fort.43 - ln -fs $O3CLIM fort.48 -else - echo 'FILESTYLE' $FILESTYLE 'NOT SUPPORTED' - exit 222 -fi -for m in 01 02 03 04 05 06 07 08 09 10 11 12 -do - ln -fs $AERODIR/global_aeropac3a.m$m.txt aeropac3a.m$m -done -ln -fs $EMISDIR/sfc_emissivity_idx.txt sfc_emissivity_idx.txt -ln -fs $OROGRAPHY orography - -# -# For one member case i.e. control -# -if [[ $ENS_NUM -le 1 ]] ; then - FH=$((10#$FHINI)) - [[ $FH -lt 10 ]]&&FH=0$FH - if [[ $FHINI -gt 0 ]] ; then - FH=$((10#$FHINI+10#$FHOUT)) - [[ $FH -lt 10 ]]&&FH=0$FH - fi -# For Initial Conditions - ln -fs $SIGI sig_ini - ln -fs $SFCI sfc_ini - ln -fs $SIGI2 sig_ini2 -# For output - while [ $FH -le $FHMAX ] ; do - eval ln -fs $SIGO SIG.F${FH} - eval ln -fs $SFCO SFC.F${FH} - eval ln -fs $FLXO FLX.F${FH} - eval ln -fs $LOGO LOG.F${FH} - eval ln -fs $D3DO D3D.F${FH} - ((FH=10#$FH+10#$FHOUT)) - [[ $FH -lt 10 ]]&&FH=0$FH - done - ln -fs $SIGR1 SIGR1 - ln -fs $SIGR2 SIGR2 - ln -fs $SFCR SFCR -else -# -# For Ensemble runs (members > 1) - for MN in $MEMBER_NAMES ; do -# This is just faking the ensemble ICs. -# ${NCP:-cp} $SIGI ${SIGI}${MN} -# ${NCP:-cp} $SFCI ${SFCI}${MN} -# ${NCP:-cp} $SIGI2 ${SIGI2}${MN} -# For Initial Conditions - ln -fs ${SIGI}${MN} sig_ini${MN} - ln -fs ${SFCI}${MN} sfc_ini${MN} - ln -fs ${SIGI2}${MN} sig_ini2${MN} -# For output - FH=$((10#$FHINI)) - [[ $FH -lt 10 ]]&&FH=0$FH - if [[ $FHINI -gt 0 ]] ; then - FH=$((10#$FHINI+10#$FHOUT)) - [[ $FH -lt 10 ]]&&FH=0$FH - fi - while [[ $FH -le $FHMAX ]] ; do - eval ln -fs $SIGO SIG.F${FH}${MN} - eval ln -fs $SFCO SFC.F${FH}${MN} - eval ln -fs $FLXO FLX.F${FH}${MN} - eval ln -fs $LOGO LOG.F${FH}${MN} - eval ln -fs $D3DO D3D.F${FH}${MN} - ((FH=10#$FH+10#$FHOUT)) - [[ $FH -lt 10 ]]&&FH=0$FH - done - ln -fs ${SIGR1}${MN} SIGR1${MN} - ln -fs ${SIGR2}${MN} SIGR2${MN} - ln -fs ${SFCR}${MN} SFCR${MN} - done -fi - -# -# Create Configure file (i.e. .rc file) here -# PE$n are to be imported from outside. If PE$n are not set from outside, the -# model would give equal processors for all ensembel members. -# -c=1 -while [ $c -le $ENS_NUM ] ; do - eval export PE$c=\${PE$c:-0} - c=$((c+1)) -done -cat << EOF > gfs_namelist.rc - -#nam_gfs +++++++++++++++++++++++++++ -NLUNIT: 35 -DELTIM: ${DELTIM}.0 -NAMELIST: gfs_namelist -TOTAL_MEMBER: $ENS_NUM -PE_MEMBER01: $PE1 -PE_MEMBER02: $PE2 -PE_MEMBER03: $PE3 -PE_MEMBER04: $PE4 -PE_MEMBER05: $PE5 -PE_MEMBER06: $PE6 -PE_MEMBER07: $PE7 -PE_MEMBER08: $PE8 -PE_MEMBER09: $PE9 -PE_MEMBER10: $PE10 -PE_MEMBER11: $PE11 -PE_MEMBER12: $PE12 -PE_MEMBER13: $PE13 -PE_MEMBER14: $PE14 -PE_MEMBER14: $PE15 -PE_MEMBER16: $PE16 -PE_MEMBER17: $PE17 -PE_MEMBER18: $PE18 -PE_MEMBER19: $PE19 -PE_MEMBER20: $PE20 -PE_MEMBER21: $PE21 - -#ESMF_State_Namelist +++++++++++++++ -IDATE1_IMPORT: 0 -Z_IMPORT: 0 -PS_IMPORT: 0 -VOR_IMPORT: 0 -DIV_IMPORT: 0 -TEMP_IMPORT: 0 -Q_IMPORT: 0 -OZ_IMPORT: 0 -SCLD_IMPORT: 0 - -IDATE1_EXPORT: 0 -Z_EXPORT: 0 -PS_EXPORT: 0 -VOR_EXPORT: 0 -DIV_EXPORT: 0 -TEMP_EXPORT: 0 -Q_EXPORT: 0 -OZ_EXPORT: 0 -SCLD_EXPORT: 0 - -# Surface state. -#--------------- -OROGRAPHY_IMPORT: 0 -T_SKIN_IMPORT: 0 -SOIL_MOIS_IMPORT: 0 -SNOW_DEPTH_IMPORT: 0 -SOIL_T_IMPORT: 0 -DEEP_SOIL_T_IMPORT: 0 -ROUGHNESS_IMPORT: 0 -CONV_CLOUD_COVER_IMPORT: 0 -CONV_CLOUD_BASE_IMPORT: 0 -CONV_CLOUD_TOP_IMPORT: 0 -ALBEDO_VISIBLE_SCATTERED_IMPORT: 0 -ALBEDO_VISIBLE_BEAM_IMPORT: 0 -ALBEDO_NEARIR_SCATTERED_IMPORT: 0 -ALBEDO_NEARIR_BEAM_IMPORT: 0 -SEA_LEVEL_ICE_MASK_IMPORT: 0 -VEGETATION_COVER_IMPORT: 0 -CANOPY_WATER_IMPORT: 0 -M10_WIND_FRACTION_IMPORT: 0 -VEGETATION_TYPE_IMPORT: 0 -SOIL_TYPE_IMPORT: 0 -ZENEITH_ANGLE_FACSF_IMPORT: 0 -ZENEITH_ANGLE_FACWF_IMPORT: 0 -UUSTAR_IMPORT: 0 -FFMM_IMPORT: 0 -FFHH_IMPORT: 0 -SEA_ICE_THICKNESS_IMPORT: 0 -SEA_ICE_CONCENTRATION_IMPORT: 0 -TPRCP_IMPORT: 0 -SRFLAG_IMPORT: 0 -ACTUAL_SNOW_DEPTH_IMPORT: 0 -LIQUID_SOIL_MOISTURE_IMPORT: 0 -VEGETATION_COVER_MIN_IMPORT: 0 -VEGETATION_COVER_MAX_IMPORT: 0 -SLOPE_TYPE_IMPORT: 0 -SNOW_ALBEDO_MAX_IMPORT: 0 - -OROGRAPHY_EXPORT: 0 -T_SKIN_EXPORT: 0 -SOIL_MOIS_EXPORT: 0 -SNOW_DEPTH_EXPORT: 0 -SOIL_T_EXPORT: 0 -DEEP_SOIL_T_EXPORT: 0 -ROUGHNESS_EXPORT: 0 -CONV_CLOUD_COVER_EXPORT: 0 -CONV_CLOUD_BASE_EXPORT: 0 -CONV_CLOUD_TOP_EXPORT: 0 -ALBEDO_VISIBLE_SCATTERED_EXPORT: 0 -ALBEDO_VISIBLE_BEAM_EXPORT: 0 -ALBEDO_NEARIR_SCATTERED_EXPORT: 0 -ALBEDO_NEARIR_BEAM_EXPORT: 0 -SEA_LEVEL_ICE_MASK_EXPORT: 0 -VEGETATION_COVER_EXPORT: 0 -CANOPY_WATER_EXPORT: 0 -M10_WIND_FRACTION_EXPORT: 0 -VEGETATION_TYPE_EXPORT: 0 -SOIL_TYPE_EXPORT: 0 -ZENEITH_ANGLE_FACSF_EXPORT: 0 -ZENEITH_ANGLE_FACWF_EXPORT: 0 -UUSTAR_EXPORT: 0 -FFMM_EXPORT: 0 -FFHH_EXPORT: 0 -SEA_ICE_THICKNESS_EXPORT: 0 -SEA_ICE_CONCENTRATION_EXPORT: 0 -TPRCP_EXPORT: 0 -SRFLAG_EXPORT: 0 -ACTUAL_SNOW_DEPTH_EXPORT: 0 -LIQUID_SOIL_MOISTURE_EXPORT: 0 -VEGETATION_COVER_MIN_EXPORT: 0 -VEGETATION_COVER_MAX_EXPORT: 0 -SLOPE_TYPE_EXPORT: 0 -SNOW_ALBEDO_MAX_EXPORT: 0 - -EOF - -# -# WARNING WARNING FILESTYLE "C" will not work for Component Ensembles!!! -# -#eval $PGM < gfs_namelist <' or '1>>') -# defaults to '1>', or to '1>>' to append if $PGMOUT is a file -# REDERR standard error redirect ('2>' or '2>>') -# defaults to '2>', or to '2>>' to append if $PGMERR is a file -# VERBOSE Verbose flag (YES or NO) -# defaults to NO -# -# Exported Shell Variables: -# PGM Current program name -# pgm -# ERR Last return code -# err -# -# Modules and files referenced: -# scripts : $INISCRIPT -# $LOGSCRIPT -# $ERRSCRIPT -# $ENDSCRIPT -# $CHGRESSH -# -# programs : $CYCLEXEC -# $GSIEXEC -# $ANGUPDATEXEC -# -# fixed data : $BERROR -# $SATANGL -# $SATINFO -# $RTMSPEC -# $RTMTRAN -# $RTMEMIS -# $RTMAERO -# $RTMCLDS -# $CONVINFO -# $OZINFO -# $PCPINFO -# -# input data : $SFCGES -# $SIGGES -# $GBIAS -# $GSATANG -# $SFCG03 -# $SFCG04 -# $SFCG05 -# $SFCG07 -# $SFCG08 -# $SFCG09 -# $SIGG03 -# $SIGG04 -# $SIGG05 -# $SIGG07 -# $SIGG08 -# $SIGG09 -# $GINCIN -# $BIASIN -# $FNTSFA -# $FNACNA -# $FNSNOA -# $PREPQC -# $GSNDBF -# $GSNDBF1 -# $B1HRS2 -# $B1MSU -# $B1HRS3 -# $B1HRS4 -# $B1AMUA -# $B1AMUB -# $B1MHS -# $AIRSBF -# $AMSREBF -# $SSMITBF -# $SBUVBF -# $SMIPCP -# $TMIPCP -# $GPSBF -# -# output data: $SFCANL -# $SIGANL -# $ABIAS -# $RADSTAT -# $GSISTAT -# $PCPSTAT -# $CNVSTAT -# $OZNSTAT -# $GINCOUT -# $BIASOUT -# $PGMOUT -# $PGMERR -# -# Remarks: -# -# Condition codes -# 0 - no problem encountered -# >0 - some problem encountered -# -# Control variable resolution priority -# 1 Command line argument. -# 2 Environment variable. -# 3 Inline default. -# -# Attributes: -# Language: POSIX shell -# Machine: IBM SP -# -################################################################################ -# Set environment. -export VERBOSE=${VERBOSE:-"NO"} -if [[ "$VERBOSE" = "YES" ]] -then - echo $(date) EXECUTING $0 $* >&2 - set -x -fi - -###################### -# For testing -JYZ -###################### -#export GSIEXEC=$EXECGLOBAL/global_gsi.x -#export ANGUPDATEXEC=$EXECGLOBAL/global_angupdate -#export CHGRESEXEC=$EXECGLOBAL/global_chgres -#export CHGRESSH=$USHGLOBAL/global_chgres.sh - -# Command line arguments. -export SFCGES=${1:-${SFCGES:?}} -export SIGGES=${2:-${SIGGES:?}} -export GBIAS=${3:-${GBIAS:?}} -export GSATANG=${4:-${GSATANG:?}} -export SFCANL=${5:-${SFCANL}} -export SIGANL=${6:-${SIGANL}} -export ABIAS=${7:-${ABIAS}} -export IGEN=${8:-${IGEN:-0}} -# Directories. -export FIXGLOBAL=${FIXGLOBAL:-/nwprod/fix} -export FIXGSI=${FIXGSI:-/nwprod/fix} -export EXECGLOBAL=${EXECGLOBAL:-/nwprod/exec} -export USHGLOBAL=${USHGLOBAL:-/nwprod/ush} -export DATA=${DATA:-$(pwd)} -export COMIN=${COMIN:-$(pwd)} -export COMOUT=${COMOUT:-$(pwd)} -# Filenames. -export XC=${XC} -export PREINP=${PREINP} -export SUFINP=${SUFINP} -export SIGHDR=${SIGHDR:-${EXECGLOBAL}/global_sighdr$XC} -export SFCHDR=${SFCHDR:-${EXECGLOBAL}/global_sfchdr$XC} -export JCAP=${JCAP:-$($SIGHDR $SIGGES JCAP||echo 0)} -export LATB=${LATB:-$($SFCHDR $SFCGES LATB||echo 0)} -export LONB=${LONB:-$($SFCHDR $SFCGES LONB||echo 0)} -export LATA=${LATA:-$LATB} -export LONA=${LONA:-$LONB} -export NLAT=${NLAT:-$(($LATA+2))} -export LEVS=${LEVS:-$($SIGHDR $SIGGES LEVS||echo 0)} -export DELTIM=${DELTIM:-$((3600/($JCAP/20)))} -export CYCLEXEC=${CYCLEXEC:-${EXECGLOBAL}/global_cycle$XC} -export GSIEXEC=${GSIEXEC:-${EXECGLOBAL}/global_gsi.x} -export ANGUPDATEXEC=${ANGUPDATEXEC:-${EXECGLOBAL}/global_angupdate$XC} -##export ANGUPDATEXEC=${ANGUPDATEXEC:-/nwprod/exec/global_angupdate} -export CHGRESSH=${CHGRESSH:-${USHGLOBAL}/global_chgres.sh} -export CYCLESH=${CYCLESH:-${EXECGLOBAL}/global_cycle.sh} -export BERROR=${BERROR:-${FIXGSI}/global_berror.l${LEVS}y${NLAT}.f77} -export SATANGL=${SATANGL:-${FIXGSI}/global_satangbias.txt} -export SATINFO=${SATINFO:-${FIXGSI}/global_satinfo.txt} -export RTMSPEC=${RTMSPEC:-${FIXGSI}/global_CRTM_SpcCoeff.f77} -export RTMTRAN=${RTMTRAN:-${FIXGSI}/global_CRTM_TauCoeff.f77} - -#export RTMEMIS=${RTMEMIS:-${FIXGSI}/global_CRTM_EmisCoeff.f77} -#export RTMAERO=${RTMAERO:-${FIXGSI}/global_CRTM_AerosolCoeff.f77} -#export RTMCLDS=${RTMCLDS:-${FIXGSI}/global_CRTM_CldCoeff.f77} -export RTMEMIS=${RTMEMIS:-${FIXGSI}/crtm_gfsgsi/EmisCoeff/Big_Endian/EmisCoeff.bin} -export RTMAERO=${RTMAERO:-${FIXGSI}/crtm_gfsgsi/AerosolCoeff/Big_Endian/AerosolCoeff.bin} -export RTMCLDS=${RTMCLDS:-${FIXGSI}/crtm_gfsgsi/CloudCoeff/Big_Endian/CloudCoeff.bin} - -export CONVINFO=${CONVINFO:-${FIXGSI}/global_convinfo.txt} -export OZINFO=${OZINFO:-${FIXGSI}/global_ozinfo.txt} -export PCPINFO=${PCPINFO:-${FIXGSI}/global_pcpinfo.txt} -export OBERROR=${OBERROR:-${FIXGLOBAL}/prepobs_errtable.global} -export PREPQC=${PREPQC:-/dev/null} -export GSNDBF=${GSNDBF:-/dev/null} -export GSNDBF1=${GSNDBF1:-/dev/null} -export B1HRS2=${B1HRS2:-/dev/null} -export B1MSU=${B1MSU:-/dev/null} -export B1HRS3=${B1HRS3:-/dev/null} -export B1HRS4=${B1HRS4:-/dev/null} -export B1AMUA=${B1AMUA:-/dev/null} -export B1AMUB=${B1AMUB:-/dev/null} -export B1MHS=${B1MHS:-/dev/null} -export AIRSBF=${AIRSBF:-/dev/null} -export IASIBF=${IASIBF:-/dev/null} -export AMSREBF=${AMSREBF:-/dev/null} -export SSMITBF=${SSMITBF:-/dev/null} -export SBUVBF=${SBUVBF:-/dev/null} -export SMIPCP=${SMIPCP:-/dev/null} -export TMIPCP=${TMIPCP:-/dev/null} -export GPSBF=${GPSBF:-/dev/null} -export GINCIN=${GINCIN:-${COMOUT}/gesfile_in} -export BIASIN=${BIASIN:-${COMOUT}/biascor_in} -export SFCG03=${SFCG03:-${COMOUT}/sfcf03} -export SFCG04=${SFCG04:-${COMOUT}/sfcf04} -export SFCG05=${SFCG05:-${COMOUT}/sfcf05} -export SFCG07=${SFCG07:-${COMOUT}/sfcf07} -export SFCG08=${SFCG08:-${COMOUT}/sfcf08} -export SFCG09=${SFCG09:-${COMOUT}/sfcf09} -export SFCG03M=${SFCG03M:-${COMOUT}/sfcfm03} -export SFCG04M=${SFCG04M:-${COMOUT}/sfcfm04} -export SFCG05M=${SFCG05M:-${COMOUT}/sfcfm05} -export SFCG07M=${SFCG07M:-${COMOUT}/sfcfm07} -export SFCG08M=${SFCG08M:-${COMOUT}/sfcfm08} -export SFCG09M=${SFCG09M:-${COMOUT}/sfcfm09} -export SIGG03=${SIGG03:-${COMOUT}/sigf03} -export SIGG04=${SIGG04:-${COMOUT}/sigf04} -export SIGG05=${SIGG05:-${COMOUT}/sigf05} -export SIGG07=${SIGG07:-${COMOUT}/sigf07} -export SIGG08=${SIGG08:-${COMOUT}/sigf08} -export SIGG09=${SIGG09:-${COMOUT}/sigf09} -export SFCANL=${SFCANL:-${COMIN}/${PREINP}sfcanl} -export SIGANL=${SIGANL:-${COMIN}/${PREINP}sanl} -export ABIAS=${ABIAS:-${COMIN}/${PREINP}abias} -export GINCOUT=${GINCOUT:-${COMIN}/${PREINP}gesfile_out} -export BIASOUT=${BIASOUT:-${COMIN}/${PREINP}biascor_out} -export RADSTAT=${RADSTAT:-${COMIN}/${PREINP}radstat} -export GSISTAT=${GSISTAT:-${COMIN}/${PREINP}gsistat} -export PCPSTAT=${PCPSTAT:-${COMIN}/${PREINP}pcpstat} -export CNVSTAT=${CNVSTAT:-${COMIN}/${PREINP}cnvstat} -export OZNSTAT=${OZNSTAT:-${COMIN}/${PREINP}oznstat} -export SATANGO=${SATANGO:-${COMIN}/${PREINP}satang} -export INISCRIPT=${INISCRIPT} -export ERRSCRIPT=${ERRSCRIPT:-'eval [[ $err = 0 ]]'} -export LOGSCRIPT=${LOGSCRIPT} -export ENDSCRIPT=${ENDSCRIPT} -# Other variables. -export CDATE=${CDATE:-$($SFCHDR $SFCGES VDATE||echo 0)} -export LSOIL=${LSOIL:-2} -export FSMCL2=${FSMCL2:-60} -export DELTSFC=${DELTSFC:-$($SFCHDR $SFCGES FHOUR||echo 0)} -export CYCLVARS=${CYCLVARS} -export SETUP=${SETUP:-""} -export GRIDOPTS=${GRIDOPTS:-""} -export BKGVERR=${BKGVERR:-""} -export ANBKGERR=${ANBKGERR:-""} -export JCOPTS=${JCOPTS:-""} -export STRONGOPTS=${STRONGOPTS:-""} -export OBSQC=${OBSQC:-""} -export OBSINPUT=${OBSINPUT:-""} -export SUPERRAD=${SUPERRAD:-""} -export SINGLEOB=${SINGLEOB:-""} -export SETUPANG=${SETUPANG:-""} -export OBSINPUTANG=${OBSINPUTANG:-""} -export NTHREADS=${NTHREADS:-1} -export NTHSTACK=${NTHSTACK:-64000000} -export PGMOUT=${PGMOUT:-${pgmout:-'&1'}} -export PGMERR=${PGMERR:-${pgmerr:-'&2'}} -export OBERRFLAG=${OBERRFLAG:-.false.} -export DIAGCONV=${DIAGCONV:-.false.} -export HXONLY=${HXONLY:-.false.} -export PERTURB_OBS=${PERTURB_OBS:-.false.} -export PERTURB_FACT=${PERTURB_FACT:-0} -export PERTURB_BERR=${PERTURB_BERR:-.false.} -export PERTURB_BERR_FACT=${PERTURB_BERR_FACT:-0} -export ONEOB_TEST=${ONEOB_TEST:-.false.} - - -export NCP=${NCP:-cp} -typeset -L1 l=$PGMOUT -[[ $l = '&' ]]&&a=''||a='>' -export REDOUT=${REDOUT:-'1>'$a} -typeset -L1 l=$PGMERR -[[ $l = '&' ]]&&a=''||a='>' -export REDERR=${REDERR:-'2>'$a} - - -homedir=$PWD -pwd=$(pwd) -if [[ -d $DATA ]] -then - mkdata=NO -else - mkdir -p $DATA - mkdata=YES -fi -cd $DATA||exit 99 - -################################################################################ -# Update surface guess file to produce surface analysis - -$CYCLESH $SFCGES $SFCANL - -################################################################################ -# If necessary, change resolution of surface guess files. - -## NOTE: 10/01/2003, r.treadon -## To prevent misleading error messages, copy/process 4,5,7,8 hour -## forecasts only if files exist. - -# here we assume LONA==LONB, LATA==LATB -#if [[ $LATA -ne $LATB && $LONA -ne $LONB ]]; then -# echo "ERROR: LONA must be equal to LONB, LATA must be equal to LATB" -# exit 1 -#fi - -#if [[ $LATA -ne $LATB && $LONA -ne $LONB ]]; then -#echo "executing global_chgres" -#fh=${FHMIN} -#PWD=`pwd` -#DATAHOLD=$DATA -#export NTHREADS=8 -#while [[ $fh -le $FHMAX ]]; do -# fhour="`printf %02i $fh`" -# SFCGIN=${datapath2}/bfg_${analdate}_fhr${fhour}_${charnanal} -# SFCGOUT=${datapath2}/bfg2${analdate}_fhr${fhour}_${charnanal} -# varname="SFCG$fhour"a -# SFCGIN=${varname} -# varname="SFCG$fhour" -# SFCGOUT=${varname} - -################################################################################ -# Make atmospheric analysis -export XLSMPOPTS="parthds=1:stack=$NTHSTACK" -export PGM=$DATA/$(basename $GSIEXEC) -export pgm=$PGM -$LOGSCRIPT - -rm berror_stats satbias_angle satinfo SpcCoeff.bin TauCoeff.bin EmisCoeff.bin -rm AerosolCoeff.bin CloudCoeff.bin convinfo ozinfo pcpinfo errtable -rm prepbufr gsndrbufr gsnd1bufr hirs2bufr msubufr hirs3bufr hirs4bufr -rm amsuabufr amsubbufr mhsbufr sbuvbufr ssmibufr tmibufr airsbufr -rm amsrebufr ssmitbufr gpsrobufr iasibufr -rm satbias_in satbias_ang.in -rm sfcf03 sfcf04 sfcf05 sfcf06 sfcf07 sfcf08 sfcf09 -rm sfcfm03 sfcfm04 sfcfm05 sfcfm06 sfcfm07 sfcfm08 sfcfm09 -rm sigf03 sigf04 sigf05 sigf06 sigf07 sigf08 sigf09 siganl -rm gesfile_in gesfiles_out satbias_in satbias_ang.in satbias_out -rm prepbufr hirs2bufr msubufr hirs3bufr hirs4bufr amsuabufr -rm amsubbufr mhsbufr airsbufr sbuvbufr ssmibufr tmibufr gpsrobufr -rm amsrebufr ssmitbufr gsndrbufr gsnd1bufr - -${NCP:-cp} $GSIEXEC $DATA - -## NOTE: 10/01/2003, r.treadon -## Do not add above file existence tests since -## we do not link to files in operations - - -# Fixed fields -ln -fs $BERROR berror_stats -ln -fs $SATANGL satbias_angle -ln -fs $SATINFO satinfo -#ln -fs $RTMSPEC SpcCoeff.bin -#ln -fs $RTMTRAN TauCoeff.bin -ln -fs $RTMEMIS EmisCoeff.bin -ln -fs $RTMAERO AerosolCoeff.bin -ln -fs $RTMCLDS CloudCoeff.bin -ln -fs $CONVINFO convinfo -ln -fs $OZINFO ozinfo -ln -fs $PCPINFO pcpinfo -ln -fs $OBERROR errtable -# CRTM Spectral and Transmittance coefficients -#nsatsen=`cat satinfo | wc -l` -#isatsen=1 -#while [[ $isatsen -le $nsatsen ]]; do -# flag=`head -n $isatsen satinfo | tail -1 | cut -c1-1` -# if [[ "$flag" != "!" ]]; then -# satsen=`head -n $isatsen satinfo | tail -1 | cut -f 2 -d" "` -# spccoeff=${satsen}.SpcCoeff.bin -# if [[ ! -s $spccoeff ]]; then -# ln -fs $FIXGLOBAL/crtm_gfsgsi/SpcCoeff/No_AC/Big_Endian/$spccoeff $spccoeff -# ln -fs $FIXGLOBAL/crtm_gfsgsi/TauCoeff/Big_Endian/${satsen}.TauCoeff.bin ${satsen}.TauCoeff.bin -# fi -# fi -# isatsen=` expr $isatsen + 1 ` -#done -#satsens="amsua_n15 amsua_n16 amsua_n17 amsua_n18 amsub_n15 amsub_n16 amsub_n17 amsub_n18" -# jsw - this is faster. -if [ -z "$CONVONLY" ]; then -satsens=`ls -1 $FIXGLOBAL/crtm_gfsgsi/SpcCoeff/Big_Endian/ | cut -f1 -d"." ` -for satsen in $satsens; do - #echo $satsen - spccoeff=${satsen}.SpcCoeff.bin - if [[ ! -s $spccoeff ]]; then - ln -fs $FIXGSI/crtm_gfsgsi/SpcCoeff/Big_Endian/$spccoeff $spccoeff - ln -fs $FIXGSI/crtm_gfsgsi/TauCoeff/Big_Endian/${satsen}.TauCoeff.bin ${satsen}.TauCoeff.bin - fi -done -fi -# Observational data -ln -fs $PREPQC prepbufr -ln -fs $GSNDBF gsndrbufr -ln -fs $GSNDBF1 gsnd1bufr -ln -fs $B1HRS2 hirs2bufr -ln -fs $B1MSU msubufr -ln -fs $B1HRS3 hirs3bufr -ln -fs $B1HRS4 hirs4bufr -ln -fs $B1AMUA amsuabufr -ln -fs $B1AMUB amsubbufr -ln -fs $B1MHS mhsbufr -ln -fs $AIRSBF airsbufr -ln -fs $IASIBF iasibufr -ln -fs $AMSREBF amsrebufr -###ln -fs $SSMITBF ssmitbufr -ln -fs $SBUVBF sbuvbufr -ln -fs $SMIPCP ssmibufr -ln -fs $TMIPCP tmibufr -ln -fs $GPSBF gpsrobufr -# jsw - add tcvitals file. -ln -fs $TCVIT tcvitals - -# Guess fields -ln -fs $GBIAS satbias_in -ln -fs $GSATANG satbias_ang.in -ln -fs $GINCIN gesfile_in -ln -fs $BIASIN biascor_in -ln -fs $SIGG03 sigf03 -ln -fs $SIGG04 sigf04 -ln -fs $SIGG05 sigf05 -ln -fs $SIGGES sigf06 -ln -fs $SIGG07 sigf07 -ln -fs $SIGG08 sigf08 -ln -fs $SIGG09 sigf09 -ln -fs $SFCG03 sfcf03 -ln -fs $SFCG04 sfcf04 -ln -fs $SFCG05 sfcf05 -ln -fs $SFCG06 sfcf06 -ln -fs $SFCG07 sfcf07 -ln -fs $SFCG08 sfcf08 -ln -fs $SFCG09 sfcf09 -ln -fs $SFCG03M sfcfm03 -ln -fs $SFCG04M sfcfm04 -ln -fs $SFCG05M sfcfm05 -ln -fs $SFCG06M sfcfm06 -ln -fs $SFCG07M sfcfm07 -ln -fs $SFCG08M sfcfm08 -ln -fs $SFCG09M sfcfm09 -# Output files -ln -fs $SIGANL siganl -ln -fs $ABIAS satbias_out -ln -fs $GINCOUT gesfile_out -ln -fs $BIASOUT biascor_out - - -if [[ "${charnanal}" != "ensmean" ]]; then - ${NCP} ${COMOUT}/obs_input.${CDATE}.tar ${DATA}/ - cd ${DATA} - tar -xvf obs_input.${CDATE}.tar -fi - - -ls -l -# these files on't exist, but the gsi tries to read them. -#touch pcpbias_in -touch ssmisbufr -touch gimgrbufr - -wait # wait for global_cycle to finish. - -if [ -n "$CONVONLY" ]; then - GBIAS=$SFCGES - GSATANG=$SIGGES -fi -if [ -s $GBIAS ] && [ -s $GSATANG ] && [ -s $SFCGES ] && [ -s $SFCG03 ] && [ -s $SFCG09 ] && [ -s $SIGGES ] && [ -s $SIGG03 ] && [ -s $SIGG09 ] && [ -s $SFCANL ]; then - -# Create global_gsi namelist -cat < gsiparm.anl - &SETUP - miter=0,niter(1)=1,niter(2)=1, - niter_no_qc(1)=10000,niter_no_qc(2)=1000000, - write_diag(1)=.true.,write_diag(2)=.false.,write_diag(3)=.true., - qoption=2, - gencode=$IGEN,factqmin=0.005,factqmax=0.005,deltim=$DELTIM, - ndat=67,npred=5,iguess=-1, - oneobtest=.false.,retrieval=.false.,l_foto=.false., - use_pbl=.false., - $SETUP - / - &GRIDOPTS - JCAP_B=$JCAP,JCAP=$JCAP,NLAT=$NLAT,NLON=$LONA,nsig=$LEVS,hybrid=.true., - regional=.false.,nlayers(63)=3,nlayers(64)=6, - $GRIDOPTS - / - &BKGERR - as=0.6,0.6,0.75,0.75,0.75,0.75,1.0,1.0 - vs=0.7, - hzscl=1.7,0.8,0.5, - hswgt=0.45,0.3,0.25, - bw=0.0,norsp=4, - bkgv_flowdep=.true.,bkgv_rewgtfct=1.5, - tsfc_sdv(1)=3.0,tsfc_sdv(2)=3.0, - - $BKGVERR - / - &ANBKGERR - anisotropic=.false., - $ANBKGERR - / - &JCOPTS - ljcdfi=.false.,alphajc=0.0,ljcpdry=.true.,bamp_jcpdry=2.5e7, - $JCOPTS - / - &STRONGOPTS - jcstrong=.false.,nstrong=0,nvmodes_keep=0,period_max=6.,period_width=1.5, - jcstrong_option=2,baldiag_full=.false.,baldiag_inc=.false., - $STRONGOPTS - / - &OBSQC - dfact=0.75,dfact1=3.0,noiqc=.true.,oberrflg=.false.,c_varqc=0.02, - use_poq7=.true., - $OBSQC - / - &OBS_INPUT - dmesh(1)=145.0,dmesh(2)=145.0,dmesh(3)=145.0,dmesh(4)=145.0,dmesh(5)=145.0,dmesh(6)=150.0,time_window_max=3.0, - dfile(01)='prepbufr', dtype(01)='ps', dplat(01)=' ', dsis(01)='ps', dval(01)=1.0, dthin(01)=0, dsfcalc(01)=0, - dfile(02)='prepbufr' dtype(02)='t', dplat(02)=' ', dsis(02)='t', dval(02)=1.0, dthin(02)=0, dsfcalc(02)=0, - dfile(03)='prepbufr', dtype(03)='q', dplat(03)=' ', dsis(03)='q', dval(03)=1.0, dthin(03)=0, dsfcalc(03)=0, - dfile(04)='prepbufr', dtype(04)='pw', dplat(04)=' ', dsis(04)='pw', dval(04)=1.0, dthin(04)=0, dsfcalc(04)=0, - dfile(05)='prepbufr', dtype(05)='uv', dplat(05)=' ', dsis(05)='uv', dval(05)=1.0, dthin(05)=0, dsfcalc(05)=0, - dfile(06)='prepbufr', dtype(06)='spd', dplat(06)=' ', dsis(06)='spd', dval(06)=1.0, dthin(06)=0, dsfcalc(06)=0, - dfile(07)='prepbufr', dtype(07)='dw', dplat(07)=' ', dsis(07)='dw', dval(07)=1.0, dthin(07)=0, dsfcalc(07)=0, - dfile(08)='radarbufr', dtype(08)='rw', dplat(08)=' ', dsis(08)='rw', dval(08)=1.0, dthin(08)=0, dsfcalc(08)=0, - dfile(09)='prepbufr', dtype(09)='sst', dplat(09)=' ', dsis(09)='sst', dval(09)=1.0, dthin(09)=0, dsfcalc(09)=0, - dfile(10)='gpsrobufr', dtype(10)='gps_ref', dplat(10)=' ', dsis(10)='gps_ref', dval(10)=1.0, dthin(10)=0, dsfcalc(10)=0, - dfile(11)='ssmirrbufr',dtype(11)='pcp_ssmi', dplat(11)='dmsp', dsis(11)='pcp_ssmi', dval(11)=1.0, dthin(11)=-1, dsfcalc(11)=0, - dfile(12)='tmirrbufr', dtype(12)='pcp_tmi', dplat(12)='trmm', dsis(12)='pcp_tmi', dval(12)=1.0, dthin(12)=-1, dsfcalc(12)=0, - dfile(13)='sbuvbufr', dtype(13)='sbuv2', dplat(13)='n16', dsis(13)='sbuv8_n16', dval(13)=1.0, dthin(13)=0, dsfcalc(13)=0, - dfile(14)='sbuvbufr', dtype(14)='sbuv2', dplat(14)='n17', dsis(14)='sbuv8_n17', dval(14)=1.0, dthin(14)=0, dsfcalc(14)=0, - dfile(15)='sbuvbufr', dtype(15)='sbuv2', dplat(15)='n18', dsis(15)='sbuv8_n18', dval(15)=1.0, dthin(15)=0, dsfcalc(15)=0, - dfile(16)='hirs2bufr', dtype(16)='hirs2', dplat(16)='n14', dsis(16)='hirs2_n14', dval(16)=6.0, dthin(16)=1, dsfcalc(16)=0, - dfile(17)='hirs3bufr', dtype(17)='hirs3', dplat(17)='n16', dsis(17)='hirs3_n16', dval(17)=0.0, dthin(17)=1, dsfcalc(17)=0, - dfile(18)='hirs3bufr', dtype(18)='hirs3', dplat(18)='n17', dsis(18)='hirs3_n17', dval(18)=6.0, dthin(18)=1, dsfcalc(18)=0, - dfile(19)='hirs4bufr', dtype(19)='hirs4', dplat(19)='n18', dsis(19)='hirs4_n18', dval(19)=0.0, dthin(19)=1, dsfcalc(19)=0, - dfile(20)='hirs4bufr', dtype(20)='hirs4', dplat(20)='metop-a', dsis(20)='hirs4_metop-a', dval(20)=6.0, dthin(20)=1, dsfcalc(20)=0, - dfile(21)='gsndrbufr', dtype(21)='sndr', dplat(21)='g11', dsis(21)='sndr_g11', dval(21)=0.0, dthin(21)=1, dsfcalc(21)=0, - dfile(22)='gsndrbufr', dtype(22)='sndr', dplat(22)='g12', dsis(22)='sndr_g12', dval(22)=0.0, dthin(22)=1, dsfcalc(22)=0, - dfile(23)='gimgrbufr', dtype(23)='goes_img', dplat(23)='g11', dsis(23)='imgr_g11', dval(23)=0.0, dthin(23)=1, dsfcalc(23)=0, - dfile(24)='gimgrbufr', dtype(24)='goes_img', dplat(24)='g12', dsis(24)='imgr_g12', dval(24)=0.0, dthin(24)=1, dsfcalc(24)=0, - dfile(25)='airsbufr', dtype(25)='airs', dplat(25)='aqua', dsis(25)='airs_aqua', dval(25)=20.0, dthin(25)=1, dsfcalc(25)=0, - dfile(26)='msubufr', dtype(26)='msu', dplat(26)='n14', dsis(26)='msu_n14', dval(26)=2.0, dthin(26)=2, dsfcalc(26)=0, - dfile(27)='amsuabufr', dtype(27)='amsua', dplat(27)='n15', dsis(27)='amsua_n15', dval(27)=10.0, dthin(27)=2, dsfcalc(27)=0, - dfile(28)='amsuabufr', dtype(28)='amsua', dplat(28)='n16', dsis(28)='amsua_n16', dval(28)=0.0, dthin(28)=2, dsfcalc(28)=0, - dfile(29)='amsuabufr', dtype(29)='amsua', dplat(29)='n17', dsis(29)='amsua_n17', dval(29)=0.0, dthin(29)=2, dsfcalc(29)=0, - dfile(30)='amsuabufr', dtype(30)='amsua', dplat(30)='n18', dsis(30)='amsua_n18', dval(30)=10.0, dthin(30)=2, dsfcalc(30)=0, - dfile(31)='amsuabufr', dtype(31)='amsua', dplat(31)='metop-a', dsis(31)='amsua_metop-a', dval(31)=10.0, dthin(31)=2, dsfcalc(31)=0, - dfile(32)='airsbufr', dtype(32)='amsua', dplat(32)='aqua', dsis(32)='amsua_aqua', dval(32)=5.0, dthin(32)=2, dsfcalc(32)=0, - dfile(33)='amsubbufr', dtype(33)='amsub', dplat(33)='n15', dsis(33)='amsub_n15', dval(33)=3.0, dthin(33)=3, dsfcalc(33)=0, - dfile(34)='amsubbufr', dtype(34)='amsub', dplat(34)='n16', dsis(34)='amsub_n16', dval(34)=3.0, dthin(34)=3, dsfcalc(34)=0, - dfile(35)='amsubbufr', dtype(35)='amsub', dplat(35)='n17', dsis(35)='amsub_n17', dval(35)=3.0, dthin(35)=3, dsfcalc(35)=0, - dfile(36)='mhsbufr', dtype(36)='mhs', dplat(36)='n18', dsis(36)='mhs_n18', dval(36)=3.0, dthin(36)=3, dsfcalc(36)=0, - dfile(37)='mhsbufr', dtype(37)='mhs', dplat(37)='metop-a', dsis(37)='mhs_metop-a', dval(37)=3.0, dthin(37)=3, dsfcalc(37)=0, - dfile(38)='ssmitbufr', dtype(38)='ssmi', dplat(38)='f13', dsis(38)='ssmi_f13', dval(38)=0.0, dthin(38)=4, dsfcalc(38)=0, - dfile(39)='ssmitbufr', dtype(39)='ssmi', dplat(39)='f14', dsis(39)='ssmi_f14', dval(39)=0.0, dthin(39)=4, dsfcalc(39)=0, - dfile(40)='ssmitbufr', dtype(40)='ssmi', dplat(40)='f15', dsis(40)='ssmi_f15', dval(40)=0.0, dthin(40)=4, dsfcalc(40)=0, - dfile(41)='amsrebufr', dtype(41)='amsre_low', dplat(41)='aqua', dsis(41)='amsre_aqua', dval(41)=0.0, dthin(41)=4, dsfcalc(41)=0, - dfile(42)='amsrebufr', dtype(42)='amsre_mid', dplat(42)='aqua', dsis(42)='amsre_aqua', dval(42)=0.0, dthin(42)=4, dsfcalc(42)=0, - dfile(43)='amsrebufr', dtype(43)='amsre_hig', dplat(43)='aqua', dsis(43)='amsre_aqua', dval(43)=0.0, dthin(43)=4, dsfcalc(43)=0, - dfile(44)='ssmisbufr', dtype(44)='ssmis_las', dplat(44)='f16', dsis(44)='ssmis_f16', dval(44)=0.0, dthin(44)=4, dsfcalc(44)=0, - dfile(45)='ssmisbufr', dtype(45)='ssmis_uas', dplat(45)='f16', dsis(45)='ssmis_f16', dval(45)=0.0, dthin(45)=4, dsfcalc(45)=0, - dfile(46)='ssmisbufr', dtype(46)='ssmis_img', dplat(46)='f16', dsis(46)='ssmis_f16', dval(46)=0.0, dthin(46)=4, dsfcalc(46)=0, - dfile(47)='ssmisbufr', dtype(47)='ssmis_env', dplat(47)='f16', dsis(47)='ssmis_f16', dval(47)=0.0, dthin(47)=4, dsfcalc(47)=0, - dfile(48)='gsnd1bufr', dtype(48)='sndrd1', dplat(48)='g12', dsis(48)='sndrD1_g12', dval(48)=1.5, dthin(48)=5, dsfcalc(48)=0, - dfile(49)='gsnd1bufr', dtype(49)='sndrd2', dplat(49)='g12', dsis(49)='sndrD2_g12', dval(49)=1.5, dthin(49)=5, dsfcalc(49)=0, - dfile(50)='gsnd1bufr', dtype(50)='sndrd3', dplat(50)='g12', dsis(50)='sndrD3_g12', dval(50)=1.5, dthin(50)=5, dsfcalc(50)=0, - dfile(51)='gsnd1bufr', dtype(51)='sndrd4', dplat(51)='g12', dsis(51)='sndrD4_g12', dval(51)=1.5, dthin(51)=5, dsfcalc(51)=0, - dfile(52)='gsnd1bufr', dtype(52)='sndrd1', dplat(52)='g11', dsis(52)='sndrD1_g11', dval(52)=1.5, dthin(52)=5, dsfcalc(52)=0, - dfile(53)='gsnd1bufr', dtype(53)='sndrd2', dplat(53)='g11', dsis(53)='sndrD2_g11', dval(53)=1.5, dthin(53)=5, dsfcalc(53)=0, - dfile(54)='gsnd1bufr', dtype(54)='sndrd3', dplat(54)='g11', dsis(54)='sndrD3_g11', dval(54)=1.5, dthin(54)=5, dsfcalc(54)=0, - dfile(55)='gsnd1bufr', dtype(55)='sndrd4', dplat(55)='g11', dsis(55)='sndrD4_g11', dval(55)=1.5, dthin(55)=5, dsfcalc(55)=0, - dfile(56)='gsnd1bufr', dtype(56)='sndrd1', dplat(56)='g13', dsis(56)='sndrD1_g13', dval(56)=1.5, dthin(56)=5, dsfcalc(56)=0, - dfile(57)='gsnd1bufr', dtype(57)='sndrd2', dplat(57)='g13', dsis(57)='sndrD2_g13', dval(57)=1.5, dthin(57)=5, dsfcalc(57)=0, - dfile(58)='gsnd1bufr', dtype(58)='sndrd3', dplat(58)='g13', dsis(58)='sndrD3_g13', dval(58)=1.5, dthin(58)=5, dsfcalc(58)=0, - dfile(59)='gsnd1bufr', dtype(59)='sndrd4', dplat(59)='g13', dsis(59)='sndrD4_g13', dval(59)=1.5, dthin(59)=5, dsfcalc(59)=0, - dfile(60)='iasibufr', dtype(60)='iasi', dplat(60)='metop-a', dsis(60)='iasi_metop-a', dval(60)=20.0, dthin(60)=1, dsfcalc(60)=0, - dfile(61)='gomebufr', dtype(61)='gome', dplat(61)='metop-a', dsis(61)='gome_metop-a', dval(61)=1.0, dthin(61)=6, dsfcalc(61)=0, - dfile(62)='omibufr', dtype(62)='omi', dplat(62)='aura', dsis(62)='omi_aura', dval(62)=1.0, dthin(62)=6, dsfcalc(62)=0, - dfile(63)='sbuvbufr', dtype(63)='sbuv2', dplat(63)='n19', dsis(63)='sbuv8_n19', dval(63)=1.0, dthin(63)=0, dsfcalc(63)=0, - dfile(64)='hirs4bufr', dtype(64)='hirs4', dplat(64)='n19', dsis(64)='hirs4_n19', dval(64)=6.0, dthin(64)=1, dsfcalc(64)=0, - dfile(65)='amsuabufr', dtype(65)='amsua', dplat(65)='n19', dsis(65)='amsua_n19', dval(65)=10.0, dthin(65)=2, dsfcalc(65)=0, - dfile(66)='mhsbufr', dtype(66)='mhs', dplat(66)='n19', dsis(66)='mhs_n19', dval(66)=3.0, dthin(66)=3, dsfcalc(66)=0, - dfile(67)='tcvitl' dtype(67)='tcp', dplat(67)=' ', dsis(67)='tcp', dval(67)=1.0, dthin(67)=0, dsfcalc(67)=0, - $OBSINPUT - / - &SUPEROB_RADAR - $SUPERRAD - / - &LAG_DATA - $LAGDATA - / - &HYBRID_ENSEMBLE - l_hyb_ens=.false.,uv_hyb_ens=.false.,aniso_a_en=.false.,generate_ens=.false., - n_ens=0,beta1_inv=0.5,s_ens_h=750,s_ens_v=20,jcap_ens=${JCAP_EN}, - jcap_ens_test=190,nlon_ens=576,nlat_ens=288, - write_ens_sprd=.false., - $HYBRID_ENSEMBLE - / - &SINGLEOB_TEST - maginnov=0.1,magoberr=0.1,oneob_type='t', - oblat=45.,oblon=180.,obpres=1000.,obdattim=${CDATE}, - obhourset=0., - $SINGLEOB - / -EOF - -ls -l $PGM -echo "executing $PGM at `date`" -# Run global_gsi -eval $PGM < gsiparm.anl $REDOUT$PGMOUT $REDERR$PGMERR -rc=$? -echo "done executing $PGM at `date`" - -else -echo "some input files missing, exiting ..." -ls -l $GBIAS -ls -l $GSATANG -ls -l $SFCGES -ls -l $SFCG03 -ls -l $SFCG09 -ls -l $SIGGES -ls -l $SIGG03 -ls -l $SIGG09 -ls -l $SFCANL -exit 1 -fi - -export ERR=$? -export err=$ERR -#$ERRSCRIPT||exit 2 - -# Cat runtime output files. -cat fort.2* > $GSISTAT -cat fort.2* - - -# Loop over first and last outer loops to generate innovation -# diagnostic files for indicated observation types (groups) -# -# NOTE: Since we set miter=2 in GSI namelist SETUP, outer -# loop 03 will contain innovations with respect to -# the analysis. Creation of o-a innovation files -# is triggered by write_diag(3)=.true. The setting -# write_diag(1)=.true. turns on creation of o-g -# innovation files. -# - -if [[ "${charnanal}" = "ensmean" ]]; then - cd ${DATA} - tar -cvf obs_input.${CDATE}.tar obs_input* - ${NCP} obs_input.${CDATE}.tar ${COMOUT}/ -fi - -#loops="01 03" -loops="01" # only save fit to first-guess -pwd -#ls -l ${DATA} -for loop in $loops; do - -# Collect diagnostic files for obs types (groups) below - list="hirs2_n14 msu_n14 sndr_g08 sndr_g10 sndr_g11 sndr_g12 sndr_g13 sndr_g08_prep sndr_g10_prep sndr_g11_prep sndr_g12_prep sndr_g13_prep sndrd1_g11 sndrd2_g11 sndrd3_g11 sndrd4_g11 sndrd1_g12 sndrd2_g12 sndrd3_g12 sndrd4_g12 sndrd1_g13 sndrd2_g13 sndrd3_g13 sndrd4_g13 hirs3_n15 hirs3_n16 hirs3_n17 amsua_n15 amsua_n16 amsua_n17 amsub_n15 amsub_n16 amsub_n17 hsb_aqua airs_aqua amsua_aqua imgr_g08 imgr_g10 imgr_g12 pcp_ssmi_dmsp pcp_tmi_trmm conv sbuv2_n16 sbuv2_n17 sbuv2_n18 omi_aura ssmi_f13 ssmi_f14 ssmi_f15 hirs4_n18 amsua_n18 mhs_n18 amsre_low_aqua amsre_mid_aqua amsre_hig_aqua ssmis_las_f16 ssmis_uas_f16 ssmis_img_f16 ssmis_env_f16 iasi_metop-a amsua_metop-a mhs_metop-a hirs4_metop-a" - for type in $list; do - #count=`ls ${DATA}/*${type}_${loop}* | wc -l` - count=`ls ${DATA}/dir.*/${type}_${loop}* | wc -l` - if [[ count -gt 0 ]]; then - #cat ${DATA}/${type}_${loop}.* > ${DATA}/diag_${type}_${loop}.${CDATE} - #cat ${DATA}/${type}_${loop}.* > ${COMOUT}/diag_${type}_ges.${CDATE}_${charnanal} - #cat ${DATA}/*${type}_${loop}* > diag_${type}.${CDATE} - cat ${DATA}/dir.*/${type}_${loop}* > ${DATA}/diag_${type}.${CDATE} - if [ $SAVEHX == ".true." ]; then - /bin/cp -f diag_${type}.${CDATE} ${COMOUT}/diag_${type}_ges.${CDATE}_${charnanal} - fi - #if [[ "$loop" = "01" ]]; then - # #mv ${DATA}/diag_${type}_${loop}.${CDATE} ${DATA}/diag_${type}_ges.${CDATE} - # mv ${DATA}/diag_${type}_${loop}.${CDATE} ${COMOUT}/diag_${type}_ges.${CDATE}_${charnanal} - #elif [[ "$loop" = "03" ]]; then - # mv ${DATA}/diag_${type}_${loop}.${CDATE} ${DATA}/diag_${type}_anl.${CDATE} - #else - # mv ${DATA}/diag_${type}_${loop}.${CDATE} ${DATA}/diag_${type}_${loop}.${CDATE} - #fi - fi - done -done -if [ $ONEOB_TEST == ".true." ]; then - echo "copy prepqc ..." - ls -l prepqc - /bin/mv -f prepqc ${COMOUT}/prepqc_oneob - ls -l ${COMOUT}/prepqc_oneob - exit 0 -fi -# stop here? -#if [ $SKIP_ANGUPDATE == ".true." ]; then -# #/bin/rm -rf $HOSTFILE -# exit 0 -#fi - -if [ -n "$CONVONLY" ]; then - exit 0 -fi - - -################################################################################ -# Update angle dependent bias -export XLSMPOPTS="parthds=$NTHREADS:stack=$NTHSTACK" -export PGM=$ANGUPDATEXEC -export pgm=$PGM -$LOGSCRIPT - -iy=$(echo $CDATE|cut -c1-4) -im=$(echo $CDATE|cut -c5-6) -id=$(echo $CDATE|cut -c7-8) -ih=$(echo $CDATE|cut -c9-10) - -# local input files assumed to already exist are -# ./satbias_ang.in -# radiance diagnostic files - -if [[ -s satbias_ang.in ]]; then - cp ./satbias_angle ./satbias_ang.in -fi - -cat > global_angupdate.nml < enkf.nml - &nam_enkf - datestring="$adate",datapath="$tmpdir", - analpertwtnh=0.9,analpertwtsh=0.9,analpertwttr=0.9, - ntrac_update=2, - covinflatemax=1.e2,covinflatemin=1,pseudo_rh=.true., - corrlengthnh=1500,corrlengthsh=1500,corrlengthtr=1500, - obtimelnh=15,obtimelsh=15,obtimeltr=15,iassim_order=0, - lnsigcutoffnh=1.5,lnsigcutoffsh=1.5,lnsigcutofftr=1.5, - lnsigcutoffsatnh=3.3,lnsigcutoffsatsh=3.3,lnsigcutoffsattr=3.3, - lnsigcutoffpsnh=2.2,lnsigcutoffpssh=2.2,lnsigcutoffpstr=2.2, - saterrfact=1.0,numiter=3, - sprd_tol=1.e30,paoverpb_thresh=0.975, - npts=$npts,nlevs=$LEVS,nanals=$nanals,ntrac=$NTRAC,nvars=$nvars, - deterministic=.true.,sortinc=.true.,lupd_satbiasc=.false., - nlats=$LATA,nlons=$LONA, - / - &END - &satobs_enkf - sattypes_rad(1) = 'amsua_n15', dsis(1) = 'amsua_n15', - sattypes_rad(2) = 'amsua_n18', dsis(2) = 'amsua_n18', - sattypes_rad(3) = 'amsua_n19', dsis(3) = 'amsua_n19', - sattypes_rad(4) = 'amsub_n16', dsis(4) = 'amsub_n16', - sattypes_rad(5) = 'amsub_n17', dsis(5) = 'amsub_n17', - sattypes_rad(6) = 'amsua_aqua', dsis(6) = 'amsua_aqua', - sattypes_rad(7) = 'amsua_metop-a', dsis(7) = 'amsua_metop-a', - sattypes_rad(8) = 'airs_aqua', dsis(8) = 'airs_aqua', - sattypes_rad(9) = 'hirs3_n17', dsis(9) = 'hirs3_n17', - sattypes_rad(10)= 'hirs4_n19', dsis(10)= 'hirs4_n19', - sattypes_rad(11)= 'hirs4_metop-a', dsis(11)= 'hirs4_metop-a', - sattypes_rad(12)= 'mhs_n18', dsis(12)= 'mhs_n18', - sattypes_rad(13)= 'mhs_n19', dsis(13)= 'mhs_n19', - sattypes_rad(14)= 'mhs_metop-a', dsis(14)= 'mhs_metop-a', - sattypes_rad(15)= 'goes_img_g11', dsis(15)= 'imgr_g11', - sattypes_rad(16)= 'goes_img_g12', dsis(16)= 'imgr_g12', - sattypes_rad(17)= 'goes_img_g13', dsis(17)= 'imgr_g13', - sattypes_rad(18)= 'goes_img_g14', dsis(18)= 'imgr_g14', - sattypes_rad(19)= 'goes_img_g15', dsis(19)= 'imgr_g15', - sattypes_rad(20)= 'avhrr3_n16', dsis(20)= 'avhrr3_n16', - sattypes_rad(21)= 'avhrr3_n17', dsis(21)= 'avhrr3_n17', - sattypes_rad(22)= 'avhrr3_n18', dsis(22)= 'avhrr3_n18', - sattypes_rad(23)= 'amsre_aqua', dsis(23)= 'amsre_aqua', - sattypes_rad(24)= 'ssmis_f16', dsis(24)= 'ssmis_f16', - sattypes_rad(25)= 'ssmis_f17', dsis(25)= 'ssmis_f17', - sattypes_rad(26)= 'ssmis_f18', dsis(26)= 'ssmis_f18', - sattypes_rad(27)= 'ssmis_f19', dsis(27)= 'ssmis_f19', - sattypes_rad(28)= 'ssmis_f20', dsis(28)= 'ssmis_f20', - sattypes_rad(29)= 'sndrd1_g11', dsis(29)= 'sndrD1_g11', - sattypes_rad(30)= 'sndrd2_g11', dsis(30)= 'sndrD2_g11', - sattypes_rad(31)= 'sndrd3_g11', dsis(31)= 'sndrD3_g11', - sattypes_rad(32)= 'sndrd4_g11', dsis(32)= 'sndrD4_g12', - sattypes_rad(33)= 'sndrd1_g12', dsis(33)= 'sndrD1_g12', - sattypes_rad(34)= 'sndrd2_g12', dsis(34)= 'sndrD2_g12', - sattypes_rad(35)= 'sndrd3_g12', dsis(35)= 'sndrD3_g12', - sattypes_rad(36)= 'sndrd4_g12', dsis(36)= 'sndrD4_g12', - sattypes_rad(37)= 'sndrd1_g13', dsis(37)= 'sndrD1_g13', - sattypes_rad(38)= 'sndrd2_g13', dsis(38)= 'sndrD2_g13', - sattypes_rad(39)= 'sndrd3_g13', dsis(39)= 'sndrD3_g13', - sattypes_rad(40)= 'sndrd4_g13', dsis(40)= 'sndrD4_g13', - sattypes_rad(41)= 'sndrd1_g14', dsis(41)= 'sndrD1_g14', - sattypes_rad(42)= 'sndrd2_g14', dsis(42)= 'sndrD2_g14', - sattypes_rad(43)= 'sndrd3_g14', dsis(43)= 'sndrD3_g14', - sattypes_rad(44)= 'sndrd4_g14', dsis(44)= 'sndrD4_g14', - sattypes_rad(45)= 'sndrd1_g15', dsis(45)= 'sndrD1_g15', - sattypes_rad(46)= 'sndrd2_g15', dsis(46)= 'sndrD2_g15', - sattypes_rad(47)= 'sndrd3_g15', dsis(47)= 'sndrD3_g15', - sattypes_rad(48)= 'sndrd4_g15', dsis(48)= 'sndrD4_g15', - sattypes_rad(49)= 'iasi_metop-a', dsis(49)= 'iasi_metop-a', - sattypes_rad(50)= 'atms_npp', dsis(50)= 'atms_npp', - sattypes_rad(51)= 'atms_n20', dsis(51)= 'atms_n20', - sattypes_rad(52)= 'cris_npp', dsis(52)= 'cris_npp', - sattypes_rad(53)= 'cris-fsr_npp', dsis(53)= 'cris-fsr_npp', - sattypes_rad(54)= 'cris-fsr_n20', dsis(54)= 'cris-fsr_n20', - / - &END - &ozobs_enkf - sattypes_oz(1) = 'sbuv2_n16', - sattypes_oz(2) = 'sbuv2_n17', - sattypes_oz(3) = 'sbuv2_n18', - sattypes_oz(4) = 'sbuv2_n19', - sattypes_oz(5) = 'omi_aura', - sattypes_oz(6) = 'gome_metop-a', - / - &END -EOF - -cat enkf.nml - -$ncp $enkfexec ./enkf.x -$ncp $CONVINFO ./convinfo -$ncp $SATINFO ./satinfo -$ncp $OZINFO ./ozinfo -$ncp $dirobs/abias ./abias -$ncp $dirobs/satang ./satang - -ln -fs ./abias ./satbias_in -ln -fs ./satang ./satbias_angle -ln -fs $dirges/sfg* ./ -ln -fs $dirobs/diag* ./ - -poe hpmcount $tmpdir/enkf.x < enkf.nml > stdout - -##/global/save/wx23jd/enkf/work/src/getsigensmean.x $tmpdir/ sanl_2008080112_ensmean sanl_2008080112 60 anal - -##rm $tmpdir/diag* -##rm $tmpdir/sfg* - -exit - - diff --git a/ush/EnKF/runobs_multi.csh b/ush/EnKF/runobs_multi.csh deleted file mode 100755 index 6857be4731..0000000000 --- a/ush/EnKF/runobs_multi.csh +++ /dev/null @@ -1,151 +0,0 @@ -#!/bin/tcsh - -# import parameters -source /global/save/${LOGNAME}/enkf/work/scripts/ncep/current.enkfparms - -setenv startupenv "${datapath}/analdate.csh" -source $startupenv - -# current analysis time. -setenv analdate $analdate - -# substringing to get yr, mon, day, hr info -setenv yr `echo $analdate | cut -c1-4` -setenv mon `echo $analdate | cut -c5-6` -setenv day `echo $analdate | cut -c7-8` -setenv hr `echo $analdate | cut -c9-10` - -# previous analysis time. -setenv analdatem1 `${incdate} $analdate -$ANALINC` -# next analysis time. -setenv analdatep1 `${incdate} $analdate $ANALINC` -setenv datapathprev "${datapath}/${analdatem1}/" -setenv hrp1 `echo $analdatep1 | cut -c9-10` -setenv hrm1 `echo $analdatem1 | cut -c9-10` -setenv datapathp1 "${datapath}/${analdatep1}/" -setenv datapathm1 "${datapath}/${analdatem1}/" - -# make log dir for analdate -setenv current_logdir "${logdir}/ensda_out_${analdate}" -echo "Current LogDir: ${current_logdir}" -mkdir -p ${current_logdir} - -setenv DIAGCONV .true. -setenv HXONLY .true. -setenv SAVEHX .true. - -setenv datapath2 "${datapath}/${analdate}/" - -set nanal=$NSTART -@ nanalsp1 = $nanals + 1 -echo "nanalsp1=",$nanalsp1 - -while ($nanal <= $NEND) - -if ($nanal == $nanalsp1) then - setenv charnanal "ensmean" -else - setenv charnanal "mem"`printf %03i $nanal` -endif - -setenv SFCG03a ${datapath2}/bfg_${analdate}_fhr03_${charnanal} -setenv SFCG04a ${datapath2}/bfg_${analdate}_fhr04_${charnanal} -setenv SFCG05a ${datapath2}/bfg_${analdate}_fhr05_${charnanal} -setenv SFCG06a ${datapath2}/bfg_${analdate}_fhr06_${charnanal} -setenv SFCG07a ${datapath2}/bfg_${analdate}_fhr07_${charnanal} -setenv SFCG08a ${datapath2}/bfg_${analdate}_fhr08_${charnanal} -setenv SFCG09a ${datapath2}/bfg_${analdate}_fhr09_${charnanal} -setenv SFCG03 ${datapath2}/bfg_${analdate}_fhr03_${charnanal} -setenv SFCG04 ${datapath2}/bfg_${analdate}_fhr04_${charnanal} -setenv SFCG05 ${datapath2}/bfg_${analdate}_fhr05_${charnanal} -setenv SFCG06 ${datapath2}/bfg_${analdate}_fhr06_${charnanal} -setenv SFCG07 ${datapath2}/bfg_${analdate}_fhr07_${charnanal} -setenv SFCG08 ${datapath2}/bfg_${analdate}_fhr08_${charnanal} -setenv SFCG09 ${datapath2}/bfg_${analdate}_fhr09_${charnanal} -setenv SFCGES $SFCG06a -setenv SFCANL ${datapath2}/sfcanl_${analdate}_${charnanal} -# use ensemble mean surface files for forward operator -# (since ob thinning routines use surface information, won't -# get same obs for each ensemble member if different surface -# files specified for each member). -setenv SFCG03Ma ${datapath2}/bfg_${analdate}_fhr03_ensmean -setenv SFCG04Ma ${datapath2}/bfg_${analdate}_fhr04_ensmean -setenv SFCG05Ma ${datapath2}/bfg_${analdate}_fhr05_ensmean -setenv SFCG06Ma ${datapath2}/bfg_${analdate}_fhr05_ensmean -setenv SFCG07Ma ${datapath2}/bfg_${analdate}_fhr07_ensmean -setenv SFCG08Ma ${datapath2}/bfg_${analdate}_fhr08_ensmean -setenv SFCG09Ma ${datapath2}/bfg_${analdate}_fhr09_ensmean -setenv SFCG03M ${datapath2}/bfg_${analdate}_fhr03_ensmean -setenv SFCG04M ${datapath2}/bfg_${analdate}_fhr04_ensmean -setenv SFCG05M ${datapath2}/bfg_${analdate}_fhr05_ensmean -setenv SFCG06M ${datapath2}/bfg_${analdate}_fhr06_ensmean -setenv SFCG07M ${datapath2}/bfg_${analdate}_fhr07_ensmean -setenv SFCG08M ${datapath2}/bfg_${analdate}_fhr08_ensmean -setenv SFCG09M ${datapath2}/bfg_${analdate}_fhr09_ensmean -setenv SFCGESM $SFCG06Ma - - -# just use ensemble mean surface file for all members -setenv SIGG03 ${datapath2}/sfg_${analdate}_fhr03_${charnanal} -setenv SIGG04 ${datapath2}/sfg_${analdate}_fhr04_${charnanal} -setenv SIGG05 ${datapath2}/sfg_${analdate}_fhr05_${charnanal} -setenv SIGGES ${datapath2}/sfg_${analdate}_fhr06_${charnanal} -setenv SIGG07 ${datapath2}/sfg_${analdate}_fhr07_${charnanal} -setenv SIGG08 ${datapath2}/sfg_${analdate}_fhr08_${charnanal} -setenv SIGG09 ${datapath2}/sfg_${analdate}_fhr09_${charnanal} - -##setenv GBIAS ${datapath}/${analdatem1}/abias -setenv GSATANG ${datapath}/${analdatem1}/satang - -# obs bufr files to use in assimilation. -setenv PREINP "${RUN}.t${hr}z." -setenv PREINP1 "${RUN}.t${hrp1}z." -setenv COMIN "${obs_datapath}/${analdate}/${datdump}" -setenv COMINGES "/global/noscrub/${LOGNAME}/bias_prd09q1o" -setenv GPSBF "${COMIN}/gpsro.${datdump}.${analdate}" -setenv PREPQC "${PREPDATA}/prepqc.${datdump}.${analdate}" -setenv TCVIT "${COMIN}/tcvitl.${datdump}.${analdate}" -setenv B1AMUA "${COMIN}/1bamua.${datdump}.${analdate}" -setenv B1AMUB "${COMIN}/1bamub.${datdump}.${analdate}" -setenv FNTSFA "${COMIN}/sstgrb.${datdump}.${analdate}" -setenv FNACNA "${COMIN}/icegrb.${datdump}.${analdate}" -setenv FNSNOA "${COMIN}/snogrb.${datdump}.${analdate}" -setenv SSMITBF "${COMIN}/ssmit.${datdump}.${analdate}" -setenv SBUVBF "${COMIN}/osbuv8.${datdump}.${analdate}" -setenv AIRSBF "${COMIN}/airsev.${datdump}.${analdate}" -setenv IASIBF "${COMIN}/mtiasi.${datdump}.${analdate}" -setenv B1HRS3 "${COMIN}/1bhrs3.${datdump}.${analdate}" -setenv B1HRS4 "${COMIN}/1bhrs4.${datdump}.${analdate}" -setenv AMSREBF "${COMIN}/amsre.${datdump}.${analdate}" -setenv B1MHS "${COMIN}/1bmhs.${datdump}.${analdate}" -setenv GSNDBF1 "${COMIN}/goesfv.${datdump}.${analdate}" -setenv ABIAS "${COMINGES}/biascr.${datdump}.${analdate}" -setenv GBIAS "${COMINGES}/biascr.${datdump}.${analdate}" - -# check to see if output files already created. -set obsfiles = "${datapath2}/diag_conv_ges.${analdate}_${charnanal} ${datapath2}/sfcanl_${analdate}_${charnanal}" -set filemissing='no' -echo $obsfiles -foreach obsfile ($obsfiles) - if { /bin/test ! -s $obsfile } set filemissing='yes' -end -if ($filemissing == 'yes') then - echo "nanal = ${nanal}" - setenv PGMOUT ${current_logdir}/run_cycle_${charnanal}.out - time sh ${enkfscripts}/drive_gsi >&! ${current_logdir}/run_obs_${charnanal}.out -else - echo "skipping nanal = ${nanal}, output files already created" -endif - -@ nanal = $nanal + 1 -end -echo "waiting at nanal = ${nanal} `date`" -wait -echo "all done `date`" - -if ($charnanal == 'ensmean') then - echo "now that ensmean done, submit ensemble member obs processing" - /bin/tcsh ${enkfscripts}/obsproc_multi.sh -endif - -exit 0 diff --git a/ush/EnKF/sub_gfsctrlhigh.sh b/ush/EnKF/sub_gfsctrlhigh.sh deleted file mode 100755 index 5e59187864..0000000000 --- a/ush/EnKF/sub_gfsctrlhigh.sh +++ /dev/null @@ -1,75 +0,0 @@ -#!/bin/tcsh - -source /global/save/${LOGNAME}/enkf/work/scripts_ncep/current.enkfparms - -########################################################################## -# current cycle starts - -set username = `whoami` - -setenv startupenv "${datapath}/analdate.csh" -source $startupenv - -setenv SUB "/u/wx23sm/bin/sub_vapor" -echo "SUB= ${SUB}" -#------------------------------------------------------------------------ -mkdir -p $datapath -mkdir -p $logdir - -echo "BaseDir: ${basedir}" -echo "EnKFBin: ${enkfbin}" -echo "DataPath: ${datapath}" -echo "LogDir: ${logdir}" - -############################################################################ -# Main Program -# Please do not edit the code below; it is not recommended except lines relevant to getsfcensmean.csh. - -env -echo "starting the cycle" - -set ncycles=10 -set ncycle=1 -##while ($ncycle <= $ncycles) -echo "ncycle = " $ncycle "and ncycles = " $ncycles - -# substringing to get yr, mon, day, hr info -setenv yr `echo $analdate | cut -c1-4` -setenv mon `echo $analdate | cut -c5-6` -setenv day `echo $analdate | cut -c7-8` -setenv hr `echo $analdate | cut -c9-10` -setenv ANALHR $hr -# set environment analdate -setenv datapath2 "${datapath}/${analdate}/" -# copy hostfileall to working dir. -##/bin/cp -f ${datapath}/hostfileall ${datapath2} - -# current analysis time. -setenv analdate $analdate -# previous analysis time. -setenv analdatem1 `${incdate} $analdate -$ANALINC` -# next analysis time. -setenv analdatep1 `${incdate} $analdate $ANALINC` -setenv datapathprev "${datapath}/${analdatem1}/" -setenv hrp1 `echo $analdatep1 | cut -c9-10` -setenv hrm1 `echo $analdatem1 | cut -c9-10` -setenv datapathp1 "${datapath}/${analdatep1}/" -setenv datapathm1 "${datapath}/${analdatem1}/" -mkdir -p $datapathp1 - -date -echo "analdate minus 1: $analdatem1" -echo "analdate: $analdate" -echo "analdate plus 1: $analdatep1" - -# make log dir for analdate -setenv current_logdir "${logdir}/ensda_out_${analdate}" -echo "Current LogDir: ${current_logdir}" -mkdir -p ${current_logdir} - -mkdir -p ${datapath}${analdatep1} - -echo "SUBMIT HI-RES GFS CNTRL" -$SUB -a GDAS-T2O -g devonprod -j enkf_a5_gfsctrl -o ${current_logdir}/run_gfsctrl.out -p 64/6/N -q dev -r 1640/1 -t 00:35:00 -u ${LOGNAME} -w +0000 ${enkfscripts}/${ctrl_gfs} - -exit 0 diff --git a/ush/EnKF/test.py b/ush/EnKF/test.py deleted file mode 100755 index 537b107d2d..0000000000 --- a/ush/EnKF/test.py +++ /dev/null @@ -1,7 +0,0 @@ -import sys -import random -n1 = int(sys.argv[1]) -nens = int(sys.argv[2]) -array = random.sample(xrange(n1), nens) -for a1 in array: - print '%s' % (a1) diff --git a/ush/EnKF/test_gdas_enkf_fcst.sh b/ush/EnKF/test_gdas_enkf_fcst.sh deleted file mode 100755 index 60307bf185..0000000000 --- a/ush/EnKF/test_gdas_enkf_fcst.sh +++ /dev/null @@ -1,92 +0,0 @@ -#!/bin/ksh - -#BSUB -o gdas_enkf_fcst.o%J -#BSUB -e gdas_enkf_fcst.o%J -#BSUB -J gdas_enkf_fcst -#BSUB -n 96 -#BSUB -x -#BSUB -R span[ptile=6] -#BSUB -R affinity[core(4)] -#BSUB -W 02:00 -#BSUB -q devmax2 -#BSUB -a poe -#BSUB -P GFS-T2O - -set -x - -export CDATE=2016030212 -export ENSGRP=1 - -export grp=$ENSGRP -if [[ $grp -lt 10 ]]; then - export grp=0$grp -fi - - -############################################################# -# Specify whether the run is production or development -############################################################# -export RUN_ENVIR=para -export PDY=`echo $CDATE | cut -c1-8` -export cyc=`echo $CDATE | cut -c9-10` -export job=gdas_enkf_innovate_obs_grp${grp}_${cyc} -export pid=${pid:-$$} -export jobid=${job}.${pid} -export envir=para -export DATAROOT=/stmpd3/$LOGNAME/test -export COMROOT=/ptmpd3/$LOGNAME/com - - -############################################################# -# Specify versions -############################################################# -export gdas_ver=v13.0.0 -export global_shared_ver=v13.0.0 -export grib_util_ver=v1.0.1 -export prod_util_ver=v1.0.2 - - -############################################################# -# Load modules -############################################################# -. /usrx/local/Modules/3.2.9/init/ksh -module use /nwprod2/modulefiles -module load grib_util/$grib_util_ver -module load prod_util/$prod_util_ver - -module unload ics/12.1 -module load ics/14.0.1 - -module list - - -############################################################# -# WCOSS environment settings -############################################################# -export MP_EAGER_LIMIT=65536 -export MP_COREFILE_FORMAT=lite -export MP_EUIDEVELOP=min -export MP_EUIDEVICE=sn_all -export MP_EUILIB=us -export MP_MPILIB=mpich2 -export MP_LABELIO=yes -export MP_USE_BULK_XFER=no -export MP_SHARED_MEMORY=yes -export KMP_STACKSIZE=2048m -export NTHREADS_EFCS=${NTHREADS_EFCS:-4} - - -############################################################# -# Set user specific variables -############################################################# -export NWTEST=/global/save/$LOGNAME/svn/gfs/branches -export PARA_CONFIG=$NWTEST/gdas.${gdas_ver}/driver/para_config.gdas_enkf_fcst -export JOBGLOBAL=$NWTEST/gdas.${gdas_ver}/jobs - - -############################################################# -# Execute job -############################################################# -$JOBGLOBAL/JGDAS_ENKF_FCST - -exit diff --git a/ush/EnKF/test_gdas_enkf_inflate_recenter.sh b/ush/EnKF/test_gdas_enkf_inflate_recenter.sh deleted file mode 100755 index 74194b542a..0000000000 --- a/ush/EnKF/test_gdas_enkf_inflate_recenter.sh +++ /dev/null @@ -1,85 +0,0 @@ -#!/bin/ksh - -#BSUB -o gdas_enkf_inflate_recenter.o%J -#BSUB -e gdas_enkf_inflate_recenter.o%J -#BSUB -J gdas_enkf_inflate_recenter -#BSUB -q devmax2 -#BSUB -n 80 -#BSUB -R span[ptile=24] -#BSUB -R affinity[core] -#BSUB -x -#BSUB -W 01:00 -#BSUB -a poe -#BSUB -P GFS-T2O - -set -x - -export CDATE=2016030212 - -############################################################# -# Specify whether the run is production or development -############################################################# -export RUN_ENVIR=para -export PDY=`echo $CDATE | cut -c1-8` -export cyc=`echo $CDATE | cut -c9-10` -export job=gdas_enkf_inflate_recenter_${cyc} -export pid=${pid:-$$} -export jobid=${job}.${pid} -export envir=para -export DATAROOT=/stmpd3/$LOGNAME/test -export COMROOT=/ptmpd3/$LOGNAME/com - - -############################################################# -# Specify versions -############################################################# -export gdas_ver=v13.0.0 -export global_shared_ver=v13.0.0 -export grib_util_ver=v1.0.1 -export prod_util_ver=v1.0.2 - - -############################################################# -# Load modules -############################################################# -. /usrx/local/Modules/3.2.9/init/ksh -module use /nwprod2/lib/modulefiles -module load grib_util/$grib_util_ver -module load prod_util/$prod_util_ver - -module unload ics/12.1 -module load ics/15.0.3 - -module list - - -############################################################# -# WCOSS environment settings -############################################################# -export MP_EAGER_LIMIT=65536 -export MP_COREFILE_FORMAT=lite -export MP_EUIDEVELOP=min -export MP_EUIDEVICE=sn_all -export MP_EUILIB=us -export MP_MPILIB=mpich2 -export MP_LABELIO=yes -export MP_USE_BULK_XFER=no -export CHGRESTHREAD=24 -export KMP_STACKSIZE=2048m -export MPICH_ALLTOALL_THROTTLE=0 - - -############################################################# -# Set user specific variables -############################################################# -export NWTEST=/global/save/$LOGNAME/svn/gfs/branches -export PARA_CONFIG=$NWTEST/gdas.${gdas_ver}/driver/para_config.gdas_enkf_inflate_recenter -export JOBGLOBAL=$NWTEST/gdas.${gdas_ver}/jobs - - -############################################################# -# Execute job -############################################################# -$JOBGLOBAL/JGDAS_ENKF_INFLATE_RECENTER - -exit diff --git a/ush/EnKF/test_gdas_enkf_innovate_obs.sh b/ush/EnKF/test_gdas_enkf_innovate_obs.sh deleted file mode 100755 index 657075bd37..0000000000 --- a/ush/EnKF/test_gdas_enkf_innovate_obs.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/ksh - -#BSUB -o gdas_enkf_innovate_obs.o%J -#BSUB -e gdas_enkf_innovate_obs.o%J -#BSUB -J gdas_enkf_innovate_obs -#BSUB -n 144 -#BSUB -x -#BSUB -R span[ptile=12] -#BSUB -R affinity[core(2)] -#BSUB -W 02:30 -#BSUB -q devmax2 -#BSUB -a poe -#BSUB -P GFS-T2O - -set -x - -export CDATE=2016030212 -export ENSGRP=1 - -export grp=$ENSGRP -if [[ $grp -lt 10 ]]; then - export grp=0$grp -fi - - -############################################################# -# Specify whether the run is production or development -############################################################# -export RUN_ENVIR=para -export PDY=`echo $CDATE | cut -c1-8` -export cyc=`echo $CDATE | cut -c9-10` -export job=gdas_enkf_innovate_obs_grp${grp}_${cyc} -export pid=${pid:-$$} -export jobid=${job}.${pid} -export envir=para -export DATAROOT=/stmpd3/$LOGNAME/test -export COMROOT=/ptmpd3/$LOGNAME/com - - -############################################################# -# Specify versions -############################################################# -export gdas_ver=v13.0.0 -export global_shared_ver=v13.0.0 -export crtm_ver=v2.2.3 -export grib_util_ver=v1.0.1 -export prod_util_ver=v1.0.2 -export util_shared_ver=v1.0.2 - - -############################################################# -# Load modules -############################################################# -. /usrx/local/Modules/3.2.9/init/ksh -module use /nwprod2/lib/modulefiles -module load crtm/${crtm_ver} - -module use /nwprod2/modulefiles -module load grib_util/$grib_util_ver -module load prod_util/$prod_util_ver -module load util_shared/$util_shared_ver - -module unload ics/12.1 -module load ics/15.0.3 - -module list - - -############################################################# -# WCOSS environment settings -############################################################# -export MP_EAGER_LIMIT=65536 -export MP_LABELIO=yes -export MP_USE_BULK_XFER=yes -export MP_SINGLE_THREAD=yes -export MP_MPILIB=mpich2 -export MP_SHARED_MEMORY=yes -export MP_USE_TOKEN_FLOW_CONTROL=yes -export FORT_BUFFERED=true -export KMP_STACKSIZE=2048m -export MPICH_ALLTOALL_THROTTLE=0 - -export OMP_NUM_THREADS_CY=24 -export NTHREADS=$OMP_NUM_THREADS_CY -export NTHREADS_GSI=2 -export NTHSTACK=1024000000 - - -############################################################# -# Set user specific variables -############################################################# -export NWTEST=/global/save/$LOGNAME/svn/gfs/branches -export PARA_CONFIG=$NWTEST/gdas.${gdas_ver}/driver/para_config.gdas_enkf_innovate_obs -export JOBGLOBAL=$NWTEST/gdas.${gdas_ver}/jobs - - -############################################################# -# Execute job -############################################################# -$JOBGLOBAL/JGDAS_ENKF_INNOVATE_OBS - -exit diff --git a/ush/EnKF/test_gdas_enkf_post.sh b/ush/EnKF/test_gdas_enkf_post.sh deleted file mode 100755 index f5fc08ea9b..0000000000 --- a/ush/EnKF/test_gdas_enkf_post.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/ksh - -#BSUB -o gdas_enkf_post.o%J -#BSUB -e gdas_enkf_post.o%J -#BSUB -J gdas_enkf_post -#BSUB -q devmax2 -#BSUB -n 81 -#BSUB -R span[ptile=24] -#BSUB -R affinity[core] -#BSUB -x -#BSUB -W 01:00 -#BSUB -a poe -#BSUB -P GFS-T2O - -set -x - -export CDATE=2016030212 - -############################################################# -# Specify whether the run is production or development -############################################################# -export RUN_ENVIR=para -export PDY=`echo $CDATE | cut -c1-8` -export cyc=`echo $CDATE | cut -c9-10` -export job=gdas_enkf_post_${cyc} -export pid=${pid:-$$} -export jobid=${job}.${pid} -export envir=para -export DATAROOT=/stmpd3/$LOGNAME/test -export COMROOT=/ptmpd3/$LOGNAME/com - - -############################################################# -# Specify versions -############################################################# -export gdas_ver=v13.0.0 -export global_shared_ver=v13.0.0 -export grib_util_ver=v1.0.1 -export prod_util_ver=v1.0.2 - - -############################################################# -# Load modules -############################################################# -. /usrx/local/Modules/3.2.9/init/ksh -module use /nwprod2/modulefiles -module load grib_util/$grib_util_ver -module load prod_util/$prod_util_ver - -module unload ics/12.1 -module load ics/15.0.3 - -module list - - -############################################################# -# WCOSS environment settings -############################################################# -export MP_LABELIO=yes -export MP_STDOUTMODE=ordered -export MP_PGMMODEL=mpmd -export POE=YES -export OMP_NUM_THREADS=1 -export CHGRESTHREAD=24 - - -############################################################# -# Set user specific variables -############################################################# -export NWTEST=/global/save/$LOGNAME/svn/gfs/branches -export PARA_CONFIG=$NWTEST/gdas.${gdas_ver}/driver/para_config.gdas_enkf_post -export JOBGLOBAL=$NWTEST/gdas.${gdas_ver}/jobs - - -############################################################# -# Execute job -############################################################# -$JOBGLOBAL/JGDAS_ENKF_POST - -exit diff --git a/ush/EnKF/test_gdas_enkf_select_obs.sh b/ush/EnKF/test_gdas_enkf_select_obs.sh deleted file mode 100755 index 70dc082d56..0000000000 --- a/ush/EnKF/test_gdas_enkf_select_obs.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/ksh - -#BSUB -o gdas_enkf_select_obs.o%J -#BSUB -e gdas_enkf_select_obs.o%J -#BSUB -J gdas_enkf_select_obs -#BSUB -n 144 -#BSUB -x -#BSUB -R span[ptile=12] -#BSUB -R affinity[core(2)] -#BSUB -W 00:30 -#BSUB -q devmax2 -#BSUB -a poe -#BSUB -P GFS-T2O - -set -x - -export CDATE=2016030212 - -############################################################# -# Specify whether the run is production or development -############################################################# -export RUN_ENVIR=para -export PDY=`echo $CDATE | cut -c1-8` -export cyc=`echo $CDATE | cut -c9-10` -export job=gdas_enkf_select_obs_${cyc} -export pid=${pid:-$$} -export jobid=${job}.${pid} -export envir=para -export DATAROOT=/stmpd3/$LOGNAME/test -export COMROOT=/ptmpd3/$LOGNAME/com - - -############################################################# -# Specify versions -############################################################# -export gdas_ver=v13.0.0 -export global_shared_ver=v13.0.0 - -export crtm_ver=v2.2.3 -export grib_util_ver=v1.0.1 -export prod_util_ver=v1.0.2 -export util_shared_ver=v1.0.2 - - -############################################################# -# Load modules -############################################################# -. /usrx/local/Modules/3.2.9/init/ksh -module use /nwprod2/lib/modulefiles -module load crtm/${crtm_ver} - -module use /nwprod2/modulefiles -module load grib_util/$grib_util_ver -module load prod_util/$prod_util_ver -module load util_shared/$util_shared_ver - -module unload ics/12.1 -module load ics/15.0.3 - -module list - - -############################################################# -# WCOSS environment settings -############################################################# -export MP_EAGER_LIMIT=65536 -export MP_LABELIO=yes -export MP_USE_BULK_XFER=yes -export MP_SINGLE_THREAD=yes -export MP_MPILIB=mpich2 -export MP_SHARED_MEMORY=yes -export MP_USE_TOKEN_FLOW_CONTROL=yes -export FORT_BUFFERED=true -export KMP_STACKSIZE=2048m -export MPICH_ALLTOALL_THROTTLE=0 - -export OMP_NUM_THREADS_CY=24 -export NTHREADS=$OMP_NUM_THREADS_CY -export NTHREADS_GSI=2 -export NTHSTACK=1024000000 - - -############################################################# -# Set user specific variables -############################################################# -export NWTEST=/global/save/$LOGNAME/svn/gfs/branches -export PARA_CONFIG=$NWTEST/gdas.${gdas_ver}/driver/para_config.gdas_enkf_select_obs -export JOBGLOBAL=$NWTEST/gdas.${gdas_ver}/jobs - - -############################################################# -# Execute job -############################################################# -$JOBGLOBAL/JGDAS_ENKF_SELECT_OBS - -exit diff --git a/ush/EnKF/test_gdas_enkf_update.sh b/ush/EnKF/test_gdas_enkf_update.sh deleted file mode 100755 index a3ee47fe59..0000000000 --- a/ush/EnKF/test_gdas_enkf_update.sh +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/ksh - -#BSUB -o gdas_enkf_update.o%J -#BSUB -e gdas_enkf_update.o%J -#BSUB -J gdas_enkf_update -#BSUB -n 240 -#BSUB -x -#BSUB -R span[ptile=6] -#BSUB -R affinity[core(4)] -#BSUB -W 01:00 -#BSUB -q devmax2 -#BSUB -a poe -#BSUB -P GFS-T2O - -set -x - -export CDATE=2016030212 - -############################################################# -# Specify whether the run is production or development -############################################################# -export RUN_ENVIR=para -export PDY=`echo $CDATE | cut -c1-8` -export cyc=`echo $CDATE | cut -c9-10` -export job=gdas_enkf_update_${cyc} -export pid=${pid:-$$} -export jobid=${job}.${pid} -export envir=para -export DATAROOT=/stmpd3/$LOGNAME/test -export COMROOT=/ptmpd3/$LOGNAME/com - - -############################################################# -# Specify versions -############################################################# -export gdas_ver=v13.0.0 -export global_shared_ver=v13.0.0 -export grib_util_ver=v1.0.1 -export prod_util_ver=v1.0.2 -export util_shared_ver=v1.0.2 - - -############################################################# -# Load modules -############################################################# -. /usrx/local/Modules/3.2.9/init/ksh -module use /nwprod2/modulefiles -module load grib_util/$grib_util_ver -module load prod_util/$prod_util_ver -module load util_shared/$util_shared_ver - -module unload ics/12.1 -module load ics/15.0.3 - -module list - - -############################################################# -# WCOSS environment settings -############################################################# -export MP_EAGER_LIMIT=65536 -export MP_EUIDEVELOP=min -export MP_MPILIB=mpich2 -export MP_LABELIO=yes -export MP_USE_BULK_XFER=yes -export MP_SHARED_MEMORY=yes -export MP_SINGLE_THREAD=yes -export MPICH_ALLTOALL_THROTTLE=0 -export KMP_STACKSIZE=2048m - -export NTHREADS_ENKF=4 - - -############################################################# -# Set user specific variables -############################################################# -export NWTEST=/global/save/$LOGNAME/svn/gfs/branches -export PARA_CONFIG=$NWTEST/gdas.${gdas_ver}/driver/para_config.gdas_enkf_update -export JOBGLOBAL=$NWTEST/gdas.${gdas_ver}/jobs - - -############################################################# -# Execute job -############################################################# -$JOBGLOBAL/JGDAS_ENKF_UPDATE - -exit diff --git a/ush/EnKF/verifec.py b/ush/EnKF/verifec.py deleted file mode 100644 index 273df614c2..0000000000 --- a/ush/EnKF/verifec.py +++ /dev/null @@ -1,238 +0,0 @@ -from PyNIO import nio -from spharm import Spharmt, regrid -import numpy as np -from dateutils import dateshift, daterange -import sys, os - -datapath1 = '/lfs0/tmp/whitaker/ensda/ensrf_test2' -runname1 = 'enkf' -datapath2 = '/lfs0/tmp/whitaker/ncepgfs/gsi_test' -runname2 = 'gdas1' -#datapath2 = '/lfs0/tmp/whitaker/ensda/ensrf_test' -#runname2 = 'enkf' - -date1 = sys.argv[1] -date2 = sys.argv[2] -fhr = sys.argv[3] -varshort = sys.argv[4] - -print datapath1 -print datapath2 -print 'fhr = ',fhr - -def getmean(diff,coslats): - meancoslats = coslats.mean() - diffvar = (coslats*diff).mean() - return diffvar/meancoslats - -def getcorr(f,a): - f = f - f.mean(axis=0) - a = a - a.mean(axis=0) - covfa = (f*a).mean(axis=0) - varf = (f**2).mean(axis=0) - vara = (a**2).mean(axis=0) - return covfa/(np.sqrt(varf)*np.sqrt(vara)) - -def getmse(f,a): - return ((f-a)**2).mean(axis=0) - -nlonsin = 800; nlatsin = 400 -nlons = 360; nlats = 181 -ntrunc = 20 -latbound = 20. - -sin = Spharmt(nlonsin,nlatsin) -sout = Spharmt(nlons,nlats) - -delta = 360./nlons -lats = 90.-delta*np.arange(nlats) -coslats = np.cos((np.pi/180.)*lats) -coslats = coslats[:,np.newaxis]*np.ones((nlats,nlons)) -latnh = lats.tolist().index(latbound) -latsh = lats.tolist().index(-latbound) -coslatsnh = coslats[0:latnh+1,:] -coslatssh = coslats[latsh:,:] -coslatstr = coslats[latnh:latsh+1,:] -lons = delta*np.arange(nlons) -lons, lats = np.meshgrid(lons,lats[::-1]) - -filename = varshort -if varshort == 'hgt': - varname = 'HGT_3_ISBL_10' - ecvarname = 'gh_P0_L100_GGA0' -elif varshort == 'mslp': - varname = 'PRMSL_3_MSL_10' - ecvarname = 'msl_P0_L101_GGA0' -elif varshort == 'temp': - varname = 'TMP_3_ISBL_10' - ecvarname = 't_P0_L100_GGA0' -elif varshort == 'uwnd': - varname = 'U_GRD_3_ISBL_10' - ecvarname = 'u_P0_L100_GGA0' - filename = 'uv' -elif varshort == 'vwnd': - varname = 'V_GRD_3_ISBL_10' - ecvarname = 'v_P0_L100_GGA0' - filename = 'uv' -elif varshort in ['chi','psi']: - filename = 'uv' - varnamev = 'V_GRD_3_ISBL_10' - varnameu = 'U_GRD_3_ISBL_10' - ecvarnamev = 'v_P0_L100_GGA0' - ecvarnameu = 'u_P0_L100_GGA0' -else: - print 'unknown variable',varshort - raise SystemExit - -if filename in ['mslp']: - levels = [None] -elif filename == 'hgt': - levels = [1000,925,850,700,500,300,250,200,50] -else: - levels = [1000,925,850,700,500,300,250,200] - -for level in levels: - ecfilename = filename+'.grib' - f = nio.open_file('/p72/reanl/whitaker/'+ecfilename) - lonsin = f.variables['lon_0'][:] - latsin = f.variables['lat_0'][:] - datesin = f.variables['initial_time0'][:] - dates = [] - for date in datesin: - d = date.split('/') - mm = d[0]; dd = d[1]; yyyy = d[2][0:4] - hh = (d[2].split('(')[1]).split(':')[0] - dates.append(yyyy+mm+dd+hh) - if varshort not in ['psi','chi']: - varin = f.variables[ecvarname] - else: - varinu = f.variables[ecvarnameu] - varinv = f.variables[ecvarnamev] - datefcsts = daterange(date1,date2,12) - fcsts_2 = np.zeros((len(datefcsts),nlats,nlons),np.float32) - fcsts_1 = np.zeros((len(datefcsts),nlats,nlons),np.float32) - anals = np.zeros((len(datefcsts),nlats,nlons),np.float32) - if levels[0] is not None: - eclevels = (0.01*f.variables['lv_ISBL0'][:]).tolist() - nlevec = eclevels.index(level) - for ntime,date in enumerate(datefcsts): - dateverif = dateshift(date,int(fhr)) - nt = dates.index(dateverif) - if varshort in ['chi','psi']: - if fhr=='0': - grbfile_1 =\ - os.path.join(os.path.join(datapath1,date),runname1+'.t'+date[8:10]+'z.pgrbanl') - grbfile_2 =\ - os.path.join(os.path.join(datapath2,date),runname2+'.t'+date[8:10]+'z.pgrbanl') - else: - grbfile_1 =\ - os.path.join(os.path.join(datapath1,date),runname1+'.t'+date[8:10]+'z.pgrbf'+fhr) - grbfile_2 =\ - os.path.join(os.path.join(datapath2,date),runname2+'.t'+date[8:10]+'z.pgrbf'+fhr) - f2 = nio.open_file(grbfile_2+'.grib') - levels = f2.variables['lv_ISBL3'][:].tolist() - nlev = levels.index(level) - dat2u = f2.variables[varnameu][nlev] - dat2v = f2.variables[varnamev][nlev] - f2.close() - f1 = nio.open_file(grbfile_1+'.grib') - levels = f1.variables['lv_ISBL3'][:].tolist() - nlev = levels.index(level) - dat1u = f1.variables[varnameu][nlev] - dat1v = f1.variables[varnamev][nlev] - f1.close() - datainu = varinu[nt,nlevec,:,:] - datainv = varinv[nt,nlevec,:,:] - datverifu = regrid(sin,sout,datainu,ntrunc=ntrunc) - datverifv = regrid(sin,sout,datainv,ntrunc=ntrunc) - if varshort == 'psi': - datverif,chi =\ - sout.getpsichi(datverifu,datverifv,ntrunc=ntrunc) - dat2,chi = sout.getpsichi(dat2u,dat2v,ntrunc=ntrunc) - dat1,chi = sout.getpsichi(dat1u,dat1v,ntrunc=ntrunc) - else: - psi,datverif = sout.getpsichi(datverifu,datverifv,ntrunc=ntrunc) - psi,dat2 = sout.getpsichi(dat2u,dat2v,ntrunc=ntrunc) - psi,dat1 = sout.getpsichi(dat1u,dat1v,ntrunc=ntrunc) - else: - if fhr=='0': - grbfile_1 =\ - os.path.join(os.path.join(datapath1,date),runname1+'.t'+date[8:10]+'z.pgrbanl') - grbfile_2 =\ - os.path.join(os.path.join(datapath2,date),runname2+'.t'+date[8:10]+'z.pgrbanl') - else: - grbfile_1 =\ - os.path.join(os.path.join(datapath1,date),runname1+'.t'+date[8:10]+'z.pgrbf'+fhr) - grbfile_2 =\ - os.path.join(os.path.join(datapath2,date),runname2+'.t'+date[8:10]+'z.pgrbf'+fhr) - f2 = nio.open_file(grbfile_2+'.grib') - levels = f2.variables['lv_ISBL3'][:].tolist() - if level is not None: - nlev = levels.index(level) - dat2 = f2.variables[varname][nlev] - else: - dat2 = f2.variables[varname][:] - if ntrunc is not None: - dat2spec = sout.grdtospec(dat2,ntrunc=ntrunc) - dat2 = sout.spectogrd(dat2spec) - f2.close() - f1 = nio.open_file(grbfile_1+'.grib') - if level is not None: - levels = f1.variables['lv_ISBL3'][:].tolist() - nlev = levels.index(level) - dat1 = f1.variables[varname][nlev] - else: - dat1 = f1.variables[varname][:] - if ntrunc is not None: - dat1spec = sout.grdtospec(dat1,ntrunc=ntrunc) - dat1 = sout.spectogrd(dat1spec) - f1.close() - if level is not None: - datain = varin[nt,nlevec,:,:] - else: - datain = varin[nt,:,:] - datverif = regrid(sin,sout,datain,ntrunc=ntrunc) - fcsts_2[ntime] = dat2 - fcsts_1[ntime] = dat1 - anals[ntime] = datverif - corr_2 = getcorr(fcsts_2,anals) - corr_1 = getcorr(fcsts_1,anals) - corrnh = corr_2[0:latnh+1,:] - corrsh = corr_2[latsh:,:] - corrtr = corr_2[latnh:latsh+1,:] - corrg_2 = getmean(corr_2,coslats) - corrnh_2 = getmean(corrnh,coslatsnh) - corrsh_2 = getmean(corrsh,coslatssh) - corrtr_2 = getmean(corrtr,coslatstr) - corrnh = corr_1[0:latnh+1,:] - corrsh = corr_1[latsh:,:] - corrtr = corr_1[latnh:latsh+1,:] - corrg_1 = getmean(corr_1,coslats) - corrnh_1 = getmean(corrnh,coslatsnh) - corrsh_1 = getmean(corrsh,coslatssh) - corrtr_1 = getmean(corrtr,coslatstr) - mse_2 = getmse(fcsts_2,anals) - mse_1 = getmse(fcsts_1,anals) - if varshort in ['psi','chi']: - mse_2 = mse_2/1.e10 - mse_1 = mse_1/1.e10 - msenh = mse_2[0:latnh+1,:] - msesh = mse_2[latsh:,:] - msetr = mse_2[latnh:latsh+1,:] - mseg_2 = np.sqrt(getmean(mse_2,coslats)) - msenh_2 = np.sqrt(getmean(msenh,coslatsnh)) - msesh_2 = np.sqrt(getmean(msesh,coslatssh)) - msetr_2 = np.sqrt(getmean(msetr,coslatstr)) - msenh = mse_1[0:latnh+1,:] - msesh = mse_1[latsh:,:] - msetr = mse_1[latnh:latsh+1,:] - mseg_1 = np.sqrt(getmean(mse_1,coslats)) - msenh_1 = np.sqrt(getmean(msenh,coslatsnh)) - msesh_1 = np.sqrt(getmean(msesh,coslatssh)) - msetr_1 = np.sqrt(getmean(msetr,coslatstr)) - print '%s %6.3f %6.3f %6.3f %6.3f %6.3f %6.3f %6.3f %6.3f' %\ - (level,corrnh_1,corrnh_2,corrtr_1,corrtr_2,\ - corrsh_1,corrsh_2,corrg_1,corrg_2) - print '%s %6.3f %6.3f %6.3f %6.3f %6.3f %6.3f %6.3f %6.3f' %\ - (level,msenh_1,msenh_2,msetr_1,msetr_2,\ - msesh_1,msesh_2,mseg_1,mseg_2)