Ignore:
Timestamp:
Apr 15, 2020 2:26:31 PM (4 years ago)
Author:
raasch
Message:

bugfix for creation of filetypes, argument removed from rd_mpi_io_open, files re-formatted to follow the PALM coding standard

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/user_init_grid.f90

    r4360 r4498  
    11!> @file user_init_grid.f90
    2 !------------------------------------------------------------------------------!
     2!--------------------------------------------------------------------------------------------------!
    33! This file is part of the PALM model system.
    44!
    5 ! PALM is free software: you can redistribute it and/or modify it under the
    6 ! terms of the GNU General Public License as published by the Free Software
    7 ! Foundation, either version 3 of the License, or (at your option) any later
    8 ! version.
     5! PALM is free software: you can redistribute it and/or modify it under the terms of the GNU General
     6! Public License as published by the Free Software Foundation, either version 3 of the License, or
     7! (at your option) any later version.
    98!
    10 ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
    11 ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
    12 ! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
     9! PALM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the
     10! implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
     11! Public License for more details.
    1312!
    14 ! You should have received a copy of the GNU General Public License along with
    15 ! PALM. If not, see <http://www.gnu.org/licenses/>.
     13! You should have received a copy of the GNU General Public License along with PALM. If not, see
     14! <http://www.gnu.org/licenses/>.
    1615!
    1716! Copyright 1997-2020 Leibniz Universitaet Hannover
    18 !------------------------------------------------------------------------------!
     17!--------------------------------------------------------------------------------------------------!
     18!
    1919!
    2020! Current revisions:
     
    2525! -----------------
    2626! $Id$
     27! file re-formatted to follow the PALM coding standard
     28!
     29!
     30! 4360 2020-01-07 11:25:50Z suehring
    2731! Corrected "Former revisions" section
    28 ! 
     32!
    2933! 3768 2019-02-27 14:35:58Z raasch
    3034! variables commented + statement added to avoid compiler warnings about unused variables
    31 ! 
     35!
    3236! 3655 2019-01-07 16:51:22Z knoop
    3337! dz was replaced by dz(1)
     
    4044! ------------
    4145!> Execution of user-defined grid initializing actions
    42 !------------------------------------------------------------------------------!
     46!--------------------------------------------------------------------------------------------------!
    4347 SUBROUTINE user_init_grid( topo_3d )
    44  
     48
    4549
    4650    USE control_parameters
    47    
     51
    4852    USE indices
    49    
     53
    5054    USE kinds
    51    
     55
    5256    USE user
    5357
    5458    IMPLICIT NONE
    5559
    56 !    INTEGER(iwp)                                           ::  k_topo      !< topography top index
    57     INTEGER(iwp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  topo_3d     !< 3D topography field
     60!    INTEGER(iwp)                                           ::  k_topo   !< topography top index
     61    INTEGER(iwp), DIMENSION(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ::  topo_3d  !< 3D topography field
    5862
    5963!    REAL(wp) ::  h_topo !< user-defined topography height
     
    7882       CASE ( 'user_defined_topography_1' )
    7983!
    80 !--       Here the user can define his own topography.
     84!--       Here the user can define their own topography.
    8185!--       After definition, please remove the following three lines!
    8286          message_string = 'topography "' // topography // '" not available yet'
    8387          CALL message( 'user_init_grid', 'UI0005', 1, 2, 0, 6, 0 )
    8488!
    85 !--       The user is allowed to set surface-mounted as well as non-surface
    86 !--       mounted topography (e.g. overhanging structures). For both, use
    87 !--       3D array topo_3d and set bit 0. The convention is: bit is zero inside
    88 !--       topography, bit is 1 for atmospheric grid point.
    89 !--       The following example shows how to prescribe sine-like topography
    90 !--       along x-direction with amplitude of 10 * dz(1) and wavelength 10 * dy.
     89!--       The user is allowed to set surface-mounted as well as non-surface mounted topography
     90!--       (e.g. overhanging structures). For both, use 3D array topo_3d and set bit 0. The
     91!--       convention is: bit is zero inside topography, bit is 1 for atmospheric grid point.
     92!--       The following example shows how to prescribe sine-like topography along x-direction with
     93!--       amplitude of 10 * dz(1) and wavelength 10 * dy.
    9194!           DO  i = nxlg, nxrg
    92 !              h_topo = 10.0_wp * dz(1) * (SIN(3.14_wp*0.5_wp)*i*dx / ( 5.0_wp * dy ) )**2
    93 ! 
     95!              h_topo = 10.0_wp * dz(1) * ( SIN( 3.14_wp * 0.5_wp) * i * dx / ( 5.0_wp * dy ) )**2
     96!
    9497!              k_topo = MINLOC( ABS( zw - h_topo ), 1 ) - 1
    95 !
    96 !              topo_3d(k_topo+1:nzt+1,:,i) =                                     &
    97 !                                          IBSET( topo_3d(k_topo+1:nzt+1,:,i), 0 )
    98 !           ENDDO
    99 !
     98!
     99!              topo_3d(k_topo+1:nzt+1,:,i) = IBSET( topo_3d(k_topo+1:nzt+1,:,i), 0 )
     100!           ENDDO
     101!
    100102!           CALL exchange_horiz_int( topo_3d, nys, nyn, nxl, nxr, nzt, nbgp )
    101103
    102104       CASE DEFAULT
    103105!
    104 !--       The DEFAULT case is reached if the parameter topography contains a
    105 !--       wrong character string that is neither recognized in init_grid nor
    106 !--       here in user_init_grid.
     106!--       The DEFAULT case is reached if the parameter topography contains a wrong character string
     107!--       that is neither recognized in init_grid nor here in user_init_grid.
    107108          message_string = 'unknown topography "' // topography // '"'
    108109          CALL message( 'user_init_grid', 'UI0006', 1, 2, 0, 6, 0 )
     
    110111    END SELECT
    111112
    112 
    113 
    114 
    115113 END SUBROUTINE user_init_grid
    116114
Note: See TracChangeset for help on using the changeset viewer.