Changeset 4507 for palm/trunk/SOURCE/netcdf_data_input_mod.f90
- Timestamp:
- Apr 22, 2020 6:21:45 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/netcdf_data_input_mod.f90
r4457 r4507 25 25 ! ----------------- 26 26 ! $Id$ 27 ! - bugfix: check terrain height for fill values directly after reading 28 ! - changes: 29 ! - remove check for negative zt 30 ! - add reference height from input file upon PALM reference height (origin_z) 31 ! 32 ! 4457 2020-03-11 14:20:43Z raasch 27 33 ! use statement for exchange horiz added, 28 34 ! bugfixes for calls of exchange horiz 2d … … 988 994 ! 989 995 !-- Copy latitude, longitude, origin_z, rotation angle on init type 996 !-- NOTE: A shifting height might have already been saved to orgin_z in 997 !-- init_grid; therefore, do not override but add the reference height from 998 !-- the input file. 990 999 init_model%latitude = input_file_atts%origin_lat 991 1000 init_model%longitude = input_file_atts%origin_lon … … 993 1002 init_model%origin_x = input_file_atts%origin_x 994 1003 init_model%origin_y = input_file_atts%origin_y 995 init_model%origin_z = in put_file_atts%origin_z1004 init_model%origin_z = init_model%origin_z + input_file_atts%origin_z 996 1005 init_model%rotation_angle = input_file_atts%rotation_angle 997 1006 … … 2553 2562 ENDIF 2554 2563 ENDIF 2555 ! 2556 !-- In case no terrain height is provided by static input file, allocate 2557 !-- array nevertheless and set terrain height to 0, which simplifies 2558 !-- topography initialization. 2559 IF ( .NOT. terrain_height_f%from_file ) THEN 2564 2565 IF ( terrain_height_f%from_file ) THEN 2566 ! 2567 !-- Check orography for fill-values. 2568 !-- For the moment, give an error message. More advanced methods, e.g. a 2569 !-- nearest neighbor algorithm as used in GIS systems might be implemented 2570 !-- later. 2571 !-- NOTE: This check must be placed here as terrain_height_f is altered 2572 !-- within init_grid which is called before netcdf_data_input_check_static 2573 IF ( ANY( terrain_height_f%var == terrain_height_f%fill ) ) THEN 2574 message_string = 'NetCDF variable zt is not ' // & 2575 'allowed to have missing data' 2576 CALL message( 'netcdf_data_input_mod', 'PA0550', 2, 2, myid, 6, 0 ) 2577 ENDIF 2578 ELSE 2579 ! 2580 !-- In case no terrain height is provided by static input file, allocate 2581 !-- array nevertheless and set terrain height to 0, which simplifies 2582 !-- topography initialization. 2560 2583 ALLOCATE ( terrain_height_f%var(nys:nyn,nxl:nxr) ) 2561 2584 terrain_height_f%var = 0.0_wp … … 3161 3184 CALL message( 'netcdf_data_input_mod', 'PA0580', 1, 2, 0, 6, 0 ) 3162 3185 ENDIF 3163 ENDIF3164 !3165 !-- Check orography for fill-values. For the moment, give an error message.3166 !-- More advanced methods, e.g. a nearest neighbor algorithm as used in GIS3167 !-- systems might be implemented later.3168 !-- Please note, if no terrain height is provided, it is set to 0.3169 IF ( ANY( terrain_height_f%var == terrain_height_f%fill ) ) THEN3170 message_string = 'NetCDF variable zt is not ' // &3171 'allowed to have missing data'3172 CALL message( 'netcdf_data_input_mod', 'PA0550', 2, 2, myid, 6, 0 )3173 ENDIF3174 !3175 !-- Check for negative terrain heights3176 IF ( ANY( terrain_height_f%var < 0.0_wp ) ) THEN3177 message_string = 'NetCDF variable zt is not ' // &3178 'allowed to have negative values'3179 CALL message( 'netcdf_data_input_mod', 'PA0551', 2, 2, myid, 6, 0 )3180 3186 ENDIF 3181 3187 !
Note: See TracChangeset
for help on using the changeset viewer.