Changeset 2638 for palm/trunk


Ignore:
Timestamp:
Nov 23, 2017 12:44:23 PM (7 years ago)
Author:
raasch
Message:

bugfix for cases with constant top momentumflux

Location:
palm/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/palmrun

    r2610 r2638  
    535535          # LINE DEFINES FILE CONNECTION. READ THE FILE ATTRIBUTES.
    536536          # s2a: in/out - field
    537           # s2b: loc    - field (optional)
    538           # s2c: tr/ar  - field (optional)
     537          # s2b: action - field (optional)
    539538       s1=`echo $line | cut -d" " -f1`
    540539       s2=`echo $line | cut -d" " -s -f2`
    541        s2a=$(echo $s2 | cut -d":" -f1)
     540#       s2a=$(echo $s2 | cut -d":" -f1)
    542541       if [[ $(echo $s2 | grep -c ":") = 0 ]]
    543542       then
     543          s2a=$s2
    544544          s2b=""
    545           s2c=""
    546545       else
    547           s2b=`echo $s2 | cut -d":" -f2 | sed 's/:/ /g'`
    548           s2c=`echo $s2 | cut -d":" -s -f3 | sed 's/:/ /g'`
     546          s2a=`echo $s2 | cut -d":" -f1`
     547          s2b=`echo $s2 | cut -d":" -f2`
    549548       fi
    550549       s3=`echo $line | cut -d" " -f3`
     
    558557          # VARIABLE S3 MAY CONTAIN A LIST OF ACTIVATION STRINGS (FIELD-SEPERATOR ":").
    559558          # IF EXECUTION IS SCHEDULED FOR A REMOTE-MACHINE AND THE FILE IS ONLY
    560           # LOCALLY REQUIRED ON THAT MACHINE (I.E. s2b = loc), THE FILE CONNECTION
     559          # LOCALLY REQUIRED ON THAT MACHINE (I.E. s2b != tr), THE FILE CONNECTION
    561560          # IS NOT CHECKED AND STORED.
    562561       IFSALT="$IFS"; IFS="$IFS:"      # ADD ":" AS FIELD SEPARATOR
    563        if [[ "$s2a" = in  &&  ! ( $create_remote_batch_job = true  &&  ( "$s2b" = loc  ||  "$s2b" = locopt ) ) ]]
     562       if [[ ( "$s2a" = in  || "$s2a" = inopt )  &&  ! ( $create_remote_batch_job = true  &&  "$s2b" != tr ) ]]
    564563       then
    565564          found=false
     
    574573          then
    575574             (( iin = iin + 1 ))
    576              localin_pre[$iin]=$s1; transin_pre[$iin]=$s2b; actionin_pre[$iin]=$s2c;
     575             localin_pre[$iin]=$s1; actionin_pre[$iin]=$s2b;
    577576             pathin_pre[$iin]=$s4; endin_pre[$iin]=$s5; extin_pre[$iin]=$s6
     577             if [[ "$s2a" = inopt ]]
     578             then
     579                optin_pre[$iin]=yes
     580             else
     581                optin_pre[$iin]=no
     582             fi
    578583
    579584                # FILES WITH JOB-ATTRIBUTE ARE STORED IN THE SOURCES_FOR_RUN
    580585                # FOLDER IF THE JOB IS RUNNING ON A REMOTE HOST
    581              if [[ $running_on_remote = true  && ( "$s2b" = job  ||  "$s2b" = jobopt ) ]]
     586             if [[ $running_on_remote = true  &&  "$s2b" = tr ]]
    582587             then
    583588                pathin_pre[$iin]=${fast_io_catalog}/${sources_for_run_catalog}
     
    588593             if [[ "${s5: -1}" = "*" ]]
    589594             then
    590                 if [[ "$s2c" = "di" ]]
     595                if [[ "$s2b" = "di" ]]
    591596                then
    592597                   printf "\n    +++ wildcards (*) not allowed with \"di\" file attribute."
     
    602607             fi
    603608          fi
    604        elif [[ "$s2a" = out  &&  ! ( $create_remote_batch_job = true  &&  "$s2b" = loc ) ]]
     609       elif [[ "$s2a" = out  &&  ! ( $create_remote_batch_job = true ) ]]
    605610       then
    606611          found=false
     
    615620          then
    616621             (( iout = iout + 1 ))
    617              localout_pre[$iout]=$s1; actionout_pre[$iout]=$s2c; typeout_pre[$iout]=$s3;
     622             localout_pre[$iout]=$s1; actionout_pre[$iout]=$s2b; typeout_pre[$iout]=$s3;
    618623             pathout_pre[$iout]=$s4; endout_pre[$iout]=$s5; extout_pre[$iout]=$s6
    619624
     
    622627             if [[ "${s1: -1}" = "*" ]]
    623628             then
    624                 if [[ "$s2c" = "di" ]]
     629                if [[ "$s2b" = "di" ]]
    625630                then
    626631                   printf "\n    +++ wildcards (*) not allowed with \"di\" file attribute."
     
    636641             fi
    637642          fi
    638        elif [[ "$s2a" != in  &&  "$s2a" != out ]]
    639        then
    640           printf "\n  +++ I/O-attribute in configuration file $config_file has the invalid"
    641           printf "\n      value \"$s2\". Only \"in\" and \"out\" are allowed!"
     643       elif [[ "$s2a" != in  &&  "$s2a" != inopt  &&  "$s2a" != out ]]
     644       then
     645          printf "\n  +++ I/O-attribute in file $fileconnection_file has invalid"
     646          printf "\n      value \"$s2\". Only \"in\", \"inopt\", and \"out\" are allowed!"
    642647          locat=connect; exit
    643648       fi
     
    10241029    then
    10251030
    1026           # FILES WITH ATTRIBUTE locopt ARE OPTIONAL. NO ABORT, IF THEY DO NOT EXIST.
    1027        if [[ "${transin_pre[$i]}" != "locopt"  &&  "${transin_pre[$i]}" != "jobopt" ]]
     1031          # FILES WITH ATTRIBUTE opt ARE OPTIONAL. NO ABORT, IF THEY DO NOT EXIST.
     1032       if [[ "${optin_pre[$i]}" != "yes" ]]
    10281033       then
    10291034          printf "\n\n  +++ INPUT-file: "
     
    10391044          (( nr_of_input_files = nr_of_input_files + 1 ))
    10401045          localin[$nr_of_input_files]="${localin_pre[$i]}"
    1041           transin[$nr_of_input_files]="unavailable"
    1042           actionin[$nr_of_input_files]="${actionin_pre[$i]}"
     1046          optin[$nr_of_input_files]="${optin_pre[$i]}"
     1047#          transin[$nr_of_input_files]="unavailable"
     1048#          actionin[$nr_of_input_files]="${actionin_pre[$i]}"
     1049          actionin[$nr_of_input_files]="unavailable"
    10431050          pathin[$nr_of_input_files]="${pathin_pre[$i]}"
    10441051          endin[$nr_of_input_files]="${endin_pre[$i]}"
     
    11281135          (( nr_of_input_files = nr_of_input_files + 1 ))
    11291136          localin[$nr_of_input_files]="${localin_pre[$i]}"$ending
    1130           transin[$nr_of_input_files]="${transin_pre[$i]}"
     1137          optin[$nr_of_input_files]="${optin_pre[$i]}"
     1138#          transin[$nr_of_input_files]="${transin_pre[$i]}"
    11311139          actionin[$nr_of_input_files]="${actionin_pre[$i]}"
    11321140          pathin[$nr_of_input_files]="${pathin_pre[$i]}"
     
    17551763
    17561764
    1757     # WHEN CREATING A REMOTE BATCH JOB, THOSE INPUT FILES WITH JOB-ATTRIBUT WILL
    1758     # BE COPIED TO THE REMOTE HOST
     1765    # WHEN CREATING A REMOTE BATCH JOB, THOSE INPUT FILES WITH TRANSFER-ATTRIBUT
     1766    # WILL BE COPIED TO THE REMOTE HOST
    17591767 if [[ $create_remote_batch_job = true ]]
    17601768 then
     
    17631771    do
    17641772       (( i = i + 1 ))
    1765        if [[ "${transin[$i]}" = job  ||  "${transin[$i]}" = jobopt ]]
     1773       if [[ "${actionin[$i]}" = tr ]]
    17661774       then
    17671775          eval inputfile=${pathin[$i]}/${frelin[$i]}
     
    18131821
    18141822          # SKIP OPTIONAL FILES, IF THEY DO NOT EXIST
    1815        if [[ "${transin[$i]}" = unavailable ]]
     1823       if [[ "${actionin[$i]}" = unavailable ]]
    18161824       then
    18171825          if [[ "${extin[$i]}" = ""  ||  "${extin[$i]}" = " " ]]
     
    18871895
    18881896          # FILE IS STORED IN THE RESPECTIVE DIRECTORY GIVEN IN THE CONFIGURATION FILE
    1889        if [[ "${actionin[$i]}" = ""  ||  "${actionin[$i]}" = "di"  ||  "${actionin[$i]}" = "npe" ]]
     1897       if [[ "${actionin[$i]}" = ""  ||  "${actionin[$i]}" = "di"  ||  "${actionin[$i]}" = "tr"  ||  "${actionin[$i]}" = "npe" ]]
    18901898       then
    18911899
     
    19621970                      printf "\n  --- WARNING: ln failed, using cp instead (might be time consuming...)"
    19631971                                 fi
    1964                    if [[ $running_on_remote = true  &&  ( "${transin[$i]}" = job  ||  "${transin[$i]}" = jobopt ) ]]
     1972                   if [[ $running_on_remote = true  &&  "${actionin[$i]}" = tr ]]
    19651973                   then
    19661974                      mv  ${absnamein[$i]}  ${localin[$i]}
  • palm/trunk/SOURCE/diffusion_u.f90

    r2233 r2638  
    2525! -----------------
    2626! $Id$
     27! bugfix for constant top momentumflux
     28!
     29! 2233 2017-05-30 18:08:54Z suehring
    2730!
    2831! 2232 2017-05-30 17:47:52Z suehring
     
    328331!
    329332!--          Add momentum flux at model top
    330              IF ( use_top_fluxes )  THEN
     333             IF ( use_top_fluxes  .AND.  constant_top_momentumflux )  THEN
    331334                surf_s = surf_def_h(2)%start_index(j,i)
    332335                surf_e = surf_def_h(2)%end_index(j,i)
     
    550553!
    551554!--    Add momentum flux at model top
    552        IF ( use_top_fluxes )  THEN
     555       IF ( use_top_fluxes  .AND.  constant_top_momentumflux )  THEN
    553556          surf_s = surf_def_h(2)%start_index(j,i)
    554557          surf_e = surf_def_h(2)%end_index(j,i)
  • palm/trunk/SOURCE/diffusion_v.f90

    r2233 r2638  
    2525! -----------------
    2626! $Id$
     27! bugfix for constant top momentumflux
     28!
     29! 2233 2017-05-30 18:08:54Z suehring
    2730!
    2831! 2232 2017-05-30 17:47:52Z suehring
     
    316319!
    317320!--          Add momentum flux at model top
    318              IF ( use_top_fluxes )  THEN
     321             IF ( use_top_fluxes  .AND.  constant_top_momentumflux )  THEN
    319322                surf_s = surf_def_h(2)%start_index(j,i)
    320323                surf_e = surf_def_h(2)%end_index(j,i)
     
    538541!
    539542!--    Add momentum flux at model top
    540        IF ( use_top_fluxes )  THEN
     543       IF ( use_top_fluxes  .AND.  constant_top_momentumflux )  THEN
    541544          surf_s = surf_def_h(2)%start_index(j,i)
    542545          surf_e = surf_def_h(2)%end_index(j,i)
  • palm/trunk/SOURCE/surface_mod.f90

    r2575 r2638  
    1818!
    1919!------------------------------------------------------------------------------!
     20!
    2021! Current revisions:
    2122! ------------------
     
    2526! -----------------
    2627! $Id$
     28! bugfix for constant top momentumflux
     29!
     30! 2575 2017-10-24 09:57:58Z maronga
    2731! Pavement parameterization revised
    2832!
     
    15431547!
    15441548!--          Top momentum fluxes
    1545              surf%usws(num_h) = top_momentumflux_u *                           &
     1549             IF ( constant_top_momentumflux )  THEN
     1550                surf%usws(num_h) = top_momentumflux_u *                        &
    15461551                                            momentumflux_input_conversion(nzt+1)
    1547              surf%vsws(num_h) = top_momentumflux_v *                           &
     1552                surf%vsws(num_h) = top_momentumflux_v *                        &
    15481553                                            momentumflux_input_conversion(nzt+1)
     1554             ENDIF
    15491555!
    15501556!--          Increment surface indices
Note: See TracChangeset for help on using the changeset viewer.