Changeset 4186 for palm/trunk/SOURCE
- Timestamp:
- Aug 23, 2019 4:06:14 PM (5 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/init_3d_model.f90
r4185 r4186 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Design change, use variables defined in netcdf_data_input_mod to read netcd 28 ! variables rather than define local ones. 29 ! 30 ! 4185 2019-08-23 13:49:38Z oliver.maas 27 31 ! For initializing_actions = ' cyclic_fill': 28 32 ! Overwrite u_init, v_init, pt_init, q_init and s_init with the … … 160 164 input_file_static, & 161 165 netcdf_data_input_init_3d, & 166 num_var_pids, & 162 167 open_read_file, & 163 real_2d 168 pids_id, & 169 real_2d, & 170 vars_pids 164 171 165 172 USE nesting_offl_mod, & … … 213 220 214 221 IMPLICIT NONE 215 216 CHARACTER(LEN=50), DIMENSION(:), ALLOCATABLE :: vars_pids_static !< variable names in static input file217 222 218 223 INTEGER(iwp) :: i !< grid index in x direction … … 223 228 INTEGER(iwp) :: l !< running index over surface orientation 224 229 INTEGER(iwp) :: m !< index of surface element in surface data type 225 INTEGER(iwp) :: num_vars_pids_static !< number of variables in static input file226 230 INTEGER(iwp) :: nz_u_shift !< topography-top index on u-grid, used to vertically shift initial profiles 227 231 INTEGER(iwp) :: nz_v_shift !< topography-top index on v-grid, used to vertically shift initial profiles … … 233 237 INTEGER(iwp) :: nz_s_shift_l !< topography-top index on scalar-grid, used to vertically shift initial profiles 234 238 INTEGER(iwp) :: nzt_l !< index of top PE boundary for multigrid level 235 INTEGER(iwp) :: pids_static_id !< file id for static input file236 239 INTEGER(iwp) :: sr !< index of statistic region 237 240 … … 1541 1544 CALL open_read_file( TRIM( input_file_static ) // & 1542 1545 TRIM( coupling_char ), & 1543 pids_ static_id )1546 pids_id ) 1544 1547 1545 CALL inquire_num_variables( pids_ static_id, num_vars_pids_static)1548 CALL inquire_num_variables( pids_id, num_var_pids ) 1546 1549 ! 1547 1550 !-- Allocate memory to store variable names and read them 1548 ALLOCATE( vars_pids _static(1:num_vars_pids_static) )1549 CALL inquire_variable_names( pids_ static_id, vars_pids_static)1551 ALLOCATE( vars_pids(1:num_var_pids) ) 1552 CALL inquire_variable_names( pids_id, vars_pids ) 1550 1553 ! 1551 1554 !-- Input roughness length. 1552 IF ( check_existence( vars_pids _static, 'z0' ) ) THEN1555 IF ( check_existence( vars_pids, 'z0' ) ) THEN 1553 1556 ! 1554 1557 !-- Read _FillValue attribute 1555 CALL get_attribute( pids_ static_id, char_fill, tmp_2d%fill, &1558 CALL get_attribute( pids_id, char_fill, tmp_2d%fill, & 1556 1559 .FALSE., 'z0' ) 1557 1560 ! 1558 1561 !-- Read variable 1559 CALL get_variable( pids_ static_id, 'z0', tmp_2d%var, &1562 CALL get_variable( pids_id, 'z0', tmp_2d%var, & 1560 1563 nxl, nxr, nys, nyn ) 1561 1564 ! … … 1592 1595 ! 1593 1596 !-- Finally, close the input file. 1594 CALL close_input_file( pids_ static_id )1597 CALL close_input_file( pids_id ) 1595 1598 #endif 1596 1599 DEALLOCATE( tmp_2d%var ) -
palm/trunk/SOURCE/netcdf_data_input_mod.f90
r4182 r4186 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Minor formatting adjustments 28 ! 29 ! 4182 2019-08-22 15:20:23Z scharf 27 30 ! Corrected "Former revisions" section 28 31 ! … … 5057 5060 5058 5061 #if defined( __netcdf4_parallel ) 5059 ! if __netcdf4_parallel is defined, parrallel NetCDF will be used unconditionally 5062 ! 5063 !-- If __netcdf4_parallel is defined, parrallel NetCDF will be used 5064 !-- unconditionally 5060 5065 nc_stat = NF90_OPEN( filename, IOR( NF90_WRITE, NF90_MPIIO ), id, & 5061 5066 COMM = comm2d, INFO = MPI_INFO_NULL ) 5062 IF(nc_stat /= NF90_NOERR ) THEN !possible NetCDF 3 file 5063 nc_stat = NF90_OPEN( filename, NF90_NOWRITE, id ) 5064 collective_read = .FALSE. 5067 ! 5068 !-- Check for possible Netcdf 3 file. 5069 IF( nc_stat /= NF90_NOERR ) THEN 5070 nc_stat = NF90_OPEN( filename, NF90_NOWRITE, id ) 5071 collective_read = .FALSE. 5065 5072 ELSE 5066 5067 END 5073 collective_read = .TRUE. 5074 ENDIF 5068 5075 #else 5069 5076 ! All MPI processes open und read -
palm/trunk/SOURCE/surface_layer_fluxes_mod.f90
r4182 r4186 26 26 ! ----------------- 27 27 ! $Id$ 28 ! - To enable limitation of Obukhov length, move it before exit-cycle construct. 29 ! Further, change the limit to 10E-5 in order to get rid-off unrealistic 30 ! peaks in the heat fluxes during nighttime 31 ! - Unused variable removed 32 ! 33 ! 4182 2019-08-22 15:20:23Z scharf 28 34 ! Corrected "Former revisions" section 29 35 ! … … 129 135 INTEGER(iwp) :: l !< loop index for surf type 130 136 131 INTEGER(iwp), PARAMETER :: num_steps = 15000 !< number of steps in the lookup table132 133 137 LOGICAL :: coupled_run !< Flag for coupled atmosphere-ocean runs 134 138 LOGICAL :: downward = .FALSE.!< Flag indicating downward-facing horizontal surface … … 1008 1012 ENDIF 1009 1013 ! 1014 !-- Assure that Obukhov length does not become zero. If the limit is 1015 !-- reached, exit the loop. 1016 IF ( ABS( surf%ol(m) ) < 1E-5_wp ) THEN 1017 surf%ol(m) = SIGN( 1E-5_wp, surf%ol(m) ) 1018 EXIT 1019 ENDIF 1020 ! 1010 1021 !-- Check for convergence 1011 1022 IF ( ABS( ( surf%ol(m) - ol_m ) / surf%ol(m) ) < 1.0E-4_wp ) THEN … … 1013 1024 ELSE 1014 1025 CYCLE 1015 ENDIF 1016 ! 1017 !-- Assure that Obukhov length does not become zero 1018 IF ( ABS( surf%ol(m) ) < 1E-6_wp ) & 1019 surf%ol(m) = SIGN( 10E-6_wp, surf%ol(m) ) 1026 ENDIF 1020 1027 1021 1028 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.