Changeset 211 for palm


Ignore:
Timestamp:
Nov 11, 2008 4:46:24 AM (15 years ago)
Author:
raasch
Message:

user interface was split into one single file per subroutine

Location:
palm/trunk
Files:
24 added
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/mrun

    r210 r211  
    157157     # 21/10/08 - Siggi  - bugfix for the case that -K has more than one
    158158     #                     argument
     159     # 08/11/08 - Siggi  - bugfix for depository path settings in configuration
     160     #                     file
     161     # 11/11/08 - Siggi  - rules for using user code files changed: user
     162     #                     code splitted into one file per subroutine,
     163     #                     user can provide his/her own makefile, only
     164     #                     default source-code filenames are allowed
     165
     166
    159167 
    160168    # VARIABLENVEREINBARUNGEN + DEFAULTWERTE
     
    16221630
    16231631
     1632       # MAKEFILE AUF VORHANDENSEIN PRUEFEN UND KOPIEREN
     1633       # BEI RESTART-LAEUFEN LIEGT ES SCHON IM VERZEICHNIS SOURCES_FOR_RUN...
     1634    if [[ "$restart_run" != true ]]
     1635    then
     1636       [[ "$makefile" = "" ]]  &&  makefile=$source_path/Makefile
     1637       if [[ ! -f $makefile ]]
     1638       then
     1639          printf "\n  +++ file \"$makefile\" does not exist"
     1640          locat=make; exit
     1641       else
     1642          cp  $makefile  SOURCES_FOR_RUN_$fname/Makefile
     1643       fi
     1644    fi
     1645
     1646
    16241647       # DATEIEN AUS ZUSAETZLICHEM QUELLVERZEICHNIS HINZUFUEGEN
    16251648    if [[ $restart_run != true  &&  "$add_source_path" != "" ]]
     
    16381661
    16391662          cd $add_source_path
     1663          found=false
    16401664
    16411665          Names=$(ls -1 *.f90 2>&1)
     
    16531677          cd  SOURCES_FOR_RUN_$fname
    16541678
     1679             # COPY MAKEFILE IF EXISTING
     1680          if [[ -f $add_source_path/Makefile ]]
     1681          then
     1682             printf "\n\n  *** user Makefile from directory"
     1683             printf "\n      \"$add_source_path\" is used \n"
     1684             sleep 1
     1685             cp  $add_source_path/Makefile  .
     1686          fi
     1687
    16551688          for  dateiname  in  $AddFilenames
    16561689          do
     
    16591692                printf "\n  +++ source code file \"$dateiname\" found in additional"
    16601693                printf "\n      source code directory \"$add_source_path\" "
    1661                 printf "\n      as well as in directory \"$source_path\"."
     1694                printf "\n      but was also given with option \"-s\" which means that it should be taken"
     1695                printf "\n      from directory \"$source_path\"."
    16621696                locat=source; exit
    16631697             fi
     
    16661700             source_list="$source_list $dateiname"
    16671701
     1702                # CHECK IF FILE IS CONTAINED IN MAKEFILE
     1703             if [[ $(grep -c $dateiname Makefile) = 0 ]]
     1704             then
     1705                printf "\n\n  +++ user file \"$dateiname\" "
     1706                printf "\n      is not listed in Makefile \n"
     1707                locat=source; exit
     1708             else
     1709
    16681710                # Default User-Interface von der Liste entfernen, falls Datei
    16691711                # ein User-Interface enthaelt
    1670              if [[ $( cat $dateiname | grep -c "END SUBROUTINE user_parin" ) != 0 ]]
    1671              then
    1672                 if [[ $dateiname != user_interface.f90  &&  -f user_interface.f90 ]]
     1712#             if [[ $( cat $dateiname | grep -c "END SUBROUTINE user_parin" ) != 0 ]]
     1713#             then
     1714#                if [[ $dateiname != user_interface.f90  &&  -f user_interface.f90 ]]
     1715#                then
     1716#                   rm -rf  user_interface.f90
     1717#                   source_list=`echo $source_list | sed -e 's/user_interface.f90//'`
     1718#                   printf "\n\n  *** default \"user_interface.f90\" removed from the files to be translated"
     1719#                   printf "\n      since a user-interface is found in file"
     1720#                   printf "\n      \"$add_source_path/$dateiname\" \n"
     1721#                   sleep 3
     1722#                else
     1723                if [[ $found = false ]]
    16731724                then
    1674                    rm -rf  user_interface.f90
    1675                    source_list=`echo $source_list | sed -e 's/user_interface.f90//'`
    1676                    printf "\n\n  *** default \"user_interface.f90\" removed from the files to be translated"
    1677                    printf "\n      since a user-interface is found in file"
    1678                    printf "\n      \"$add_source_path/$dateiname\" \n"
    1679                    sleep 3
    1680                 else
    1681                    printf "\n\n  *** user-interface file \"$dateiname\" "
    1682                    printf "\n      added to the files to be translated \n"
    1683                    sleep 3
     1725                   found=true
     1726                   printf "\n\n  *** following user file(s) added to the"
     1727                   printf " files to be translated:\n      "
    16841728                fi
     1729                printf "$dateiname  "
     1730                sleep 0.5
    16851731             fi
    16861732          done
    1687 
     1733          [[ $found = true ]]  &&  printf "\n"
    16881734          cd -  > /dev/null
    16891735       fi
     
    17331779       # MAKEFILE AUF VORHANDENSEIN PRUEFEN UND KOPIEREN
    17341780       # BEI RESTART-LAEUFEN LIEGT ES SCHON IM VERZEICHNIS SOURCES_FOR_RUN...
    1735     if [[ "$restart_run" != true ]]
    1736     then
    1737        [[ "$makefile" = "" ]]  &&  makefile=$source_path/Makefile
    1738        if [[ ! -f $makefile ]]
    1739        then
    1740           printf "\n  +++ file \"$makefile\" does not exist"
    1741           locat=make; exit
    1742        else
    1743           cp  $makefile  SOURCES_FOR_RUN_$fname/Makefile
    1744        fi
    1745     fi
     1781#    if [[ "$restart_run" != true ]]
     1782#    then
     1783#       [[ "$makefile" = "" ]]  &&  makefile=$source_path/Makefile
     1784#       if [[ ! -f $makefile ]]
     1785#       then
     1786#          printf "\n  +++ file \"$makefile\" does not exist"
     1787#          locat=make; exit
     1788#       else
     1789#          cp  $makefile  SOURCES_FOR_RUN_$fname/Makefile
     1790#       fi
     1791#    fi
    17461792
    17471793 fi  # do_compile=true
     
    22202266          if [[ "$line" != ""  &&  $(echo $line | cut -c1) != "#" ]]
    22212267          then
    2222              local_depository_path=`echo $line | cut -d" " -s -f2`
     2268             if [[ "$(echo $line | cut -d" " -s -f4)" = "$cond1"  &&  "$(echo $line | cut -d" " -s -f5)" = "$cond2" ]]
     2269             then
     2270                local_depository_path=`echo $line | cut -d" " -s -f2`
     2271             fi
    22232272          fi
    22242273       done < tmp_mrun
     
    22572306          # ALS user_interface.f90 LIEGT, DIESEN GEAENDERTEN NAMEN INS
    22582307          # MAKEFILE EINTRAGEN
    2259        cd  $TEMPDIR_COMPILE
    2260        interface_file=`grep -l "END SUBROUTINE user_parin" $source_list`
    2261        if [[ "$interface_file" != "" ]]
    2262        then
    2263           interface_file=`echo $interface_file | cut -d"." -f1`
    2264           mv  Makefile  Makefile_old
    2265           sed "s/user_interface/$interface_file/g"  Makefile_old  >  Makefile
    2266        fi
    2267        cd -  > /dev/null
     2308#       cd  $TEMPDIR_COMPILE
     2309#       interface_file=`grep -l "END SUBROUTINE user_parin" $source_list`
     2310#       if [[ "$interface_file" != "" ]]
     2311#       then
     2312#          interface_file=`echo $interface_file | cut -d"." -f1`
     2313#          mv  Makefile  Makefile_old
     2314#          sed "s/user_interface/$interface_file/g"  Makefile_old  >  Makefile
     2315#       fi
     2316#       cd -  > /dev/null
    22682317    else
    22692318       cp  $executable   ${TEMPDIR}/a.out
     
    23012350       printf "\n\n\n  *** compilation starts \n$striche\n"
    23022351       printf "  *** compilation with make using following options:\n"
     2352       printf "      make depository:          $make_depository"
    23032353       printf "      compilername:             $compiler_name\n"
    23042354       printf "      options:                  $fopts\n"
     
    27152765       if [[ "$ENVIRONMENT" = BATCH ]]
    27162766       then
    2717           printf "\n  +++ debug is allowed in interactive mode only"
    2718           locat=debug
    2719           exit
     2767          if [[ $(echo $localhost | cut -c1-5) != lcsgi ]]
     2768          then
     2769             printf "\n  +++ debug is allowed in interactive mode only"
     2770             locat=debug
     2771             exit
     2772          fi
    27202773       fi
    27212774       if [[ $localhost = decalpha ]]
     
    27562809             totalview   poe  -a a.out  -procs $numprocs  -rmpool 0  -nodes 1   $ROPTS
    27572810          fi
     2811       elif [[ $(echo $localhost | cut -c1-5) = lcsgi ]]
     2812       then
     2813             # CURRENTLY NO DEBUGGER ON LCSGI
     2814          if [[ $run_coupled_model = true ]]
     2815          then
     2816             printf "\n  +++ no debug in coupled mode available on \"$localhost\" "
     2817             locat=debug
     2818             exit
     2819          fi
     2820          (( ii = $numprocs / $threads_per_task ))
     2821          export OMP_NUM_THREADS=$threads_per_task
     2822          echo "OMP_NUM_THREADS=$OMP_NUM_THREADS"
     2823          if [[ $threads_per_task != 1 ]]
     2824          then
     2825             printf "\n      threads per task: $threads_per_task"
     2826          fi
     2827          printf "\n\n"
     2828#          ulimit -s 300000   # A too large stack size causes problems
     2829#          export MV2_NUM_PORTS=2
     2830#          export MV2_CPU_MAPPING=0:1:2:3
     2831#          mpiexec    ./a.out  $ROPTS
     2832#          export MPI_LAUNCH_TIMEOUT=360
     2833           echo "no_coupling"  >  runfile_atmos
     2834           mpiexec_mpt -np $ii   ./a.out  $ROPTS
    27582835       else
    27592836          printf "\n  +++ no debug available on \"$localhost\" "
  • palm/trunk/SOURCE/CURRENT_MODIFICATIONS

    r210 r211  
    77(-Y option). Adjustments in mrun, mbuild, and subjob for lcxt4.
    88
    9 DVRP arguments changed to single precision, mode pathlines added
     9DVRP arguments changed to single precision, mode pathlines added.
     10
     11User can add additional routines in files user_additional_routines.f90
    1012
    1113
    12 check_for_restart, check_parameters, data_output_dvrp, init_dvrp, init_pegrid, local_stop, modules, package_parin, palm, surface_coupler, timestep
     14check_for_restart, check_parameters, data_output_dvrp, init_dvrp, init_pegrid, local_stop, modules, package_parin, palm, surface_coupler, timestep, user_additional_routines
    1315Makefile, mrun, mbuild, subjob
    1416
     
    1820Changed:
    1921-------
     22User interface has been split into single files.
    2023
     24Makefile
     25
     26New: user_3d_data_averaging user_actions user_advec_particles user_check_data_output user_check_data_output_pr user_data_output_2d user_data_output_3d user_data_output_dvrp user_define_netcdf_grid user_dvrp_coltab user_header user_init user_init_3d_model user_init_grid user_init_particles user_init_plant_canopy user_last_actions user_module user_parin user_particle_attributes user_read_restart_data user_spectra user_statistics
     27
     28Removed: user_interface
    2129
    2230Errors:
  • palm/trunk/SOURCE/Makefile

    r206 r211  
    44# Actual revisions:
    55# -----------------
     6# former file user_interface split into one file per subroutine
    67# +init_coupling
    78#
     
    7273        sum_up_3d_data.f90 surface_coupler.f90 swap_timelevel.f90 \
    7374        temperton_fft.f90 time_integration.f90 time_to_string.f90 timestep.f90 \
    74         timestep_scheme_steering.f90 transpose.f90 user_interface.f90 \
    75         wall_fluxes.f90 write_3d_binary.f90 write_compressed.f90 \
    76         write_var_list.f90
     75        timestep_scheme_steering.f90 transpose.f90 user_3d_data_averaging.f90 \
     76        user_actions.f90 user_additional_routines.f90 user_advec_particles.f90 \
     77        user_check_data_output.f90 \
     78        user_check_data_output_pr.f90 user_data_output_2d.f90 \
     79        user_data_output_3d.f90 user_data_output_dvrp.f90 \
     80        user_define_netcdf_grid.f90 user_dvrp_coltab.f90 user_header.f90 \
     81        user_init.f90 user_init_3d_model.f90 user_init_grid.f90 \
     82        user_init_particles.f90 user_init_plant_canopy.f90 \
     83        user_last_actions.f90 user_module.f90 user_parin.f90 \
     84        user_particle_attributes.f90 user_read_restart_data.f90 \
     85        user_spectra.f90 user_statistics.f90 wall_fluxes.f90 \
     86        write_3d_binary.f90 write_compressed.f90 write_var_list.f90
    7787
    7888OBJS =  advec_particles.o advec_s_bc.o advec_s_pw.o advec_s_up.o \
     
    102112        spline_x.o spline_y.o spline_z.o sum_up_3d_data.o surface_coupler.o \
    103113        swap_timelevel.o temperton_fft.o time_integration.o time_to_string.o \
    104         timestep.o timestep_scheme_steering.o transpose.o user_interface.o \
     114        timestep.o timestep_scheme_steering.o transpose.o \
     115        user_3d_data_averaging.o user_actions.o user_additional_routines.o \
     116        user_advec_particles.o \
     117        user_check_data_output.o user_check_data_output_pr.o \
     118        user_data_output_2d.o user_data_output_3d.o user_data_output_dvrp.o \
     119        user_define_netcdf_grid.o user_dvrp_coltab.o user_header.o \
     120        user_init.o user_init_3d_model.o user_init_grid.o \
     121        user_init_particles.o user_init_plant_canopy.o user_last_actions.o \
     122        user_module.o user_parin.o user_particle_attributes.o \
     123        user_read_restart_data.o user_spectra.o user_statistics.o \
    105124        wall_fluxes.o write_3d_binary.o write_compressed.o write_var_list.o
    106125
     
    224243        eqn_state_seawater.o impact_of_latent_heat.o \
    225244        plant_canopy_model.o production_e.o \
    226         user_interface.o
     245        user_actions.o
    227246random_gauss.o: random_function.o
    228247read_3d_binary.o: modules.o random_function.o
     
    238257swap_timelevel.o: modules.o
    239258temperton_fft.o: modules.o
    240 time_integration.o: modules.o prognostic_equations.o user_interface.o \
     259time_integration.o: modules.o prognostic_equations.o user_actions.o \
    241260        interaction_droplets_ptq.o
    242261timestep.o: modules.o
    243262timestep_scheme_steering.o: modules.o
    244263transpose.o: modules.o
    245 user_interface.o: modules.o user_interface.f90
     264user_3d_data_averaging.o: modules.o user_module.o
     265user_actions.o: modules.o user_module.o
     266user_additional_routines.o: modules.o user_module.o
     267user_advec_particles.o: modules.o user_module.o
     268user_check_data_output.o: modules.o user_module.o
     269user_check_data_output_pr.o: modules.o user_module.o
     270user_data_output_2d.o: modules.o user_module.o
     271user_data_output_3d.o: modules.o user_module.o
     272user_data_output_dvrp.o: modules.o user_module.o
     273user_define_netcdf_grid.o: modules.o user_module.o
     274user_dvrp_coltab.o: modules.o user_module.o
     275user_header.o: modules.o user_module.o
     276user_init.o: modules.o user_module.o
     277user_init_3d_model.o: modules.o user_module.o
     278user_init_grid.o: modules.o user_module.o
     279user_init_particles.o: modules.o user_module.o
     280user_init_plant_canopy.o: modules.o user_module.o
     281user_last_actions.o: modules.o user_module.o
     282user_module.o: user_module.f90
     283user_parin.o: modules.o user_module.o
     284user_particle_attributes.o: modules.o user_module.o
     285user_read_restart_data.o: modules.o user_module.o
     286user_spectra.o: modules.o user_module.o
     287user_statistics.o: modules.o user_module.o
    246288wall_fluxes.o: modules.o
    247289write_3d_binary.o: modules.o random_function.o
Note: See TracChangeset for help on using the changeset viewer.