Changeset 3997 for palm/trunk/UTIL
- Timestamp:
- May 23, 2019 12:35:57 PM (6 years ago)
- Location:
- palm/trunk/UTIL/inifor
- Files:
-
- 1 deleted
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/UTIL/inifor/src/inifor.f90
r3866 r3997 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Alert user to warnings if any 29 ! 30 ! 31 ! 3866 2019-04-05 14:25:01Z eckhard 28 32 ! Use PALM's working precision 29 33 ! Show error message if compiled without netCDF support … … 185 189 ! 186 190 !-- Initialize the netCDF output file and define dimensions 187 CALL setup_netcdf_dimensions( output_file, palm_grid, cfg%start_date,&188 origin_lon, origin_lat)191 CALL setup_netcdf_dimensions( output_file, palm_grid, cfg%start_date, & 192 origin_lon, origin_lat ) 189 193 CALL log_runtime( 'time', 'write' ) 190 194 … … 587 591 CALL log_runtime( 'report', 'void' ) 588 592 589 message = "Finished writing dynamic driver '" // TRIM( output_file%name ) // & 590 "' successfully." 593 message = "Finished writing dynamic driver '" // TRIM( output_file%name ) 594 595 IF ( n_wrngs > 0 ) THEN 596 message = TRIM( message ) // "' with " // TRIM( str( n_wrngs ) ) // & 597 " warning(s). Please see logfile '" // LOG_FILE_NAME // "'." 598 ELSE 599 message = TRIM( message ) // "' successfully." 600 END IF 601 591 602 CALL report( 'main loop', message ) 592 603 CALL close_log -
palm/trunk/UTIL/inifor/src/inifor_control.f90
r3866 r3997 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Added warnings counter 29 ! 30 ! 31 ! 3866 2019-04-05 14:25:01Z eckhard 28 32 ! Use PALM's working precision 29 33 ! Renamed run_control -> log_runtime … … 85 89 CHARACTER (LEN=5000) :: tip = '' !< optional log message buffer for tips on how to rectify encountered errors 86 90 INTEGER, SAVE :: u !< Fortran file unit for the log file 91 INTEGER, SAVE :: n_wrngs = 0 !< Fortran file unit for the log file 87 92 88 93 CONTAINS … … 143 148 CHARACTER(LEN=*), INTENT(IN) :: message !< log message 144 149 150 n_wrngs = n_wrngs + 1 145 151 CALL report(routine, "WARNING: " // TRIM(message)) 146 152 -
palm/trunk/UTIL/inifor/src/inifor_defs.f90
r3867 r3997 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Defined netCDF attribute names for PALM origin coordinates 29 ! Make netCDF variable names constants 30 ! Bumped version number 31 ! 32 ! 33 ! 3867 2019-04-05 16:15:55Z eckhard 28 34 ! Added parameter for INIFOR's log file name 29 35 ! Use PALM's working precision … … 145 151 REAL(wp), PARAMETER :: CP_PALM = 1005.0_wp !< heat capacity of dry air at constant pressure, used in computation of PALM-4U's potential temperature [J/kg/K] 146 152 153 ! 154 !-- PALM static driver attribute names (PIDS 1.9) 155 CHARACTER(SNAME), PARAMETER :: PIDS_ORIGIN_LON = 'origin_lon' 156 CHARACTER(SNAME), PARAMETER :: PIDS_ORIGIN_LAT = 'origin_lat' 157 CHARACTER(SNAME), PARAMETER :: PIDS_ORIGIN_Z = 'origin_z' 158 147 159 ! 148 160 !-- COSMO netCDF names 149 CHARACTER(SNAME) :: NC_DEPTH_NAME = 'depth_2'150 CHARACTER(SNAME) :: NC_HHL_NAME = 'HHL'151 CHARACTER(SNAME) :: NC_RLAT_NAME = 'rlat'152 CHARACTER(SNAME) :: NC_RLON_NAME = 'rlon'153 CHARACTER(SNAME) :: NC_ROTATED_POLE_NAME = 'rotated_pole'154 CHARACTER(SNAME) :: NC_POLE_LATITUDE_NAME = 'grid_north_pole_latitude'155 CHARACTER(SNAME) :: NC_POLE_LONGITUDE_NAME = 'grid_north_pole_longitude'161 CHARACTER(SNAME), PARAMETER :: NC_DEPTH_NAME = 'depth_2' 162 CHARACTER(SNAME), PARAMETER :: NC_HHL_NAME = 'HHL' 163 CHARACTER(SNAME), PARAMETER :: NC_RLAT_NAME = 'rlat' 164 CHARACTER(SNAME), PARAMETER :: NC_RLON_NAME = 'rlon' 165 CHARACTER(SNAME), PARAMETER :: NC_ROTATED_POLE_NAME = 'rotated_pole' 166 CHARACTER(SNAME), PARAMETER :: NC_POLE_LATITUDE_NAME = 'grid_north_pole_latitude' 167 CHARACTER(SNAME), PARAMETER :: NC_POLE_LONGITUDE_NAME = 'grid_north_pole_longitude' 156 168 157 169 ! … … 164 176 ACHAR( 10 ) // ' Copyright 2017-2019 Deutscher Wetterdienst Offenbach' !< Copyright notice 165 177 CHARACTER(LEN=*), PARAMETER :: LOG_FILE_NAME = 'inifor.log' !< Name of INIFOR's log file 166 CHARACTER(LEN=*), PARAMETER :: VERSION = '1.4.9 rc'!< INIFOR version number178 CHARACTER(LEN=*), PARAMETER :: VERSION = '1.4.9' !< INIFOR version number 167 179 168 180 END MODULE inifor_defs -
palm/trunk/UTIL/inifor/src/inifor_grid.f90
r3866 r3997 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Read origin_z from static driver if given on the command line 29 ! Warn if origin_z is specified twice (by static driver and --elevation) 30 ! 31 ! 32 ! 3866 2019-04-05 14:25:01Z eckhard 28 33 ! Use PALM's working precision 29 34 ! Catch errors while reading namelists … … 140 145 SNAME, LNAME, PATH, FORCING_STEP, WATER_ID, FILL_ITERATIONS, & 141 146 BETA, P_SL, T_SL, BETA, RD, RV, G, P_REF, RD_PALM, CP_PALM, & 142 RHO_L, OMEGA, HECTO, wp, iwp 147 RHO_L, OMEGA, HECTO, wp, iwp, & 148 PIDS_ORIGIN_LON, & 149 PIDS_ORIGIN_LAT, & 150 PIDS_ORIGIN_Z 143 151 USE inifor_io, & 144 152 ONLY: get_cosmo_grid, get_netcdf_attribute, get_netcdf_dim_vector, & … … 440 448 441 449 output_file%name = cfg%output_file 442 z0 = cfg%z0443 p0 = cfg%p0444 450 445 451 init_variables_required = .TRUE. … … 536 542 IF (TRIM(cfg%static_driver_file) .NE. '') THEN 537 543 538 origin_lon = get_netcdf_attribute(cfg%static_driver_file, 'origin_lon') 539 origin_lat = get_netcdf_attribute(cfg%static_driver_file, 'origin_lat') 544 origin_lon = get_netcdf_attribute(cfg%static_driver_file, TRIM( PIDS_ORIGIN_LON ) ) 545 origin_lat = get_netcdf_attribute(cfg%static_driver_file, TRIM( PIDS_ORIGIN_LAT ) ) 546 z0 = get_netcdf_attribute(cfg%static_driver_file, TRIM( PIDS_ORIGIN_Z ) ) 547 540 548 541 549 message = TRIM(message) // " static driver file '" & … … 556 564 557 565 CALL report('setup_parameters', message) 566 567 IF ( cfg%z0_is_set .AND. TRIM( cfg%static_driver_file ) .NE. '' ) THEN 568 569 message = 'You specified both --static-driver/-t and --elevation/-z0. ' // & 570 'Using the command line value (' // TRIM( real_to_str_f( cfg%z0 ) ) // & 571 ') instead of static driver value (' // TRIM( real_to_str_f( z0 ) ) // ').' 572 CALL warn('setup_parameters', message) 573 574 z0 = cfg%z0 575 576 END IF 577 578 p0 = cfg%p0 558 579 559 580 CALL log_runtime('time', 'read') -
palm/trunk/UTIL/inifor/src/inifor_io.f90
r3866 r3997 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Added boolean indicator for --elevation option invocation 29 ! Stop INIFOR if no command-line options given 30 ! 31 ! 32 ! 3866 2019-04-05 14:25:01Z eckhard 28 33 ! Use PALM's working precision 29 34 ! Improved coding style … … 143 148 !------------------------------------------------------------------------------! 144 149 INTERFACE get_netcdf_variable 145 146 150 MODULE PROCEDURE get_netcdf_variable_int 151 MODULE PROCEDURE get_netcdf_variable_real 147 152 END INTERFACE get_netcdf_variable 148 153 … … 411 416 INTEGER :: arg_count, i 412 417 413 cfg%p0_is_set = .FALSE.414 cfg%ug_defined_by_user = .FALSE.415 cfg%vg_defined_by_user = .FALSE.416 418 cfg%flow_prefix_is_set = .FALSE. 417 419 cfg%input_prefix_is_set = .FALSE. 420 cfg%p0_is_set = .FALSE. 418 421 cfg%radiation_prefix_is_set = .FALSE. 419 422 cfg%soil_prefix_is_set = .FALSE. 420 423 cfg%soilmoisture_prefix_is_set = .FALSE. 424 cfg%ug_defined_by_user = .FALSE. 425 cfg%vg_defined_by_user = .FALSE. 426 cfg%z0_is_set = .FALSE. 421 427 422 428 arg_count = COMMAND_ARGUMENT_COUNT() … … 448 454 449 455 CASE( '-z0', '-z', '--elevation' ) 456 cfg%z0_is_set = .TRUE. 450 457 CALL get_option_argument( i, arg ) 451 458 READ(arg, *) cfg%z0 … … 552 559 ELSE 553 560 554 message = "No arguments present, using default input and output files" 555 CALL report('parse_command_line_arguments', message) 561 CALL print_version 562 CALL report( 'parse_command_line_arguments', 'No arguments present, exiting.' ) 563 STOP 556 564 557 565 ENDIF … … 559 567 END SUBROUTINE parse_command_line_arguments 560 568 561 569 562 570 563 571 SUBROUTINE get_datetime_file_list( start_date_string, start_hour, end_hour, & -
palm/trunk/UTIL/inifor/src/inifor_types.f90
r3866 r3997 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Added boolean indicator for --elevation option invocation, sorted varibles 29 ! 30 ! 31 ! 3866 2019-04-05 14:25:01Z eckhard 28 32 ! Use PALM's working precision 29 33 ! … … 117 121 118 122 LOGICAL :: debug !< indicates whether --debug option was given 119 LOGICAL :: p0_is_set !< indicates whether p0 was set manually120 LOGICAL :: ug_defined_by_user !< indicates whether ug was set manually121 LOGICAL :: vg_defined_by_user !< indicates whether vg was set manually122 123 LOGICAL :: flow_prefix_is_set !< indicates whether the flow prefix was set manually 123 124 LOGICAL :: input_prefix_is_set !< indicates whether the input prefix was set manually 125 LOGICAL :: p0_is_set !< indicates whether p0 was set manually 124 126 LOGICAL :: radiation_prefix_is_set !< indicates whether the radiation prefix was set manually 125 127 LOGICAL :: soil_prefix_is_set !< indicates whether the soil prefix was set manually 126 128 LOGICAL :: soilmoisture_prefix_is_set !< indicates whether the soilmoisture prefix was set manually 129 LOGICAL :: ug_defined_by_user !< indicates whether ug was set manually 130 LOGICAL :: vg_defined_by_user !< indicates whether vg was set manually 131 LOGICAL :: z0_is_set !< indicates whether z0 was set manually 127 132 END TYPE inifor_config 128 133
Note: See TracChangeset
for help on using the changeset viewer.