- Timestamp:
- Jul 27, 2007 9:09:17 AM (17 years ago)
- Location:
- palm/trunk
- Files:
-
- 1 added
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/DOC/app/chapter_4.2.html
r97 r102 3 3 <meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>PALM chapter 4.2</title></head> 4 4 <body><h3 style="line-height: 100%;"><a name="Kapitel4.2"></a>4.2 <a href="#Laufparameter">Runtime 5 parameters</a> and <a href="#Paketparameter">package5 parameters</a>, <a href="#particle_parameters">particle parameters</a>, and <a href="#Paketparameter">package 6 6 parameters</a></h3> 7 7 <h3 style="margin-bottom: 0cm; line-height: 100%;"><a name="Laufparameter"></a>Runtime parameters:</h3> … … 2093 2093 is <a href="http://www.muk.uni-hannover.de/institut/software/iso2d_beschreibung.html#YRIGHT">yright</a>).</p> 2094 2094 </td> </tr> </tbody></table><br> 2095 <br><h3 style="line-height: 100%;"><a name=" Paketparameter"></a>Package2095 <br><h3 style="line-height: 100%;"><a name="particle_parameters"></a>Particle 2096 2096 parameters: </h3> 2097 Package (<span style="font-weight: bold;">mrun</span> 2098 option -p): <span style="font-weight: bold;"><a name="particles_package"></a>particles</span> 2099 NAMELIST group name: <span style="font-weight: bold;">particles_par<br> 2097 <span style="font-weight: bold;"></span><span style="font-weight: bold;"></span>NAMELIST group name: <span style="font-weight: bold;">particles_par<br> 2100 2098 </span><table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2"> <tbody><tr> 2101 2099 <td style="vertical-align: top;"><font size="4"><b>Parameter … … 2654 2652 and performance of PALM may decrease.</p> </td> </tr> 2655 2653 </tbody></table><span style="font-weight: bold;"><br> 2656 <br></span><span style="font-weight: bold;">Package 2654 </span><br><h3 style="line-height: 100%;"><a name="Paketparameter"></a>Package 2655 parameters: </h3><br><span style="font-weight: bold;">Package 2657 2656 (<span style="font-weight: bold;">mrun</span> option 2658 2657 -p): <span style="font-weight: bold;"><a name="dvrp_graphics"></a>dvrp_graphics</span> -
palm/trunk/SCRIPTS/mrun
r97 r102 120 120 # removed (incl. option -f) 121 121 # 19/06/07 - Siggi - time limit for cdata jobs increased 122 # 25/07/07 - Siggi - two sets of executables can be started on lcmuk, 123 # if new option -Y (coupling) is given, 124 # output of executables to aout_output removed, 125 # messages are immediately written to stdout instead 122 126 123 127 … … 207 211 remotecall=false 208 212 remote_username="" 213 run_coupled_model=false 209 214 run_mode="" 210 215 scirocco=false … … 226 231 227 232 typeset -i iec=0 iic=0 iin=0 ioc=0 iout=0 memory=0 stagein_anz=0 stageout_anz=0 228 typeset -i cputime i ii i cycle inode ival jobges jobsek maxcycle minuten nodes pes sekunden tp1233 typeset -i cputime i ii iii icycle inode ival jobges jobsek maxcycle minuten nodes pes sekunden tp1 229 234 230 235 typeset -R30 calltime … … 344 349 # SHELLSCRIPT-OPTIONEN EINLESEN UND KOMMANDO NEU ZUSAMMENSETZEN, FALLS ES 345 350 # FUER FOLGEJOBS BENOETIGT WIRD 346 while getopts :a:AbBc:Cd:D:FG:h:H:i:IkK:m:M:n:o:Op:P:q:r:R:s:St:T:u:U:vxX: option351 while getopts :a:AbBc:Cd:D:FG:h:H:i:IkK:m:M:n:o:Op:P:q:r:R:s:St:T:u:U:vxX:Y option 347 352 do 348 353 case $option in … … 382 387 (x) do_trace=true;set -x; mc="$mc -x";; 383 388 (X) numprocs=$OPTARG; mc="$mc -X$OPTARG";; 389 (Y) run_coupled_model=true; mc="$mc -Y";; 384 390 (\?) printf "\n +++ unknown option $OPTARG \n" 385 391 printf "\n --> type \"$0 ?\" for available options \n" … … 436 442 printf "\n -x tracing of mrun for debug purposes ---" 437 443 printf "\n -X # of processors (on parallel machines) 1" 444 printf "\n -Y run coupled model ---" 438 445 printf "\n " 439 446 printf "\n Possible values of positional parameter <modus>:" … … 2618 2625 if [[ "$cond1" = hpmcount || "$cond2" = hpmcount ]] 2619 2626 then 2620 /opt/optibm/HPM_2_4_1/bin/hpmcount a.out $ROPTS > aout_output 2>&12627 /opt/optibm/HPM_2_4_1/bin/hpmcount a.out $ROPTS 2621 2628 else 2622 poe ./a.out $ROPTS > aout_output 2>&12629 poe ./a.out $ROPTS 2623 2630 fi 2624 2631 else 2625 2632 if [[ $localhost = ibmb || $localhost = ibmh || $localhost = ibms ]] 2626 2633 then 2627 poe a.out -procs $numprocs -nodes 1 -rmpool 0 $ROPTS > aout_output 2>&12634 poe a.out -procs $numprocs -nodes 1 -rmpool 0 $ROPTS 2628 2635 elif [[ $localhost = ibmy ]] 2629 2636 then … … 2640 2647 fi 2641 2648 export MP_HOSTFILE=hostfile 2642 ./a.out -procs $tasks_per_node $ROPTS > aout_output 2>&12649 ./a.out -procs $tasks_per_node $ROPTS 2643 2650 else 2644 2651 if [[ "$host_file" = "" ]] … … 2651 2658 fi 2652 2659 export MP_HOSTFILE=$host_file 2653 poe a.out -procs $numprocs -tasks_per_node $numprocs $ROPTS > aout_output 2>&12660 poe a.out -procs $numprocs -tasks_per_node $numprocs $ROPTS 2654 2661 fi 2655 2662 fi … … 2663 2670 # export F_TRACE=YES|FMT1|FMT2 # output of ftrace informations to job protocol 2664 2671 echo "*** execution on single node with mpirun" 2665 mpirun -np $numprocs ./a.out $ROPTS > aout_output 2>&12672 mpirun -np $numprocs ./a.out $ROPTS 2666 2673 else 2667 2674 (( i = 0 )) … … 2699 2706 echo "export use_seperate_pe_for_dvrp_output" >> mpi_exec_shell 2700 2707 echo " " >> mpi_exec_shell 2701 echo "exec ./a.out > aout_output 2>&1">> mpi_exec_shell2708 echo "exec ./a.out" >> mpi_exec_shell 2702 2709 2703 2710 chmod u+x mpi_exec_shell … … 2731 2738 printf "\n threads per task: $threads_per_task" 2732 2739 fi 2733 printf "\n\n"2734 if [[ $scirocco = true ]]2735 then2736 mpiexec -machinefile hostfile -n $ii a.out $ROPTS > aout_output 2>&12740 if [[ $run_coupled_model = false ]] 2741 then 2742 printf "\n\n" 2743 mpiexec -machinefile hostfile -n $ii a.out $ROPTS 2737 2744 else 2738 mpirun -machinefile hostfile -np $ii a.out $ROPTS > aout_output 2>&1 2739 fi 2745 (( iii = ii / 2 )) 2746 printf "\n coupled run ($iii atmosphere, $iii ocean)" 2747 printf "\n\n" 2748 mpiexec -machinefile hostfile -n $iii -env coupling_mode atmosphere_to_ocean a.out $ROPTS & 2749 mpiexec -machinefile hostfile -n $iii -env coupling_mode ocean_to_atmosphere a.out $ROPTS & 2750 wait 2751 fi 2752 2753 # if [[ $scirocco = true ]] 2754 # then 2755 # mpiexec -machinefile hostfile -n $ii a.out $ROPTS 2756 # else 2757 # mpirun -machinefile hostfile -np $ii a.out $ROPTS 2758 # fi 2759 2740 2760 elif [[ $host = decalpha ]] 2741 2761 then 2742 dmpirun -np $numprocs a.out $ROPTS > aout_output 2>&12762 dmpirun -np $numprocs a.out $ROPTS 2743 2763 elif [[ $host = lctit ]] 2744 2764 then … … 2760 2780 if [[ "$QUEUE" = interactive ]] 2761 2781 then 2762 mpirun -np $numprocs a.out $ROPTS > aout_output 2>&12782 mpirun -np $numprocs a.out $ROPTS 2763 2783 else 2764 n1ge -fore -g 1S060156 -mpi $numprocs -mem 4 -N palm -q $queue a.out $ROPTS > aout_output 2>&12784 n1ge -fore -g 1S060156 -mpi $numprocs -mem 4 -N palm -q $queue a.out $ROPTS 2765 2785 fi 2766 2786 2767 2787 rm $runfile 2768 2788 else 2769 mpprun -n $numprocs a.out $ROPTS > aout_output 2>&12789 mpprun -n $numprocs a.out $ROPTS 2770 2790 fi 2771 2791 [[ $? != 0 ]] && execution_error=true … … 2778 2798 fi 2779 2799 else 2780 a.out $ROPTS > aout_output 2>&12800 a.out $ROPTS 2781 2801 fi 2782 2802 fi … … 2785 2805 2786 2806 # ABBRUCH BEI LAUFZEITFEHLER 2787 [[ ! ( "$cond1" = debug || "$cond2" = debug ) ]] && cat aout_output 2807 # [[ ! ( "$cond1" = debug || "$cond2" = debug ) ]] && cat aout_output* 2788 2808 printf "\n +++ runtime error occured" 2789 2809 locat=execution 2790 2810 exit 2791 2811 else 2792 [[ ! ( "$cond1" = debug || "$cond2" = debug ) ]] && cat aout_output 2812 # [[ ! ( "$cond1" = debug || "$cond2" = debug ) ]] && cat aout_output* 2793 2813 printf "\n$striche\n *** execution finished \n" 2794 2814 fi … … 3544 3564 [[ $delete_temporary_catalog = false ]] && mrun_com=${mrun_com}" -B" 3545 3565 [[ $node_usage != default ]] && mrun_com=${mrun_com}" -n $node_usage" 3566 [[ $run_coupled_model = true ]] && mrun_com=${mrun_com}" -Y" 3546 3567 if [[ $do_remote = true ]] 3547 3568 then -
palm/trunk/SCRIPTS/subjob
r101 r102 82 82 # 01/03/07 - Siggi - adjustments for RIAM machines gate and NEC-SX8 (n-sx) 83 83 # 12/04/07 - Siggi - option -f (filetransfer protocol) removed, scp only 84 # 27/07/07 - Siggi - autan admitted 84 85 85 86 … … 144 145 case $local_host in 145 146 (atmos) local_addres=172.20.25.35; local_host=lcide;; 147 (autan) local_addres=130.75.105.57; local_host=lcmuk;; 146 148 (bora) local_addres=130.75.105.103; local_host=lcmuk;; 147 149 (breg*-en0|berni*-en0) local_addres=130.73.230.10; local_host=ibmb;; -
palm/trunk/SOURCE/CURRENT_MODIFICATIONS
r97 r102 1 1 New: 2 2 --- 3 Allows runs for a coupled atmosphere-ocean LES, 4 coupling frequency is controlled by new d3par-parameter dt_coupling, 5 the coupling mode (atmosphere_to_ocean or ocean_to_atmosphere) for the 6 respective processes is read from environment variable coupling_mode, 7 which is set by the mpiexec-command, 8 communication between the two models is done using the intercommunicator 9 comm_inter, 10 local files opened by the ocean model get the additional suffic "_O" 11 12 A momentum flux can be set as top boundary condition using the new 13 inipar parameter top_momentumflux_u|v. 14 15 boundary_conds, check_open, check_parameters, diffusion_u, diffusion_v, flow_statistics, header, init_pegrid, init_3d_model, modules, palm, parin, prognostic_equations, read_var_list, read_3d_binary, swap_timelevel, time_integration, write_var_list, write_3d_binary 16 17 New: 18 surface_coupler 3 19 4 20 -
palm/trunk/SOURCE/Makefile
r96 r102 4 4 # Actual revisions: 5 5 # ----------------- 6 # + eqn_state_seawater, init_ocean6 # +surface_coupler 7 7 # 8 8 # Former revisions: 9 9 # ----------------- 10 10 # $Id$ 11 # 12 # 96 2007-06-04 08:07:41Z raasch 13 # +eqn_state_seawater, init_ocean 11 14 # 12 15 # 82 2007-04-16 15:40:52Z raasch … … 61 64 random_gauss.f90 read_3d_binary.f90 read_var_list.f90 run_control.f90 \ 62 65 singleton.f90 sor.f90 spline_x.f90 spline_y.f90 spline_z.f90 \ 63 sum_up_3d_data.f90 s wap_timelevel.f90 temperton_fft.f90 \64 t ime_integration.f90 time_to_string.f90 timestep.f90 \66 sum_up_3d_data.f90 surface_coupler.f90 swap_timelevel.f90 \ 67 temperton_fft.f90 time_integration.f90 time_to_string.f90 timestep.f90 \ 65 68 timestep_scheme_steering.f90 transpose.f90 user_interface.f90 \ 66 69 wall_fluxes.f90 write_3d_binary.f90 write_compressed.f90 \ … … 90 93 production_e.o prognostic_equations.o random_function.o random_gauss.o \ 91 94 read_3d_binary.o read_var_list.o run_control.o singleton.o sor.o \ 92 spline_x.o spline_y.o spline_z.o sum_up_3d_data.o s wap_timelevel.o \93 temperton_fft.o time_integration.o time_to_string.o timestep.o \94 95 spline_x.o spline_y.o spline_z.o sum_up_3d_data.o surface_coupler.o \ 96 swap_timelevel.o temperton_fft.o time_integration.o time_to_string.o \ 97 timestep.o timestep_scheme_steering.o transpose.o user_interface.o \ 95 98 wall_fluxes.o write_3d_binary.o write_compressed.o write_var_list.o 96 99 … … 221 224 spline_z.o: modules.o 222 225 sum_up_3d_data.o: modules.o 226 surface_coupler.o: modules.o 223 227 swap_timelevel.o: modules.o 224 228 temperton_fft.o: modules.o -
palm/trunk/SOURCE/boundary_conds.f90
r98 r102 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Boundary conditions for temperature adjusted for coupled runs 7 7 ! 8 8 ! Former revisions: … … 93 93 94 94 ! 95 !-- Temperature at bottom boundary 95 !-- Temperature at bottom boundary. 96 !-- In case of coupled runs (ibc_pt_b = 2) the temperature is given by 97 !-- the sea surface temperature of the coupled ocean model. 96 98 IF ( ibc_pt_b == 0 ) THEN 97 99 DO i = nxl-1, nxr+1 … … 100 102 ENDDO 101 103 ENDDO 102 ELSE 104 ELSEIF ( ibc_pt_b == 1 ) THEN 103 105 DO i = nxl-1, nxr+1 104 106 DO j = nys-1, nyn+1 -
palm/trunk/SOURCE/check_open.f90
r83 r102 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Different filenames are used in case of a coupled simulation, 7 ! coupling_char added to all relevant filenames 7 8 ! 8 9 ! Former revisions: … … 146 147 CASE ( 11 ) 147 148 148 OPEN ( 11, FILE='PARIN', FORM='FORMATTED', STATUS='OLD' ) 149 OPEN ( 11, FILE='PARIN'//coupling_char, FORM='FORMATTED', & 150 STATUS='OLD' ) 149 151 150 152 CASE ( 13 ) 151 153 152 154 IF ( myid_char == '' ) THEN 153 OPEN ( 13, FILE='BININ'// myid_char, FORM='UNFORMATTED', &154 STATUS='OLD' )155 ELSE 156 OPEN ( 13, FILE='BININ /'//myid_char, FORM='UNFORMATTED', &157 STATUS='OLD' )155 OPEN ( 13, FILE='BININ'//coupling_char//myid_char, & 156 FORM='UNFORMATTED', STATUS='OLD' ) 157 ELSE 158 OPEN ( 13, FILE='BININ'//coupling_char//'/'//myid_char, & 159 FORM='UNFORMATTED', STATUS='OLD' ) 158 160 ENDIF 159 161 … … 161 163 162 164 IF ( myid_char == '' ) THEN 163 OPEN ( 14, FILE='BINOUT'// myid_char, FORM='UNFORMATTED', &164 POSITION='APPEND' )165 OPEN ( 14, FILE='BINOUT'//coupling_char//myid_char, & 166 FORM='UNFORMATTED', POSITION='APPEND' ) 165 167 ELSE 166 168 IF ( myid == 0 .AND. .NOT. openfile(file_id)%opened_before ) THEN 167 CALL local_system( 'mkdir BINOUT' )169 CALL local_system( 'mkdir BINOUT' // coupling_char ) 168 170 ENDIF 169 171 #if defined( __parallel ) … … 173 175 CALL MPI_BARRIER( comm2d, ierr ) 174 176 #endif 175 OPEN ( 14, FILE='BINOUT /'//myid_char_14, FORM='UNFORMATTED', &176 POSITION='APPEND' )177 OPEN ( 14, FILE='BINOUT'//coupling_char//'/'//myid_char_14, & 178 FORM='UNFORMATTED', POSITION='APPEND' ) 177 179 ENDIF 178 180 179 181 CASE ( 15 ) 180 182 181 OPEN ( 15, FILE='RUN_CONTROL' , FORM='FORMATTED' )183 OPEN ( 15, FILE='RUN_CONTROL'//coupling_char, FORM='FORMATTED' ) 182 184 183 185 CASE ( 16 ) 184 186 185 OPEN ( 16, FILE='LIST_PROFIL' , FORM='FORMATTED' )187 OPEN ( 16, FILE='LIST_PROFIL'//coupling_char, FORM='FORMATTED' ) 186 188 187 189 CASE ( 17 ) 188 190 189 OPEN ( 17, FILE='LIST_PROFIL_1D' , FORM='FORMATTED' )191 OPEN ( 17, FILE='LIST_PROFIL_1D'//coupling_char, FORM='FORMATTED' ) 190 192 191 193 CASE ( 18 ) 192 194 193 OPEN ( 18, FILE='CPU_MEASURES' , FORM='FORMATTED' )195 OPEN ( 18, FILE='CPU_MEASURES'//coupling_char, FORM='FORMATTED' ) 194 196 195 197 CASE ( 19 ) 196 198 197 OPEN ( 19, FILE='HEADER' , FORM='FORMATTED' )199 OPEN ( 19, FILE='HEADER'//coupling_char, FORM='FORMATTED' ) 198 200 199 201 CASE ( 20 ) 200 202 201 203 IF ( myid == 0 .AND. .NOT. openfile(file_id)%opened_before ) THEN 202 CALL local_system( 'mkdir DATA_LOG' )204 CALL local_system( 'mkdir DATA_LOG' // coupling_char ) 203 205 ENDIF 204 206 IF ( myid_char == '' ) THEN 205 OPEN ( 20, FILE='DATA_LOG /_0000', FORM='UNFORMATTED', &206 POSITION='APPEND' )207 OPEN ( 20, FILE='DATA_LOG'//coupling_char//'/_0000', & 208 FORM='UNFORMATTED', POSITION='APPEND' ) 207 209 ELSE 208 210 #if defined( __parallel ) … … 212 214 CALL MPI_BARRIER( comm2d, ierr ) 213 215 #endif 214 OPEN ( 20, FILE='DATA_LOG /'//myid_char, FORM='UNFORMATTED', &215 POSITION='APPEND' )216 OPEN ( 20, FILE='DATA_LOG'//coupling_char//'/'//myid_char, & 217 FORM='UNFORMATTED', POSITION='APPEND' ) 216 218 ENDIF 217 219 … … 219 221 220 222 IF ( data_output_2d_on_each_pe ) THEN 221 OPEN ( 21, FILE='PLOT2D_XY'// myid_char, FORM='UNFORMATTED', &222 POSITION='APPEND' )223 ELSE 224 OPEN ( 21, FILE='PLOT2D_XY' , FORM='UNFORMATTED', &225 POSITION='APPEND' )223 OPEN ( 21, FILE='PLOT2D_XY'//coupling_char//myid_char, & 224 FORM='UNFORMATTED', POSITION='APPEND' ) 225 ELSE 226 OPEN ( 21, FILE='PLOT2D_XY'//coupling_char, & 227 FORM='UNFORMATTED', POSITION='APPEND' ) 226 228 ENDIF 227 229 … … 250 252 !-- Create output file for local parameters 251 253 IF ( iso2d_output ) THEN 252 OPEN ( 27, FILE='PLOT2D_XY_LOCAL' , FORM='FORMATTED', &253 DELIM='APOSTROPHE' )254 OPEN ( 27, FILE='PLOT2D_XY_LOCAL'//coupling_char, & 255 FORM='FORMATTED', DELIM='APOSTROPHE' ) 254 256 openfile(27)%opened = .TRUE. 255 257 ENDIF … … 260 262 261 263 IF ( data_output_2d_on_each_pe ) THEN 262 OPEN ( 22, FILE='PLOT2D_XZ'// myid_char, FORM='UNFORMATTED', &263 POSITION='APPEND' )264 ELSE 265 OPEN ( 22, FILE='PLOT2D_XZ' , FORM='UNFORMATTED', &264 OPEN ( 22, FILE='PLOT2D_XZ'//coupling_char//myid_char, & 265 FORM='UNFORMATTED', POSITION='APPEND' ) 266 ELSE 267 OPEN ( 22, FILE='PLOT2D_XZ'//coupling_char, FORM='UNFORMATTED', & 266 268 POSITION='APPEND' ) 267 269 ENDIF … … 289 291 ! 290 292 !-- Create output file for local parameters 291 OPEN ( 28, FILE='PLOT2D_XZ_LOCAL' , FORM='FORMATTED', &292 DELIM='APOSTROPHE' )293 OPEN ( 28, FILE='PLOT2D_XZ_LOCAL'//coupling_char, & 294 FORM='FORMATTED', DELIM='APOSTROPHE' ) 293 295 openfile(28)%opened = .TRUE. 294 296 … … 298 300 299 301 IF ( data_output_2d_on_each_pe ) THEN 300 OPEN ( 23, FILE='PLOT2D_YZ'// myid_char, FORM='UNFORMATTED', &301 POSITION='APPEND' )302 ELSE 303 OPEN ( 23, FILE='PLOT2D_YZ' , FORM='UNFORMATTED', &302 OPEN ( 23, FILE='PLOT2D_YZ'//coupling_char//myid_char, & 303 FORM='UNFORMATTED', POSITION='APPEND' ) 304 ELSE 305 OPEN ( 23, FILE='PLOT2D_YZ'//coupling_char, FORM='UNFORMATTED', & 304 306 POSITION='APPEND' ) 305 307 ENDIF … … 327 329 ! 328 330 !-- Create output file for local parameters 329 OPEN ( 29, FILE='PLOT2D_YZ_LOCAL' , FORM='FORMATTED', &330 DELIM='APOSTROPHE' )331 OPEN ( 29, FILE='PLOT2D_YZ_LOCAL'//coupling_char, & 332 FORM='FORMATTED', DELIM='APOSTROPHE' ) 331 333 openfile(29)%opened = .TRUE. 332 334 … … 335 337 CASE ( 30 ) 336 338 337 OPEN ( 30, FILE='PLOT3D_DATA'//myid_char, FORM='UNFORMATTED' ) 339 OPEN ( 30, FILE='PLOT3D_DATA'//coupling_char//myid_char, & 340 FORM='UNFORMATTED' ) 338 341 ! 339 342 !-- Write coordinate file for AVS … … 508 511 WRITE ( suffix, '(''_'',I1)' ) file_id - 40 509 512 ENDIF 510 OPEN ( file_id, FILE='PLOT1D_DATA'//TRIM( suffix ), FORM='FORMATTED' ) 513 OPEN ( file_id, FILE='PLOT1D_DATA'//coupling_char//TRIM( suffix ), & 514 FORM='FORMATTED' ) 511 515 ! 512 516 !-- Write contents comments at the top of the file … … 521 525 WRITE ( suffix, '(''_'',I1)' ) file_id - 50 522 526 ENDIF 523 OPEN ( file_id, FILE='PLOTTS_DATA'// TRIM( suffix ), FORM='FORMATTED',&524 RECL=496 )527 OPEN ( file_id, FILE='PLOTTS_DATA'//coupling_char//TRIM( suffix ), & 528 FORM='FORMATTED', RECL=496 ) 525 529 ! 526 530 !-- Write PROFIL parameter file for output of time series … … 539 543 ! 540 544 !-- Write RAHMEN parameter 541 OPEN ( 90, FILE='PLOTTS_PAR'// TRIM( suffix ), FORM='FORMATTED', &542 DELIM='APOSTROPHE' )545 OPEN ( 90, FILE='PLOTTS_PAR'//coupling_char//TRIM( suffix ), & 546 FORM='FORMATTED', DELIM='APOSTROPHE' ) 543 547 WRITE ( 90, RAHMEN ) 544 548 ! … … 575 579 576 580 IF ( myid_char == '' ) THEN 577 OPEN ( 80, FILE='PARTICLE_INFOS'// myid_char, FORM='FORMATTED', &578 POSITION='APPEND' )581 OPEN ( 80, FILE='PARTICLE_INFOS'//coupling_char//myid_char, & 582 FORM='FORMATTED', POSITION='APPEND' ) 579 583 ELSE 580 584 IF ( myid == 0 .AND. .NOT. openfile(80)%opened_before ) THEN 581 CALL local_system( 'mkdir PARTICLE_INFOS' )585 CALL local_system( 'mkdir PARTICLE_INFOS' // coupling_char ) 582 586 ENDIF 583 587 #if defined( __parallel ) … … 592 596 ENDIF 593 597 #endif 594 OPEN ( 80, FILE='PARTICLE_INFOS /'//myid_char, FORM='FORMATTED', &595 POSITION='APPEND' )598 OPEN ( 80, FILE='PARTICLE_INFOS'//coupling_char//'/'//myid_char, & 599 FORM='FORMATTED', POSITION='APPEND' ) 596 600 ENDIF 597 601 … … 602 606 CASE ( 81 ) 603 607 604 OPEN ( 81, FILE='PLOTSP_X_PAR' , FORM='FORMATTED', &608 OPEN ( 81, FILE='PLOTSP_X_PAR'//coupling_char, FORM='FORMATTED', & 605 609 DELIM='APOSTROPHE', RECL=1500, POSITION='APPEND' ) 606 610 607 611 CASE ( 82 ) 608 612 609 OPEN ( 82, FILE='PLOTSP_X_DATA' , FORM='FORMATTED', &613 OPEN ( 82, FILE='PLOTSP_X_DATA'//coupling_char, FORM='FORMATTED', & 610 614 POSITION = 'APPEND' ) 611 615 612 616 CASE ( 83 ) 613 617 614 OPEN ( 83, FILE='PLOTSP_Y_PAR' , FORM='FORMATTED', &618 OPEN ( 83, FILE='PLOTSP_Y_PAR'//coupling_char, FORM='FORMATTED', & 615 619 DELIM='APOSTROPHE', RECL=1500, POSITION='APPEND' ) 616 620 617 621 CASE ( 84 ) 618 622 619 OPEN ( 84, FILE='PLOTSP_Y_DATA' , FORM='FORMATTED', &623 OPEN ( 84, FILE='PLOTSP_Y_DATA'//coupling_char, FORM='FORMATTED', & 620 624 POSITION='APPEND' ) 621 625 … … 623 627 624 628 IF ( myid_char == '' ) THEN 625 OPEN ( 85, FILE='PARTICLE_DATA'// myid_char, FORM='UNFORMATTED', &626 POSITION='APPEND' )629 OPEN ( 85, FILE='PARTICLE_DATA'//coupling_char//myid_char, & 630 FORM='UNFORMATTED', POSITION='APPEND' ) 627 631 ELSE 628 632 IF ( myid == 0 .AND. .NOT. openfile(85)%opened_before ) THEN 629 CALL local_system( 'mkdir PARTICLE_DATA' )633 CALL local_system( 'mkdir PARTICLE_DATA' // coupling_char ) 630 634 ENDIF 631 635 #if defined( __parallel ) … … 635 639 CALL MPI_BARRIER( comm2d, ierr ) 636 640 #endif 637 OPEN ( 85, FILE='PARTICLE_DATA /'//myid_char, FORM='UNFORMATTED', &638 POSITION='APPEND' )641 OPEN ( 85, FILE='PARTICLE_DATA'//coupling_char//'/'//myid_char, & 642 FORM='UNFORMATTED', POSITION='APPEND' ) 639 643 ENDIF 640 644 … … 656 660 !-- Set filename depending on unit number 657 661 IF ( file_id == 101 ) THEN 658 filename = 'DATA_2D_XY_NETCDF' 662 filename = 'DATA_2D_XY_NETCDF' // coupling_char 659 663 av = 0 660 664 ELSE 661 filename = 'DATA_2D_XY_AV_NETCDF' 665 filename = 'DATA_2D_XY_AV_NETCDF' // coupling_char 662 666 av = 1 663 667 ENDIF … … 716 720 !-- Set filename depending on unit number 717 721 IF ( file_id == 102 ) THEN 718 filename = 'DATA_2D_XZ_NETCDF' 722 filename = 'DATA_2D_XZ_NETCDF' // coupling_char 719 723 av = 0 720 724 ELSE 721 filename = 'DATA_2D_XZ_AV_NETCDF' 725 filename = 'DATA_2D_XZ_AV_NETCDF' // coupling_char 722 726 av = 1 723 727 ENDIF … … 776 780 !-- Set filename depending on unit number 777 781 IF ( file_id == 103 ) THEN 778 filename = 'DATA_2D_YZ_NETCDF' 782 filename = 'DATA_2D_YZ_NETCDF' // coupling_char 779 783 av = 0 780 784 ELSE 781 filename = 'DATA_2D_YZ_AV_NETCDF' 785 filename = 'DATA_2D_YZ_AV_NETCDF' // coupling_char 782 786 av = 1 783 787 ENDIF … … 834 838 CASE ( 104 ) 835 839 ! 840 !-- Set filename 841 filename = 'DATA_1D_PR_NETCDF' // coupling_char 842 843 ! 836 844 !-- Inquire, if there is a NetCDF file from a previuos run. This should 837 845 !-- be opened for extension, if its variables match the actual run. 838 INQUIRE( FILE= 'DATA_1D_PR_NETCDF', EXIST=netcdf_extend )846 INQUIRE( FILE=filename, EXIST=netcdf_extend ) 839 847 840 848 IF ( netcdf_extend ) THEN 841 849 ! 842 850 !-- Open an existing NetCDF file for output 843 nc_stat = NF90_OPEN( 'DATA_1D_PR_NETCDF', NF90_WRITE, id_set_pr )851 nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_pr ) 844 852 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 29 ) 845 853 ! … … 854 862 nc_stat = NF90_CLOSE( id_set_pr ) 855 863 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 30 ) 856 CALL local_system( 'rm DATA_1D_PR_NETCDF')864 CALL local_system( 'rm ' // TRIM( filename ) ) 857 865 ENDIF 858 866 … … 864 872 IF ( netcdf_64bit ) THEN 865 873 #if defined( __netcdf_64bit ) 866 nc_stat = NF90_CREATE( 'DATA_1D_PR_NETCDF',&874 nc_stat = NF90_CREATE( filename, & 867 875 OR( NF90_NOCLOBBER, NF90_64BIT_OFFSET ),& 868 876 id_set_pr ) … … 870 878 IF ( myid == 0 ) PRINT*, '+++ WARNING: NetCDF: no 64-bit ', & 871 879 'offset allowed on this machine' 872 nc_stat = NF90_CREATE( 'DATA_1D_PR_NETCDF', NF90_NOCLOBBER, & 873 id_set_pr ) 880 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_pr ) 874 881 #endif 875 882 ELSE 876 nc_stat = NF90_CREATE( 'DATA_1D_PR_NETCDF', NF90_NOCLOBBER, & 877 id_set_pr ) 883 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_pr ) 878 884 ENDIF 879 885 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 31 ) … … 886 892 CASE ( 105 ) 887 893 ! 894 !-- Set filename 895 filename = 'DATA_1D_TS_NETCDF' // coupling_char 896 897 ! 888 898 !-- Inquire, if there is a NetCDF file from a previuos run. This should 889 899 !-- be opened for extension, if its variables match the actual run. 890 INQUIRE( FILE= 'DATA_1D_TS_NETCDF', EXIST=netcdf_extend )900 INQUIRE( FILE=filename, EXIST=netcdf_extend ) 891 901 892 902 IF ( netcdf_extend ) THEN 893 903 ! 894 904 !-- Open an existing NetCDF file for output 895 nc_stat = NF90_OPEN( 'DATA_1D_TS_NETCDF', NF90_WRITE, id_set_ts )905 nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_ts ) 896 906 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 32 ) 897 907 ! … … 906 916 nc_stat = NF90_CLOSE( id_set_ts ) 907 917 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 33 ) 908 CALL local_system( 'rm DATA_1D_TS_NETCDF')918 CALL local_system( 'rm ' // TRIM( filename ) ) 909 919 ENDIF 910 920 … … 916 926 IF ( netcdf_64bit ) THEN 917 927 #if defined( __netcdf_64bit ) 918 nc_stat = NF90_CREATE( 'DATA_1D_TS_NETCDF',&928 nc_stat = NF90_CREATE( filename, & 919 929 OR( NF90_NOCLOBBER, NF90_64BIT_OFFSET ),& 920 930 id_set_ts ) … … 922 932 IF ( myid == 0 ) PRINT*, '+++ WARNING: NetCDF: no 64-bit ', & 923 933 'offset allowed on this machine' 924 nc_stat = NF90_CREATE( 'DATA_1D_TS_NETCDF', NF90_NOCLOBBER, & 925 id_set_ts ) 934 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_ts ) 926 935 #endif 927 936 ELSE 928 nc_stat = NF90_CREATE( 'DATA_1D_TS_NETCDF', NF90_NOCLOBBER, & 929 id_set_ts ) 937 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_ts ) 930 938 ENDIF 931 939 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 34 ) … … 941 949 !-- Set filename depending on unit number 942 950 IF ( file_id == 106 ) THEN 943 filename = 'DATA_3D_NETCDF' 951 filename = 'DATA_3D_NETCDF' // coupling_char 944 952 av = 0 945 953 ELSE 946 filename = 'DATA_3D_AV_NETCDF' 954 filename = 'DATA_3D_AV_NETCDF' // coupling_char 947 955 av = 1 948 956 ENDIF … … 1000 1008 CASE ( 107 ) 1001 1009 ! 1010 !-- Set filename 1011 filename = 'DATA_1D_SP_NETCDF' // coupling_char 1012 1013 ! 1002 1014 !-- Inquire, if there is a NetCDF file from a previuos run. This should 1003 1015 !-- be opened for extension, if its variables match the actual run. 1004 INQUIRE( FILE= 'DATA_1D_SP_NETCDF', EXIST=netcdf_extend )1016 INQUIRE( FILE=filename, EXIST=netcdf_extend ) 1005 1017 1006 1018 IF ( netcdf_extend ) THEN 1007 1019 ! 1008 1020 !-- Open an existing NetCDF file for output 1009 nc_stat = NF90_OPEN( 'DATA_1D_SP_NETCDF', NF90_WRITE, id_set_sp )1021 nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_sp ) 1010 1022 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 38 ) 1011 1023 ! … … 1020 1032 nc_stat = NF90_CLOSE( id_set_sp ) 1021 1033 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 39 ) 1022 CALL local_system( 'rm DATA_1D_SP_NETCDF')1034 CALL local_system( 'rm ' // TRIM( filename ) ) 1023 1035 ENDIF 1024 1036 … … 1030 1042 IF ( netcdf_64bit ) THEN 1031 1043 #if defined( __netcdf_64bit ) 1032 nc_stat = NF90_CREATE( 'DATA_1D_SP_NETCDF',&1044 nc_stat = NF90_CREATE( filename, & 1033 1045 OR( NF90_NOCLOBBER, NF90_64BIT_OFFSET ),& 1034 1046 id_set_sp ) … … 1036 1048 IF ( myid == 0 ) PRINT*, '+++ WARNING: NetCDF: no 64-bit ', & 1037 1049 'offset allowed on this machine' 1038 nc_stat = NF90_CREATE( 'DATA_1D_SP_NETCDF', NF90_NOCLOBBER, & 1039 id_set_sp ) 1050 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_sp ) 1040 1051 #endif 1041 1052 ELSE 1042 nc_stat = NF90_CREATE( 'DATA_1D_SP_NETCDF', NF90_NOCLOBBER, & 1043 id_set_sp ) 1053 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_sp ) 1044 1054 ENDIF 1045 1055 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 40 ) … … 1054 1064 1055 1065 IF ( myid_char == '' ) THEN 1056 filename = 'DATA_PRT_NETCDF' 1057 ELSE 1058 filename = 'DATA_PRT_NETCDF /' // myid_char1066 filename = 'DATA_PRT_NETCDF' // coupling_char 1067 ELSE 1068 filename = 'DATA_PRT_NETCDF' // coupling_char // '/' // myid_char 1059 1069 ENDIF 1060 1070 ! … … 1091 1101 IF ( myid == 0 .AND. .NOT. openfile(file_id)%opened_before ) & 1092 1102 THEN ! needs modification in case of non-extendable sets 1093 CALL local_system( 'mkdir DATA_PRT_NETCDF/' ) 1103 CALL local_system( 'mkdir DATA_PRT_NETCDF' // & 1104 coupling_char // '/' ) 1094 1105 ENDIF 1095 1106 #if defined( __parallel ) … … 1126 1137 CASE ( 109 ) 1127 1138 ! 1139 !-- Set filename 1140 filename = 'DATA_1D_PTS_NETCDF' // coupling_char 1141 1142 ! 1128 1143 !-- Inquire, if there is a NetCDF file from a previuos run. This should 1129 1144 !-- be opened for extension, if its variables match the actual run. 1130 INQUIRE( FILE= 'DATA_1D_PTS_NETCDF', EXIST=netcdf_extend )1145 INQUIRE( FILE=filename, EXIST=netcdf_extend ) 1131 1146 1132 1147 IF ( netcdf_extend ) THEN 1133 1148 ! 1134 1149 !-- Open an existing NetCDF file for output 1135 nc_stat = NF90_OPEN( 'DATA_1D_PTS_NETCDF', NF90_WRITE, id_set_pts )1150 nc_stat = NF90_OPEN( filename, NF90_WRITE, id_set_pts ) 1136 1151 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 393 ) 1137 1152 ! … … 1146 1161 nc_stat = NF90_CLOSE( id_set_pts ) 1147 1162 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 394 ) 1148 CALL local_system( 'rm DATA_1D_PTS_NETCDF')1163 CALL local_system( 'rm ' // TRIM( filename ) ) 1149 1164 ENDIF 1150 1165 … … 1156 1171 IF ( netcdf_64bit ) THEN 1157 1172 #if defined( __netcdf_64bit ) 1158 nc_stat = NF90_CREATE( 'DATA_1D_PTS_NETCDF',&1173 nc_stat = NF90_CREATE( filename, & 1159 1174 OR( NF90_NOCLOBBER, NF90_64BIT_OFFSET ),& 1160 1175 id_set_pts ) … … 1162 1177 IF ( myid == 0 ) PRINT*, '+++ WARNING: NetCDF: no 64-bit ', & 1163 1178 'offset allowed on this machine' 1164 nc_stat = NF90_CREATE( 'DATA_1D_PTS_NETCDF', NF90_NOCLOBBER, & 1165 id_set_pts ) 1179 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_pts ) 1166 1180 #endif 1167 1181 ELSE 1168 nc_stat = NF90_CREATE( 'DATA_1D_PTS_NETCDF', NF90_NOCLOBBER, & 1169 id_set_pts ) 1182 nc_stat = NF90_CREATE( filename, NF90_NOCLOBBER, id_set_pts ) 1170 1183 ENDIF 1171 1184 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 395 ) -
palm/trunk/SOURCE/check_parameters.f90
r98 r102 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Check coupling_mode and set default (obligatory) values (like boundary 7 ! conditions for temperature and fluxes) in case of coupled runs 7 8 ! 8 9 ! Former revisions: … … 69 70 CHARACTER (LEN=8) :: date 70 71 CHARACTER (LEN=10) :: time 72 CHARACTER (LEN=40) :: coupling_string 71 73 CHARACTER (LEN=100) :: action 72 74 … … 85 87 PRINT*, ' is set before running PALM' 86 88 ENDIF 89 ENDIF 90 91 ! 92 !-- Check the coupling mode 93 IF ( coupling_mode /= 'uncoupled' .AND. & 94 coupling_mode /= 'atmosphere_to_ocean' .AND. & 95 coupling_mode /= 'ocean_to_atmosphere' ) THEN 96 IF ( myid == 0 ) THEN 97 PRINT*, '+++ check_parameters:' 98 PRINT*, ' illegal coupling mode: ', TRIM( coupling_mode ) 99 ENDIF 100 CALL local_stop 87 101 ENDIF 88 102 … … 93 107 run_date = date(7:8)//'-'//date(5:6)//'-'//date(3:4) 94 108 run_time = time(1:2)//':'//time(3:4)//':'//time(5:6) 95 96 WRITE ( run_description_header, '(A,2X,A,2X,A,A,A,I2.2,2X,A,A,2X,A,1X,A)' )& 97 TRIM( version ), TRIM( revision ), & 98 'run: ', TRIM( run_identifier ), '.', & 99 runnr, 'host: ', TRIM( host ), run_date, run_time 109 IF ( coupling_mode == 'uncoupled' ) THEN 110 coupling_string = '' 111 ELSEIF ( coupling_mode == 'atmosphere_to_ocean' ) THEN 112 coupling_string = ' coupled (atmosphere)' 113 ELSEIF ( coupling_mode == 'ocean_to_atmosphere' ) THEN 114 coupling_string = ' coupled (ocean)' 115 ENDIF 116 117 WRITE ( run_description_header, & 118 '(A,2X,A,2X,A,A,A,I2.2,A,2X,A,A,2X,A,1X,A)' ) & 119 TRIM( version ), TRIM( revision ), 'run: ', & 120 TRIM( run_identifier ), '.', runnr, TRIM( coupling_string ), & 121 'host: ', TRIM( host ), run_date, run_time 100 122 101 123 ! … … 1029 1051 ! 1030 1052 !-- Boundary conditions for potential temperature 1031 IF ( bc_pt_b == 'dirichlet' ) THEN 1032 ibc_pt_b = 0 1033 ELSEIF ( bc_pt_b == 'neumann' ) THEN 1034 ibc_pt_b = 1 1053 IF ( coupling_mode == 'atmosphere_to_ocean' ) THEN 1054 ibc_pt_b = 2 1035 1055 ELSE 1036 IF ( myid == 0 ) THEN 1037 PRINT*, '+++ check_parameters:' 1038 PRINT*, ' unknown boundary condition: bc_pt_b = ', bc_pt_b 1039 ENDIF 1040 CALL local_stop 1041 ENDIF 1056 IF ( bc_pt_b == 'dirichlet' ) THEN 1057 ibc_pt_b = 0 1058 ELSEIF ( bc_pt_b == 'neumann' ) THEN 1059 ibc_pt_b = 1 1060 ELSE 1061 IF ( myid == 0 ) THEN 1062 PRINT*, '+++ check_parameters:' 1063 PRINT*, ' unknown boundary condition: bc_pt_b = ', bc_pt_b 1064 ENDIF 1065 CALL local_stop 1066 ENDIF 1067 ENDIF 1068 1042 1069 IF ( bc_pt_t == 'dirichlet' ) THEN 1043 1070 ibc_pt_t = 0 -
palm/trunk/SOURCE/diffusion_u.f90
r77 r102 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Momentumflux at top (uswst) included as boundary condition 7 7 ! 8 8 ! Former revisions: … … 54 54 ! Call for all grid points 55 55 !------------------------------------------------------------------------------! 56 SUBROUTINE diffusion_u( ddzu, ddzw, km, km_damp_y, tend, u, usws, v, w ) 56 SUBROUTINE diffusion_u( ddzu, ddzw, km, km_damp_y, tend, u, usws, uswst, & 57 v, w ) 57 58 58 59 USE control_parameters … … 66 67 REAL :: ddzu(1:nzt+1), ddzw(1:nzt+1), km_damp_y(nys-1:nyn+1) 67 68 REAL :: tend(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) 68 REAL, DIMENSION(:,:), POINTER :: usws 69 REAL, DIMENSION(:,:), POINTER :: usws, uswst 69 70 REAL, DIMENSION(:,:,:), POINTER :: km, u, v, w 70 71 REAL, DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr) :: usvs … … 155 156 !-- Compute vertical diffusion. In case of simulating a Prandtl layer, 156 157 !-- index k starts at nzb_u_inner+2. 157 DO k = nzb_diff_u(j,i), nzt 158 DO k = nzb_diff_u(j,i), nzt_diff 158 159 ! 159 160 !-- Interpolate eddy diffusivities on staggered gridpoints … … 195 196 & + ( kmzp * ( w(k,j,i) - w(k,j,i-1) ) * ddx & 196 197 & ) * ddzw(k) & 197 & + ( kmzp * ( u(k+1,j,i) - u(k,j,i) ) * ddzu(k+1)&198 & + ( kmzp * ( u(k+1,j,i) - u(k,j,i) ) * ddzu(k+1) & 198 199 & + usws(j,i) & 200 & ) * ddzw(k) 201 ENDIF 202 203 ! 204 !-- Vertical diffusion at the first gridpoint below the top boundary, 205 !-- if the momentum flux at the top is prescribed by the user 206 IF ( use_top_fluxes ) THEN 207 k = nzt 208 ! 209 !-- Interpolate eddy diffusivities on staggered gridpoints 210 kmzp = 0.25 * & 211 ( km(k,j,i)+km(k+1,j,i)+km(k,j,i-1)+km(k+1,j,i-1) ) 212 kmzm = 0.25 * & 213 ( km(k,j,i)+km(k-1,j,i)+km(k,j,i-1)+km(k-1,j,i-1) ) 214 215 tend(k,j,i) = tend(k,j,i) & 216 & - ( kmzm * ( w(k-1,j,i) - w(k-1,j,i-1) ) * ddx & 217 & ) * ddzw(k) & 218 & + ( -uswst(j,i) & 219 & - kmzm * ( u(k,j,i) - u(k-1,j,i) ) * ddzu(k) & 199 220 & ) * ddzw(k) 200 221 ENDIF … … 210 231 !------------------------------------------------------------------------------! 211 232 SUBROUTINE diffusion_u_ij( i, j, ddzu, ddzw, km, km_damp_y, tend, u, usws, & 212 v, w )233 uswst, v, w ) 213 234 214 235 USE control_parameters … … 223 244 REAL :: tend(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) 224 245 REAL, DIMENSION(nzb:nzt+1) :: usvs 225 REAL, DIMENSION(:,:), POINTER :: usws 246 REAL, DIMENSION(:,:), POINTER :: usws, uswst 226 247 REAL, DIMENSION(:,:,:), POINTER :: km, u, v, w 227 248 … … 303 324 !-- Compute vertical diffusion. In case of simulating a Prandtl layer, 304 325 !-- index k starts at nzb_u_inner+2. 305 DO k = nzb_diff_u(j,i), nzt 326 DO k = nzb_diff_u(j,i), nzt_diff 306 327 ! 307 328 !-- Interpolate eddy diffusivities on staggered gridpoints … … 339 360 & + ( kmzp * ( w(k,j,i) - w(k,j,i-1) ) * ddx & 340 361 & ) * ddzw(k) & 341 & + ( kmzp * ( u(k+1,j,i) - u(k,j,i) ) * ddzu(k+1)&362 & + ( kmzp * ( u(k+1,j,i) - u(k,j,i) ) * ddzu(k+1) & 342 363 & + usws(j,i) & 343 364 & ) * ddzw(k) 344 365 ENDIF 345 366 367 ! 368 !-- Vertical diffusion at the first gridpoint below the top boundary, 369 !-- if the momentum flux at the top is prescribed by the user 370 IF ( use_top_fluxes ) THEN 371 k = nzt 372 ! 373 !-- Interpolate eddy diffusivities on staggered gridpoints 374 kmzp = 0.25 * & 375 ( km(k,j,i)+km(k+1,j,i)+km(k,j,i-1)+km(k+1,j,i-1) ) 376 kmzm = 0.25 * & 377 ( km(k,j,i)+km(k-1,j,i)+km(k,j,i-1)+km(k-1,j,i-1) ) 378 379 tend(k,j,i) = tend(k,j,i) & 380 & - ( kmzm * ( w(k-1,j,i) - w(k-1,j,i-1) ) * ddx & 381 & ) * ddzw(k) & 382 & + ( -uswst(j,i) & 383 & - kmzm * ( u(k,j,i) - u(k-1,j,i) ) * ddzu(k) & 384 & ) * ddzw(k) 385 ENDIF 386 346 387 END SUBROUTINE diffusion_u_ij 347 388 -
palm/trunk/SOURCE/diffusion_v.f90
r77 r102 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Momentumflux at top (vswst) included as boundary condition 7 7 ! 8 8 ! Former revisions: … … 52 52 ! Call for all grid points 53 53 !------------------------------------------------------------------------------! 54 SUBROUTINE diffusion_v( ddzu, ddzw, km, km_damp_x, tend, u, v, vsws, w ) 54 SUBROUTINE diffusion_v( ddzu, ddzw, km, km_damp_x, tend, u, v, vsws, & 55 vswst, w ) 55 56 56 57 USE control_parameters … … 64 65 REAL :: ddzu(1:nzt+1), ddzw(1:nzt+1), km_damp_x(nxl-1:nxr+1) 65 66 REAL :: tend(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) 66 REAL, DIMENSION(:,:), POINTER :: vsws 67 REAL, DIMENSION(:,:), POINTER :: vsws, vswst 67 68 REAL, DIMENSION(:,:,:), POINTER :: km, u, v, w 68 69 REAL, DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr) :: vsus … … 153 154 !-- Compute vertical diffusion. In case of simulating a Prandtl 154 155 !-- layer, index k starts at nzb_v_inner+2. 155 DO k = nzb_diff_v(j,i), nzt 156 DO k = nzb_diff_v(j,i), nzt_diff 156 157 ! 157 158 !-- Interpolate eddy diffusivities on staggered gridpoints … … 193 194 & + ( kmzp * ( w(k,j,i) - w(k,j-1,i) ) * ddy & 194 195 & ) * ddzw(k) & 195 & + ( kmzp * ( v(k+1,j,i) - v(k,j,i) ) * ddzu(k+1)&196 & + ( kmzp * ( v(k+1,j,i) - v(k,j,i) ) * ddzu(k+1) & 196 197 & + vsws(j,i) & 198 & ) * ddzw(k) 199 ENDIF 200 201 ! 202 !-- Vertical diffusion at the first gridpoint below the top boundary, 203 !-- if the momentum flux at the top is prescribed by the user 204 IF ( use_top_fluxes ) THEN 205 k = nzt 206 ! 207 !-- Interpolate eddy diffusivities on staggered gridpoints 208 kmzp = 0.25 * & 209 ( km(k,j,i)+km(k+1,j,i)+km(k,j-1,i)+km(k+1,j-1,i) ) 210 kmzm = 0.25 * & 211 ( km(k,j,i)+km(k-1,j,i)+km(k,j-1,i)+km(k-1,j-1,i) ) 212 213 tend(k,j,i) = tend(k,j,i) & 214 & - ( kmzm * ( w(k-1,j,i) - w(k-1,j-1,i) ) * ddy & 215 & ) * ddzw(k) & 216 & + ( -vswst(j,i) & 217 & - kmzm * ( v(k,j,i) - v(k-1,j,i) ) * ddzu(k) & 197 218 & ) * ddzw(k) 198 219 ENDIF … … 208 229 !------------------------------------------------------------------------------! 209 230 SUBROUTINE diffusion_v_ij( i, j, ddzu, ddzw, km, km_damp_x, tend, u, v, & 210 vsws, w )231 vsws, vswst, w ) 211 232 212 233 USE control_parameters … … 221 242 REAL :: tend(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) 222 243 REAL, DIMENSION(nzb:nzt+1) :: vsus 223 REAL, DIMENSION(:,:), POINTER :: vsws 244 REAL, DIMENSION(:,:), POINTER :: vsws, vswst 224 245 REAL, DIMENSION(:,:,:), POINTER :: km, u, v, w 225 246 … … 302 323 !-- Compute vertical diffusion. In case of simulating a Prandtl layer, 303 324 !-- index k starts at nzb_v_inner+2. 304 DO k = nzb_diff_v(j,i), nzt 325 DO k = nzb_diff_v(j,i), nzt_diff 305 326 ! 306 327 !-- Interpolate eddy diffusivities on staggered gridpoints … … 338 359 & + ( kmzp * ( w(k,j,i) - w(k,j-1,i) ) * ddy & 339 360 & ) * ddzw(k) & 340 & + ( kmzp * ( v(k+1,j,i) - v(k,j,i) ) * ddzu(k+1)&361 & + ( kmzp * ( v(k+1,j,i) - v(k,j,i) ) * ddzu(k+1) & 341 362 & + vsws(j,i) & 342 363 & ) * ddzw(k) 343 364 ENDIF 344 365 366 ! 367 !-- Vertical diffusion at the first gridpoint below the top boundary, 368 !-- if the momentum flux at the top is prescribed by the user 369 IF ( use_top_fluxes ) THEN 370 k = nzt 371 ! 372 !-- Interpolate eddy diffusivities on staggered gridpoints 373 kmzp = 0.25 * & 374 ( km(k,j,i)+km(k+1,j,i)+km(k,j-1,i)+km(k+1,j-1,i) ) 375 kmzm = 0.25 * & 376 ( km(k,j,i)+km(k-1,j,i)+km(k,j-1,i)+km(k-1,j-1,i) ) 377 378 tend(k,j,i) = tend(k,j,i) & 379 & - ( kmzm * ( w(k-1,j,i) - w(k-1,j-1,i) ) * ddy & 380 & ) * ddzw(k) & 381 & + ( -vswst(j,i) & 382 & - kmzm * ( v(k,j,i) - v(k-1,j,i) ) * ddzu(k) & 383 & ) * ddzw(k) 384 ENDIF 385 345 386 END SUBROUTINE diffusion_v_ij 346 387 -
palm/trunk/SOURCE/flow_statistics.f90
r98 r102 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Prescribed momentum fluxes at the top surface are used 7 7 ! 8 8 ! Former revisions: … … 381 381 !-- ---- strictly speaking the following k-loop would have to be 382 382 !-- split up according to the staggered grid. 383 DO k = nzb_diff_s_outer(j,i)-1, nzt 383 DO k = nzb_diff_s_outer(j,i)-1, nzt_diff 384 384 ! 385 385 !-- Momentum flux w"u" … … 398 398 + ( w(k,j,i) - w(k,j-1,i) ) * ddy & 399 399 ) * rmask(j,i,sr) 400 ENDDO401 402 DO k = nzb_diff_s_outer(j,i)-1, nzt_diff403 400 ! 404 401 !-- Heat flux w"pt" … … 490 487 !-- Subgridscale fluxes at the top surface 491 488 IF ( use_top_fluxes ) THEN 489 sums_l(nzt,12,tn) = sums_l(nzt,12,tn) + & 490 uswst(j,i) * rmask(j,i,sr) ! w"u" 491 sums_l(nzt,14,tn) = sums_l(nzt,14,tn) + & 492 vswst(j,i) * rmask(j,i,sr) ! w"v" 492 493 sums_l(nzt,16,tn) = sums_l(nzt,16,tn) + & 493 494 tswst(j,i) * rmask(j,i,sr) ! w"pt" -
palm/trunk/SOURCE/header.f90
r98 r102 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Output of informations for coupled model runs (boundary conditions etc.) 7 7 ! 8 8 ! Former revisions: … … 117 117 host_chr = host(1:10) 118 118 ver_rev = TRIM( version ) // ' ' // TRIM( revision ) 119 WRITE ( io, 100 ) ver_rev, TRIM( run_classification ), run_date, & 120 run_identifier, run_time, runnr, ADJUSTR( host_chr ) 119 WRITE ( io, 100 ) ver_rev, TRIM( run_classification ) 120 IF ( coupling_mode /= 'uncoupled' ) WRITE ( io, 101 ) coupling_mode 121 WRITE ( io, 102 ) run_date, run_identifier, run_time, runnr, & 122 ADJUSTR( host_chr ) 121 123 #if defined( __parallel ) 122 124 IF ( npex == -1 .AND. pdims(2) /= 1 ) THEN … … 130 132 ENDIF 131 133 IF ( threads_per_task == 1 ) THEN 132 WRITE ( io, 10 1) numprocs, pdims(1), pdims(2), TRIM( char1 )134 WRITE ( io, 103 ) numprocs, pdims(1), pdims(2), TRIM( char1 ) 133 135 ELSE 134 WRITE ( io, 10 2) numprocs*threads_per_task, numprocs, &136 WRITE ( io, 104 ) numprocs*threads_per_task, numprocs, & 135 137 threads_per_task, pdims(1), pdims(2), TRIM( char1 ) 136 138 ENDIF … … 139 141 npex == -1 .AND. pdims(2) == 1 ) & 140 142 THEN 141 WRITE ( io, 10 4)143 WRITE ( io, 106 ) 142 144 ELSEIF ( pdims(2) == 1 ) THEN 143 WRITE ( io, 10 5) 'x'145 WRITE ( io, 107 ) 'x' 144 146 ELSEIF ( pdims(1) == 1 ) THEN 145 WRITE ( io, 10 5) 'y'146 ENDIF 147 IF ( use_seperate_pe_for_dvrp_output ) WRITE ( io, 10 3)147 WRITE ( io, 107 ) 'y' 148 ENDIF 149 IF ( use_seperate_pe_for_dvrp_output ) WRITE ( io, 105 ) 148 150 #endif 149 151 WRITE ( io, 99 ) … … 378 380 IF ( ibc_pt_b == 0 ) THEN 379 381 runten = TRIM( runten ) // ' pt(0) = pt_surface' 380 ELSE 382 ELSEIF ( ibc_pt_b == 1 ) THEN 381 383 runten = TRIM( runten ) // ' pt(0) = pt(1)' 384 ELSEIF ( ibc_pt_b == 2 ) THEN 385 runten = TRIM( runten ) // ' pt(0) = from coupled model' 382 386 ENDIF 383 387 IF ( ibc_pt_t == 0 ) THEN … … 457 461 IF ( use_top_fluxes ) THEN 458 462 WRITE ( io, 304 ) 459 IF ( constant_top_heatflux ) THEN 460 WRITE ( io, 306 ) top_heatflux 463 IF ( coupling_mode == 'uncoupled' ) THEN 464 IF ( constant_top_heatflux ) THEN 465 WRITE ( io, 306 ) top_heatflux 466 ENDIF 467 ELSEIF ( coupling_mode == 'ocean_to_atmosphere' ) THEN 468 WRITE ( io, 316 ) 461 469 ENDIF 462 470 IF ( ocean .AND. constant_top_salinityflux ) THEN … … 1193 1201 100 FORMAT (/1X,'*************************',11X,42('-')/ & 1194 1202 1X,'* ',A,' *',11X,A/ & 1195 1X,'*************************',11X,42('-')// & 1196 ' Date: ',A8,11X,'Run: ',A20/ & 1203 1X,'*************************',11X,42('-')) 1204 101 FORMAT (37X,'coupled run: ',A/ & 1205 37X,42('-')) 1206 102 FORMAT (/' Date: ',A8,11X,'Run: ',A20/ & 1197 1207 ' Time: ',A8,11X,'Run-No.: ',I2.2/ & 1198 1208 ' Run on host: ',A10) 1199 1209 #if defined( __parallel ) 1200 10 1FORMAT (' Number of PEs:',7X,I4,11X,'Processor grid (x,y): (',I3,',',I3, &1210 103 FORMAT (' Number of PEs:',7X,I4,11X,'Processor grid (x,y): (',I3,',',I3, & 1201 1211 ')',1X,A) 1202 10 2FORMAT (' Number of PEs:',7X,I4,11X,'Tasks:',I4,' threads per task:',I4/ &1212 104 FORMAT (' Number of PEs:',7X,I4,11X,'Tasks:',I4,' threads per task:',I4/ & 1203 1213 37X,'Processor grid (x,y): (',I3,',',I3,')',1X,A) 1204 10 3FORMAT (37X,'One additional PE is used to handle'/37X,'the dvrp output!')1205 10 4FORMAT (37X,'A 1d-decomposition along x is forced'/ &1214 105 FORMAT (37X,'One additional PE is used to handle'/37X,'the dvrp output!') 1215 106 FORMAT (37X,'A 1d-decomposition along x is forced'/ & 1206 1216 37X,'because the job is running on an SMP-cluster') 1207 10 5FORMAT (37X,'A 1d-decomposition along ',A,' is used')1217 107 FORMAT (37X,'A 1d-decomposition along ',A,' is used') 1208 1218 #endif 1209 1219 110 FORMAT (/' Numerical Schemes:'/ & … … 1332 1342 314 FORMAT (' Predefined scalar value at the surface') 1333 1343 315 FORMAT (' Humidity / scalar flux at top surface is 0.0') 1344 316 FORMAT (' Sensible heatflux and momentum flux from coupled ', & 1345 'atmosphere model') 1334 1346 317 FORMAT (//' Lateral boundaries:'/ & 1335 1347 ' left/right: ',A/ & -
palm/trunk/SOURCE/init_3d_model.f90
r98 r102 7 7 ! Actual revisions: 8 8 ! ----------------- 9 ! 9 ! Flux initialization in case of coupled runs, +momentum fluxes at top boundary 10 10 ! 11 11 ! Former revisions: … … 102 102 ts(nys-1:nyn+1,nxl-1:nxr+1), tswst_1(nys-1:nyn+1,nxl-1:nxr+1), & 103 103 us(nys-1:nyn+1,nxl-1:nxr+1), usws_1(nys-1:nyn+1,nxl-1:nxr+1), & 104 vsws_1(nys-1:nyn+1,nxl-1:nxr+1), z0(nys-1:nyn+1,nxl-1:nxr+1) ) 104 uswst_1(nys-1:nyn+1,nxl-1:nxr+1), & 105 vsws_1(nys-1:nyn+1,nxl-1:nxr+1), & 106 vswst_1(nys-1:nyn+1,nxl-1:nxr+1), z0(nys-1:nyn+1,nxl-1:nxr+1) ) 105 107 106 108 IF ( timestep_scheme(1:5) /= 'runge' ) THEN … … 111 113 tswst_2(nys-1:nyn+1,nxl-1:nxr+1), & 112 114 usws_2(nys-1:nyn+1,nxl-1:nxr+1), & 115 uswst_2(nys-1:nyn+1,nxl-1:nxr+1), & 116 vswst_2(nys-1:nyn+1,nxl-1:nxr+1), & 113 117 vsws_2(nys-1:nyn+1,nxl-1:nxr+1) ) 114 118 ENDIF … … 260 264 tswst_m => tswst_1; tswst => tswst_2 261 265 usws_m => usws_1; usws => usws_2 266 uswst_m => uswst_1; uswst => uswst_2 262 267 vsws_m => vsws_1; vsws => vsws_2 268 vswst_m => vswst_1; vswst => vswst_2 263 269 e_m => e_1; e => e_2; e_p => e_3; te_m => e_3 264 270 kh_m => kh_1; kh => kh_2 … … 287 293 tswst => tswst_1 288 294 usws => usws_1 295 uswst => uswst_1 289 296 vsws => vsws_1 297 vswst => vswst_1 290 298 e => e_1; e_p => e_2; te_m => e_3; e_m => e_3 291 299 kh => kh_1 … … 381 389 vsws = 0.0 382 390 ENDIF 391 uswst = top_momentumflux_u 392 vswst = top_momentumflux_v 383 393 384 394 ! … … 494 504 ! e = (u*/cm)**2 at k=nzb+1 495 505 ENDIF 496 e = 0.0 497 rif = 0.0 498 ts = 0.0 499 us = 0.0 500 usws = 0.0 501 vsws = 0.0 506 e = 0.0 507 rif = 0.0 508 ts = 0.0 509 us = 0.0 510 usws = 0.0 511 uswst = top_momentumflux_u 512 vsws = 0.0 513 vswst = top_momentumflux_v 502 514 IF ( humidity .OR. passive_scalar ) qs = 0.0 503 515 … … 617 629 saswst = top_salinityflux 618 630 ENDIF 619 ENDIF 631 ENDIF 632 633 ! 634 !-- Initialization in case of a coupled model run 635 IF ( coupling_mode == 'ocean_to_atmosphere' ) THEN 636 tswst = 0.0 637 IF ( ASSOCIATED( tswst_m ) ) tswst_m = tswst 638 ENDIF 620 639 621 640 ENDIF -
palm/trunk/SOURCE/init_pegrid.f90
r83 r102 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Intercommunicator (comm_inter) and derived data type (type_xy) for 7 ! coupled model runs created 7 8 ! 8 9 ! Former revisions: … … 480 481 CALL MPI_SEND( ibuf, 12, MPI_INTEGER, 0, myid, comm2d, ierr ) 481 482 ENDIF 483 #endif 484 485 #if defined( __mpi2 ) 486 ! 487 !-- In case of coupled runs, get the port name on PE0 of the atmosphere model 488 !-- and pass it to PE0 of the ocean model 489 IF ( myid == 0 ) THEN 490 491 IF ( coupling_mode == 'atmosphere_to_ocean' ) THEN 492 493 CALL MPI_OPEN_PORT( MPI_INFO_NULL, port_name, ierr ) 494 CALL MPI_PUBLISH_NAME( 'palm_coupler', MPI_INFO_NULL, port_name, & 495 ierr ) 496 497 ELSEIF ( coupling_mode == 'ocean_to_atmosphere' ) THEN 498 499 CALL MPI_LOOKUP_NAME( 'palm_coupler', MPI_INFO_NULL, port_name, ierr ) 500 501 ENDIF 502 503 ENDIF 504 505 ! 506 !-- In case of coupled runs, establish the connection between the atmosphere 507 !-- and the ocean model and define the intercommunicator (comm_inter) 508 CALL MPI_BARRIER( comm2d, ierr ) 509 IF ( coupling_mode == 'atmosphere_to_ocean' ) THEN 510 511 print*, '... before COMM_ACCEPT' 512 CALL MPI_COMM_ACCEPT( port_name, MPI_INFO_NULL, 0, MPI_COMM_WORLD, & 513 comm_inter, ierr ) 514 print*, '--- ierr = ', ierr 515 print*, '--- comm_inter atmosphere = ', comm_inter 516 517 ELSEIF ( coupling_mode == 'ocean_to_atmosphere' ) THEN 518 519 IF ( myid == 0 ) PRINT*, '*** read: ', port_name, ' ierr = ', ierr 520 print*, '... before COMM_CONNECT' 521 CALL MPI_COMM_CONNECT( port_name, MPI_INFO_NULL, 0, MPI_COMM_WORLD, & 522 comm_inter, ierr ) 523 print*, '--- ierr = ', ierr 524 print*, '--- comm_inter ocean = ', comm_inter 525 526 ENDIF 527 528 ! 529 !-- In case of coupled runs, create a new MPI derived datatype for the 530 !-- exchange of surface (xy) data . 531 !-- Gridpoint number for the exchange of ghost points (xy-plane) 532 ngp_xy = ( nxr - nxl + 3 ) * ( nyn - nys + 3 ) 533 534 ! 535 !-- Define a new MPI derived datatype for the exchange of ghost points in 536 !-- y-direction for 2D-arrays (line) 537 CALL MPI_TYPE_VECTOR( ngp_xy, 1, nzt-nzb+2, MPI_REAL, type_xy, ierr ) 538 CALL MPI_TYPE_COMMIT( type_xy, ierr ) 482 539 #endif 483 540 -
palm/trunk/SOURCE/modules.f90
r98 r102 5 5 ! Actual revisions: 6 6 ! ----------------- 7 ! 7 ! +comm_inter, coupling_char, coupling_mode, dt_coupling, ngp_xy, port_name, 8 ! time_coupling, type_xy, uswst*, vswst* 8 9 ! 9 10 ! Former revisions: … … 107 108 REAL, DIMENSION(:,:), ALLOCATABLE, TARGET :: & 108 109 qsws_1, qsws_2, qswst_1, qswst_2, rif_1, rif_2, saswsb_1, saswst_1, & 109 shf_1, shf_2, tswst_1, tswst_2, usws_1, usws_2, vsws_1, vsws_2 110 shf_1, shf_2, tswst_1, tswst_2, usws_1, usws_2, uswst_1, uswst_2, & 111 vsws_1, vsws_2, vswst_1, vswst_2 110 112 111 113 REAL, DIMENSION(:,:), POINTER :: & 112 114 qsws, qsws_m, qswst, qswst_m, rif, rif_m, saswsb, saswst, shf, & 113 shf_m, tswst, tswst_m, usws, usws_m, vsws, vsws_m 115 shf_m, tswst, tswst_m, usws, uswst, usws_m, uswst_m, vsws, vswst, & 116 vsws_m, vswst_m 114 117 115 118 REAL, DIMENSION(:,:,:), ALLOCATABLE :: & … … 229 232 230 233 CHARACTER (LEN=1) :: cycle_mg = 'w', timestep_reason = ' ' 234 CHARACTER (LEN=2) :: coupling_char = '' 231 235 CHARACTER (LEN=5) :: write_binary = 'false' 232 236 CHARACTER (LEN=6) :: grid_matching = 'match' … … 246 250 bc_sa_t = 'neumann', & 247 251 bc_uv_b = 'dirichlet', bc_uv_t = 'dirichlet', & 252 coupling_mode = 'uncoupled', & 248 253 dissipation_1d = 'as_in_3d_model', & 249 254 fft_method = 'system-specific', & … … 348 353 disturbance_level_t = -9999999.9, & 349 354 dt = -1.0, dt_averaging_input = 0.0, & 350 dt_averaging_input_pr = 9999999.9, dt_data_output = 9999999.9, & 355 dt_averaging_input_pr = 9999999.9, dt_coupling = 9999999.9, & 356 dt_data_output = 9999999.9, & 351 357 dt_data_output_av = 9999999.9, dt_disturb = 9999999.9, & 352 358 dt_dopr = 9999999.9, dt_dopr_listing = 9999999.9, & … … 382 388 surface_scalarflux = 0.0, surface_waterflux = 0.0, & 383 389 s_surface = 0.0, s_surface_initial_change = 0.0, & 384 termination_time_needed = -1.0, time_disturb = 0.0, & 390 termination_time_needed = -1.0, time_coupling = 0.0, & 391 time_disturb = 0.0, & 385 392 time_dopr = 0.0, time_dopr_av = 0.0, time_dopr_listing = 0.0, & 386 393 time_dopts = 0.0, time_dosp = 0.0, time_dosp_av = 0.0, & … … 389 396 time_do_sla = 0.0, time_dvrp = 0.0, time_prel = 0.0, & 390 397 time_restart = 9999999.9, time_run_control = 0.0, & 391 top_heatflux = 9999999.9, top_salinityflux = 9999999.9, & 398 top_heatflux = 9999999.9, top_momentumflux_u = 0.0, & 399 top_momentumflux_v = 0.0, top_salinityflux = 9999999.9, & 392 400 ug_surface = 0.0, u_gtrans = 0.0, & 393 401 ups_limit_e = 0.0, ups_limit_pt = 0.0, ups_limit_u = 0.0, & … … 916 924 917 925 #if defined( __parallel ) 918 INTEGER :: comm1dx, comm1dy, comm2d, comm_palm, ierr, myidx, myidy, & 919 ndim = 2, ngp_y, pleft, pnorth, pright, psouth, & 926 #if defined( __mpi2 ) 927 CHARACTER (LEN=MPI_MAX_PORT_NAME) :: port_name 928 #endif 929 930 INTEGER :: comm1dx, comm1dy, comm2d, comm_inter, comm_palm, ierr, myidx, & 931 myidy, ndim = 2, ngp_xy, ngp_y, pleft, pnorth, pright, psouth, & 920 932 sendrecvcount_xy, sendrecvcount_yz, sendrecvcount_zx, & 921 933 sendrecvcount_zyd, sendrecvcount_yxd, & 922 type_x, type_x_int, ibuf(12), pcoord(2), pdims(2), & 923 status(MPI_STATUS_SIZE) 934 type_x, type_x_int, type_xy 935 936 INTEGER :: ibuf(12), pcoord(2), pdims(2), status(MPI_STATUS_SIZE) 924 937 925 938 INTEGER, DIMENSION(:), ALLOCATABLE :: ngp_yz, type_xz -
palm/trunk/SOURCE/palm.f90
r97 r102 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Get coupling mode from environment variable 7 7 ! 8 8 ! Former revisions: … … 43 43 USE arrays_3d 44 44 USE constants 45 USE control_parameters 45 46 USE cpulog 46 47 USE dvrp_variables … … 53 54 USE spectrum 54 55 USE statistics 55 USE control_parameters56 56 57 57 IMPLICIT NONE … … 63 63 INTEGER :: i, run_description_header_i(80) 64 64 65 version = 'PALM 3.3 '65 version = 'PALM 3.3a' 66 66 67 67 #if defined( __parallel ) … … 75 75 #endif 76 76 77 #if defined( __mpi2 ) 78 ! 79 !-- Get information about the coupling mode from the environment variable 80 !-- which has been set by the mpiexec command 81 CALL local_getenv( 'coupling_mode', 13, coupling_mode, i ) 82 IF ( i == 0 ) coupling_mode = 'uncoupled' 83 IF ( coupling_mode == 'ocean_to_atmosphere' ) coupling_char = '_O' 84 #endif 85 77 86 ! 78 87 !-- Initialize measuring of the CPU-time remaining to the run … … 104 113 ! 105 114 !-- Open a file for debug output 106 OPEN( 9, FILE='DEBUG'//myid_char, FORM='FORMATTED' ) 115 OPEN( 9, FILE='DEBUG'//TRIM( coupling_char )//myid_char, FORM='FORMATTED' ) 116 117 #if defined( __mpi2 ) 118 ! 119 !-- TEST OUTPUT (TO BE REMOVED) 120 WRITE(9,*) '*** coupling_mode = "', TRIM( coupling_mode ), '"' 121 CALL LOCAL_FLUSH( 9 ) 122 print*, '*** PE', myid, ' ', TRIM( coupling_mode ) 123 #endif 107 124 108 125 ! … … 167 184 CALL cpu_log( log_point(4), 'last actions', 'stop' ) 168 185 186 #if defined( __mpi2 ) 187 ! 188 !-- Test exchange via intercommunicator 189 IF ( coupling_mode == 'atmosphere_to_ocean' ) THEN 190 i = 12345 + myid 191 CALL MPI_SEND( i, 1, MPI_INTEGER, myid, 11, comm_inter, ierr ) 192 ELSEIF ( coupling_mode == 'ocean_to_atmosphere' ) THEN 193 CALL MPI_RECV( i, 1, MPI_INTEGER, myid, 11, comm_inter, status, ierr ) 194 PRINT*, '### myid: ', myid, ' received from atmosphere: i = ', i 195 ENDIF 196 #endif 197 169 198 ! 170 199 !-- Take final CPU-time for CPU-time analysis -
palm/trunk/SOURCE/parin.f90
r98 r102 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! +top_momentumflux_u|v in inipar, +dt_coupling in d3par 7 7 ! 8 8 ! Former revisions: … … 91 91 surface_waterflux, s_surface, s_surface_initial_change, & 92 92 s_vertical_gradient, s_vertical_gradient_level, top_heatflux, & 93 top_salinityflux, timestep_scheme, topography, ug_surface, & 93 top_momentumflux_u, top_momentumflux_v, top_salinityflux, & 94 timestep_scheme, topography, ug_surface, & 94 95 ug_vertical_gradient, ug_vertical_gradient_level, ups_limit_e, & 95 96 ups_limit_pt, ups_limit_u, ups_limit_v, ups_limit_w, & … … 109 110 disturbance_level_t, do2d_at_begin, do3d_at_begin, & 110 111 do3d_compress, do3d_comp_prec, dt, dt_averaging_input, & 111 dt_averaging_input_pr, dt_ data_output, &112 dt_averaging_input_pr, dt_coupling, dt_data_output, & 112 113 dt_data_output_av, dt_disturb, dt_dopr, & 113 114 dt_dopr_listing, dt_dots, dt_do2d_xy, dt_do2d_xz, & -
palm/trunk/SOURCE/prognostic_equations.f90
r98 r102 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! +uswst, vswst as arguments in calls of diffusion_u|v 7 7 ! 8 8 ! Former revisions: … … 148 148 IF ( tsc(2) == 2.0 .AND. timestep_scheme(1:8) == 'leapfrog' ) THEN 149 149 CALL diffusion_u( i, j, ddzu, ddzw, km_m, km_damp_y, tend, u_m, & 150 usws_m, v_m, w_m )150 usws_m, uswst_m, v_m, w_m ) 151 151 ELSE 152 152 CALL diffusion_u( i, j, ddzu, ddzw, km, km_damp_y, tend, u, usws, & 153 v, w )153 uswst, v, w ) 154 154 ENDIF 155 155 CALL coriolis( i, j, 1 ) … … 216 216 IF ( tsc(2) == 2.0 .AND. timestep_scheme(1:8) == 'leapfrog' ) THEN 217 217 CALL diffusion_v( i, j, ddzu, ddzw, km_m, km_damp_x, tend, u_m, & 218 v_m, vsws_m, w_m )218 v_m, vsws_m, vswst_m, w_m ) 219 219 ELSE 220 220 CALL diffusion_v( i, j, ddzu, ddzw, km, km_damp_x, tend, u, v, & 221 vsws, w )221 vsws, vswst, w ) 222 222 ENDIF 223 223 CALL coriolis( i, j, 2 ) … … 817 817 THEN 818 818 CALL diffusion_u( i, j, ddzu, ddzw, km_m, km_damp_y, tend, & 819 u_m, usws_m, v_m, w_m )819 u_m, usws_m, uswst_m, v_m, w_m ) 820 820 ELSE 821 821 CALL diffusion_u( i, j, ddzu, ddzw, km, km_damp_y, tend, u, & 822 usws, v, w )822 usws, uswst, v, w ) 823 823 ENDIF 824 824 CALL coriolis( i, j, 1 ) … … 868 868 THEN 869 869 CALL diffusion_v( i, j, ddzu, ddzw, km_m, km_damp_x, tend, & 870 u_m, v_m, vsws_m, w_m )870 u_m, v_m, vsws_m, vswst_m, w_m ) 871 871 ELSE 872 872 CALL diffusion_v( i, j, ddzu, ddzw, km, km_damp_x, tend, u, v, & 873 vsws, w )873 vsws, vswst, w ) 874 874 ENDIF 875 875 CALL coriolis( i, j, 2 ) … … 1257 1257 ENDIF 1258 1258 IF ( tsc(2) == 2.0 .AND. timestep_scheme(1:8) == 'leapfrog' ) THEN 1259 CALL diffusion_u( ddzu, ddzw, km_m, km_damp_y, tend, u_m, usws_m, v_m,&1260 w_m )1259 CALL diffusion_u( ddzu, ddzw, km_m, km_damp_y, tend, u_m, usws_m, & 1260 uswst_m, v_m, w_m ) 1261 1261 ELSE 1262 CALL diffusion_u( ddzu, ddzw, km, km_damp_y, tend, u, usws, v, w )1262 CALL diffusion_u( ddzu, ddzw, km, km_damp_y, tend, u, usws, uswst, v, w ) 1263 1263 ENDIF 1264 1264 CALL coriolis( 1 ) … … 1330 1330 IF ( tsc(2) == 2.0 .AND. timestep_scheme(1:8) == 'leapfrog' ) THEN 1331 1331 CALL diffusion_v( ddzu, ddzw, km_m, km_damp_x, tend, u_m, v_m, vsws_m, & 1332 w_m )1332 vswst_m, w_m ) 1333 1333 ELSE 1334 CALL diffusion_v( ddzu, ddzw, km, km_damp_x, tend, u, v, vsws, w )1334 CALL diffusion_v( ddzu, ddzw, km, km_damp_x, tend, u, v, vsws, vswst, w ) 1335 1335 ENDIF 1336 1336 CALL coriolis( 2 ) -
palm/trunk/SOURCE/read_3d_binary.f90
r98 r102 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! +uswst, uswst_m, vswst, vswst_m 7 7 ! 8 8 ! Former revisions: … … 333 333 CASE ( 'usws' ) 334 334 READ ( 13 ) usws 335 CASE ( 'uswst' ) 336 READ ( 13 ) uswst 335 337 CASE ( 'usws_m' ) 336 338 READ ( 13 ) usws_m 339 CASE ( 'uswst_m' ) 340 READ ( 13 ) uswst_m 337 341 CASE ( 'us_av' ) 338 342 ALLOCATE( us_av(nys-1:nyn+1,nxl-1:nxr+1) ) … … 366 370 CASE ( 'vsws' ) 367 371 READ ( 13 ) vsws 372 CASE ( 'vswst' ) 373 READ ( 13 ) vswst 368 374 CASE ( 'vsws_m' ) 369 375 READ ( 13 ) vsws_m 376 CASE ( 'vswst_m' ) 377 READ ( 13 ) vswst_m 370 378 CASE ( 'w' ) 371 379 READ ( 13 ) w -
palm/trunk/SOURCE/read_var_list.f90
r98 r102 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! +time_coupling, top_momentumflux_u|v 7 7 ! 8 8 ! Former revisions: … … 358 358 CASE ( 's_vertical_gradient_level' ) 359 359 READ ( 13 ) s_vertical_gradient_level 360 CASE ( 'time_coupling' ) 361 READ ( 13 ) time_coupling 360 362 CASE ( 'time_disturb' ) 361 363 READ ( 13 ) time_disturb … … 396 398 CASE ( 'top_heatflux' ) 397 399 READ ( 13 ) top_heatflux 400 CASE ( 'top_momentumflux_u' ) 401 READ ( 13 ) top_momentumflux_u 402 CASE ( 'top_momentumflux_v' ) 403 READ ( 13 ) top_momentumflux_v 398 404 CASE ( 'top_salinityflux' ) 399 405 READ ( 13 ) top_salinityflux -
palm/trunk/SOURCE/swap_timelevel.f90
r98 r102 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! swaping of uswst, vswst included 7 7 ! 8 8 ! Former revisions: … … 136 136 ENDIF 137 137 IF ( use_top_fluxes ) THEN 138 uswst_m => uswst_1; uswst => uswst_2 139 vswst_m => vswst_1; vswst => vswst_2 138 140 tswst_m => tswst_1; tswst => tswst_2 139 141 IF ( humidity .OR. passive_scalar ) THEN … … 184 186 ENDIF 185 187 IF ( use_top_fluxes ) THEN 186 tswst_m => tswst_2; tswst => tswst_1 188 uswst_m => uswst_2; uswst => uswst_1 189 vswst_m => vswst_2; vswst => vswst_1 190 tswst_m => tswst_2; tswst => tswst_1 187 191 IF ( humidity .OR. passive_scalar ) THEN 188 192 qswst_m => qswst_2; qswst => qswst_1 -
palm/trunk/SOURCE/time_integration.f90
r98 r102 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Call of new routine surface_coupler 7 7 ! 8 8 ! Former revisions: … … 303 303 304 304 ! 305 !-- Data exchange between coupled models 306 IF ( coupling_mode /= 'uncoupled' ) THEN 307 time_coupling = time_coupling + dt_3d 308 DO WHILE ( time_coupling >= dt_coupling ) 309 CALL surface_coupler 310 time_coupling = time_coupling - dt_coupling 311 ENDDO 312 ENDIF 313 314 ! 305 315 !-- Execute user-defined actions 306 316 CALL user_actions( 'after_integration' ) -
palm/trunk/SOURCE/write_3d_binary.f90
r98 r102 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! +uswst, uswst_m, vswst, vswst_m 7 7 ! 8 8 ! Former revisions: … … 201 201 WRITE ( 14 ) 'us '; WRITE ( 14 ) us 202 202 WRITE ( 14 ) 'usws '; WRITE ( 14 ) usws 203 WRITE ( 14 ) 'uswst '; WRITE ( 14 ) uswst 203 204 IF ( timestep_scheme(1:5) /= 'runge' ) THEN 204 205 WRITE ( 14 ) 'usws_m '; WRITE ( 14 ) usws_m 206 WRITE ( 14 ) 'uswst_m '; WRITE ( 14 ) uswst_m 205 207 ENDIF 206 208 IF ( ALLOCATED( us_av ) ) THEN … … 236 238 ENDIF 237 239 WRITE ( 14 ) 'vsws '; WRITE ( 14 ) vsws 240 WRITE ( 14 ) 'vswst '; WRITE ( 14 ) vswst 238 241 IF ( timestep_scheme(1:5) /= 'runge' ) THEN 239 242 WRITE ( 14 ) 'vsws_m '; WRITE ( 14 ) vsws_m 243 WRITE ( 14 ) 'vswst_m '; WRITE ( 14 ) vswst_m 240 244 ENDIF 241 245 WRITE ( 14 ) 'w '; WRITE ( 14 ) w -
palm/trunk/SOURCE/write_var_list.f90
r98 r102 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! +top_momentumflux_u|v, time_coupling 7 7 ! 8 8 ! Former revisions: … … 304 304 WRITE ( 14 ) 's_vertical_gradient_level ' 305 305 WRITE ( 14 ) s_vertical_gradient_level 306 WRITE ( 14 ) 'time_coupling ' 307 WRITE ( 14 ) time_coupling 306 308 WRITE ( 14 ) 'time_disturb ' 307 309 WRITE ( 14 ) time_disturb … … 342 344 WRITE ( 14 ) 'top_heatflux ' 343 345 WRITE ( 14 ) top_heatflux 346 WRITE ( 14 ) 'top_momentumflux_u ' 347 WRITE ( 14 ) top_momentumflux_u 348 WRITE ( 14 ) 'top_momentumflux_v ' 349 WRITE ( 14 ) top_momentumflux_v 344 350 WRITE ( 14 ) 'top_salinityflux ' 345 351 WRITE ( 14 ) top_salinityflux
Note: See TracChangeset
for help on using the changeset viewer.