Changeset 366 for palm/trunk/SOURCE


Ignore:
Timestamp:
Aug 25, 2009 8:06:27 AM (15 years ago)
Author:
raasch
Message:

speed optomizations +bugfix in init_ocean

Location:
palm/trunk/SOURCE
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/CURRENT_MODIFICATIONS

    r364 r366  
    11New:
    22---
     3bc_lr/bc_ns  in most subroutines replaced by LOGICAL variables bc_lr_cyc,
     4bc_ns_cyc for speed optimization
     5(check_parameters, diffusion_u, diffusion_v, diffusion_w, modules)
     6
    37Additional timestep criterion in case of simulations with plant canopy (timestep)
    48
     
    113117Errors:
    114118------
     119Bugfix: Output on unit 14 only if requested by write_binary.
     120(user_last_actions)
     121
    115122Bugfix to avoid zero division by km_neutral (production_e)
    116123
     
    165172Bugfix: initial setting of time_coupling in coupled restart runs (time_integration)
    166173
    167 advec_particles, check_parameters, cpu_log, data_output_2d, data_output_3d, header, init_3d_model, init_particles, modules, netcdf, prandtl_fluxes, production_e, read_var_list, time_integration, write_var_list
     174advec_particles, check_parameters, cpu_log, data_output_2d, data_output_3d, header, init_3d_model, init_particles, modules, netcdf, prandtl_fluxes, production_e, read_var_list, time_integration, user_last_actions, write_var_list
  • palm/trunk/SOURCE/check_parameters.f90

    r354 r366  
    44! Actual revisions:
    55! -----------------
     6! bc_lr_cyc and bc_ns_cyc are set,
    67! initializing_actions='read_data_for_recycling' renamed to 'cyclic_fill'
    78! Check for illegal entries in section_xy|xz|yz that exceed nz+1|ny+1|nx+1
     
    11051106
    11061107!
     1108!-- Internal variables used for speed optimization in if clauses
     1109    IF ( bc_lr /= 'cyclic' )  bc_lr_cyc = .FALSE.
     1110    IF ( bc_ns /= 'cyclic' )  bc_ns_cyc = .FALSE.
     1111
     1112!
    11071113!-- Non-cyclic lateral boundaries require the multigrid method and Piascek-
    11081114!-- Willimas advection scheme. Several schemes and tools do not work with
  • palm/trunk/SOURCE/diffusion_u.f90

    r110 r366  
    44! Actual revisions:
    55! -----------------
    6 !
     6! bc_ns replaced by bc_ns_cyc
    77!
    88! Former revisions:
     
    101101!--             velocity components parallel to the outflow boundary in
    102102!--             the direction normal to the outflow boundary.
    103                 IF ( bc_ns /= 'cyclic' )  THEN
     103                IF ( .NOT. bc_ns_cyc )  THEN
    104104                   kmyp_y = MAX( kmyp_y, km_damp_y(j) )
    105105                   kmym_y = MAX( kmym_y, km_damp_y(j) )
     
    134134!--                velocity components parallel to the outflow boundary in
    135135!--                the direction normal to the outflow boundary.
    136                    IF ( bc_ns /= 'cyclic' )  THEN
     136                   IF ( .NOT. bc_ns_cyc )  THEN
    137137                      kmyp_y = MAX( kmyp_y, km_damp_y(j) )
    138138                      kmym_y = MAX( kmym_y, km_damp_y(j) )
     
    266266!--       parallel to the outflow boundary in the direction normal to the
    267267!--       outflow boundary.
    268           IF ( bc_ns /= 'cyclic' )  THEN
     268          IF ( .NOT. bc_ns_cyc )  THEN
    269269             kmyp_y = MAX( kmyp_y, km_damp_y(j) )
    270270             kmym_y = MAX( kmym_y, km_damp_y(j) )
     
    302302!--          velocity components parallel to the outflow boundary in
    303303!--          the direction normal to the outflow boundary.
    304              IF ( bc_ns /= 'cyclic' )  THEN
     304             IF ( .NOT. bc_ns_cyc )  THEN
    305305                kmyp_y = MAX( kmyp_y, km_damp_y(j) )
    306306                kmym_y = MAX( kmym_y, km_damp_y(j) )
  • palm/trunk/SOURCE/diffusion_v.f90

    r110 r366  
    44! Actual revisions:
    55! -----------------
    6 !
     6! bc_lr replaced by bc_lr_cyc
    77!
    88! Former revisions:
     
    9999!--             velocity components parallel to the outflow boundary in
    100100!--             the direction normal to the outflow boundary.
    101                 IF ( bc_lr /= 'cyclic' )  THEN
     101                IF ( .NOT. bc_lr_cyc )  THEN
    102102                   kmxp_x = MAX( kmxp_x, km_damp_x(i) )
    103103                   kmxm_x = MAX( kmxm_x, km_damp_x(i) )
     
    132132!--                velocity components parallel to the outflow boundary in
    133133!--                the direction normal to the outflow boundary.
    134                    IF ( bc_lr /= 'cyclic' )  THEN
     134                   IF ( .NOT. bc_lr_cyc )  THEN
    135135                      kmxp_x = MAX( kmxp_x, km_damp_x(i) )
    136136                      kmxm_x = MAX( kmxm_x, km_damp_x(i) )
     
    263263!--       parallel to the outflow boundary in the direction normal to the
    264264!--       outflow boundary.
    265           IF ( bc_lr /= 'cyclic' )  THEN
     265          IF ( .NOT. bc_lr_cyc )  THEN
    266266             kmxp_x = MAX( kmxp_x, km_damp_x(i) )
    267267             kmxm_x = MAX( kmxm_x, km_damp_x(i) )
     
    301301!--          velocity components parallel to the outflow boundary in
    302302!--          the direction normal to the outflow boundary.
    303              IF ( bc_lr /= 'cyclic' )  THEN
     303             IF ( .NOT. bc_lr_cyc )  THEN
    304304                kmxp_x = MAX( kmxp_x, km_damp_x(i) )
    305305                kmxm_x = MAX( kmxm_x, km_damp_x(i) )
  • palm/trunk/SOURCE/diffusion_w.f90

    r77 r366  
    44! Actual revisions:
    55! -----------------
    6 !
     6! bc_lr/bc_ns replaced by bc_lr_cyc/bc_ns_cyc
    77!
    88! Former revisions:
     
    100100!--             velocity components parallel to the outflow boundary in
    101101!--             the direction normal to the outflow boundary.
    102                 IF ( bc_lr /= 'cyclic' )  THEN
     102                IF ( .NOT. bc_lr_cyc )  THEN
    103103                   kmxp_x = MAX( kmxp_x, km_damp_x(i) )
    104104                   kmxm_x = MAX( kmxm_x, km_damp_x(i) )
    105105                ENDIF
    106                 IF ( bc_ns /= 'cyclic' )  THEN
     106                IF ( .NOT. bc_ns_cyc )  THEN
    107107                   kmyp_y = MAX( kmyp_y, km_damp_y(j) )
    108108                   kmym_y = MAX( kmym_y, km_damp_y(j) )
     
    150150!--                velocity components parallel to the outflow boundary in
    151151!--                the direction normal to the outflow boundary.
    152                    IF ( bc_lr /= 'cyclic' )  THEN
     152                   IF ( .NOT. bc_lr_cyc )  THEN
    153153                      kmxp_x = MAX( kmxp_x, km_damp_x(i) )
    154154                      kmxm_x = MAX( kmxm_x, km_damp_x(i) )
    155155                   ENDIF
    156                    IF ( bc_ns /= 'cyclic' )  THEN
     156                   IF ( .NOT. bc_ns_cyc )  THEN
    157157                      kmyp_y = MAX( kmyp_y, km_damp_y(j) )
    158158                      kmym_y = MAX( kmym_y, km_damp_y(j) )
     
    231231!--       parallel to the outflow boundary in the direction normal to the
    232232!--       outflow boundary.
    233           IF ( bc_lr /= 'cyclic' )  THEN
     233          IF ( .NOT. bc_lr_cyc )  THEN
    234234             kmxp_x = MAX( kmxp_x, km_damp_x(i) )
    235235             kmxm_x = MAX( kmxm_x, km_damp_x(i) )
    236236          ENDIF
    237           IF ( bc_ns /= 'cyclic' )  THEN
     237          IF ( .NOT. bc_ns_cyc )  THEN
    238238             kmyp_y = MAX( kmyp_y, km_damp_y(j) )
    239239             kmym_y = MAX( kmym_y, km_damp_y(j) )
     
    293293!--          velocity components parallel to the outflow boundary in
    294294!--          the direction normal to the outflow boundary.
    295              IF ( bc_lr /= 'cyclic' )  THEN
     295             IF ( .NOT. bc_lr_cyc )  THEN
    296296                kmxp_x = MAX( kmxp_x, km_damp_x(i) )
    297297                kmxm_x = MAX( kmxm_x, km_damp_x(i) )
    298298             ENDIF
    299              IF ( bc_ns /= 'cyclic' )  THEN
     299             IF ( .NOT. bc_ns_cyc )  THEN
    300300                kmyp_y = MAX( kmyp_y, km_damp_y(j) )
    301301                kmym_y = MAX( kmym_y, km_damp_y(j) )
  • palm/trunk/SOURCE/init_ocean.f90

    r336 r366  
    44! Actual revisions:
    55! -----------------
    6 !
     6! Bugfix: First calculation of hyp(0) changed
    77!
    88! Former revisions:
     
    5050    rho_init(nzt) = rho_surface
    5151
    52     DO  k = nzt-1, 0, -1
     52    DO  k = nzt-1, 1, -1
    5353       hyp(k) = hyp(k+1) + rho_surface * g * dzu(k)
    5454    ENDDO
     55    hyp(0) = hyp(1) + rho_surface * g * dzu(1)
    5556
    5657    IF ( myid == 0 )  THEN
  • palm/trunk/SOURCE/modules.f90

    r354 r366  
    55! Current revisions:
    66! -----------------
     7! +bc_lr_cyc, bc_ns_cyc
    78! +output_for_t0
    89! translation error of actual -> current revisions fixed
     
    358359
    359360    LOGICAL ::  adjust_mixing_length = .FALSE., avs_output = .FALSE., &
     361                bc_lr_cyc =.TRUE., bc_ns_cyc = .TRUE., &
    360362                call_psolver_at_all_substeps = .TRUE., &
    361363                cloud_droplets = .FALSE., cloud_physics = .FALSE., &
  • palm/trunk/SOURCE/user_last_actions.f90

    r226 r366  
    44! Actual revisions:
    55! -----------------
    6 !
     6! Output on unit 14 only if requested by write_binary
    77!
    88! Former revisions:
     
    1818!------------------------------------------------------------------------------!
    1919
     20    USE control_parameters
    2021    USE user
    2122
     
    2526!-- Here the user-defined actions at the end of a job follow.
    2627!-- Sample for user-defined output:
    27 !    IF ( ALLOCATED( u2_av ) )  THEN
    28 !       WRITE ( 14 )  'u2_av               ';  WRITE ( 14 )  u2_av
    29 !    ENDIF
     28    IF ( write_binary(1:4) == 'true' )  THEN
     29!       IF ( ALLOCATED( u2_av ) )  THEN
     30!          WRITE ( 14 )  'u2_av               ';  WRITE ( 14 )  u2_av
     31!       ENDIF
    3032
    31     WRITE ( 14 )  '*** end user ***    '
     33       WRITE ( 14 )  '*** end user ***    '
     34
     35    ENDIF
    3236
    3337 END SUBROUTINE user_last_actions
Note: See TracChangeset for help on using the changeset viewer.