Changeset 4186 for palm/trunk/SOURCE/init_3d_model.f90
- Timestamp:
- Aug 23, 2019 4:06:14 PM (5 years ago)
- File:
-
- 1 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 )
Note: See TracChangeset
for help on using the changeset viewer.