Ignore:
Timestamp:
Jun 5, 2012 9:56:53 AM (12 years ago)
Author:
maronga
Message:

Bugfixes for the parameter file check. New mrun option switches off combine_plot_fields

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/mrun

    r892 r920  
    257257     #                      bugfixes for the parameter file check, initial
    258258     #                      commands on ssh calls sourced out to .mrun.config
    259 
     259     # 05/06/12 - Bjoern  - bugfixes for the parameter file check on lcxe6.
     260     #                      combine_plot_fields can be switched off by the
     261     #                      new mrun option -Z
    260262
    261263 
     
    273275 archive_system=none
    274276 check_namelist_files=true
     277 combine_plot_fields=true
    275278 compiler_name=""
    276279 cond1=""
     
    505508    # SHELLSCRIPT-OPTIONEN EINLESEN UND KOMMANDO NEU ZUSAMMENSETZEN, FALLS ES
    506509    # FUER FOLGEJOBS BENOETIGT WIRD
    507  while  getopts  :a:AbBc:Cd:D:Fg:G:h:H:i:IkK:m:M:n:o:O:p:P:q:r:R:s:St:T:u:U:vw:xX:yY:z option
     510 while  getopts  :a:AbBc:Cd:D:Fg:G:h:H:i:IkK:m:M:n:o:O:p:P:q:r:R:s:St:T:u:U:vw:xX:yY:zZ option
    508511 do
    509512   case  $option  in
     
    548551       (Y)   run_coupled_model=true; coupled_dist=$OPTARG; mc="$mc -Y'$OPTARG'";;
    549552       (z)   check_namelist_files=false; mc="$mc -z";;
     553       (Z)   combine_plot_fields=false; mc="$mc -Z";;
    550554       (\?)  printf "\n  +++ unknown option $OPTARG \n"
    551555             printf "\n  --> type \"$0 ?\" for available options \n"
     
    564568 then
    565569   (printf "\n  *** mrun can be called as follows:\n"
    566     printf "\n      $mrun_script_name  -b -c.. -d.. -D.. -f.. -F -h.. -i.. -I -K.. -m.. -o.. -p.. -r.. -R -s.. -t.. -T.. -v -x -X.. -y -Y.. <modus>\n"
     570    printf "\n      $mrun_script_name  -b -c.. -d.. -D.. -f.. -F -h.. -i.. -I -K.. -m.. -o.. -p.. -r.. -R -s.. -t.. -T.. -v -x -X.. -y -Y.. -z -Z <modus> \n"
    567571    printf "\n      Description of available options:\n"
    568572    printf "\n      Option  Description                              Default-Value"
     
    608612    printf "\n        -Y    run coupled model, \"#1 #2\" with"
    609613    printf "\n              #1 atmosphere and #2 ocean processors    \"#/2 #/2\" depending on -X"
    610     printf "\n        -z    no parameter file check                  ---"
     614    printf "\n        -z    disable a priori parameter file check    ---"
     615    printf "\n        -Z    skip combine_plot_fields at the end of      "
     616    printf "\n              the simulation                           ---"
    611617    printf "\n "
    612618    printf "\n      Possible values of positional parameter <modus>:"
     
    13391345    eval pathname=${pathin[$i]}
    13401346
     1347#   SAVE INPUT FILE NAME FOR PARAMETER FILE CHECK
     1348    if [[ ("${transin[$i]}" = job) && (-f $filename) ]]
     1349    then
     1350       filename_input=$filename
     1351    fi
    13411352
    13421353       # PRUEFEN AUF VORHANDENSEIN
     
    14281439    fi
    14291440 done
    1430        
    1431 
     1441   
    14321442    # VOLLSTAENDIGE DATEINAMEN (OHNE $ ODER ~) DER OUTPUT-FILES BILDEN,
    14331443    # OUTPUT-DATEIEN AUF VORHANDENSEIN PRUEFEN UND EVTL. HOECHSTE ZYKLUSNUMMER
     
    23862396
    23872397#CHECK IF NAMELIST_FILE_CHECK HAS BEEN COMPILED SUCCESSFULLY
    2388  if [[ ! -f $check_depository/check_namelist_files.tar || ! -f $PALM_BIN/check_namelist_files.x ]]
     2398 if [[ ! -f $check_depository/check_namelist_files.tar ]]
     2399 then
     2400      skip_check=true
     2401      reason="run on remote host or parameter file check has not been compiled."
     2402 fi
     2403 if [[ ! -f $PALM_BIN/check_namelist_files.x ]]
    23892404 then
    23902405      skip_check=true
     
    24262441
    24272442#SKIP CHECK IN CASE OF RESTART RUN: CHECK WHETHER THE LAST CHAR IS "f" IN PARIN
    2428  ((last_char = `echo $filename | wc -c` - 1))
    2429  last_char=`echo $filename |cut -c$last_char`
     2443 ((last_char = `echo $filename_input | wc -c` - 1))
     2444 last_char=`echo $filename_input |cut -c$last_char`
    24302445 if [[ "$last_char" == "f" ]]
    24312446 then
     
    24732488
    24742489#   ERROR IF NO PARAMETER FILE WAS FOUND, OTHERWISE PROCEED
    2475     if [[ ! -f $filename ]]
    2476     then
    2477        printf "\n\n  +++ ERROR: parameter file ($filename) not found."
     2490    if [[ (! -f $filename_input) && ( "$filename_input" != "") ]]
     2491    then
     2492       printf "\n\n  +++ ERROR: parameter file ($filename_input) not found."
    24782493       locat=check_namelist; exit
    24792494    fi
     
    24852500
    24862501
    2487        filenamef="${filename}f"
     2502       filenamef="${filename_input}f"
    24882503       if [[ ! -f $filenamef ]]
    24892504       then
     
    25632578    fi
    25642579
    2565     cp $filename ./PARIN
     2580    cp $filename_input ./PARIN
    25662581    if [[ $check_restart == 1 ]]
    25672582    then
     
    25692584    fi
    25702585
    2571 cat ${pathname}/${fname}${topo_suffix}
    25722586    if [[ -f ${pathname}/${fname}${topo_suffix} && $skip_check == false ]]
    25732587    then
     
    26222636
    26232637#      CHECKING THE P3D FILE
    2624        printf "\n\n      (1) checking $filename
     2638       printf "\n\n      (1) checking $filename_input
    26252639       echo "$numprocs 0" > VARIN
    26262640       errors=`./check_namelist_files.x < VARIN 2>&1`
     
    29092923          continue   # ANDERENFALLS IST STATUS=1, FALLS A.OUT VORHANDEN
    29102924       else
    2911           [[ $localhost = lcxe6 ]]  &&  eval $init_cmds
     2925          [[ "$init_cmds" != "" ]]  &&  eval $init_cmds
    29122926          [[ "$module_calls" != "" ]]  &&  eval $module_calls
    29132927          make $mopts -f Makefile PROG=a.out  F90=$compiler_name  COPT="$cpp_options"  F90FLAGS="$fopts"  LDFLAGS="$lopts"
     
    39393953       # Call of combine_plot_fields in order to merge single files written
    39403954       # by each PE into one file.
    3941     if [[ ! -f ${PALM_BIN}/combine_plot_fields${block}.x ]]
    3942     then
    3943        printf "\n\n\n  +++ WARNING: no combine_plot_fields found for given block \"$cond1 $cond2\""
    3944        printf "\n      2d- and/or 3d-data may be incomplete!"
    3945        printf "\n      Run \"mbuild -u -h $localhost\" to generate utilities for this block.\n"
    3946     else
    3947        printf "\n\n\n *** post-processing: now executing \"combine_plot_fields${block}.x\" ..."
    3948        combine_plot_fields${block}.x
    3949     fi
     3955   if [[ ! -f ${PALM_BIN}/combine_plot_fields${block}.x ]]
     3956   then
     3957      printf "\n\n\n  +++ WARNING: no combine_plot_fields found for given block \"$cond1 $cond2\""
     3958      printf "\n      2d- and/or 3d-data may be incomplete!"
     3959      printf "\n      Run \"mbuild -u -h $localhost\" to generate utilities for this block.\n"
     3960   elif [[ "$combine_plot_fields" == true ]]
     3961   then
     3962      printf "\n\n\n *** post-processing: now executing \"combine_plot_fields${block}.x\" ..."
     3963      combine_plot_fields${block}.x
     3964   else
     3965#     Temporary solution to skip combine_plot_fields. This is necessary in case of huge amount of
     3966#     data output. To do: extend this branch by creating a batch job for combine_plot_fields.
     3967      printf "\n\n\n *** post-processing: skipping combine_plot_fields (-Z option set) ..."
     3968   fi
    39503969
    39513970
     
    47734792    [[ "$ocean_file_appendix" = true ]]  &&  mrun_com=${mrun_com}" -y"
    47744793    [[ $run_coupled_model = true ]]  &&  mrun_com=${mrun_com}" -Y \"$coupled_dist\""
     4794    [[ "$check_namelist_files" = false ]]  &&  mrun_com=${mrun_com}" -z"
     4795    [[ "$combine_plot_fields" = false ]]  &&  mrun_com=${mrun_com}" -Z"
    47754796    [[ "$max_par_io_str" != "" ]]  &&  mrun_com=${mrun_com}" -w $max_par_io_str"
    47764797    if [[ $do_remote = true ]]
Note: See TracChangeset for help on using the changeset viewer.