Index: palm/trunk/SCRIPTS/.mrun.config.riam
===================================================================
--- palm/trunk/SCRIPTS/.mrun.config.riam	(revision 251)
+++ palm/trunk/SCRIPTS/.mrun.config.riam	(revision 251)
@@ -0,0 +1,124 @@
+#column 1          column 2                                   column 3
+#name of variable  value of variable (~ must not be used)     scope
+#----------------------------------------------------------------------------
+%mainprog          palm.f90
+%base_directory    $HOME/palm/current_version
+%base_data         ~/palm/current_version/JOBS
+%source_path       $base_directory/trunk/SOURCE
+%add_source_path   $base_directory/USER_CODE/$fname
+%depository_path   $base_directory/MAKE_DEPOSITORY
+%use_makefile      true
+#
+# Enter your own host below by adding another line containing in the second
+# column your hostname (as provided by the unix command "hostname") and in the
+# third column the host identifier. Depending on your operating system, the
+# first characters of the host identifier should be "lc" (Linux cluster), "ibm"
+# (IBM-AIX), or "nec" (NEC-SX), respectively.
+#
+# The next line is just an example. Add your own line below or replace this line.
+%host_identifier   sx-*                                       necriam
+#
+#
+# The next block contains all informations for compiling the PALM code
+# and for generating and running the PALM executable using MPI. Replace all
+# required paths (given in <>) by the respective paths valid on your host.
+# Also replace <hi> by your host identifier (see above) in each line!
+# Compilernames, cpp-options and compiler-options are assuming
+# an Intel-Compiler and mpich2 on this host! Please change
+# appropriately, if you are using a different compiler / MPI-Version.
+#
+#
+%compiler_name     sxmpif90                                   necriam parallel
+%compiler_name_ser sxf90                                      necriam parallel
+%cpp_options       -Ep:-D__mpi2:-DMPI_REAL=MPI_REAL8:-DMPI_2REAL=MPI_2REAL8:-DSCFFT=DZFFT:-DCSFFT=ZDFFT:-D__netcdf:-D__netcdf_64bit  necriam parallel
+%netcdf_inc        -I:/home/COAR/NC/tatuyama/pub/netcdf-3.6.0-p1/include      necriam parallel
+%netcdf_lib        -L/home/COAR/NC/tatuyama/pub/netcdf-3.6.0-p1/lib:-lnetcdf  necriam parallel
+%fopts             -C:hopt:-Wf:\'-init:stack=nan:-init:heap=nan:-A:idbl4:-pvctl:fullmsg\':-ftrace:-P:stack:-pi:auto:-pi:line=1000  necriam parallel
+%lopts             -C:hopt:-Wf:\'-init:stack=nan:-init:heap=nan:-A:idbl4\':-ftrace:-P:stack:-pi:auto:-pi:line=1000:-L/SX/opt/mathkeisan/MK3_0/lib0/:-l:fft  necriam parallel
+%memory            4000                                       necriam parallel
+%cpumax            1000                                       necriam parallel
+%numprocs          4                                          necriam parallel
+%tmp_data_catalog  /work/<replace by your username>/restart_data  necriam parallel
+%tmp_user_catalog  /work/<replace by your username>               necriam parallel
+%remote_username   <replace by your username>                     necriam parallel
+#
+%write_binary                true                             restart
+#
+#----------------------------------------------------------------------------
+# INPUT-commands, executed before running PALM - lines must start with "IC:" 
+#----------------------------------------------------------------------------
+#IC:
+#
+#----------------------------------------------------------------------------
+# ERROR-commands - executed when program terminates abnormally
+#----------------------------------------------------------------------------
+EC:[[ \$locat = execution ]]  &&  cat  RUN_CONTROL
+EC:pwd; ls -al
+#
+#----------------------------------------------------------------------------
+# OUTPUT-commands - executed when program terminates normally
+#----------------------------------------------------------------------------
+#
+# Combine 1D- and 3D-profile output (these files are not usable for plotting)
+OC:[[ -f LIST_PROFIL_1D     ]]  &&  cat  LIST_PROFIL_1D  >>  LIST_PROFILE
+OC:[[ -f LIST_PROFIL        ]]  &&  cat  LIST_PROFIL     >>  LIST_PROFILE
+#
+# Combine all particle information files
+OC:[[ -f PARTICLE_INFOS/_0000 ]]  &&  cat  PARTICLE_INFOS/* >> PARTICLE_INFO
+#
+# Collect plot data (2d/3d) into one file
+OC:combine_plot_fields.x
+#
+#----------------------------------------------------------------------------
+# List of input-files
+#----------------------------------------------------------------------------
+PARIN                    in:job        d3#   $base_data/$fname/INPUT    _p3d
+PARIN                    in:job        d3f   $base_data/$fname/INPUT    _p3df
+TOPOGRAPHY_DATA          in:locopt     d3#   $base_data/$fname/INPUT    _topo
+BININ                    in:loc:flpe   d3f   $base_data/$fname/RESTART  _d3d
+PARTICLE_RESTART_DATA_IN in:loc:flpe   prtf  $base_data/$fname/RESTART  _rprt
+DATA_1D_PR_NETCDF        in:locopt     prf   $base_data/$fname/OUTPUT   _pr     nc
+DATA_1D_SP_NETCDF        in:locopt     spf   $base_data/$fname/OUTPUT   _sp     nc
+DATA_1D_TS_NETCDF        in:locopt     tsf   $base_data/$fname/OUTPUT   _ts     nc
+DATA_1D_PTS_NETCDF       in:locopt     ptsf  $base_data/$fname/OUTPUT   _pts    nc
+DATA_2D_XY_NETCDF        in:locopt     xyf   $base_data/$fname/OUTPUT   _xy     nc
+DATA_2D_XY_AV_NETCDF     in:locopt     xyf   $base_data/$fname/OUTPUT   _xy_av  nc
+DATA_2D_XZ_NETCDF        in:locopt     xzf   $base_data/$fname/OUTPUT   _xz     nc
+DATA_2D_YZ_NETCDF        in:locopt     yzf   $base_data/$fname/OUTPUT   _yz     nc
+DATA_3D_NETCDF           in:locopt     3df   $base_data/$fname/OUTPUT   _3d     nc
+DATA_PRT_NETCDF          in:locopt:pe  prtf  $base_data/$fname/OUTPUT   _prt
+#
+#----------------------------------------------------------------------------
+# List of output-files
+#----------------------------------------------------------------------------
+BINOUT                    out:loc:flpe restart   $base_data/$fname/RESTART  _d3d
+PARTICLE_RESTART_DATA_OUT out:loc:flpe prt#:prtf $base_data/$fname/RESTART  _rprt
+#
+RUN_CONTROL       out:loc:tr   d3#     $base_data/$fname/MONITORING  _rc
+RUN_CONTROL       out:loc:tra  d3f     $base_data/$fname/MONITORING  _rc
+HEADER            out:loc:tr   d3#     $base_data/$fname/MONITORING  _header
+HEADER            out:loc:tra  d3f     $base_data/$fname/MONITORING  _header
+CPU_MEASURES      out:loc:tr   d3#     $base_data/$fname/MONITORING  _cpu
+CPU_MEASURES      out:loc:tra  d3f     $base_data/$fname/MONITORING  _cpu
+#
+DATA_1D_PR_NETCDF    out:loc:tr   pr#:prf   $base_data/$fname/OUTPUT  _pr     nc
+DATA_1D_SP_NETCDF    out:loc:tr   sp#:spf   $base_data/$fname/OUTPUT  _sp     nc
+DATA_1D_TS_NETCDF    out:loc:tr   ts#:tsf   $base_data/$fname/OUTPUT  _ts     nc
+DATA_1D_PTS_NETCDF   out:loc:tr   pts#:ptsf $base_data/$fname/OUTPUT  _pts    nc
+DATA_2D_XY_NETCDF    out:loc:tr   xy#:xyf   $base_data/$fname/OUTPUT  _xy     nc
+DATA_2D_XY_AV_NETCDF out:loc:tr   xy#:xyf   $base_data/$fname/OUTPUT  _xy_av  nc
+DATA_2D_XZ_NETCDF    out:loc:tr   xz#:xzf   $base_data/$fname/OUTPUT  _xz     nc
+DATA_2D_XZ_AV_NETCDF out:loc:tr   xz#:xzf   $base_data/$fname/OUTPUT  _xz_av  nc
+DATA_2D_YZ_NETCDF    out:loc:tr   yz#:yzf   $base_data/$fname/OUTPUT  _yz     nc
+DATA_2D_YZ_AV_NETCDF out:loc:tr   yz#:yzf   $base_data/$fname/OUTPUT  _yz_av  nc
+DATA_3D_NETCDF       out:loc:tr   3d#:3df   $base_data/$fname/OUTPUT  _3d     nc
+DATA_3D_AV_NETCDF    out:loc:tr   3d#:3df   $base_data/$fname/OUTPUT  _3d_av  nc
+DATA_PRT_NETCDF      out:loc:pe   prt#:prtf $base_data/$fname/OUTPUT  _prt    nc
+DATA_PRT_NETCDF      out:loc:trpe prt#:prtf $base_data/$fname/OUTPUT  _prt    nc
+#
+DVRP_LOG          out:loc:tr   dv#       $base_data/$fname/MONITORING  _dvrp_log
+DVRP_LOG          out:loc:tra  dvf       $base_data/$fname/MONITORING  _dvrp_log
+PARTICLE_INFO     out:loc:tr   pt#       $base_data/$fname/MONITORING  _prt_info
+PARTICLE_INFO     out:loc:tra  ptf       $base_data/$fname/MONITORING  _prt_info
+PARTICLE_DATA     out:loc:flpe prt#:prtf $base_data/$fname/OUTPUT      _prt_dat
+
Index: palm/trunk/SCRIPTS/mrun
===================================================================
--- palm/trunk/SCRIPTS/mrun	(revision 250)
+++ palm/trunk/SCRIPTS/mrun	(revision 251)
@@ -170,4 +170,5 @@
      # 25/02/09 - Siggi  - cputime-option (-t) is allowed to be omitted for
      #                     interactive runs
+     # 02/03/09 - Siggi  - adjustments for new NEC-SX9 at RIAM (necriam)
 
 
@@ -603,5 +604,5 @@
     do_remote=true
     case  $host  in
-        (ibm|ibmb|ibmh|ibms|ibmy|nech|neck|lcsgib|lcsgih|lctit|unics|lcxt4)  true;;
+        (ibm|ibmb|ibmh|ibms|ibmy|nech|necriam|lcsgib|lcsgih|lctit|unics|lcxt4)  true;;
         (*)  printf "\n"
              printf "\n  +++ sorry: execution of batch jobs on remote host \"$host\""
@@ -778,5 +779,5 @@
                    do_remote=true
                    case  $host  in
-                       (ibm|ibms|ibmy|lcsgib|lcsgih|lctit|nech|neck|unics|lcxt4)  true;;
+                       (ibm|ibms|ibmy|lcsgib|lcsgih|lctit|nech|necriam|unics|lcxt4)  true;;
                        (*)  printf "\n  +++ sorry: execution of batch jobs on remote host \"$host\""
                             printf "\n      is not available"
@@ -924,7 +925,7 @@
     mrun_numprocs=$numprocs
 
-    if [[ $localhost_realname = "gate" ]]
-    then
-       interpret_config_gate.x
+    if [[ $localhost_realname = "sx-fep" ]]
+    then
+       /home/COAR/NC/raasch/pub/interpret_config_necriam.x
     else
        interpret_config.x
@@ -1033,5 +1034,5 @@
     do_remote=true
     case  $host  in
-        (ibm|ibmb|ibmh|ibms|ibmy|lcsgib|lcsgih|lctit|nech|neck|unics|lcxt4)  true;;
+        (ibm|ibmb|ibmh|ibms|ibmy|lcsgib|lcsgih|lctit|nech|necriam|unics|lcxt4)  true;;
         (*)  printf "\n"
              printf "\n  +++ sorry: execution of batch jobs on remote host \"$host\""
@@ -1062,5 +1063,5 @@
        # DEFAULT-WERT SETZEN) UND OB SIE EIN GANZZAHLIGER TEILER DER
        # GESAMTPROZESSORANZAHL IST
-    if [[ $host = nech  ||  $host = neck  ||  $host = ibmh  ||  $host = ibmb  ||  $host = ibms ]]
+    if [[ $host = nech  ||  $host = necriam  ||  $host = ibmh  ||  $host = ibmb  ||  $host = ibms ]]
     then
        [[ "$tasks_per_node" = "" ]]  &&  tasks_per_node=6
@@ -1192,5 +1193,5 @@
         (lctit)      queue=sla3;;
         (nech)       queue=none;;
-        (neck)       queue=P;;
+        (necriam)    queue=SS;;
         (unics)      queue=unics;;
     esac
@@ -1903,6 +1904,6 @@
 
 
-    # COMPILER AUF NECK UEBERSCHREIBEN
- [[ $localhost = neck ]]  &&  compiler_name=mpif90
+    # COMPILER AUF RIAMS NEC UEBERSCHREIBEN
+ [[ $localhost = necriam ]]  &&  compiler_name=mpif90
 
 
@@ -2936,5 +2937,5 @@
                 fi
              fi
-          elif [[ $host = nech  ||  $host = neck ]]
+          elif [[ $host = nech  ||  $host = necriam ]]
           then
              (( ii = nodes ))
Index: palm/trunk/SCRIPTS/subjob
===================================================================
--- palm/trunk/SCRIPTS/subjob	(revision 250)
+++ palm/trunk/SCRIPTS/subjob	(revision 251)
@@ -95,4 +95,5 @@
      # 23/09/08 - Gerald- paesano admitted
      # 02/10/08 - Siggi - PBS adjustments for lcxt4
+     # 02/03/09 - Siggi - Adjustments for new NEC-SX9 at RIAM
 
 
@@ -170,5 +171,4 @@
      (fimm.bccs.uib.no)      local_addres=172.20.4.2;     local_host=lcfimm;;
      (gallego)               local_addres=130.75.105.10;  local_host=lcmuk;;
-     (gate|n-sx)             local_addres=133.5.178.11;   local_host=neck;;
      (gfdl5)                 local_addres=165.132.26.58;  local_host=ibmy;;
      (gfdl3.yonsei.ac.kr)    local_addres=165.132.26.56;  local_host=decalpha;;
@@ -191,4 +191,5 @@
      (scirocco)              local_addres=172.20.25.41;   local_host=lcmuk;;
      (sun1|sun2)             local_addres=130.75.6.1;     local_host=unics;;
+     (sx-fep)                local_addres=172.16.1.131;   local_host=necriam;;
      (r1*)                   local_addres=130.75.4.102;   local_host=lcsgih;;
      (r2*)                   local_addres=130.73.232.102; local_host=lcsgib;;
@@ -249,5 +250,5 @@
     printf "\n        -h    execution host, available hosts:    $remote_host"
     printf "\n              ibm, ibmb, ibmh, ibms, ibmy, lcmuk,"
-    printf "\n              lctit, nech, neck, unics"
+    printf "\n              lctit, nech, necriam, unics"
     printf "\n        -m    memory demand per process in MByte  ---"
     printf "\n        -n    jobname                             <jobdatei>"
@@ -312,20 +313,20 @@
  else
     case  $remote_host  in
-        (ibm)    queue=p690_standard; remote_addres=134.76.99.81; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
-        (ibmb)   queue=cpar; remote_addres=130.73.230.10; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
-        (ibmh)   queue=cpar; remote_addres=130.75.4.10; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
-        (ibms)   queue=p_normal; remote_addres=150.183.5.101; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
-        (ibmy)   queue=parallel; remote_addres=165.132.26.58; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
-	(lcfimm) remote_addres=172.20.4.2; submcom=/opt/torque/bin/qsub;;
-        (lcsgib) queue=smallq; remote_addres=130.73.232.102; submcom=/opt/moab/bin/msub;;
-        (lcsgih) queue=smallq; remote_addres=130.75.4.103; submcom=/opt/moab/bin/msub;;
-        (lctit)  queue=lctit; remote_addres=172.17.75.161; submcom=/n1ge/TITECH_GRID/tools/bin/n1ge;;
-        (lcxt4)	 remote_addres=129.177.20.113; submcom=/opt/torque/2.3.0/bin/qsub;;
-        (nech)   qsubmem=memsz_job; qsubtime=cputim_job; remote_addres=136.172.44.147; submcom="/usr/local/bin/qsub";;
-        (neck)   qsubmem=memsz_job; qsubtime=cputim_job; remote_addres=133.5.178.11; submcom="/usr/bin/nqsII/qsub";;
-        (vpp)    qsubmem=m; qsubtime=t; queue=vpp; remote_addres=130.75.4.130;;
-        (unics)  qsubmem=d; qsubtime=t; queue=unics; remote_addres=130.75.6.1;;
-        (*)      printf "\n  +++ hostname \"$remote_host\" not allowed";
-                 locat=parameter; exit;;
+        (ibm)     queue=p690_standard; remote_addres=134.76.99.81; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
+        (ibmb)    queue=cpar; remote_addres=130.73.230.10; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
+        (ibmh)    queue=cpar; remote_addres=130.75.4.10; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
+        (ibms)    queue=p_normal; remote_addres=150.183.5.101; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
+        (ibmy)    queue=parallel; remote_addres=165.132.26.58; submcom=/usr/lpp/LoadL/full/bin/llsubmit;;
+	(lcfimm)  remote_addres=172.20.4.2; submcom=/opt/torque/bin/qsub;;
+        (lcsgib)  queue=smallq; remote_addres=130.73.232.102; submcom=/opt/moab/bin/msub;;
+        (lcsgih)  queue=smallq; remote_addres=130.75.4.103; submcom=/opt/moab/bin/msub;;
+        (lctit)   queue=lctit; remote_addres=172.17.75.161; submcom=/n1ge/TITECH_GRID/tools/bin/n1ge;;
+        (lcxt4)	  remote_addres=129.177.20.113; submcom=/opt/torque/2.3.0/bin/qsub;;
+        (nech)    qsubmem=memsz_job; qsubtime=cputim_job; remote_addres=136.172.44.147; submcom="/usr/local/bin/qsub";;
+        (necriam) qsubmem=memsz_job; qsubtime=cputim_job; remote_addres=172.16.1.131; submcom="/usr/bin/nqsII/qsub";;
+        (vpp)     qsubmem=m; qsubtime=t; queue=vpp; remote_addres=130.75.4.130;;
+        (unics)   qsubmem=d; qsubtime=t; queue=unics; remote_addres=130.75.6.1;;
+        (*)       printf "\n  +++ hostname \"$remote_host\" not allowed";
+                  locat=parameter; exit;;
     esac
  fi
@@ -370,4 +371,8 @@
                      (*)    error=true;;
                  esac;;
+        (necriam) case  $ndq  in
+                     (SS|P6|X)  error=false;;
+                     (*)    error=true;;
+                 esac;;
         (t3eh)   case  $ndq  in
                      (para_t3e|em|k|l|lm|comp_t3e|c|p|ht)  error=false;;
@@ -454,5 +459,5 @@
  done
 
- if [[ $remote_host = nech  ||  $remote_host = neck ]]
+ if [[ $remote_host = nech  ||  $remote_host = necriam ]]
  then
     if (( tasks_per_node != 0 ))
@@ -803,5 +808,5 @@
     fi
 
- elif [[ $remote_host = neck ]]
+ elif [[ $remote_host = necriam ]]
  then
 
@@ -810,11 +815,9 @@
        cat > $job_to_send << %%END%%
 #!/bin/ksh
-#PBS -l cpunum_prc=$tasks_per_node,cputim_job=$cputime
-#PBS -l ${qsubmem}=${Memory}gb
 #PBS -b $nodes
 #PBS -o $remote_dayfile
 #PBS -N palm
 #PBS -j o
-#PBS -T mpisx
+#PBS -v MPIPROGINV=YES
 
 %%END%%
@@ -825,10 +828,8 @@
 #!/bin/ksh
 #PBS -q ${queue}
-#PBS -l cpunum_prc=$tasks_per_node,cputim_job=$cputime
-#PBS -l ${qsubmem}=${Memory}gb
 #PBS -o $remote_dayfile
 #PBS -N palm
 #PBS -j o
-#PBS -T mpisx
+#PBS -v MPIPROGINV=YES
 
 %%END%%
@@ -837,5 +838,4 @@
        cat > $job_to_send << %%END%%
 #!/bin/ksh
-#PBS -l ${qsubmem}=${Memory}gb,${qsubtime}=$cputime
 #PBS -o $remote_dayfile
 #PBS -j o
@@ -897,7 +897,7 @@
        then
           return_queue=sla3
-       elif [[ $remote_host = neck ]]
-       then
-          return_queue=S
+       elif [[ $remote_host = necriam ]]
+       then
+          return_queue=SS
        else
           return_queue=unknown
@@ -939,9 +939,8 @@
           echo "%%END%%"                           >>  $job_to_send
 
-       elif [[ $remote_host = neck ]]
+       elif [[ $remote_host = necriam ]]
        then
           echo "cat > scpjob.$kennung << %%END%%"  >>  $job_to_send
           echo "#PBS -q $return_queue"             >>  $job_to_send
-          echo "#PBS -l ${qsubmem}=1GB,${qsubtime}=100"  >>  $job_to_send
           echo "#PBS -o last_job_transfer_protocol"      >>  $job_to_send
           echo "#PBS -j o"                         >>  $job_to_send
