Changeset 3700 for palm/trunk
- Timestamp:
- Jan 26, 2019 5:03:42 PM (6 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 1 deleted
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/Makefile
r3687 r3700 690 690 user_data_output_dvrp.f90 \ 691 691 user_data_output_mask.f90 \ 692 user_define_netcdf_grid.f90 \693 692 user_dvrp_coltab.f90 \ 694 693 user_flight.f90\ … … 1352 1351 spectra_mod.o \ 1353 1352 turbulence_closure_mod.o \ 1354 urban_surface_mod.o 1353 urban_surface_mod.o \ 1354 user_module.o 1355 1355 nesting_offl_mod.o: \ 1356 1356 cpulog_mod.o \ … … 1752 1752 modules.o \ 1753 1753 user_module.o 1754 user_define_netcdf_grid.o: \1755 mod_kinds.o \1756 modules.o \1757 user_module.o1758 1754 user_dvrp_coltab.o: \ 1759 1755 mod_kinds.o \ … … 1782 1778 mod_kinds.o \ 1783 1779 modules.o \ 1784 netcdf_interface_mod.o \ 1785 surface_mod.o \ 1786 user_module.o 1780 surface_mod.o 1787 1781 user_init_plant_canopy.o: \ 1788 1782 mod_kinds.o \ … … 1816 1810 mod_kinds.o \ 1817 1811 modules.o \ 1818 netcdf_interface_mod.o \1819 1812 surface_mod.o 1820 1813 user_spectra.o: \ -
palm/trunk/SOURCE/bulk_cloud_model_mod.f90
r3655 r3700 881 881 !> Initialization of the bulk cloud module 882 882 !------------------------------------------------------------------------------! 883 SUBROUTINE bcm_init !( dots_label, dots_unit, dots_num, dots_max )883 SUBROUTINE bcm_init 884 884 885 885 IMPLICIT NONE … … 888 888 INTEGER(iwp) :: j !< 889 889 INTEGER(iwp) :: k !< 890 891 ! INTEGER(iwp) :: dots_num892 ! INTEGER(iwp) :: dots_max893 ! CHARACTER (LEN=13), DIMENSION(dots_max) :: dots_unit894 ! CHARACTER (LEN=13), DIMENSION(dots_max) :: dots_label895 890 896 891 CALL location_message( 'initializing bulk cloud module', .FALSE. ) -
palm/trunk/SOURCE/check_parameters.f90
r3668 r3700 780 780 USE module_interface, & 781 781 ONLY: module_interface_check_parameters, & 782 module_interface_check_data_output_ts, & 782 783 module_interface_check_data_output_pr, & 783 784 module_interface_check_data_output … … 790 791 ONLY: dopr_unit, do2d_unit, do3d_unit, netcdf_data_format, & 791 792 netcdf_data_format_string, dots_unit, heatflux_output_unit, & 792 waterflux_output_unit, momentumflux_output_unit 793 waterflux_output_unit, momentumflux_output_unit, & 794 dots_max, dots_num, dots_label 793 795 794 796 USE particle_attributes … … 1253 1255 dots_unit(21) = waterflux_output_unit 1254 1256 dots_unit(19:20) = momentumflux_output_unit 1257 1258 ! 1259 !-- Add other module specific timeseries 1260 CALL module_interface_check_data_output_ts( dots_max, dots_num, dots_label, dots_unit ) 1261 1262 ! 1263 !-- Check if maximum number of allowed timeseries is exceeded 1264 IF ( dots_num > dots_max ) THEN 1265 WRITE( message_string, * ) 'number of time series quantities exceeds', & 1266 ' its maximum of dots_max = ', dots_max, & 1267 '&Please increase dots_max in modules.f90.' 1268 CALL message( 'init_3d_model', 'PA0194', 1, 2, 0, 6, 0 ) 1269 ENDIF 1255 1270 1256 1271 ! -
palm/trunk/SOURCE/chemistry_model_mod.f90
r3687 r3700 2642 2642 INTEGER(iwp) :: m !< 2643 2643 INTEGER(iwp) :: lpr !< running index chem spcs 2644 2645 ! REAL(wp), &2646 ! DIMENSION(dots_num_palm+1:dots_max) :: &2647 ! ts_value_l !<2648 2644 2649 2645 IF ( mode == 'profiles' ) THEN -
palm/trunk/SOURCE/init_3d_model.f90
r3685 r3700 617 617 618 618 USE netcdf_interface, & 619 ONLY: dots_max , dots_num, dots_unit, dots_label619 ONLY: dots_max 620 620 621 621 USE netcdf_data_input_mod, & … … 734 734 sums_l(nzb:nzt+1,pr_palm+max_pr_user+max_pr_cs,0:threads_per_task-1), & 735 735 sums_l_l(nzb:nzt+1,0:statistic_regions,0:threads_per_task-1), & 736 sums_wsts_bc_l(nzb:nzt+1,0:statistic_regions) , &737 736 sums_wsts_bc_l(nzb:nzt+1,0:statistic_regions) ) 737 ALLOCATE( ts_value(dots_max,0:statistic_regions) ) 738 738 ALLOCATE( ptdf_x(nxlg:nxrg), ptdf_y(nysg:nyng) ) 739 739 … … 2041 2041 rmask(:,nxlg:nxl-1,:) = 0.0_wp; rmask(:,nxr+1:nxrg,:) = 0.0_wp 2042 2042 rmask(nysg:nys-1,:,:) = 0.0_wp; rmask(nyn+1:nyng,:,:) = 0.0_wp 2043 2044 !2045 !-- Temporary solution to add LSM and radiation time series to the default2046 !-- output2047 IF ( land_surface .OR. radiation ) THEN2048 IF ( TRIM( radiation_scheme ) == 'rrtmg' ) THEN2049 dots_num = dots_num + 152050 ELSE2051 dots_num = dots_num + 112052 ENDIF2053 ENDIF2054 2043 ! 2055 2044 !-- To do: New concept for these non-topography grid points! … … 2382 2371 ENDDO 2383 2372 ENDIF 2384 !2385 !-- Check if maximum number of allowed timeseries is exceeded2386 IF ( dots_num > dots_max ) THEN2387 WRITE( message_string, * ) 'number of time series quantities exceeds', &2388 ' its maximum of dots_max = ', dots_max, &2389 '&Please increase dots_max in modules.f90.'2390 CALL message( 'init_3d_model', 'PA0194', 1, 2, 0, 6, 0 )2391 ENDIF2392 2373 2393 2374 ! -
palm/trunk/SOURCE/module_interface.f90
r3687 r3700 216 216 radiation_parin, & 217 217 radiation_check_parameters, & 218 radiation_check_data_output_ts, & 218 219 radiation_check_data_output_pr, & 219 220 radiation_check_data_output, & … … 271 272 ONLY: user_parin, & 272 273 user_check_parameters, & 274 user_check_data_output_ts, & 273 275 user_check_data_output_pr, & 274 276 user_check_data_output, & … … 307 309 module_interface_parin, & 308 310 module_interface_check_parameters, & 311 module_interface_check_data_output_ts, & 309 312 module_interface_check_data_output_pr, & 310 313 module_interface_check_data_output, & … … 334 337 MODULE PROCEDURE module_interface_check_parameters 335 338 END INTERFACE module_interface_check_parameters 339 340 INTERFACE module_interface_check_data_output_ts 341 MODULE PROCEDURE module_interface_check_data_output_ts 342 END INTERFACE module_interface_check_data_output_ts 336 343 337 344 INTERFACE module_interface_check_data_output_pr … … 481 488 ! Description: 482 489 ! ------------ 490 !> Check module-specific data output of timeseries 491 !------------------------------------------------------------------------------! 492 SUBROUTINE module_interface_check_data_output_ts( dots_max, dots_num, dots_label, dots_unit ) 493 494 495 INTEGER(iwp), INTENT(IN) :: dots_max !< variable output array index 496 INTEGER(iwp), INTENT(INOUT) :: dots_num !< variable output array index 497 CHARACTER (LEN=*), DIMENSION(dots_max), INTENT(INOUT) :: dots_label 498 CHARACTER (LEN=*), DIMENSION(dots_max), INTENT(INOUT) :: dots_unit 499 500 501 IF ( radiation ) THEN 502 CALL radiation_check_data_output_ts( dots_max, dots_num, dots_label, dots_unit ) 503 ENDIF 504 505 CALL user_check_data_output_ts( dots_max, dots_num, dots_label, dots_unit ) 506 507 508 END SUBROUTINE module_interface_check_data_output_ts 509 510 511 !------------------------------------------------------------------------------! 512 ! Description: 513 ! ------------ 483 514 !> Check module-specific data output of profiles 484 515 !------------------------------------------------------------------------------! … … 522 553 IF ( unit == 'illegal' ) THEN 523 554 unit = '' ! ToDo: Seems like a hack. Find a general soultion! 524 CALL user_check_data_output_pr( variable, var_count, unit )555 CALL user_check_data_output_pr( variable, var_count, unit, dopr_unit ) 525 556 ENDIF 526 557 -
palm/trunk/SOURCE/netcdf_interface_mod.f90
r3665 r3700 673 673 ONLY: lsm_define_netcdf_grid, nzb_soil, nzt_soil, nzs, zs 674 674 675 USE user, & 676 ONLY: user_define_netcdf_grid 677 675 678 USE ocean_mod, & 676 679 ONLY: ocean_define_netcdf_grid -
palm/trunk/SOURCE/radiation_model_mod.f90
r3685 r3700 1136 1136 END INTERFACE radiation_check_data_output 1137 1137 1138 INTERFACE radiation_check_data_output_ts 1139 MODULE PROCEDURE radiation_check_data_output_ts 1140 END INTERFACE radiation_check_data_output_ts 1141 1138 1142 INTERFACE radiation_check_data_output_pr 1139 1143 MODULE PROCEDURE radiation_check_data_output_pr … … 1241 1245 !-- Public functions / NEEDS SORTING 1242 1246 PUBLIC radiation_check_data_output, radiation_check_data_output_pr, & 1247 radiation_check_data_output_ts, & 1243 1248 radiation_check_parameters, radiation_control, & 1244 1249 radiation_header, radiation_init, radiation_parin, & … … 1448 1453 1449 1454 END SUBROUTINE radiation_check_data_output 1455 1456 1457 !------------------------------------------------------------------------------! 1458 ! Description: 1459 ! ------------ 1460 !> Set module-specific timeseries units and labels 1461 !------------------------------------------------------------------------------! 1462 SUBROUTINE radiation_check_data_output_ts( dots_max, dots_num, dots_label, dots_unit ) 1463 1464 1465 INTEGER(iwp), INTENT(IN) :: dots_max 1466 INTEGER(iwp), INTENT(INOUT) :: dots_num 1467 CHARACTER (LEN=*), DIMENSION(dots_max), INTENT(INOUT) :: dots_label 1468 CHARACTER (LEN=*), DIMENSION(dots_max), INTENT(INOUT) :: dots_unit 1469 1470 ! 1471 !-- Temporary solution to add LSM and radiation time series to the default 1472 !-- output 1473 IF ( land_surface .OR. radiation ) THEN 1474 IF ( TRIM( radiation_scheme ) == 'rrtmg' ) THEN 1475 dots_num = dots_num + 15 1476 ELSE 1477 dots_num = dots_num + 11 1478 ENDIF 1479 ENDIF 1480 1481 1482 END SUBROUTINE radiation_check_data_output_ts 1450 1483 1451 1484 !------------------------------------------------------------------------------! -
palm/trunk/SOURCE/user_init_land_surface.f90
r3655 r3700 58 58 59 59 60 USE control_parameters61 62 USE indices63 64 60 USE kinds 65 61 66 62 USE land_surface_model_mod 67 63 68 USE netcdf_interface, & 69 ONLY: dots_label, dots_unit, dots_num 70 71 USE pegrid 72 73 USE surface_mod 74 75 USE user 64 USE surface_mod 76 65 77 66 IMPLICIT NONE -
palm/trunk/SOURCE/user_module.f90
r3687 r3700 86 86 USE statistics 87 87 88 USE statistics, &89 ONLY: statistic_regions, region90 91 88 USE surface_mod 92 89 … … 94 91 95 92 INTEGER(iwp) :: dots_num_palm !< 93 INTEGER(iwp) :: dots_num_user = 0 !< 96 94 INTEGER(iwp) :: user_idummy !< 97 95 … … 117 115 user_parin, & 118 116 user_check_parameters, & 117 user_check_data_output_ts, & 119 118 user_check_data_output_pr, & 120 119 user_check_data_output, & … … 143 142 MODULE PROCEDURE user_check_parameters 144 143 END INTERFACE user_check_parameters 144 145 INTERFACE user_check_data_output_ts 146 MODULE PROCEDURE user_check_data_output_ts 147 END INTERFACE user_check_data_output_ts 145 148 146 149 INTERFACE user_check_data_output_pr … … 322 325 ! Description: 323 326 ! ------------ 327 !> Set module-specific timeseries units and labels 328 !------------------------------------------------------------------------------! 329 SUBROUTINE user_check_data_output_ts( dots_max, dots_num, dots_label, dots_unit ) 330 331 332 INTEGER(iwp), INTENT(IN) :: dots_max 333 INTEGER(iwp), INTENT(INOUT) :: dots_num 334 CHARACTER (LEN=*), DIMENSION(dots_max), INTENT(INOUT) :: dots_label 335 CHARACTER (LEN=*), DIMENSION(dots_max), INTENT(INOUT) :: dots_unit 336 337 338 !-- Sample for user-defined time series 339 !-- For each time series quantity you have to give a label and a unit, 340 !-- which will be used for the NetCDF file. They must not contain more than 341 !-- seven characters. The value of dots_num has to be increased by the 342 !-- number of new time series quantities. Its old value has to be store in 343 !-- dots_num_palm. See routine user_statistics on how to output calculate 344 !-- and output these quantities. 345 346 ! dots_num_palm = dots_num 347 348 ! dots_num = dots_num + 1 349 ! dots_num_user = dots_num_user + 1 350 ! dots_label(dots_num) = 'abs_umx' 351 ! dots_unit(dots_num) = 'm/s' 352 353 ! dots_num = dots_num + 1 354 ! dots_num_user = dots_num_user + 1 355 ! dots_label(dots_num) = 'abs_vmx' 356 ! dots_unit(dots_num) = 'm/s' 357 358 359 END SUBROUTINE user_check_data_output_ts 360 361 362 !------------------------------------------------------------------------------! 363 ! Description: 364 ! ------------ 324 365 !> Set the unit of user defined profile output quantities. For those variables 325 366 !> not recognized by the user, the parameter unit is set to "illegal", which … … 327 368 !> to a program abort. 328 369 !------------------------------------------------------------------------------! 329 SUBROUTINE user_check_data_output_pr( variable, var_count, unit ) 330 331 332 USE netcdf_interface, & 333 ONLY: dopr_unit 370 SUBROUTINE user_check_data_output_pr( variable, var_count, unit, dopr_unit ) 371 334 372 335 373 USE profil_parameter … … 338 376 CHARACTER (LEN=*) :: unit !< 339 377 CHARACTER (LEN=*) :: variable !< 378 CHARACTER (LEN=*) :: dopr_unit !< local value of dopr_unit 340 379 341 380 INTEGER(iwp) :: user_pr_index !< … … 357 396 ! user_pr_index = pr_palm + 1 358 397 ! dopr_index(var_count) = user_pr_index ! quantities' user-profile-number 359 ! dopr_unit(var_count) = 'm2/s2' ! quantity unit 398 ! dopr_unit = 'm2/s2' ! quantity unit 399 ! unit = dopr_unit 360 400 ! hom(:,2,user_pr_index,:) = SPREAD( zu, 2, statistic_regions+1 ) 361 401 ! ! grid on which the quantity is … … 413 453 414 454 415 USE netcdf_interface, &416 ONLY: dots_label, dots_unit, dots_num417 418 419 455 CHARACTER (LEN=20) :: field_char !< 420 456 ! … … 424 460 ! ALLOCATE( ustvst(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ); ustvst = 0.0_wp 425 461 426 !-- Sample for user-defined time series427 !-- For each time series quantity you have to give a label and a unit,428 !-- which will be used for the NetCDF file. They must not contain more than429 !-- seven characters. The value of dots_num has to be increased by the430 !-- number of new time series quantities. Its old value has to be store in431 !-- dots_num_palm. See routine user_statistics on how to output calculate432 !-- and output these quantities.433 ! dots_label(dots_num+1) = 'abs_umx'434 ! dots_unit(dots_num+1) = 'm/s'435 ! dots_label(dots_num+2) = 'abs_vmx'436 ! dots_unit(dots_num+2) = 'm/s'437 !438 ! dots_num_palm = dots_num439 ! dots_num = dots_num + 2440 462 441 463 END SUBROUTINE user_init 464 465 466 !------------------------------------------------------------------------------! 467 ! Description: 468 ! ------------ 469 !> Set the grids on which user-defined output quantities are defined. 470 !> Allowed values for grid_x are "x" and "xu", for grid_y "y" and "yv", and 471 !> for grid_z "zu" and "zw". 472 !------------------------------------------------------------------------------! 473 SUBROUTINE user_define_netcdf_grid( variable, found, grid_x, grid_y, grid_z ) 474 475 476 CHARACTER (LEN=*) :: grid_x !< 477 CHARACTER (LEN=*) :: grid_y !< 478 CHARACTER (LEN=*) :: grid_z !< 479 CHARACTER (LEN=*) :: variable !< 480 481 LOGICAL :: found !< 482 483 484 SELECT CASE ( TRIM( variable ) ) 485 486 ! 487 !-- Uncomment and extend the following lines, if necessary 488 ! CASE ( 'u2', 'u2_xy', 'u2_xz', 'u2_yz' ) 489 ! found = .TRUE. 490 ! grid_x = 'xu' 491 ! grid_y = 'y' 492 ! grid_z = 'zu' 493 494 ! CASE ( 'u*v*', 'u*v*_xy', 'u*v*_xz', 'u*v*_yz' ) 495 ! found = .TRUE. 496 ! grid_x = 'x' 497 ! grid_y = 'y' 498 ! grid_z = 'zu' 499 500 CASE DEFAULT 501 found = .FALSE. 502 grid_x = 'none' 503 grid_y = 'none' 504 grid_z = 'none' 505 506 END SELECT 507 508 509 END SUBROUTINE user_define_netcdf_grid 510 511 442 512 443 513 … … 913 983 914 984 915 USE netcdf_interface, &916 ONLY: dots_max917 918 919 985 CHARACTER (LEN=*) :: mode !< 920 921 986 INTEGER(iwp) :: i !< 922 987 INTEGER(iwp) :: j !< … … 925 990 INTEGER(iwp) :: tn !< 926 991 927 REAL(wp), & 928 DIMENSION(dots_num_palm+1:dots_max) :: & 929 ts_value_l !< 930 992 REAL(wp), DIMENSION(:), ALLOCATABLE :: ts_value_l !< 931 993 932 994 IF ( mode == 'profiles' ) THEN … … 962 1024 ELSEIF ( mode == 'time_series' ) THEN 963 1025 1026 1027 ! ALLOCATE ( ts_value_l(dots_num_user) ) 964 1028 ! 965 1029 !-- Sample on how to add values for the user-defined time series quantities. … … 968 1032 !-- velocities u and v. 969 1033 ! ts_value_l = 0.0_wp 970 ! ts_value_l( dots_num_palm+1) = ABS( u_max )971 ! ts_value_l( dots_num_palm+2) = ABS( v_max )1034 ! ts_value_l(1) = ABS( u_max ) 1035 ! ts_value_l(2) = ABS( v_max ) 972 1036 ! 973 1037 !-- Collect / send values to PE0, because only PE0 outputs the time series. … … 981 1045 !#if defined( __parallel ) 982 1046 ! IF ( collective_wait ) CALL MPI_BARRIER( comm2d, ierr ) 983 ! CALL MPI_ALLREDUCE( ts_value_l( dots_num_palm+1), &1047 ! CALL MPI_ALLREDUCE( ts_value_l(1), & 984 1048 ! ts_value(dots_num_palm+1,sr), & 985 ! dots_ max-dots_num_palm, MPI_REAL, MPI_SUM, comm2d, &1049 ! dots_num_user, MPI_REAL, MPI_MAX, comm2d, & 986 1050 ! ierr ) 987 1051 !#else 988 ! ts_value(dots_num_palm+1: ,sr) = ts_value_l1052 ! ts_value(dots_num_palm+1:dots_num_palm+dots_num_user,sr) = ts_value_l 989 1053 !#endif 990 1054
Note: See TracChangeset
for help on using the changeset viewer.