Changeset 4495
- Timestamp:
- Apr 13, 2020 8:11:20 PM (5 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 2 added
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/Makefile
r4493 r4495 25 25 # ----------------- 26 26 # $Id$ 27 # added routines and dependencies for restart data with MPI-IO 28 # 29 # 4493 2020-04-10 09:49:43Z pavelkrc 27 30 # cpu measures in advec_ws added 28 31 # … … 255 258 poismg_noopt_mod.f90 \ 256 259 posix_calls_from_fortran.f90 \ 260 posix_interface_mod.f90 \ 257 261 pres.f90 \ 258 262 print_1d.f90 \ … … 264 268 random_generator_parallel_mod.f90 \ 265 269 read_restart_data_mod.f90 \ 270 restart_data_mpi_io_mod.f90 \ 266 271 run_control.f90 \ 267 272 salsa_mod.f90 \ … … 385 390 netcdf_data_input_mod.o \ 386 391 palm_date_time_mod.o \ 387 radiation_model_mod.o 392 radiation_model_mod.o \ 393 restart_data_mpi_io_mod.o 388 394 bulk_cloud_model_mod.o: \ 389 395 basic_constants_and_equations_mod.o \ … … 397 403 mod_kinds.o \ 398 404 modules.o \ 405 restart_data_mpi_io_mod.o \ 399 406 surface_mod.o 400 407 buoyancy.o: \ … … 596 603 basic_constants_and_equations_mod.o \ 597 604 mod_kinds.o \ 598 599 605 surface_mod.o \ 606 pmc_interface_mod.o \ 600 607 modules.o 601 608 exchange_horiz_mod.o: \ … … 735 742 random_function_mod.o \ 736 743 random_generator_parallel_mod.o \ 744 restart_data_mpi_io_mod.o \ 737 745 surface_mod.o 738 746 land_surface_model_mod.o: \ … … 866 874 modules.o \ 867 875 pmc_interface_mod.o \ 876 restart_data_mpi_io_mod.o \ 868 877 surface_mod.o 869 878 outflow_turbulence.o: \ … … 885 894 pmc_interface_mod.o \ 886 895 pmc_particle_interface.o \ 896 restart_data_mpi_io_mod.o \ 887 897 salsa_mod.o \ 888 898 surface_layer_fluxes_mod.o \ … … 912 922 modules.o \ 913 923 netcdf_data_input_mod.o \ 924 restart_data_mpi_io_mod.o \ 914 925 surface_mod.o 915 926 pmc_particle_interface.o: \ … … 969 980 posix_calls_from_fortran.o: \ 970 981 982 posix_interface_mod.o: \ 983 mod_kinds.o 971 984 pres.o: \ 972 985 cpulog_mod.o \ … … 1029 1042 palm_date_time_mod.o \ 1030 1043 plant_canopy_model_mod.o \ 1044 restart_data_mpi_io_mod.o \ 1031 1045 surface_mod.o 1032 1046 random_function_mod.o: \ … … 1038 1052 random_generator_parallel_mod.o: \ 1039 1053 mod_kinds.o \ 1040 modules.o 1054 modules.o \ 1055 posix_interface_mod.o 1041 1056 read_restart_data_mod.o: \ 1057 bulk_cloud_model_mod.o \ 1042 1058 chem_modules.o \ 1043 1059 cpulog_mod.o \ 1044 1060 diagnostic_output_quantities_mod.o \ 1061 gust_mod.o \ 1045 1062 mod_kinds.o \ 1046 1063 model_1d_mod.o \ 1047 1064 module_interface.o \ 1048 1065 modules.o \ 1066 mod_particle_attributes.o \ 1049 1067 netcdf_interface_mod.o \ 1050 1068 palm_date_time_mod.o \ … … 1052 1070 random_function_mod.o\ 1053 1071 random_generator_parallel_mod.o \ 1072 restart_data_mpi_io_mod.o \ 1054 1073 spectra_mod.o \ 1055 1074 surface_mod.o \ 1075 user_module.o \ 1056 1076 vertical_nesting_mod.o \ 1057 1077 virtual_measurement_mod.o 1078 restart_data_mpi_io_mod.o: \ 1079 modules.o \ 1080 mod_kinds.o \ 1081 exchange_horiz_mod.o \ 1082 posix_interface_mod.o 1058 1083 run_control.o: \ 1059 1084 cpulog_mod.o \ … … 1121 1146 model_1d_mod.o \ 1122 1147 mod_kinds.o \ 1123 modules.o 1148 modules.o \ 1149 restart_data_mpi_io_mod.o 1124 1150 surface_data_output_mod.o: \ 1125 1151 mod_kinds.o \ … … 1127 1153 netcdf_data_input_mod.o \ 1128 1154 netcdf_interface_mod.o \ 1155 restart_data_mpi_io_mod.o \ 1129 1156 surface_mod.o 1130 1157 synthetic_turbulence_generator_mod.o: \ … … 1137 1164 pmc_interface_mod.o \ 1138 1165 random_generator_parallel_mod.o \ 1166 restart_data_mpi_io_mod.o \ 1139 1167 surface_mod.o 1140 1168 temperton_fft_mod.o: \ … … 1242 1270 palm_date_time_mod.o \ 1243 1271 radiation_model_mod.o \ 1272 restart_data_mpi_io_mod.o \ 1244 1273 surface_mod.o 1245 1274 user_data_output_mask.o: \ … … 1320 1349 modules.o \ 1321 1350 netcdf_interface_mod.o \ 1351 restart_data_mpi_io_mod.o \ 1322 1352 user_flight.o \ 1323 1353 user_init_flight.o … … 1342 1372 netcdf_data_input_mod.o \ 1343 1373 mod_kinds.o \ 1344 modules.o 1374 modules.o \ 1375 restart_data_mpi_io_mod.o 1345 1376 wrd_write_string.o: \ 1346 1377 mod_kinds.o 1347 1378 write_restart_data_mod.o: \ 1379 bulk_cloud_model_mod.o \ 1380 gust_mod.o \ 1348 1381 mod_kinds.o \ 1349 1382 model_1d_mod.o \ 1350 1383 module_interface.o \ 1351 1384 modules.o \ 1385 mod_particle_attributes.o \ 1352 1386 netcdf_interface_mod.o \ 1353 1387 palm_date_time_mod.o \ … … 1355 1389 random_function_mod.o \ 1356 1390 random_generator_parallel_mod.o \ 1391 restart_data_mpi_io_mod.o \ 1357 1392 spectra_mod.o \ 1358 1393 surface_mod.o \ 1394 user_module.o \ 1359 1395 vertical_nesting_mod.o \ 1360 1396 virtual_measurement_mod.o -
palm/trunk/SOURCE/biometeorology_mod.f90
r4493 r4495 27 27 ! ----------------- 28 28 ! $Id$ 29 ! restart data handling with MPI-IO added 30 ! 31 ! 4493 2020-04-10 09:49:43Z pavelkrc 29 32 ! Revise bad formatting 30 33 ! … … 144 147 dz, dz_stretch_factor, & 145 148 dz_stretch_level, humidity, initializing_actions, nz_do3d, & 146 surface_pressure149 restart_data_format_output, surface_pressure 147 150 148 151 USE grid_variables, & … … 168 171 radiation_interactions, rad_sw_in, & 169 172 rad_sw_out, rad_lw_in, rad_lw_out 173 174 USE restart_data_mpi_io_mod, & 175 ONLY: rrd_mpi_io, wrd_mpi_io 176 170 177 171 178 IMPLICIT NONE … … 352 359 !-- Read global restart parameters 353 360 INTERFACE bio_rrd_global 354 MODULE PROCEDURE bio_rrd_global 361 MODULE PROCEDURE bio_rrd_global_ftn 362 MODULE PROCEDURE bio_rrd_global_mpi 355 363 END INTERFACE bio_rrd_global 356 364 ! … … 1330 1338 ! Description: 1331 1339 ! ------------ 1332 !> Soubroutine reads global biometeorology configuration from restart file(s)1333 !------------------------------------------------------------------------------! 1334 SUBROUTINE bio_rrd_global ( found )1340 !> Read module-specific global restart data (Fortran binary format). 1341 !------------------------------------------------------------------------------! 1342 SUBROUTINE bio_rrd_global_ftn( found ) 1335 1343 1336 1344 USE control_parameters, & … … 1389 1397 1390 1398 1391 END SUBROUTINE bio_rrd_global 1399 END SUBROUTINE bio_rrd_global_ftn 1400 1401 1402 !------------------------------------------------------------------------------! 1403 ! Description: 1404 ! ------------ 1405 !> Read module-specific global restart data (MPI-IO). 1406 !------------------------------------------------------------------------------! 1407 SUBROUTINE bio_rrd_global_mpi 1408 1409 1410 ! 1411 !-- Read control flags to determine if input grids need to be averaged 1412 CALL rrd_mpi_io( 'do_average_theta', do_average_theta ) 1413 CALL rrd_mpi_io( 'do_average_q', do_average_q ) 1414 CALL rrd_mpi_io( 'do_average_u', do_average_u ) 1415 CALL rrd_mpi_io( 'do_average_v', do_average_v ) 1416 CALL rrd_mpi_io( 'do_average_w', do_average_w ) 1417 CALL rrd_mpi_io( 'do_average_mrt', do_average_mrt ) 1418 ! 1419 !-- Rad control flags to determine which thermal index needs to trigger averaging 1420 CALL rrd_mpi_io( 'average_trigger_perct', average_trigger_perct ) 1421 CALL rrd_mpi_io( 'average_trigger_utci', average_trigger_utci ) 1422 CALL rrd_mpi_io( 'average_trigger_pet', average_trigger_pet ) 1423 CALL rrd_mpi_io( 'average_trigger_mrt', average_trigger_mrt ) 1424 1425 END SUBROUTINE bio_rrd_global_mpi 1392 1426 1393 1427 … … 1442 1476 IMPLICIT NONE 1443 1477 1444 CALL wrd_write_string( 'do_average_theta' ) 1445 WRITE ( 14 ) do_average_theta 1446 CALL wrd_write_string( 'do_average_q' ) 1447 WRITE ( 14 ) do_average_q 1448 CALL wrd_write_string( 'do_average_u' ) 1449 WRITE ( 14 ) do_average_u 1450 CALL wrd_write_string( 'do_average_v' ) 1451 WRITE ( 14 ) do_average_v 1452 CALL wrd_write_string( 'do_average_w' ) 1453 WRITE ( 14 ) do_average_w 1454 CALL wrd_write_string( 'do_average_mrt' ) 1455 WRITE ( 14 ) do_average_mrt 1456 CALL wrd_write_string( 'average_trigger_perct' ) 1457 WRITE ( 14 ) average_trigger_perct 1458 CALL wrd_write_string( 'average_trigger_utci' ) 1459 WRITE ( 14 ) average_trigger_utci 1460 CALL wrd_write_string( 'average_trigger_pet' ) 1461 WRITE ( 14 ) average_trigger_pet 1462 CALL wrd_write_string( 'average_trigger_mrt' ) 1463 WRITE ( 14 ) average_trigger_mrt 1478 IF ( TRIM( restart_data_format_output ) == 'fortran_binary' ) THEN 1479 1480 CALL wrd_write_string( 'do_average_theta' ) 1481 WRITE ( 14 ) do_average_theta 1482 CALL wrd_write_string( 'do_average_q' ) 1483 WRITE ( 14 ) do_average_q 1484 CALL wrd_write_string( 'do_average_u' ) 1485 WRITE ( 14 ) do_average_u 1486 CALL wrd_write_string( 'do_average_v' ) 1487 WRITE ( 14 ) do_average_v 1488 CALL wrd_write_string( 'do_average_w' ) 1489 WRITE ( 14 ) do_average_w 1490 CALL wrd_write_string( 'do_average_mrt' ) 1491 WRITE ( 14 ) do_average_mrt 1492 CALL wrd_write_string( 'average_trigger_perct' ) 1493 WRITE ( 14 ) average_trigger_perct 1494 CALL wrd_write_string( 'average_trigger_utci' ) 1495 WRITE ( 14 ) average_trigger_utci 1496 CALL wrd_write_string( 'average_trigger_pet' ) 1497 WRITE ( 14 ) average_trigger_pet 1498 CALL wrd_write_string( 'average_trigger_mrt' ) 1499 WRITE ( 14 ) average_trigger_mrt 1500 1501 ELSEIF ( TRIM( restart_data_format_output ) == 'mpi' ) THEN 1502 1503 CALL wrd_mpi_io( 'do_average_theta', do_average_theta ) 1504 CALL wrd_mpi_io( 'do_average_q', do_average_q ) 1505 CALL wrd_mpi_io( 'do_average_u', do_average_u ) 1506 CALL wrd_mpi_io( 'do_average_v', do_average_v ) 1507 CALL wrd_mpi_io( 'do_average_w', do_average_w ) 1508 CALL wrd_mpi_io( 'do_average_mrt', do_average_mrt ) 1509 CALL wrd_mpi_io( 'average_trigger_perct', average_trigger_perct ) 1510 CALL wrd_mpi_io( 'average_trigger_utci', average_trigger_utci ) 1511 CALL wrd_mpi_io( 'average_trigger_pet', average_trigger_pet ) 1512 CALL wrd_mpi_io( 'average_trigger_mrt', average_trigger_mrt ) 1513 ENDIF 1464 1514 1465 1515 END SUBROUTINE bio_wrd_global … … 1475 1525 IMPLICIT NONE 1476 1526 1477 ! 1478 !-- First nmrtbl has to be written/read, because it is the dimension of mrt_av_grid 1479 CALL wrd_write_string( 'nmrtbl' ) 1480 WRITE ( 14 ) nmrtbl 1481 1482 IF ( ALLOCATED( mrt_av_grid ) ) THEN 1483 CALL wrd_write_string( 'mrt_av_grid' ) 1484 WRITE ( 14 ) mrt_av_grid 1485 ENDIF 1486 1527 1528 IF ( TRIM( restart_data_format_output ) == 'fortran_binary' ) THEN 1529 1530 ! 1531 !-- First nmrtbl has to be written/read, because it is the dimension of mrt_av_grid 1532 CALL wrd_write_string( 'nmrtbl' ) 1533 WRITE ( 14 ) nmrtbl 1534 1535 IF ( ALLOCATED( mrt_av_grid ) ) THEN 1536 CALL wrd_write_string( 'mrt_av_grid' ) 1537 WRITE ( 14 ) mrt_av_grid 1538 ENDIF 1539 1540 ELSEIF ( TRIM( restart_data_format_output ) == 'mpi' ) THEN 1541 1542 ! 1543 !-- TODO: the mrt_av_grid is a 1-d array and its size depends on subdomain features. This does 1544 !-- not work with the MPI-IO concept (nor with the restart I/O concept in general. 1545 !-- I am not sure, if this data needs to be written to the restart file at all (Siggi, 13.4.20) 1546 ! CALL wrd_mpi_io( 'nmrtbl', nmrtbl ) 1547 ! CALL wrd_mpi_io_..... 'mrt_av_grid' 1548 WRITE (6,*) '+++ biometeorology module does not work with MPI-IO for restart_data' 1549 STOP 1550 1551 ENDIF 1487 1552 1488 1553 END SUBROUTINE bio_wrd_local -
palm/trunk/SOURCE/bulk_cloud_model_mod.f90
r4457 r4495 25 25 ! ----------------- 26 26 ! $Id$ 27 ! restart data handling with MPI-IO added 28 ! 29 ! 4457 2020-03-11 14:20:43Z raasch 27 30 ! use statement for exchange horiz added 28 31 ! … … 140 143 dt_3d, dt_do2d_xy, intermediate_timestep_count, & 141 144 intermediate_timestep_count_max, large_scale_forcing, & 142 lsf_surf, pt_surface, r ho_surface, surface_pressure,&145 lsf_surf, pt_surface, restart_data_format_output, rho_surface, surface_pressure, & 143 146 time_do2d_xy, message_string, initializing_actions, & 144 147 ws_scheme_sca, scalar_advec, timestep_scheme, tsc, loop_optimization … … 163 166 USE pegrid, & 164 167 ONLY: threads_per_task 168 169 USE restart_data_mpi_io_mod, & 170 ONLY: rrd_mpi_io, wrd_mpi_io 165 171 166 172 USE statistics, & … … 365 371 366 372 INTERFACE bcm_rrd_global 367 MODULE PROCEDURE bcm_rrd_global 373 MODULE PROCEDURE bcm_rrd_global_ftn 374 MODULE PROCEDURE bcm_rrd_global_mpi 368 375 END INTERFACE bcm_rrd_global 369 376 … … 2684 2691 ! Description: 2685 2692 ! ------------ 2686 !> This routine reads the respective restart data for the bulk cloud module.2687 !------------------------------------------------------------------------------! 2688 SUBROUTINE bcm_rrd_global ( found )2693 !> Read module-specific global restart data (Fortran binary format). 2694 !------------------------------------------------------------------------------! 2695 SUBROUTINE bcm_rrd_global_ftn( found ) 2689 2696 2690 2697 … … 2744 2751 READ ( 13 ) curvature_solution_effects_bulk 2745 2752 2746 2747 ! CASE ( 'global_paramter' )2748 ! READ ( 13 ) global_parameter2749 ! CASE ( 'global_array' )2750 ! IF ( .NOT. ALLOCATED( global_array ) ) ALLOCATE( global_array(1:10) )2751 ! READ ( 13 ) global_array2752 2753 2753 CASE DEFAULT 2754 2754 … … 2758 2758 2759 2759 2760 END SUBROUTINE bcm_rrd_global 2760 END SUBROUTINE bcm_rrd_global_ftn 2761 2762 2763 !------------------------------------------------------------------------------! 2764 ! Description: 2765 ! ------------ 2766 !> Read module-specific global restart data (MPI-IO). 2767 !------------------------------------------------------------------------------! 2768 SUBROUTINE bcm_rrd_global_mpi 2769 2770 CALL rrd_mpi_io( 'c_sedimentation', c_sedimentation ) 2771 CALL rrd_mpi_io( 'bulk_cloud_model', bulk_cloud_model ) 2772 CALL rrd_mpi_io( 'cloud_scheme', cloud_scheme ) 2773 CALL rrd_mpi_io( 'cloud_water_sedimentation', cloud_water_sedimentation ) 2774 CALL rrd_mpi_io( 'collision_turbulence', collision_turbulence ) 2775 CALL rrd_mpi_io( 'limiter_sedimentation', limiter_sedimentation ) 2776 CALL rrd_mpi_io( 'nc_const', nc_const ) 2777 CALL rrd_mpi_io( 'precipitation', precipitation ) 2778 CALL rrd_mpi_io( 'ventilation_effect', ventilation_effect ) 2779 CALL rrd_mpi_io( 'na_init', na_init ) 2780 CALL rrd_mpi_io( 'dry_aerosol_radius', dry_aerosol_radius ) 2781 CALL rrd_mpi_io( 'sigma_bulk', sigma_bulk ) 2782 CALL rrd_mpi_io( 'aerosol_bulk', aerosol_bulk ) 2783 CALL rrd_mpi_io( 'curvature_solution_effects_bulk', curvature_solution_effects_bulk ) 2784 2785 END SUBROUTINE bcm_rrd_global_mpi 2761 2786 2762 2787 … … 2915 2940 IMPLICIT NONE 2916 2941 2917 CALL wrd_write_string( 'c_sedimentation' ) 2918 WRITE ( 14 ) c_sedimentation 2919 2920 CALL wrd_write_string( 'bulk_cloud_model' ) 2921 WRITE ( 14 ) bulk_cloud_model 2922 2923 CALL wrd_write_string( 'cloud_scheme' ) 2924 WRITE ( 14 ) cloud_scheme 2925 2926 CALL wrd_write_string( 'cloud_water_sedimentation' ) 2927 WRITE ( 14 ) cloud_water_sedimentation 2928 2929 CALL wrd_write_string( 'collision_turbulence' ) 2930 WRITE ( 14 ) collision_turbulence 2931 2932 CALL wrd_write_string( 'limiter_sedimentation' ) 2933 WRITE ( 14 ) limiter_sedimentation 2934 2935 CALL wrd_write_string( 'nc_const' ) 2936 WRITE ( 14 ) nc_const 2937 2938 CALL wrd_write_string( 'precipitation' ) 2939 WRITE ( 14 ) precipitation 2940 2941 CALL wrd_write_string( 'ventilation_effect' ) 2942 WRITE ( 14 ) ventilation_effect 2943 2944 CALL wrd_write_string( 'na_init' ) 2945 WRITE ( 14 ) na_init 2946 2947 CALL wrd_write_string( 'dry_aerosol_radius' ) 2948 WRITE ( 14 ) dry_aerosol_radius 2949 2950 CALL wrd_write_string( 'sigma_bulk' ) 2951 WRITE ( 14 ) sigma_bulk 2952 2953 CALL wrd_write_string( 'aerosol_bulk' ) 2954 WRITE ( 14 ) aerosol_bulk 2955 2956 CALL wrd_write_string( 'curvature_solution_effects_bulk' ) 2957 WRITE ( 14 ) curvature_solution_effects_bulk 2958 2959 2960 ! needs preceeding allocation if array 2961 ! CALL wrd_write_string( 'global_parameter' ) 2962 ! WRITE ( 14 ) global_parameter 2963 2964 ! IF ( ALLOCATED( inflow_damping_factor ) ) THEN 2965 ! CALL wrd_write_string( 'inflow_damping_factor' ) 2966 ! WRITE ( 14 ) inflow_damping_factor 2967 ! ENDIF 2968 2942 2943 IF ( TRIM( restart_data_format_output ) == 'fortran_binary' ) THEN 2944 2945 CALL wrd_write_string( 'c_sedimentation' ) 2946 WRITE ( 14 ) c_sedimentation 2947 2948 CALL wrd_write_string( 'bulk_cloud_model' ) 2949 WRITE ( 14 ) bulk_cloud_model 2950 2951 CALL wrd_write_string( 'cloud_scheme' ) 2952 WRITE ( 14 ) cloud_scheme 2953 2954 CALL wrd_write_string( 'cloud_water_sedimentation' ) 2955 WRITE ( 14 ) cloud_water_sedimentation 2956 2957 CALL wrd_write_string( 'collision_turbulence' ) 2958 WRITE ( 14 ) collision_turbulence 2959 2960 CALL wrd_write_string( 'limiter_sedimentation' ) 2961 WRITE ( 14 ) limiter_sedimentation 2962 2963 CALL wrd_write_string( 'nc_const' ) 2964 WRITE ( 14 ) nc_const 2965 2966 CALL wrd_write_string( 'precipitation' ) 2967 WRITE ( 14 ) precipitation 2968 2969 CALL wrd_write_string( 'ventilation_effect' ) 2970 WRITE ( 14 ) ventilation_effect 2971 2972 CALL wrd_write_string( 'na_init' ) 2973 WRITE ( 14 ) na_init 2974 2975 CALL wrd_write_string( 'dry_aerosol_radius' ) 2976 WRITE ( 14 ) dry_aerosol_radius 2977 2978 CALL wrd_write_string( 'sigma_bulk' ) 2979 WRITE ( 14 ) sigma_bulk 2980 2981 CALL wrd_write_string( 'aerosol_bulk' ) 2982 WRITE ( 14 ) aerosol_bulk 2983 2984 CALL wrd_write_string( 'curvature_solution_effects_bulk' ) 2985 WRITE ( 14 ) curvature_solution_effects_bulk 2986 2987 ELSEIF ( TRIM( restart_data_format_output ) == 'mpi' ) THEN 2988 2989 CALL wrd_mpi_io( 'c_sedimentation', c_sedimentation ) 2990 CALL wrd_mpi_io( 'bulk_cloud_model', bulk_cloud_model ) 2991 CALL wrd_mpi_io( 'cloud_scheme', cloud_scheme ) 2992 CALL wrd_mpi_io( 'cloud_water_sedimentation', cloud_water_sedimentation ) 2993 CALL wrd_mpi_io( 'collision_turbulence', collision_turbulence ) 2994 CALL wrd_mpi_io( 'limiter_sedimentation', limiter_sedimentation ) 2995 CALL wrd_mpi_io( 'nc_const', nc_const ) 2996 CALL wrd_mpi_io( 'precipitation', precipitation ) 2997 CALL wrd_mpi_io( 'ventilation_effect', ventilation_effect ) 2998 CALL wrd_mpi_io( 'na_init', na_init ) 2999 CALL wrd_mpi_io( 'dry_aerosol_radius', dry_aerosol_radius ) 3000 CALL wrd_mpi_io( 'sigma_bulk', sigma_bulk ) 3001 CALL wrd_mpi_io( 'aerosol_bulk', aerosol_bulk ) 3002 CALL wrd_mpi_io( 'curvature_solution_effects_bulk', curvature_solution_effects_bulk ) 3003 3004 ENDIF 2969 3005 2970 3006 END SUBROUTINE bcm_wrd_global … … 2981 3017 IMPLICIT NONE 2982 3018 2983 IF ( ALLOCATED( prr ) ) THEN 2984 CALL wrd_write_string( 'prr' ) 2985 WRITE ( 14 ) prr 3019 3020 IF ( TRIM( restart_data_format_output ) == 'fortran_binary' ) THEN 3021 3022 IF ( ALLOCATED( prr ) ) THEN 3023 CALL wrd_write_string( 'prr' ) 3024 WRITE ( 14 ) prr 3025 ENDIF 3026 3027 IF ( ALLOCATED( prr_av ) ) THEN 3028 CALL wrd_write_string( 'prr_av' ) 3029 WRITE ( 14 ) prr_av 3030 ENDIF 3031 3032 IF ( ALLOCATED( precipitation_amount ) ) THEN 3033 CALL wrd_write_string( 'precipitation_amount' ) 3034 WRITE ( 14 ) precipitation_amount 3035 ENDIF 3036 3037 CALL wrd_write_string( 'ql' ) 3038 WRITE ( 14 ) ql 3039 3040 IF ( ALLOCATED( ql_av ) ) THEN 3041 CALL wrd_write_string( 'ql_av' ) 3042 WRITE ( 14 ) ql_av 3043 ENDIF 3044 3045 CALL wrd_write_string( 'qc' ) 3046 WRITE ( 14 ) qc 3047 3048 IF ( ALLOCATED( qc_av ) ) THEN 3049 CALL wrd_write_string( 'qc_av' ) 3050 WRITE ( 14 ) qc_av 3051 ENDIF 3052 3053 IF ( microphysics_morrison ) THEN 3054 3055 CALL wrd_write_string( 'nc' ) 3056 WRITE ( 14 ) nc 3057 3058 IF ( ALLOCATED( nc_av ) ) THEN 3059 CALL wrd_write_string( 'nc_av' ) 3060 WRITE ( 14 ) nc_av 3061 ENDIF 3062 3063 ENDIF 3064 3065 IF ( microphysics_seifert ) THEN 3066 3067 CALL wrd_write_string( 'nr' ) 3068 WRITE ( 14 ) nr 3069 3070 IF ( ALLOCATED( nr_av ) ) THEN 3071 CALL wrd_write_string( 'nr_av' ) 3072 WRITE ( 14 ) nr_av 3073 ENDIF 3074 3075 CALL wrd_write_string( 'qr' ) 3076 WRITE ( 14 ) qr 3077 3078 IF ( ALLOCATED( qr_av ) ) THEN 3079 CALL wrd_write_string( 'qr_av' ) 3080 WRITE ( 14 ) qr_av 3081 ENDIF 3082 3083 ENDIF 3084 3085 ELSEIF ( TRIM( restart_data_format_output ) == 'mpi' ) THEN 3086 3087 IF ( ALLOCATED( prr ) ) CALL wrd_mpi_io( 'prr', prr ) 3088 IF ( ALLOCATED( prr_av ) ) CALL wrd_mpi_io( 'prr_av', prr_av ) 3089 IF ( ALLOCATED( precipitation_amount ) ) THEN 3090 CALL wrd_mpi_io( 'precipitation_amount', precipitation_amount ) 3091 ENDIF 3092 CALL wrd_mpi_io( 'ql', ql ) 3093 IF ( ALLOCATED( ql_av ) ) CALL wrd_mpi_io( 'ql_av', ql_av ) 3094 CALL wrd_mpi_io( 'qc', qc ) 3095 IF ( ALLOCATED( qc_av ) ) CALL wrd_mpi_io( 'qc_av', qc_av ) 3096 IF ( microphysics_morrison ) THEN 3097 CALL wrd_mpi_io( 'nc', nc ) 3098 IF ( ALLOCATED( nc_av ) ) CALL wrd_mpi_io( 'nc_av', nc_av ) 3099 ENDIF 3100 IF ( microphysics_seifert ) THEN 3101 CALL wrd_mpi_io( 'nr', nr ) 3102 IF ( ALLOCATED( nr_av ) ) CALL wrd_mpi_io( 'nr_av', nr_av ) 3103 CALL wrd_mpi_io( 'qr', qr ) 3104 IF ( ALLOCATED( qr_av ) ) CALL wrd_mpi_io( 'qr_av', qr_av ) 3105 ENDIF 3106 2986 3107 ENDIF 2987 2988 IF ( ALLOCATED( prr_av ) ) THEN2989 CALL wrd_write_string( 'prr_av' )2990 WRITE ( 14 ) prr_av2991 ENDIF2992 2993 IF ( ALLOCATED( precipitation_amount ) ) THEN2994 CALL wrd_write_string( 'precipitation_amount' )2995 WRITE ( 14 ) precipitation_amount2996 ENDIF2997 2998 CALL wrd_write_string( 'ql' )2999 WRITE ( 14 ) ql3000 3001 IF ( ALLOCATED( ql_av ) ) THEN3002 CALL wrd_write_string( 'ql_av' )3003 WRITE ( 14 ) ql_av3004 ENDIF3005 3006 CALL wrd_write_string( 'qc' )3007 WRITE ( 14 ) qc3008 3009 IF ( ALLOCATED( qc_av ) ) THEN3010 CALL wrd_write_string( 'qc_av' )3011 WRITE ( 14 ) qc_av3012 ENDIF3013 3014 IF ( microphysics_morrison ) THEN3015 3016 CALL wrd_write_string( 'nc' )3017 WRITE ( 14 ) nc3018 3019 IF ( ALLOCATED( nc_av ) ) THEN3020 CALL wrd_write_string( 'nc_av' )3021 WRITE ( 14 ) nc_av3022 ENDIF3023 3024 ENDIF3025 3026 IF ( microphysics_seifert ) THEN3027 3028 CALL wrd_write_string( 'nr' )3029 WRITE ( 14 ) nr3030 3031 IF ( ALLOCATED( nr_av ) ) THEN3032 CALL wrd_write_string( 'nr_av' )3033 WRITE ( 14 ) nr_av3034 ENDIF3035 3036 CALL wrd_write_string( 'qr' )3037 WRITE ( 14 ) qr3038 3039 IF ( ALLOCATED( qr_av ) ) THEN3040 CALL wrd_write_string( 'qr_av' )3041 WRITE ( 14 ) qr_av3042 ENDIF3043 3044 ENDIF3045 3046 3108 3047 3109 END SUBROUTINE bcm_wrd_local -
palm/trunk/SOURCE/check_parameters.f90
r4493 r4495 25 25 ! ----------------- 26 26 ! $Id$ 27 ! check new restart_data_format parameters 28 ! 29 ! 4493 2020-04-10 09:49:43Z pavelkrc 27 30 ! Kolmogorov length scale eta added to profile output 28 31 ! … … 245 248 CALL message( 'check_parameters', 'PA0476', 1, 2, 0, 6, 0 ) 246 249 ENDIF 250 251 ! 252 !-- Check and set the restart data format variables 253 IF ( TRIM( restart_data_format ) /= 'fortran_binary' .AND. & 254 TRIM( restart_data_format ) /= 'mpi' ) THEN 255 message_string = 'illegal restart data format "' // TRIM( restart_data_format ) // '"' 256 CALL message( 'check_parameters', 'PA....', 1, 2, 0, 6, 0 ) 257 ENDIF 258 259 IF ( TRIM( restart_data_format_input ) == 'undefined' ) THEN 260 restart_data_format_input = restart_data_format 261 ENDIF 262 IF ( TRIM( restart_data_format_output ) == 'undefined' ) THEN 263 restart_data_format_output = restart_data_format 264 ENDIF 265 266 IF ( TRIM( restart_data_format_input ) /= 'fortran_binary' .AND. & 267 TRIM( restart_data_format_input ) /= 'mpi' ) THEN 268 message_string = 'illegal restart data input format "' // & 269 TRIM( restart_data_format_input ) // '"' 270 CALL message( 'check_parameters', 'PA....', 1, 2, 0, 6, 0 ) 271 ENDIF 272 IF ( TRIM( restart_data_format_output ) /= 'fortran_binary' .AND. & 273 TRIM( restart_data_format_output ) /= 'mpi' ) THEN 274 message_string = 'illegal restart data output format "' // & 275 TRIM( restart_data_format_output ) // '"' 276 CALL message( 'check_parameters', 'PA....', 1, 2, 0, 6, 0 ) 277 ENDIF 278 279 ! 280 !-- Set flag for including total domain boundaries in the restart data (MPI-IO) in case of 281 !-- non-cyclic boundary conditions 282 include_total_domain_boundaries = .NOT. ( bc_lr_cyc .AND. bc_ns_cyc ) 247 283 248 284 ! -
palm/trunk/SOURCE/dynamics_mod.f90
r4360 r4495 25 25 ! ----------------- 26 26 ! $Id$ 27 ! restart data handling with MPI-IO added 28 ! 29 ! 4360 2020-01-07 11:25:50Z suehring 27 30 ! Bugfix for last commit. 28 31 ! … … 129 132 ONLY : nesting_mode 130 133 134 ! USE restart_data_mpi_io_mod, & 135 ! ONLY: 136 131 137 USE surface_mod, & 132 138 ONLY : bc_h … … 264 270 265 271 INTERFACE dynamics_rrd_global 266 MODULE PROCEDURE dynamics_rrd_global 272 MODULE PROCEDURE dynamics_rrd_global_ftn 273 MODULE PROCEDURE dynamics_rrd_global_mpi 267 274 END INTERFACE dynamics_rrd_global 268 275 … … 1817 1824 ! Description: 1818 1825 ! ------------ 1819 !> Read module-specific global restart data .1820 !--------------------------------------------------------------------------------------------------! 1821 SUBROUTINE dynamics_rrd_global ( found )1826 !> Read module-specific global restart data (Fortran binary format). 1827 !--------------------------------------------------------------------------------------------------! 1828 SUBROUTINE dynamics_rrd_global_ftn( found ) 1822 1829 1823 1830 … … 1840 1847 1841 1848 1842 END SUBROUTINE dynamics_rrd_global 1849 END SUBROUTINE dynamics_rrd_global_ftn 1850 1851 1852 !--------------------------------------------------------------------------------------------------! 1853 ! Description: 1854 ! ------------ 1855 !> Read module-specific global restart data (MPI-IO). 1856 !--------------------------------------------------------------------------------------------------! 1857 SUBROUTINE dynamics_rrd_global_mpi 1858 1859 1860 ! CALL rrd_mpi_io( 'global_parameter', global_parameter ) 1861 CONTINUE 1862 1863 END SUBROUTINE dynamics_rrd_global_mpi 1843 1864 1844 1865 -
palm/trunk/SOURCE/gust_mod.f90
r4360 r4495 25 25 ! ----------------- 26 26 ! $Id$ 27 ! restart data handling with MPI-IO added 28 ! 29 ! 4360 2020-01-07 11:25:50Z suehring 27 30 ! CASE statement for dummy variable u2_av in gust_rrd_local changed to avoid 28 31 ! unintended interdependencies with user-defined variables … … 61 64 MODULE gust_mod 62 65 66 USE control_parameters, & 67 ONLY: restart_data_format_output 68 63 69 USE indices, & 64 70 ONLY: nxl, nxlg, nxr, nxrg, nys, nysg, nyn, nyng, nzb, nzt 65 71 66 72 USE kinds 73 74 ! USE restart_data_mpi_io_mod, & 75 ! ONLY: 67 76 68 77 IMPLICIT NONE … … 168 177 169 178 INTERFACE gust_rrd_global 170 MODULE PROCEDURE gust_rrd_global 179 MODULE PROCEDURE gust_rrd_global_ftn 180 MODULE PROCEDURE gust_rrd_global_mpi 171 181 END INTERFACE gust_rrd_global 172 182 … … 559 569 ! Description: 560 570 ! ------------ 561 !> This routine reads the respective restart data for the gust module.562 !------------------------------------------------------------------------------! 563 SUBROUTINE gust_rrd_global ( found )571 !> Read module-specific global restart data (Fortran binary format). 572 !------------------------------------------------------------------------------! 573 SUBROUTINE gust_rrd_global_ftn( found ) 564 574 565 575 … … 588 598 589 599 590 END SUBROUTINE gust_rrd_global 600 END SUBROUTINE gust_rrd_global_ftn 601 602 603 !------------------------------------------------------------------------------! 604 ! Description: 605 ! ------------ 606 !> Read module-specific global restart data (MPI-IO). 607 !------------------------------------------------------------------------------! 608 SUBROUTINE gust_rrd_global_mpi 609 610 611 ! CALL rrd_mpi_io( 'global_parameter', global_parameter ) 612 ! READ ( 13 ) global_parameter 613 614 END SUBROUTINE gust_rrd_global_mpi 591 615 592 616 … … 675 699 IMPLICIT NONE 676 700 677 ! needs preceeding allocation if array 678 ! CALL wrd_write_string( 'global_parameter' ) 679 ! WRITE ( 14 ) global_parameter 680 681 ! IF ( ALLOCATED( inflow_damping_factor ) ) THEN 682 ! CALL wrd_write_string( 'inflow_damping_factor' ) 683 ! WRITE ( 14 ) inflow_damping_factor 684 ! ENDIF 685 701 702 IF ( TRIM( restart_data_format_output ) == 'fortran_binary' ) THEN 703 704 ! CALL wrd_write_string( 'global_parameter' ) 705 ! WRITE ( 14 ) global_parameter 706 707 ! IF ( ALLOCATED( inflow_damping_factor ) ) THEN 708 ! CALL wrd_write_string( 'inflow_damping_factor' ) 709 ! WRITE ( 14 ) inflow_damping_factor 710 ! ENDIF 711 712 ELSEIF ( TRIM( restart_data_format_output ) == 'mpi' ) THEN 713 714 ! CALL wrd_mpi_io( 'global_parameter', global_parameter ) 715 ! IF ( ALLOCATED( inflow_damping_factor ) ) THEN 716 ! CALL wrd_mpi_io_global_array( 'inflow_damping_factor', inflow_damping_factor ) 717 ! ENDIF 718 719 ENDIF 686 720 687 721 END SUBROUTINE gust_wrd_global … … 699 733 700 734 701 ! needs preceeding allocation because sould be array 735 IF ( TRIM( restart_data_format_output ) == 'fortran_binary' ) THEN 736 702 737 ! IF ( ALLOCATED( u2_av ) ) THEN 703 738 ! CALL wrd_write_string( 'u2_av' ) … … 705 740 ! ENDIF 706 741 742 ELSEIF ( TRIM( restart_data_format_output ) == 'mpi' ) THEN 743 744 ! IF ( ALLOCATED( u2_av ) ) CALL wrd_mpi_io( 'u2_av', u2_av ) 745 746 ENDIF 707 747 708 748 END SUBROUTINE gust_wrd_local -
palm/trunk/SOURCE/lagrangian_particle_model_mod.f90
r4471 r4495 25 25 ! ----------------- 26 26 ! $Id$ 27 ! restart data handling with MPI-IO added 28 ! 29 ! 4471 2020-03-24 12:08:06Z schwenkel 27 30 ! Bugfix in lpm_droplet_interactions_ptq 28 31 ! … … 164 167 intermediate_timestep_count, intermediate_timestep_count_max, & 165 168 message_string, molecular_viscosity, ocean_mode, & 166 particle_maximum_age, iran, &169 particle_maximum_age, iran, restart_data_format_output, & 167 170 simulated_time, topography, dopts_time_count, & 168 171 time_since_reference_point, rho_surface, u_gtrans, v_gtrans, & … … 205 208 USE random_function_mod, & 206 209 ONLY: random_function 210 211 USE restart_data_mpi_io_mod, & 212 ONLY: rrd_mpi_io, wrd_mpi_io 207 213 208 214 USE statistics, & … … 402 408 403 409 INTERFACE lpm_rrd_global 404 MODULE PROCEDURE lpm_rrd_global 410 MODULE PROCEDURE lpm_rrd_global_ftn 411 MODULE PROCEDURE lpm_rrd_global_mpi 405 412 END INTERFACE lpm_rrd_global 406 413 … … 3175 3182 SUBROUTINE lpm_wrd_global 3176 3183 3177 CALL wrd_write_string( 'curvature_solution_effects' ) 3178 WRITE ( 14 ) curvature_solution_effects 3179 3180 CALL wrd_write_string( 'interpolation_simple_corrector' ) 3181 WRITE ( 14 ) interpolation_simple_corrector 3182 3183 CALL wrd_write_string( 'interpolation_simple_predictor' ) 3184 WRITE ( 14 ) interpolation_simple_predictor 3185 3186 CALL wrd_write_string( 'interpolation_trilinear' ) 3187 WRITE ( 14 ) interpolation_trilinear 3184 IF ( TRIM( restart_data_format_output ) == 'fortran_binary' ) THEN 3185 3186 CALL wrd_write_string( 'curvature_solution_effects' ) 3187 WRITE ( 14 ) curvature_solution_effects 3188 3189 CALL wrd_write_string( 'interpolation_simple_corrector' ) 3190 WRITE ( 14 ) interpolation_simple_corrector 3191 3192 CALL wrd_write_string( 'interpolation_simple_predictor' ) 3193 WRITE ( 14 ) interpolation_simple_predictor 3194 3195 CALL wrd_write_string( 'interpolation_trilinear' ) 3196 WRITE ( 14 ) interpolation_trilinear 3197 3198 ELSEIF ( TRIM( restart_data_format_output ) == 'mpi' ) THEN 3199 3200 CALL wrd_mpi_io( 'curvature_solution_effects', curvature_solution_effects ) 3201 CALL wrd_mpi_io( 'interpolation_simple_corrector', interpolation_simple_corrector ) 3202 CALL wrd_mpi_io( 'interpolation_simple_predictor', interpolation_simple_predictor ) 3203 CALL wrd_mpi_io( 'interpolation_trilinear', interpolation_trilinear ) 3204 3205 ENDIF 3188 3206 3189 3207 END SUBROUTINE lpm_wrd_global … … 3193 3211 ! Description: 3194 3212 ! ------------ 3195 !> This routine writes the respective restart data for the lpm.3213 !> Read module-specific global restart data (Fortran binary format). 3196 3214 !------------------------------------------------------------------------------! 3197 SUBROUTINE lpm_rrd_global ( found )3215 SUBROUTINE lpm_rrd_global_ftn( found ) 3198 3216 3199 3217 USE control_parameters, & … … 3218 3236 READ ( 13 ) interpolation_trilinear 3219 3237 3220 ! CASE ( 'global_paramter' )3221 ! READ ( 13 ) global_parameter3222 ! CASE ( 'global_array' )3223 ! IF ( .NOT. ALLOCATED( global_array ) ) ALLOCATE( global_array(1:10) )3224 ! READ ( 13 ) global_array3225 3226 3238 CASE DEFAULT 3227 3239 … … 3230 3242 END SELECT 3231 3243 3232 END SUBROUTINE lpm_rrd_global 3244 END SUBROUTINE lpm_rrd_global_ftn 3245 3246 3247 !------------------------------------------------------------------------------! 3248 ! Description: 3249 ! ------------ 3250 !> Read module-specific global restart data (MPI-IO). 3251 !------------------------------------------------------------------------------! 3252 SUBROUTINE lpm_rrd_global_mpi 3253 3254 CALL rrd_mpi_io( 'curvature_solution_effects', curvature_solution_effects ) 3255 CALL rrd_mpi_io( 'interpolation_simple_corrector', interpolation_simple_corrector ) 3256 CALL rrd_mpi_io( 'interpolation_simple_predictor', interpolation_simple_predictor ) 3257 CALL rrd_mpi_io( 'interpolation_trilinear', interpolation_trilinear ) 3258 3259 END SUBROUTINE lpm_rrd_global_mpi 3233 3260 3234 3261 -
palm/trunk/SOURCE/land_surface_model_mod.f90
r4450 r4495 25 25 ! ----------------- 26 26 ! $Id$ 27 ! restart data handling with MPI-IO added 28 ! 29 ! 4450 2020-03-09 19:12:57Z suehring 27 30 ! Missing from_file check 28 31 ! … … 234 237 end_time, humidity, intermediate_timestep_count, & 235 238 initializing_actions, intermediate_timestep_count_max, & 236 land_surface, max_masks, pt_surface, 239 land_surface, max_masks, pt_surface, restart_data_format_output, & 237 240 rho_surface, spinup, spinup_pt_mean, spinup_time, & 238 241 surface_pressure, timestep_scheme, tsc, & … … 286 289 ONLY: albedo, albedo_type, emissivity, force_radiation_call, & 287 290 radiation, radiation_scheme, unscheduled_radiation_calls 291 292 USE restart_data_mpi_io_mod, & 293 ONLY: rd_mpi_io_surface_filetypes, wrd_mpi_io, wrd_mpi_io_surface 288 294 289 295 USE statistics, & … … 6490 6496 6491 6497 CHARACTER (LEN=1) :: dum !< dummy to create correct string for creating variable string 6498 6492 6499 INTEGER(iwp) :: l !< index variable for surface orientation 6493 6500 6494 CALL wrd_write_string( 'ns_h_on_file_lsm' ) 6495 WRITE ( 14 ) surf_lsm_h%ns 6496 6497 CALL wrd_write_string( 'ns_v_on_file_lsm' ) 6498 WRITE ( 14 ) surf_lsm_v(0:3)%ns 6499 6500 6501 IF ( ALLOCATED( c_liq_av ) ) THEN 6502 CALL wrd_write_string( 'c_liq_av' ) 6503 WRITE ( 14 ) c_liq_av 6501 INTEGER(iwp),DIMENSION(nys:nyn,nxl:nxr) :: global_start_index !< index for surface data (MPI-IO) 6502 6503 LOGICAL :: surface_data_to_write !< switch for MPI-I/O if PE has surface data to write 6504 6505 6506 IF ( TRIM( restart_data_format_output ) == 'fortran_binary' ) THEN 6507 6508 CALL wrd_write_string( 'ns_h_on_file_lsm' ) 6509 WRITE ( 14 ) surf_lsm_h%ns 6510 6511 CALL wrd_write_string( 'ns_v_on_file_lsm' ) 6512 WRITE ( 14 ) surf_lsm_v(0:3)%ns 6513 6514 6515 IF ( ALLOCATED( c_liq_av ) ) THEN 6516 CALL wrd_write_string( 'c_liq_av' ) 6517 WRITE ( 14 ) c_liq_av 6518 ENDIF 6519 6520 IF ( ALLOCATED( c_soil_av ) ) THEN 6521 CALL wrd_write_string( 'c_soil_av' ) 6522 WRITE ( 14 ) c_soil_av 6523 ENDIF 6524 6525 IF ( ALLOCATED( c_veg_av ) ) THEN 6526 CALL wrd_write_string( 'c_veg_av' ) 6527 WRITE ( 14 ) c_veg_av 6528 ENDIF 6529 6530 IF ( ALLOCATED( lai_av ) ) THEN 6531 CALL wrd_write_string( 'lai_av' ) 6532 WRITE ( 14 ) lai_av 6533 ENDIF 6534 6535 IF ( ALLOCATED( m_liq_av ) ) THEN 6536 CALL wrd_write_string( 'm_liq_av' ) 6537 WRITE ( 14 ) m_liq_av 6538 ENDIF 6539 6540 IF ( ALLOCATED( m_soil_av ) ) THEN 6541 CALL wrd_write_string( 'm_soil_av' ) 6542 WRITE ( 14 ) m_soil_av 6543 ENDIF 6544 6545 IF ( ALLOCATED( qsws_liq_av ) ) THEN 6546 CALL wrd_write_string( 'qsws_liq_av' ) 6547 WRITE ( 14 ) qsws_liq_av 6548 ENDIF 6549 6550 IF ( ALLOCATED( qsws_soil_av ) ) THEN 6551 CALL wrd_write_string( 'qsws_soil_av' ) 6552 WRITE ( 14 ) qsws_soil_av 6553 ENDIF 6554 6555 IF ( ALLOCATED( qsws_veg_av ) ) THEN 6556 CALL wrd_write_string( 'qsws_veg_av' ) 6557 WRITE ( 14 ) qsws_veg_av 6558 ENDIF 6559 6560 IF ( ALLOCATED( t_soil_av ) ) THEN 6561 CALL wrd_write_string( 't_soil_av' ) 6562 WRITE ( 14 ) t_soil_av 6563 ENDIF 6564 6565 CALL wrd_write_string( 'lsm_start_index_h' ) 6566 WRITE ( 14 ) surf_lsm_h%start_index 6567 6568 CALL wrd_write_string( 'lsm_end_index_h' ) 6569 WRITE ( 14 ) surf_lsm_h%end_index 6570 6571 CALL wrd_write_string( 't_soil_h' ) 6572 WRITE ( 14 ) t_soil_h%var_2d 6573 6574 DO l = 0, 3 6575 6576 CALL wrd_write_string( 'lsm_start_index_v' ) 6577 WRITE ( 14 ) surf_lsm_v(l)%start_index 6578 6579 CALL wrd_write_string( 'lsm_end_index_v' ) 6580 WRITE ( 14 ) surf_lsm_v(l)%end_index 6581 6582 WRITE( dum, '(I1)') l 6583 CALL wrd_write_string( 't_soil_v(' // dum // ')' ) 6584 WRITE ( 14 ) t_soil_v(l)%var_2d 6585 6586 ENDDO 6587 6588 CALL wrd_write_string( 'lsm_start_index_h' ) 6589 WRITE ( 14 ) surf_lsm_h%start_index 6590 6591 CALL wrd_write_string( 'lsm_end_index_h' ) 6592 WRITE ( 14 ) surf_lsm_h%end_index 6593 6594 CALL wrd_write_string( 'm_soil_h' ) 6595 WRITE ( 14 ) m_soil_h%var_2d 6596 6597 DO l = 0, 3 6598 6599 CALL wrd_write_string( 'lsm_start_index_v' ) 6600 WRITE ( 14 ) surf_lsm_v(l)%start_index 6601 6602 CALL wrd_write_string( 'lsm_end_index_v' ) 6603 WRITE ( 14 ) surf_lsm_v(l)%end_index 6604 6605 WRITE( dum, '(I1)') l 6606 CALL wrd_write_string( 'm_soil_v(' // dum // ')' ) 6607 WRITE ( 14 ) m_soil_v(l)%var_2d 6608 6609 ENDDO 6610 6611 CALL wrd_write_string( 'lsm_start_index_h' ) 6612 WRITE ( 14 ) surf_lsm_h%start_index 6613 6614 CALL wrd_write_string( 'lsm_end_index_h' ) 6615 WRITE ( 14 ) surf_lsm_h%end_index 6616 6617 CALL wrd_write_string( 'm_liq_h' ) 6618 WRITE ( 14 ) m_liq_h%var_1d 6619 6620 DO l = 0, 3 6621 6622 CALL wrd_write_string( 'lsm_start_index_v' ) 6623 WRITE ( 14 ) surf_lsm_v(l)%start_index 6624 6625 CALL wrd_write_string( 'lsm_end_index_v' ) 6626 WRITE ( 14 ) surf_lsm_v(l)%end_index 6627 6628 WRITE( dum, '(I1)') l 6629 CALL wrd_write_string( 'm_liq_v(' // dum // ')' ) 6630 WRITE ( 14 ) m_liq_v(l)%var_1d 6631 6632 ENDDO 6633 6634 CALL wrd_write_string( 'lsm_start_index_h' ) 6635 WRITE ( 14 ) surf_lsm_h%start_index 6636 6637 CALL wrd_write_string( 'lsm_end_index_h' ) 6638 WRITE ( 14 ) surf_lsm_h%end_index 6639 6640 CALL wrd_write_string( 't_surface_h' ) 6641 WRITE ( 14 ) t_surface_h%var_1d 6642 6643 DO l = 0, 3 6644 6645 CALL wrd_write_string( 'lsm_start_index_v' ) 6646 WRITE ( 14 ) surf_lsm_v(l)%start_index 6647 6648 CALL wrd_write_string( 'lsm_end_index_v' ) 6649 WRITE ( 14 ) surf_lsm_v(l)%end_index 6650 6651 WRITE( dum, '(I1)') l 6652 CALL wrd_write_string( 't_surface_v(' // dum // ')' ) 6653 WRITE ( 14 ) t_surface_v(l)%var_1d 6654 6655 ENDDO 6656 6657 ELSEIF ( TRIM( restart_data_format_output ) == 'fortran_binary' ) THEN 6658 6659 IF ( ALLOCATED( c_liq_av ) ) CALL wrd_mpi_io( 'c_liq_av', c_liq_av ) 6660 IF ( ALLOCATED( c_soil_av ) ) CALL wrd_mpi_io( 'c_soil_av', c_soil_av ) 6661 IF ( ALLOCATED( c_veg_av ) ) CALL wrd_mpi_io( 'c_veg_av', c_veg_av ) 6662 IF ( ALLOCATED( lai_av ) ) CALL wrd_mpi_io( 'lai_av', lai_av ) 6663 IF ( ALLOCATED( m_liq_av ) ) CALL wrd_mpi_io( 'm_liq_av', m_liq_av ) 6664 IF ( ALLOCATED( m_soil_av ) ) CALL wrd_mpi_io( 'm_soil_av', m_soil_av, nzb_soil, nzt_soil ) 6665 IF ( ALLOCATED( qsws_liq_av ) ) CALL wrd_mpi_io( 'qsws_liq_av', qsws_liq_av ) 6666 IF ( ALLOCATED( qsws_soil_av ) ) CALL wrd_mpi_io( 'qsws_soil_av', qsws_soil_av ) 6667 IF ( ALLOCATED( qsws_veg_av ) ) CALL wrd_mpi_io( 'qsws_veg_av', qsws_veg_av ) 6668 IF ( ALLOCATED( t_soil_av ) ) CALL wrd_mpi_io( 't_soil_av', t_soil_av, nzb_soil, nzt_soil ) 6669 6670 CALL rd_mpi_io_surface_filetypes( surf_lsm_h%start_index, surf_lsm_h%end_index, & 6671 surface_data_to_write, global_start_index ) 6672 6673 CALL wrd_mpi_io( 'lsm_start_index_h', surf_lsm_h%start_index ) 6674 CALL wrd_mpi_io( 'lsm_end_index_h', surf_lsm_h%end_index ) 6675 CALL wrd_mpi_io( 'lsm_global_start_index_h', global_start_index ) 6676 CALL wrd_mpi_io_surface ( 't_soil_h', t_soil_h%var_2d ) 6677 CALL wrd_mpi_io_surface( 'm_soil_h', m_soil_h%var_2d ) 6678 CALL wrd_mpi_io_surface( 'm_liq_h', m_liq_h%var_1d ) 6679 CALL wrd_mpi_io_surface( 't_surface_h', t_surface_h%var_1d ) 6680 6681 DO l = 0, 3 6682 6683 WRITE( dum, '(I1)' ) l 6684 6685 CALL rd_mpi_io_surface_filetypes ( surf_lsm_v(l)%start_index, surf_lsm_v(l)%end_index, & 6686 surface_data_to_write, global_start_index ) 6687 6688 CALL wrd_mpi_io( 'lsm_start_index_v_' //dum, surf_lsm_v(l)%start_index ) 6689 CALL wrd_mpi_io( 'lsm_end_index_v_' //dum, surf_lsm_v(l)%end_index ) 6690 CALL wrd_mpi_io( 'lsm_global_start_index_v_' //dum , global_start_index ) 6691 6692 IF ( .NOT. surface_data_to_write ) CYCLE 6693 6694 CALL wrd_mpi_io_surface( 't_soil_v(' // dum // ')', t_soil_v(l)%var_2d ) 6695 CALL wrd_mpi_io_surface( 'm_soil_v(' // dum // ')', m_soil_v(l)%var_2d ) 6696 CALL wrd_mpi_io_surface( 'm_liq_v(' // dum // ')', m_liq_v(l)%var_1d ) 6697 CALL wrd_mpi_io_surface( 't_surface_v(' // dum // ')', t_surface_v(l)%var_1d ) 6698 6699 ENDDO 6700 6504 6701 ENDIF 6505 6506 IF ( ALLOCATED( c_soil_av ) ) THEN6507 CALL wrd_write_string( 'c_soil_av' )6508 WRITE ( 14 ) c_soil_av6509 ENDIF6510 6511 IF ( ALLOCATED( c_veg_av ) ) THEN6512 CALL wrd_write_string( 'c_veg_av' )6513 WRITE ( 14 ) c_veg_av6514 ENDIF6515 6516 IF ( ALLOCATED( lai_av ) ) THEN6517 CALL wrd_write_string( 'lai_av' )6518 WRITE ( 14 ) lai_av6519 ENDIF6520 6521 IF ( ALLOCATED( m_liq_av ) ) THEN6522 CALL wrd_write_string( 'm_liq_av' )6523 WRITE ( 14 ) m_liq_av6524 ENDIF6525 6526 IF ( ALLOCATED( m_soil_av ) ) THEN6527 CALL wrd_write_string( 'm_soil_av' )6528 WRITE ( 14 ) m_soil_av6529 ENDIF6530 6531 IF ( ALLOCATED( qsws_liq_av ) ) THEN6532 CALL wrd_write_string( 'qsws_liq_av' )6533 WRITE ( 14 ) qsws_liq_av6534 ENDIF6535 6536 IF ( ALLOCATED( qsws_soil_av ) ) THEN6537 CALL wrd_write_string( 'qsws_soil_av' )6538 WRITE ( 14 ) qsws_soil_av6539 ENDIF6540 6541 IF ( ALLOCATED( qsws_veg_av ) ) THEN6542 CALL wrd_write_string( 'qsws_veg_av' )6543 WRITE ( 14 ) qsws_veg_av6544 ENDIF6545 6546 IF ( ALLOCATED( t_soil_av ) ) THEN6547 CALL wrd_write_string( 't_soil_av' )6548 WRITE ( 14 ) t_soil_av6549 ENDIF6550 6551 CALL wrd_write_string( 'lsm_start_index_h' )6552 WRITE ( 14 ) surf_lsm_h%start_index6553 6554 CALL wrd_write_string( 'lsm_end_index_h' )6555 WRITE ( 14 ) surf_lsm_h%end_index6556 6557 CALL wrd_write_string( 't_soil_h' )6558 WRITE ( 14 ) t_soil_h%var_2d6559 6560 6561 6562 DO l = 0, 36563 6564 CALL wrd_write_string( 'lsm_start_index_v' )6565 WRITE ( 14 ) surf_lsm_v(l)%start_index6566 6567 CALL wrd_write_string( 'lsm_end_index_v' )6568 WRITE ( 14 ) surf_lsm_v(l)%end_index6569 6570 WRITE( dum, '(I1)') l6571 6572 CALL wrd_write_string( 't_soil_v(' // dum // ')' )6573 WRITE ( 14 ) t_soil_v(l)%var_2d6574 6575 ENDDO6576 6577 CALL wrd_write_string( 'lsm_start_index_h' )6578 WRITE ( 14 ) surf_lsm_h%start_index6579 6580 CALL wrd_write_string( 'lsm_end_index_h' )6581 WRITE ( 14 ) surf_lsm_h%end_index6582 6583 CALL wrd_write_string( 'm_soil_h' )6584 WRITE ( 14 ) m_soil_h%var_2d6585 6586 DO l = 0, 36587 6588 CALL wrd_write_string( 'lsm_start_index_v' )6589 WRITE ( 14 ) surf_lsm_v(l)%start_index6590 6591 CALL wrd_write_string( 'lsm_end_index_v' )6592 WRITE ( 14 ) surf_lsm_v(l)%end_index6593 6594 WRITE( dum, '(I1)') l6595 6596 CALL wrd_write_string( 'm_soil_v(' // dum // ')' )6597 WRITE ( 14 ) m_soil_v(l)%var_2d6598 6599 ENDDO6600 6601 CALL wrd_write_string( 'lsm_start_index_h' )6602 WRITE ( 14 ) surf_lsm_h%start_index6603 6604 CALL wrd_write_string( 'lsm_end_index_h' )6605 WRITE ( 14 ) surf_lsm_h%end_index6606 6607 CALL wrd_write_string( 'm_liq_h' )6608 WRITE ( 14 ) m_liq_h%var_1d6609 6610 DO l = 0, 36611 6612 CALL wrd_write_string( 'lsm_start_index_v' )6613 WRITE ( 14 ) surf_lsm_v(l)%start_index6614 6615 CALL wrd_write_string( 'lsm_end_index_v' )6616 WRITE ( 14 ) surf_lsm_v(l)%end_index6617 6618 WRITE( dum, '(I1)') l6619 6620 CALL wrd_write_string( 'm_liq_v(' // dum // ')' )6621 WRITE ( 14 ) m_liq_v(l)%var_1d6622 6623 ENDDO6624 6625 CALL wrd_write_string( 'lsm_start_index_h' )6626 WRITE ( 14 ) surf_lsm_h%start_index6627 6628 CALL wrd_write_string( 'lsm_end_index_h' )6629 WRITE ( 14 ) surf_lsm_h%end_index6630 6631 CALL wrd_write_string( 't_surface_h' )6632 WRITE ( 14 ) t_surface_h%var_1d6633 6634 DO l = 0, 36635 6636 CALL wrd_write_string( 'lsm_start_index_v' )6637 WRITE ( 14 ) surf_lsm_v(l)%start_index6638 6639 CALL wrd_write_string( 'lsm_end_index_v' )6640 WRITE ( 14 ) surf_lsm_v(l)%end_index6641 6642 WRITE( dum, '(I1)') l6643 6644 CALL wrd_write_string( 't_surface_v(' // dum // ')' )6645 WRITE ( 14 ) t_surface_v(l)%var_1d6646 6647 ENDDO6648 6649 6702 6650 6703 END SUBROUTINE lsm_wrd_local -
palm/trunk/SOURCE/module_interface.f90
r4414 r4495 25 25 ! ----------------- 26 26 ! $Id$ 27 ! restart data handling with MPI-IO added 28 ! 29 ! 4414 2020-02-19 20:16:04Z suehring 27 30 ! Add module interface for basic initialization of numerics. 28 31 ! … … 687 690 688 691 INTERFACE module_interface_rrd_global 689 MODULE PROCEDURE module_interface_rrd_global 692 MODULE PROCEDURE module_interface_rrd_global_ftn 693 MODULE PROCEDURE module_interface_rrd_global_mpi 690 694 END INTERFACE module_interface_rrd_global 691 695 … … 1698 1702 1699 1703 1700 !------------------------------------------------------------------------------ !1701 ! Description: 1702 ! ------------ 1703 !> Read module-specific restart data globaly shared by all MPI ranks1704 !------------------------------------------------------------------------------ !1705 SUBROUTINE module_interface_rrd_global ( found )1704 !--------------------------------------------------------------------------------------------------! 1705 ! Description: 1706 ! ------------ 1707 !> Read module-specific restart data in Fortran binary format globaly shared by all MPI ranks 1708 !--------------------------------------------------------------------------------------------------! 1709 SUBROUTINE module_interface_rrd_global_ftn( found ) 1706 1710 1707 1711 … … 1728 1732 1729 1733 1730 END SUBROUTINE module_interface_rrd_global 1734 END SUBROUTINE module_interface_rrd_global_ftn 1735 1736 1737 !--------------------------------------------------------------------------------------------------! 1738 ! Description: 1739 ! ------------ 1740 !> Read module-specific restart data in MPI format globaly shared by all MPI ranks 1741 !--------------------------------------------------------------------------------------------------! 1742 SUBROUTINE module_interface_rrd_global_mpi 1743 1744 1745 IF ( debug_output ) CALL debug_message( 'module-specific read global restart data', 'start' ) 1746 1747 CALL dynamics_rrd_global 1748 1749 IF ( biometeorology ) CALL bio_rrd_global 1750 IF ( bulk_cloud_model ) CALL bcm_rrd_global 1751 IF ( virtual_flight ) CALL flight_rrd_global 1752 IF ( gust_module_enabled ) CALL gust_rrd_global 1753 IF ( particle_advection ) CALL lpm_rrd_global 1754 IF ( ocean_mode ) CALL ocean_rrd_global 1755 IF ( syn_turb_gen ) CALL stg_rrd_global 1756 IF ( wind_turbine ) CALL wtm_rrd_global 1757 IF ( surface_output ) CALL surface_data_output_rrd_global 1758 1759 IF ( user_module_enabled ) CALL user_rrd_global 1760 1761 IF ( debug_output ) CALL debug_message( 'module-specific read global restart data', 'end' ) 1762 1763 1764 END SUBROUTINE module_interface_rrd_global_mpi 1731 1765 1732 1766 … … 1747 1781 IF ( virtual_flight ) CALL flight_wrd_global 1748 1782 IF ( gust_module_enabled ) CALL gust_wrd_global 1783 IF ( particle_advection ) CALL lpm_wrd_global 1749 1784 IF ( ocean_mode ) CALL ocean_wrd_global 1750 1785 IF ( syn_turb_gen ) CALL stg_wrd_global -
palm/trunk/SOURCE/modules.f90
r4476 r4495 25 25 ! ----------------- 26 26 ! $Id$ 27 ! +restart_data_format, restart_data_format_input|output, include_total_domain_boundaries 28 ! 29 ! 4476 2020-03-27 12:56:41Z maronga 27 30 ! Renamed variables for subgrids-scale model steering 28 31 ! … … 550 553 CHARACTER (LEN=80) :: recycling_method_for_thermodynamic_quantities = 'turbulent_fluctuation' !< namelist parameter 551 554 CHARACTER (LEN=20) :: reference_state = 'initial_profile' !< namelist parameter 555 CHARACTER (LEN=20) :: restart_data_format = 'fortran_binary' !< namelist parameter 556 CHARACTER (LEN=20) :: restart_data_format_input = 'undefined' !< namelist parameter 557 CHARACTER (LEN=20) :: restart_data_format_output = 'undefined' !< namelist parameter 552 558 CHARACTER (LEN=20) :: timestep_scheme = 'runge-kutta-3' !< namelist parameter 553 559 CHARACTER (LEN=20) :: turbulence_closure = '1.5-order' !< namelist parameter … … 748 754 LOGICAL :: humidity = .FALSE. !< namelist parameter 749 755 LOGICAL :: humidity_remote = .FALSE. !< switch for receiving near-surface humidity flux (atmosphere-ocean coupling) 756 LOGICAL :: include_total_domain_boundaries = .FALSE. !< store outer boundaries in restart file (MPI-IO) 750 757 LOGICAL :: indoor_model = .FALSE. !< switch for indoor-climate and energy-demand model 751 758 LOGICAL :: kolmogorov_length_scale = .FALSE. !< switch to activate calculations in flow_statistics for the kolmogorov length scale -
palm/trunk/SOURCE/ocean_mod.f90
r4481 r4495 25 25 ! ----------------- 26 26 ! $Id$ 27 ! restart data handling with MPI-IO added 28 ! 29 ! 4481 2020-03-31 18:55:54Z maronga 27 30 ! vector directives added to force vectorization on Intel19 compiler 28 31 ! … … 84 87 USE control_parameters, & 85 88 ONLY: atmos_ocean_sign, bottom_salinityflux, & 86 constant_top_salinityflux, ocean_mode, top_salinityflux,&89 constant_top_salinityflux, restart_data_format_output, ocean_mode, top_salinityflux, & 87 90 wall_salinityflux, loop_optimization, ws_scheme_sca 88 91 … … 97 100 USE indices, & 98 101 ONLY: advc_flags_s, nxl, nxr, nyn, nys, nzb, nzt, wall_flags_total_0 102 103 USE restart_data_mpi_io_mod, & 104 ONLY: rrd_mpi_io, rrd_mpi_io_global_array, wrd_mpi_io, wrd_mpi_io_global_array 99 105 100 106 USE surface_mod, & … … 221 227 222 228 INTERFACE ocean_rrd_global 223 MODULE PROCEDURE ocean_rrd_global 229 MODULE PROCEDURE ocean_rrd_global_ftn 230 MODULE PROCEDURE ocean_rrd_global_mpi 224 231 END INTERFACE ocean_rrd_global 225 232 … … 1938 1945 ! Description: 1939 1946 ! ------------ 1940 !> This routine reads the respective restart data for the ocean module.1941 !------------------------------------------------------------------------------! 1942 SUBROUTINE ocean_rrd_global ( found )1947 !> Read module-specific global restart data (Fortran binary format). 1948 !------------------------------------------------------------------------------! 1949 SUBROUTINE ocean_rrd_global_ftn( found ) 1943 1950 1944 1951 … … 2001 2008 END SELECT 2002 2009 2003 END SUBROUTINE ocean_rrd_global 2010 END SUBROUTINE ocean_rrd_global_ftn 2011 2012 2013 !------------------------------------------------------------------------------! 2014 ! Description: 2015 ! ------------ 2016 !> Read module-specific global restart data (MPI-IO). 2017 !------------------------------------------------------------------------------! 2018 SUBROUTINE ocean_rrd_global_mpi 2019 2020 CALL rrd_mpi_io( 'bc_sa_t', bc_sa_t ) 2021 CALL rrd_mpi_io( 'bottom_salinityflux', bottom_salinityflux ) 2022 CALL rrd_mpi_io( 'salinity', salinity ) 2023 CALL rrd_mpi_io_global_array( 'sa_init', sa_init ) 2024 CALL rrd_mpi_io( 'sa_surface', sa_surface ) 2025 CALL rrd_mpi_io_global_array( 'sa_vertical_gradient', sa_vertical_gradient ) 2026 CALL rrd_mpi_io_global_array( 'sa_vertical_gradient_level', sa_vertical_gradient_level ) 2027 CALL rrd_mpi_io_global_array( 'sa_vertical_gradient_level_ind', sa_vertical_gradient_level_ind ) 2028 CALL rrd_mpi_io( 'stokes_waveheight', stokes_waveheight ) 2029 CALL rrd_mpi_io( 'stokes_wavelength', stokes_wavelength ) 2030 CALL rrd_mpi_io( 'surface_cooling_spinup_time', surface_cooling_spinup_time ) 2031 CALL rrd_mpi_io( 'top_salinityflux', top_salinityflux ) 2032 CALL rrd_mpi_io_global_array( 'wall_salinityflux', wall_salinityflux ) 2033 CALL rrd_mpi_io( 'wave_breaking', wave_breaking ) 2034 2035 END SUBROUTINE ocean_rrd_global_mpi 2004 2036 2005 2037 … … 2086 2118 SUBROUTINE ocean_wrd_global 2087 2119 2088 2089 IMPLICIT NONE 2090 2091 CALL wrd_write_string( 'bc_sa_t' ) 2092 WRITE ( 14 ) bc_sa_t 2093 2094 CALL wrd_write_string( 'bottom_salinityflux' ) 2095 WRITE ( 14 ) bottom_salinityflux 2096 2097 CALL wrd_write_string( 'salinity' ) 2098 WRITE ( 14 ) salinity 2099 2100 CALL wrd_write_string( 'sa_init' ) 2101 WRITE ( 14 ) sa_init 2102 2103 CALL wrd_write_string( 'sa_surface' ) 2104 WRITE ( 14 ) sa_surface 2105 2106 CALL wrd_write_string( 'sa_vertical_gradient' ) 2107 WRITE ( 14 ) sa_vertical_gradient 2108 2109 CALL wrd_write_string( 'sa_vertical_gradient_level' ) 2110 WRITE ( 14 ) sa_vertical_gradient_level 2111 2112 CALL wrd_write_string( 'stokes_waveheight' ) 2113 WRITE ( 14 ) stokes_waveheight 2114 2115 CALL wrd_write_string( 'stokes_wavelength' ) 2116 WRITE ( 14 ) stokes_wavelength 2117 2118 CALL wrd_write_string( 'surface_cooling_spinup_time' ) 2119 WRITE ( 14 ) surface_cooling_spinup_time 2120 2121 CALL wrd_write_string( 'top_salinityflux' ) 2122 WRITE ( 14 ) top_salinityflux 2123 2124 CALL wrd_write_string( 'wall_salinityflux' ) 2125 WRITE ( 14 ) wall_salinityflux 2126 2127 CALL wrd_write_string( 'wave_breaking' ) 2128 WRITE ( 14 ) wave_breaking 2120 IMPLICIT NONE 2121 2122 2123 IF ( TRIM( restart_data_format_output ) == 'fortran_binary' ) THEN 2124 2125 CALL wrd_write_string( 'bc_sa_t' ) 2126 WRITE ( 14 ) bc_sa_t 2127 2128 CALL wrd_write_string( 'bottom_salinityflux' ) 2129 WRITE ( 14 ) bottom_salinityflux 2130 2131 CALL wrd_write_string( 'salinity' ) 2132 WRITE ( 14 ) salinity 2133 2134 CALL wrd_write_string( 'sa_init' ) 2135 WRITE ( 14 ) sa_init 2136 2137 CALL wrd_write_string( 'sa_surface' ) 2138 WRITE ( 14 ) sa_surface 2139 2140 CALL wrd_write_string( 'sa_vertical_gradient' ) 2141 WRITE ( 14 ) sa_vertical_gradient 2142 2143 CALL wrd_write_string( 'sa_vertical_gradient_level' ) 2144 WRITE ( 14 ) sa_vertical_gradient_level 2145 2146 CALL wrd_write_string( 'stokes_waveheight' ) 2147 WRITE ( 14 ) stokes_waveheight 2148 2149 CALL wrd_write_string( 'stokes_wavelength' ) 2150 WRITE ( 14 ) stokes_wavelength 2151 2152 CALL wrd_write_string( 'surface_cooling_spinup_time' ) 2153 WRITE ( 14 ) surface_cooling_spinup_time 2154 2155 CALL wrd_write_string( 'top_salinityflux' ) 2156 WRITE ( 14 ) top_salinityflux 2157 2158 CALL wrd_write_string( 'wall_salinityflux' ) 2159 WRITE ( 14 ) wall_salinityflux 2160 2161 CALL wrd_write_string( 'wave_breaking' ) 2162 WRITE ( 14 ) wave_breaking 2163 2164 ELSEIF ( TRIM( restart_data_format_output ) == 'mpi' ) THEN 2165 2166 CALL wrd_mpi_io( 'bc_sa_t', bc_sa_t ) 2167 CALL wrd_mpi_io( 'bottom_salinityflux', bottom_salinityflux ) 2168 CALL wrd_mpi_io( 'salinity', salinity ) 2169 CALL wrd_mpi_io_global_array( 'sa_init', sa_init ) 2170 CALL wrd_mpi_io( 'sa_surface', sa_surface ) 2171 CALL wrd_mpi_io_global_array( 'sa_vertical_gradient', sa_vertical_gradient ) 2172 CALL wrd_mpi_io_global_array( 'sa_vertical_gradient_level', sa_vertical_gradient_level ) 2173 CALL wrd_mpi_io_global_array( 'sa_vertical_gradient_level_ind', sa_vertical_gradient_level_ind ) 2174 CALL wrd_mpi_io( 'stokes_waveheight', stokes_waveheight ) 2175 CALL wrd_mpi_io( 'stokes_wavelength', stokes_wavelength ) 2176 CALL wrd_mpi_io( 'surface_cooling_spinup_time', surface_cooling_spinup_time ) 2177 CALL wrd_mpi_io( 'top_salinityflux', top_salinityflux ) 2178 CALL wrd_mpi_io_global_array( 'wall_salinityflux', wall_salinityflux ) 2179 CALL wrd_mpi_io( 'wave_breaking', wave_breaking ) 2180 2181 ENDIF 2129 2182 2130 2183 END SUBROUTINE ocean_wrd_global … … 2143 2196 IMPLICIT NONE 2144 2197 2145 IF ( ALLOCATED( rho_ocean_av ) ) THEN 2146 CALL wrd_write_string( 'rho_ocean_av' ) 2147 WRITE ( 14 ) rho_ocean_av 2148 ENDIF 2149 2150 CALL wrd_write_string( 'sa' ) 2151 WRITE ( 14 ) sa 2152 2153 IF ( ALLOCATED( sa_av ) ) THEN 2154 CALL wrd_write_string( 'sa_av' ) 2155 WRITE ( 14 ) sa_av 2198 2199 IF ( TRIM( restart_data_format_output ) == 'fortran_binary' ) THEN 2200 2201 IF ( ALLOCATED( rho_ocean_av ) ) THEN 2202 CALL wrd_write_string( 'rho_ocean_av' ) 2203 WRITE ( 14 ) rho_ocean_av 2204 ENDIF 2205 2206 CALL wrd_write_string( 'sa' ) 2207 WRITE ( 14 ) sa 2208 2209 IF ( ALLOCATED( sa_av ) ) THEN 2210 CALL wrd_write_string( 'sa_av' ) 2211 WRITE ( 14 ) sa_av 2212 ENDIF 2213 2214 ELSEIF ( TRIM( restart_data_format_output ) == 'mpi' ) THEN 2215 2216 IF ( ALLOCATED( rho_ocean_av ) ) CALL wrd_mpi_io( 'rho_ocean_av', rho_ocean_av ) 2217 CALL wrd_mpi_io( 'sa', sa ) 2218 IF ( ALLOCATED( sa_av ) ) CALL wrd_mpi_io( 'sa_av', sa_av ) 2219 2156 2220 ENDIF 2157 2221 -
palm/trunk/SOURCE/palm.f90
r4457 r4495 25 25 ! ----------------- 26 26 ! $Id$ 27 ! restart data handling with MPI-IO added 28 ! 29 ! 4457 2020-03-11 14:20:43Z raasch 27 30 ! use statement for exchange horiz added 28 31 ! … … 86 89 USE control_parameters, & 87 90 ONLY: coupling_char, do2d_at_begin, do3d_at_begin, io_blocks, & 88 io_group, message_string, r unnr, simulated_time_chr, spinup,&91 io_group, message_string, restart_data_format_output, runnr, simulated_time_chr, spinup, & 89 92 time_since_reference_point, user_interface_current_revision, & 90 93 user_interface_required_revision, version, write_binary … … 140 143 pmci_modelconfiguration, pmci_parent_initialize 141 144 #endif 145 146 USE restart_data_mpi_io_mod, & 147 ONLY: rd_mpi_io_close, rd_mpi_io_open 142 148 143 149 USE surface_data_output_mod, & … … 168 174 169 175 version = 'PALM 6.0' 170 user_interface_required_revision = 'r 3703'176 user_interface_required_revision = 'r4495' 171 177 172 178 #if defined( __parallel ) … … 399 405 CALL location_message( 'writing restart data', 'start' ) 400 406 401 DO i = 0, io_blocks-1 402 IF ( i == io_group ) THEN 403 404 ! 405 !-- Open binary file 406 CALL check_open( 14 ) 407 ! 408 !-- Write control parameters and other global variables for restart. 409 IF ( myid == 0 ) CALL wrd_global 410 ! 411 !-- Write processor specific flow field data for restart runs 412 CALL wrd_local 413 ! 414 !-- Close binary file 415 CALL close_file( 14 ) 416 417 ENDIF 418 #if defined( __parallel ) 419 CALL MPI_BARRIER( comm2d, ierr ) 420 #endif 421 ENDDO 407 IF ( TRIM( restart_data_format_output ) == 'fortran_binary' ) THEN 408 409 DO i = 0, io_blocks-1 410 IF ( i == io_group ) THEN 411 412 ! 413 !-- Open binary file 414 CALL check_open( 14 ) 415 ! 416 !-- Write control parameters and other global variables for restart. 417 IF ( myid == 0 ) CALL wrd_global 418 ! 419 !-- Write processor specific flow field data for restart runs 420 CALL wrd_local 421 ! 422 !-- Close binary file 423 CALL close_file( 14 ) 424 425 ENDIF 426 #if defined( __parallel ) 427 CALL MPI_BARRIER( comm2d, ierr ) 428 #endif 429 ENDDO 430 431 ELSEIF ( TRIM( restart_data_format_output ) == 'mpi' ) THEN 432 ! 433 !-- Open MPI-IO restart file 434 CALL rd_mpi_io_open( 'write', 'BINOUT' ) 435 ! 436 !-- Write control parameters and other global variables for restart. 437 CALL wrd_global 438 ! 439 !-- Write processor specific flow field data for restart runs 440 CALL wrd_local 441 ! 442 !-- Close restart File 443 CALL rd_mpi_io_close 444 445 ENDIF 422 446 423 447 CALL location_message( 'writing restart data', 'finished' ) -
palm/trunk/SOURCE/parin.f90
r4360 r4495 25 25 ! ----------------- 26 26 ! $Id$ 27 ! restart data handling with MPI-IO added 28 ! 29 ! 4360 2020-01-07 11:25:50Z suehring 27 30 ! removed recycling_yshift 28 31 ! … … 267 270 recycling_method_for_thermodynamic_quantities, recycling_width, & 268 271 reference_state, residual_limit, & 272 restart_data_format, restart_data_format_input, restart_data_format_output, & 269 273 rotation_angle, & 270 274 roughness_length, scalar_advec, & … … 337 341 profile_columns, profile_rows, & 338 342 restart_time, section_xy, section_xz, section_yz, & 343 restart_data_format, restart_data_format_input, restart_data_format_output, & 339 344 skip_time_data_output, skip_time_data_output_av, skip_time_dopr, & 340 345 skip_time_do2d_xy, skip_time_do2d_xz, skip_time_do2d_yz, & … … 499 504 IF ( TRIM( initializing_actions ) == 'read_restart_data' ) THEN 500 505 506 ! 507 !-- If not set by the user in the runtime parameters, the data format for restart 508 !-- input needs to be set now! This is normally done later in check parameters. 509 IF ( TRIM( restart_data_format ) /= 'fortran_binary' .AND. & 510 TRIM( restart_data_format ) /= 'mpi' ) THEN 511 message_string = 'illegal restart data format "' // TRIM( restart_data_format ) // '"' 512 CALL message( 'parin', 'PA....', 1, 2, 0, 6, 0 ) 513 ENDIF 514 IF ( TRIM( restart_data_format_input ) == 'undefined' ) THEN 515 restart_data_format_input = restart_data_format 516 ENDIF 517 501 518 CALL rrd_global 502 519 ! -
palm/trunk/SOURCE/plant_canopy_model_mod.f90
r4457 r4495 26 26 ! Former revisions: 27 27 ! ----------------- 28 ! $Id$ 29 ! restart data handling with MPI-IO added 30 ! 31 ! 4457 2020-03-11 14:20:43Z raasch 28 32 ! 29 33 ! use statement for exchange horiz added 30 !31 !32 ! $Id$33 34 ! (salim) removed the error message PA0672 to consider PC 3d data via ascii file 34 35 ! … … 191 192 passive_scalar, & 192 193 plant_canopy, & 194 restart_data_format_output, & 193 195 restart_string, & 194 196 urban_surface … … 221 223 222 224 USE pegrid 225 226 USE restart_data_mpi_io_mod, & 227 ONLY: wrd_mpi_io 223 228 224 229 USE surface_mod, & … … 2436 2441 SUBROUTINE pcm_wrd_local 2437 2442 2438 IF ( ALLOCATED( pcm_heatrate_av ) ) THEN 2439 CALL wrd_write_string( 'pcm_heatrate_av' ) 2440 WRITE ( 14 ) pcm_heatrate_av 2443 IF ( TRIM( restart_data_format_output ) == 'fortran_binary' ) THEN 2444 2445 IF ( ALLOCATED( pcm_heatrate_av ) ) THEN 2446 CALL wrd_write_string( 'pcm_heatrate_av' ) 2447 WRITE ( 14 ) pcm_heatrate_av 2448 ENDIF 2449 2450 IF ( ALLOCATED( pcm_latentrate_av ) ) THEN 2451 CALL wrd_write_string( 'pcm_latentrate_av' ) 2452 WRITE ( 14 ) pcm_latentrate_av 2453 ENDIF 2454 2455 IF ( ALLOCATED( pcm_transpirationrate_av ) ) THEN 2456 CALL wrd_write_string( 'pcm_transpirationrate_av' ) 2457 WRITE ( 14 ) pcm_transpirationrate_av 2458 ENDIF 2459 2460 ELSEIF ( TRIM( restart_data_format_output ) == 'mpi' ) THEN 2461 2462 IF ( ALLOCATED( pcm_heatrate_av ) ) CALL wrd_mpi_io( 'pcm_heatrate_av', pcm_heatrate_av ) 2463 IF ( ALLOCATED( pcm_latentrate_av ) ) THEN 2464 CALL wrd_mpi_io( 'pcm_latentrate_av', pcm_latentrate_av ) 2465 ENDIF 2466 IF ( ALLOCATED( pcm_transpirationrate_av ) ) THEN 2467 CALL wrd_write_string( 'pcm_transpirationrate_av', pcm_transpirationrate_av ) 2468 ENDIF 2469 2441 2470 ENDIF 2442 2471 2443 IF ( ALLOCATED( pcm_latentrate_av ) ) THEN2444 CALL wrd_write_string( 'pcm_latentrate_av' )2445 WRITE ( 14 ) pcm_latentrate_av2446 ENDIF2447 2448 IF ( ALLOCATED( pcm_transpirationrate_av ) ) THEN2449 CALL wrd_write_string( 'pcm_transpirationrate_av' )2450 WRITE ( 14 ) pcm_transpirationrate_av2451 ENDIF2452 2453 2472 END SUBROUTINE pcm_wrd_local 2454 2473 -
palm/trunk/SOURCE/radiation_model_mod.f90
r4493 r4495 28 28 ! ----------------- 29 29 ! $Id$ 30 ! restart data handling with MPI-IO added 31 ! 32 ! 4493 2020-04-10 09:49:43Z pavelkrc 30 33 ! Avoid unstable direct normal radiation near horizon 31 34 ! … … 278 281 message_string, plant_canopy, pt_surface, & 279 282 rho_surface, simulated_time, spinup_time, surface_pressure, & 280 read_svf, write_svf,&283 read_svf, restart_data_format_output, write_svf, & 281 284 time_since_reference_point, urban_surface, varnamelength 282 285 … … 360 363 ONLY: rrtmg_sw 361 364 #endif 365 USE restart_data_mpi_io_mod, & 366 ONLY: wrd_mpi_io 367 362 368 USE statistics, & 363 369 ONLY: hom … … 11934 11940 11935 11941 11936 IF ( ALLOCATED( rad_net_av ) ) THEN 11937 CALL wrd_write_string( 'rad_net_av' ) 11938 WRITE ( 14 ) rad_net_av 11942 IF ( TRIM( restart_data_format_output ) == 'fortran_binary' ) THEN 11943 11944 IF ( ALLOCATED( rad_net_av ) ) THEN 11945 CALL wrd_write_string( 'rad_net_av' ) 11946 WRITE ( 14 ) rad_net_av 11947 ENDIF 11948 11949 IF ( ALLOCATED( rad_lw_in_xy_av ) ) THEN 11950 CALL wrd_write_string( 'rad_lw_in_xy_av' ) 11951 WRITE ( 14 ) rad_lw_in_xy_av 11952 ENDIF 11953 11954 IF ( ALLOCATED( rad_lw_out_xy_av ) ) THEN 11955 CALL wrd_write_string( 'rad_lw_out_xy_av' ) 11956 WRITE ( 14 ) rad_lw_out_xy_av 11957 ENDIF 11958 11959 IF ( ALLOCATED( rad_sw_in_xy_av ) ) THEN 11960 CALL wrd_write_string( 'rad_sw_in_xy_av' ) 11961 WRITE ( 14 ) rad_sw_in_xy_av 11962 ENDIF 11963 11964 IF ( ALLOCATED( rad_sw_out_xy_av ) ) THEN 11965 CALL wrd_write_string( 'rad_sw_out_xy_av' ) 11966 WRITE ( 14 ) rad_sw_out_xy_av 11967 ENDIF 11968 11969 IF ( ALLOCATED( rad_lw_in ) ) THEN 11970 CALL wrd_write_string( 'rad_lw_in' ) 11971 WRITE ( 14 ) rad_lw_in 11972 ENDIF 11973 11974 IF ( ALLOCATED( rad_lw_in_av ) ) THEN 11975 CALL wrd_write_string( 'rad_lw_in_av' ) 11976 WRITE ( 14 ) rad_lw_in_av 11977 ENDIF 11978 11979 IF ( ALLOCATED( rad_lw_out ) ) THEN 11980 CALL wrd_write_string( 'rad_lw_out' ) 11981 WRITE ( 14 ) rad_lw_out 11982 ENDIF 11983 11984 IF ( ALLOCATED( rad_lw_out_av) ) THEN 11985 CALL wrd_write_string( 'rad_lw_out_av' ) 11986 WRITE ( 14 ) rad_lw_out_av 11987 ENDIF 11988 11989 IF ( ALLOCATED( rad_lw_cs_hr) ) THEN 11990 CALL wrd_write_string( 'rad_lw_cs_hr' ) 11991 WRITE ( 14 ) rad_lw_cs_hr 11992 ENDIF 11993 11994 IF ( ALLOCATED( rad_lw_cs_hr_av) ) THEN 11995 CALL wrd_write_string( 'rad_lw_cs_hr_av' ) 11996 WRITE ( 14 ) rad_lw_cs_hr_av 11997 ENDIF 11998 11999 IF ( ALLOCATED( rad_lw_hr) ) THEN 12000 CALL wrd_write_string( 'rad_lw_hr' ) 12001 WRITE ( 14 ) rad_lw_hr 12002 ENDIF 12003 12004 IF ( ALLOCATED( rad_lw_hr_av) ) THEN 12005 CALL wrd_write_string( 'rad_lw_hr_av' ) 12006 WRITE ( 14 ) rad_lw_hr_av 12007 ENDIF 12008 12009 IF ( ALLOCATED( rad_sw_in) ) THEN 12010 CALL wrd_write_string( 'rad_sw_in' ) 12011 WRITE ( 14 ) rad_sw_in 12012 ENDIF 12013 12014 IF ( ALLOCATED( rad_sw_in_av) ) THEN 12015 CALL wrd_write_string( 'rad_sw_in_av' ) 12016 WRITE ( 14 ) rad_sw_in_av 12017 ENDIF 12018 12019 IF ( ALLOCATED( rad_sw_out) ) THEN 12020 CALL wrd_write_string( 'rad_sw_out' ) 12021 WRITE ( 14 ) rad_sw_out 12022 ENDIF 12023 12024 IF ( ALLOCATED( rad_sw_out_av) ) THEN 12025 CALL wrd_write_string( 'rad_sw_out_av' ) 12026 WRITE ( 14 ) rad_sw_out_av 12027 ENDIF 12028 12029 IF ( ALLOCATED( rad_sw_cs_hr) ) THEN 12030 CALL wrd_write_string( 'rad_sw_cs_hr' ) 12031 WRITE ( 14 ) rad_sw_cs_hr 12032 ENDIF 12033 12034 IF ( ALLOCATED( rad_sw_cs_hr_av) ) THEN 12035 CALL wrd_write_string( 'rad_sw_cs_hr_av' ) 12036 WRITE ( 14 ) rad_sw_cs_hr_av 12037 ENDIF 12038 12039 IF ( ALLOCATED( rad_sw_hr) ) THEN 12040 CALL wrd_write_string( 'rad_sw_hr' ) 12041 WRITE ( 14 ) rad_sw_hr 12042 ENDIF 12043 12044 IF ( ALLOCATED( rad_sw_hr_av) ) THEN 12045 CALL wrd_write_string( 'rad_sw_hr_av' ) 12046 WRITE ( 14 ) rad_sw_hr_av 12047 ENDIF 12048 12049 ELSEIF ( TRIM( restart_data_format_output ) == 'mpi' ) THEN 12050 12051 IF ( ALLOCATED( rad_net_av ) ) CALL wrd_mpi_io( 'rad_net_av', rad_net_av ) 12052 IF ( ALLOCATED( rad_lw_in_xy_av ) ) CALL wrd_mpi_io( 'rad_lw_in_xy_av', rad_lw_in_xy_av ) 12053 IF ( ALLOCATED( rad_lw_out_xy_av ) ) CALL wrd_mpi_io( 'rad_lw_out_xy_av', rad_lw_out_xy_av ) 12054 IF ( ALLOCATED( rad_sw_in_xy_av ) ) CALL wrd_mpi_io( 'rad_sw_in_xy_av', rad_sw_in_xy_av ) 12055 IF ( ALLOCATED( rad_sw_out_xy_av ) ) CALL wrd_mpi_io( 'rad_sw_out_xy_av', rad_sw_out_xy_av ) 12056 IF ( ALLOCATED( rad_lw_in ) ) CALL wrd_mpi_io( 'rad_lw_in', rad_lw_in ) 12057 IF ( ALLOCATED( rad_lw_in_av ) ) CALL wrd_mpi_io( 'rad_lw_in_av', rad_lw_in_av ) 12058 IF ( ALLOCATED( rad_lw_out ) ) CALL wrd_mpi_io( 'rad_lw_out', rad_lw_out ) 12059 IF ( ALLOCATED( rad_lw_out_av) ) CALL wrd_mpi_io( 'rad_lw_out_av', rad_lw_out_av ) 12060 IF ( ALLOCATED( rad_lw_cs_hr) ) CALL wrd_mpi_io( 'rad_lw_cs_hr', rad_lw_cs_hr ) 12061 IF ( ALLOCATED( rad_lw_cs_hr_av) ) CALL wrd_mpi_io( 'rad_lw_cs_hr_av', rad_lw_cs_hr_av ) 12062 IF ( ALLOCATED( rad_lw_hr) ) CALL wrd_mpi_io( 'rad_lw_hr', rad_lw_hr ) 12063 IF ( ALLOCATED( rad_lw_hr_av) ) CALL wrd_mpi_io( 'rad_lw_hr_av', rad_lw_hr_av ) 12064 IF ( ALLOCATED( rad_sw_in) ) CALL wrd_mpi_io( 'rad_sw_in', rad_sw_in ) 12065 IF ( ALLOCATED( rad_sw_in_av) ) CALL wrd_mpi_io( 'rad_sw_in_av', rad_sw_in_av ) 12066 IF ( ALLOCATED( rad_sw_out) ) CALL wrd_mpi_io( 'rad_sw_out', rad_sw_out ) 12067 IF ( ALLOCATED( rad_sw_out_av) ) CALL wrd_mpi_io( 'rad_sw_out_av', rad_sw_out_av ) 12068 IF ( ALLOCATED( rad_sw_cs_hr) ) CALL wrd_mpi_io( 'rad_sw_cs_hr', rad_sw_cs_hr ) 12069 IF ( ALLOCATED( rad_sw_cs_hr_av) ) CALL wrd_mpi_io( 'rad_sw_cs_hr_av', rad_sw_cs_hr_av ) 12070 IF ( ALLOCATED( rad_sw_hr) ) CALL wrd_mpi_io( 'rad_sw_hr', rad_sw_hr ) 12071 IF ( ALLOCATED( rad_sw_hr_av) ) CALL wrd_mpi_io( 'rad_sw_hr_av', rad_sw_hr_av ) 12072 11939 12073 ENDIF 11940 12074 11941 IF ( ALLOCATED( rad_lw_in_xy_av ) ) THEN11942 CALL wrd_write_string( 'rad_lw_in_xy_av' )11943 WRITE ( 14 ) rad_lw_in_xy_av11944 ENDIF11945 11946 IF ( ALLOCATED( rad_lw_out_xy_av ) ) THEN11947 CALL wrd_write_string( 'rad_lw_out_xy_av' )11948 WRITE ( 14 ) rad_lw_out_xy_av11949 ENDIF11950 11951 IF ( ALLOCATED( rad_sw_in_xy_av ) ) THEN11952 CALL wrd_write_string( 'rad_sw_in_xy_av' )11953 WRITE ( 14 ) rad_sw_in_xy_av11954 ENDIF11955 11956 IF ( ALLOCATED( rad_sw_out_xy_av ) ) THEN11957 CALL wrd_write_string( 'rad_sw_out_xy_av' )11958 WRITE ( 14 ) rad_sw_out_xy_av11959 ENDIF11960 11961 IF ( ALLOCATED( rad_lw_in ) ) THEN11962 CALL wrd_write_string( 'rad_lw_in' )11963 WRITE ( 14 ) rad_lw_in11964 ENDIF11965 11966 IF ( ALLOCATED( rad_lw_in_av ) ) THEN11967 CALL wrd_write_string( 'rad_lw_in_av' )11968 WRITE ( 14 ) rad_lw_in_av11969 ENDIF11970 11971 IF ( ALLOCATED( rad_lw_out ) ) THEN11972 CALL wrd_write_string( 'rad_lw_out' )11973 WRITE ( 14 ) rad_lw_out11974 ENDIF11975 11976 IF ( ALLOCATED( rad_lw_out_av) ) THEN11977 CALL wrd_write_string( 'rad_lw_out_av' )11978 WRITE ( 14 ) rad_lw_out_av11979 ENDIF11980 11981 IF ( ALLOCATED( rad_lw_cs_hr) ) THEN11982 CALL wrd_write_string( 'rad_lw_cs_hr' )11983 WRITE ( 14 ) rad_lw_cs_hr11984 ENDIF11985 11986 IF ( ALLOCATED( rad_lw_cs_hr_av) ) THEN11987 CALL wrd_write_string( 'rad_lw_cs_hr_av' )11988 WRITE ( 14 ) rad_lw_cs_hr_av11989 ENDIF11990 11991 IF ( ALLOCATED( rad_lw_hr) ) THEN11992 CALL wrd_write_string( 'rad_lw_hr' )11993 WRITE ( 14 ) rad_lw_hr11994 ENDIF11995 11996 IF ( ALLOCATED( rad_lw_hr_av) ) THEN11997 CALL wrd_write_string( 'rad_lw_hr_av' )11998 WRITE ( 14 ) rad_lw_hr_av11999 ENDIF12000 12001 IF ( ALLOCATED( rad_sw_in) ) THEN12002 CALL wrd_write_string( 'rad_sw_in' )12003 WRITE ( 14 ) rad_sw_in12004 ENDIF12005 12006 IF ( ALLOCATED( rad_sw_in_av) ) THEN12007 CALL wrd_write_string( 'rad_sw_in_av' )12008 WRITE ( 14 ) rad_sw_in_av12009 ENDIF12010 12011 IF ( ALLOCATED( rad_sw_out) ) THEN12012 CALL wrd_write_string( 'rad_sw_out' )12013 WRITE ( 14 ) rad_sw_out12014 ENDIF12015 12016 IF ( ALLOCATED( rad_sw_out_av) ) THEN12017 CALL wrd_write_string( 'rad_sw_out_av' )12018 WRITE ( 14 ) rad_sw_out_av12019 ENDIF12020 12021 IF ( ALLOCATED( rad_sw_cs_hr) ) THEN12022 CALL wrd_write_string( 'rad_sw_cs_hr' )12023 WRITE ( 14 ) rad_sw_cs_hr12024 ENDIF12025 12026 IF ( ALLOCATED( rad_sw_cs_hr_av) ) THEN12027 CALL wrd_write_string( 'rad_sw_cs_hr_av' )12028 WRITE ( 14 ) rad_sw_cs_hr_av12029 ENDIF12030 12031 IF ( ALLOCATED( rad_sw_hr) ) THEN12032 CALL wrd_write_string( 'rad_sw_hr' )12033 WRITE ( 14 ) rad_sw_hr12034 ENDIF12035 12036 IF ( ALLOCATED( rad_sw_hr_av) ) THEN12037 CALL wrd_write_string( 'rad_sw_hr_av' )12038 WRITE ( 14 ) rad_sw_hr_av12039 ENDIF12040 12041 12042 12075 END SUBROUTINE radiation_wrd_local 12076 12077 12043 12078 12044 12079 !------------------------------------------------------------------------------! -
palm/trunk/SOURCE/read_restart_data_mod.f90
r4435 r4495 25 25 ! ----------------- 26 26 ! $Id$ 27 ! restart data handling with MPI-IO added 28 ! 29 ! 4435 2020-03-03 10:38:41Z raasch 27 30 ! bugfix for message that reports about files that are read from in case that the virtual PE grid 28 31 ! has chenged (in case of large number of files format was exceeded), detailed messages about the … … 107 110 108 111 USE averaging 112 113 USE bulk_cloud_model_mod, & 114 ONLY: bulk_cloud_model 109 115 110 116 USE chem_modules, & … … 130 136 ONLY: dx, dy 131 137 138 USE gust_mod, & 139 ONLY: gust_module_enabled 140 132 141 USE indices, & 133 142 ONLY: nbgp, nx, nxl, nxlg, nxr, nxrg, nx_on_file, ny, nys, nysg, nyn, & … … 146 155 ONLY: netcdf_precision, output_for_t0 147 156 157 USE particle_attributes, & 158 ONLY: particle_advection 159 148 160 USE pegrid 149 161 … … 156 168 USE random_generator_parallel, & 157 169 ONLY: id_random_array, seq_random_array 170 171 USE restart_data_mpi_io_mod, & 172 ONLY: rd_mpi_io_check_array, rd_mpi_io_close, rd_mpi_io_open, rrd_mpi_io, & 173 rrd_mpi_io_global_array 158 174 159 175 USE spectra_mod, & … … 166 182 ONLY: statistic_regions, hom, hom_sum, pr_palm, u_max, u_max_ijk, & 167 183 v_max, v_max_ijk, w_max, w_max_ijk, z_i 184 185 USE user, & 186 ONLY: user_module_enabled 168 187 169 188 USE vertical_nesting_mod, & … … 205 224 !> created by PE0 of the previous run 206 225 !------------------------------------------------------------------------------! 207 SUBROUTINE rrd_global 208 209 210 CHARACTER (LEN=10) :: binary_version_global, version_on_file 211 212 LOGICAL :: found 213 214 226 SUBROUTINE rrd_global 227 228 229 CHARACTER(LEN=10) :: binary_version_global !< 230 CHARACTER(LEN=10) :: version_on_file !< 231 CHARACTER(LEN=20) :: tmp_name !< temporary variable 232 233 INTEGER :: i !< loop index 234 235 LOGICAL :: array_found !< 236 LOGICAL :: found !< 237 238 239 CALL location_message( 'read global restart data', 'start' ) 240 241 IF ( TRIM( restart_data_format_input ) == 'fortran_binary' ) THEN 242 ! 243 !-- Input in Fortran binary format 215 244 CALL check_open( 13 ) 216 245 ! … … 294 323 READ ( 13 ) statistic_regions 295 324 325 ! 326 !-- The following global arrays (better to say, they have the same size and values on each 327 !-- subdomain) are by default allocated in routine parin, but not in case of restarts! 296 328 IF ( .NOT. ALLOCATED( ug ) ) THEN 297 ALLOCATE( ug(0:nz+1), u_init(0:nz+1), vg(0:nz+1), &298 v_init(0:nz+1), pt_init(0:nz+1), q_init(0:nz+1), &299 ref_state(0:nz+1), s_init(0:nz+1), sa_init(0:nz+1), &329 ALLOCATE( ug(0:nz+1), u_init(0:nz+1), vg(0:nz+1), & 330 v_init(0:nz+1), pt_init(0:nz+1), q_init(0:nz+1), & 331 ref_state(0:nz+1), s_init(0:nz+1), sa_init(0:nz+1), & 300 332 hom(0:nz+1,2,pr_palm+max_pr_user+max_pr_cs+max_pr_salsa,0:statistic_regions), & 301 333 hom_sum(0:nz+1,pr_palm+max_pr_user+max_pr_cs+max_pr_salsa,0:statistic_regions) ) … … 617 649 CASE ( 'spinup_time' ) 618 650 READ ( 13 ) spinup_time 651 CASE ( 'subs_vertical_gradient' ) 652 READ ( 13 ) subs_vertical_gradient 653 CASE ( 'subs_vertical_gradient_level' ) 654 READ ( 13 ) subs_vertical_gradient_level 655 CASE ( 'subs_vertical_gradient_level_i' ) 656 READ ( 13 ) subs_vertical_gradient_level_i 619 657 CASE ( 'surface_heatflux' ) 620 658 READ ( 13 ) surface_heatflux … … 747 785 CASE ( 'volume_flow_initial' ) 748 786 READ ( 13 ) volume_flow_initial 749 CASE ( 'subs_vertical_gradient' )750 READ ( 13 ) subs_vertical_gradient751 CASE ( 'subs_vertical_gradient_level' )752 READ ( 13 ) subs_vertical_gradient_level753 CASE ( 'subs_vertical_gradient_level_i' )754 READ ( 13 ) subs_vertical_gradient_level_i755 787 CASE ( 'w_max' ) 756 788 READ ( 13 ) w_max … … 796 828 READ ( 13 ) restart_string(1:length) 797 829 830 ENDDO ! End of loop for reading the restart string 831 832 CALL close_file( 13 ) 833 834 ELSEIF ( TRIM( restart_data_format_input ) == 'mpi' ) THEN 835 ! 836 !-- Read global restart data using MPI-IO 837 !-- ATTENTION: Arrays need to be read with routine rrd_mpi_io_global_array! 838 !-- Caution: When any of the following read instructions have been changed, the 839 !-- ------- version number stored in the variable binary_version_global has 840 !-- to be increased. The same changes must also be done in 841 !-- wrd_write_global. 842 ! 843 !-- Open the MPI-IO restart file. 844 CALL rd_mpi_io_open( 'read', 'BININ', only_global = .TRUE. ) 845 846 ! 847 !-- Make version number check first 848 CALL rrd_mpi_io( 'binary_version_global', version_on_file ) 849 850 binary_version_global = '5.0' 851 IF ( TRIM( version_on_file ) /= TRIM( binary_version_global ) ) THEN 852 WRITE( message_string, * ) 'version mismatch concerning binary_version_global:', & 853 '&version on file = "', TRIM( version_on_file ), '"', & 854 '&version in program = "', TRIM( binary_version_global ), '"' 855 CALL message( 'rrd_global', 'PA0296', 1, 2, 0, 6, 0 ) 856 ENDIF 857 858 CALL rrd_mpi_io( 'numprocs', numprocs_previous_run ) 859 CALL rrd_mpi_io( 'nz' , nz ) 860 CALL rrd_mpi_io( 'max_pr_user', max_pr_user ) 861 CALL rrd_mpi_io( 'statistic_regions', statistic_regions ) 862 863 ! 864 !-- The following global arrays (better to say, they have the same size and values on each 865 !-- subdomain) are by default allocated in routine parin, but not in case of restarts! 866 IF ( .NOT. ALLOCATED( ug ) ) THEN 867 ALLOCATE( ug(0:nz+1), u_init(0:nz+1), vg(0:nz+1), & 868 v_init(0:nz+1), pt_init(0:nz+1), q_init(0:nz+1), & 869 ref_state(0:nz+1), s_init(0:nz+1), sa_init(0:nz+1), & 870 hom(0:nz+1,2,pr_palm+max_pr_user,0:statistic_regions), & 871 hom_sum(0:nz+1,pr_palm+max_pr_user,0:statistic_regions) ) 872 ENDIF 873 874 CALL rrd_mpi_io( 'advected_distance_x', advected_distance_x ) 875 CALL rrd_mpi_io( 'advected_distance_y', advected_distance_y ) 876 CALL rrd_mpi_io( 'alpha_surface', alpha_surface ) 877 CALL rrd_mpi_io( 'average_count_pr', average_count_pr ) 878 CALL rrd_mpi_io( 'average_count_sp', average_count_sp ) 879 CALL rrd_mpi_io( 'average_count_3d', average_count_3d ) 880 CALL rrd_mpi_io( 'bc_e_b', bc_e_b ) 881 CALL rrd_mpi_io( 'bc_lr', bc_lr ) 882 CALL rrd_mpi_io( 'bc_ns', bc_ns ) 883 CALL rrd_mpi_io( 'bc_p_b', bc_p_b ) 884 CALL rrd_mpi_io( 'bc_p_t', bc_p_t ) 885 CALL rrd_mpi_io( 'bc_pt_b', bc_pt_b ) 886 CALL rrd_mpi_io( 'bc_pt_t', bc_pt_t ) 887 CALL rrd_mpi_io( 'bc_pt_t_val', bc_pt_t_val ) 888 CALL rrd_mpi_io( 'bc_q_b', bc_q_b ) 889 CALL rrd_mpi_io( 'bc_q_t', bc_q_t ) 890 CALL rrd_mpi_io( 'bc_q_t_val', bc_q_t_val ) 891 CALL rrd_mpi_io( 'bc_s_b', bc_s_b ) 892 CALL rrd_mpi_io( 'bc_s_t', bc_s_t ) 893 CALL rrd_mpi_io( 'bc_uv_b', bc_uv_b ) 894 CALL rrd_mpi_io( 'bc_uv_t', bc_uv_t ) 895 CALL rrd_mpi_io( 'biometeorology', biometeorology ) 896 CALL rrd_mpi_io( 'building_height', building_height ) 897 CALL rrd_mpi_io( 'building_length_x', building_length_x ) 898 CALL rrd_mpi_io( 'building_length_y', building_length_y ) 899 CALL rrd_mpi_io( 'building_wall_left', building_wall_left ) 900 CALL rrd_mpi_io( 'building_wall_south', building_wall_south ) 901 CALL rrd_mpi_io( 'bulk_cloud_model', bulk_cloud_model ) 902 CALL rrd_mpi_io( 'call_psolver_at_all_substeps', call_psolver_at_all_substeps ) 903 CALL rrd_mpi_io( 'canyon_height', canyon_height ) 904 CALL rrd_mpi_io( 'canyon_wall_left', canyon_wall_left ) 905 CALL rrd_mpi_io( 'canyon_wall_south', canyon_wall_south ) 906 CALL rrd_mpi_io( 'canyon_width_x', canyon_width_x ) 907 CALL rrd_mpi_io( 'canyon_width_y', canyon_width_y ) 908 CALL rrd_mpi_io( 'cfl_factor', cfl_factor ) 909 CALL rrd_mpi_io( 'cloud_droplets', cloud_droplets ) 910 CALL rrd_mpi_io( 'collective_wait', collective_wait ) 911 CALL rrd_mpi_io( 'conserve_volume_flow', conserve_volume_flow ) 912 CALL rrd_mpi_io( 'conserve_volume_flow_mode', conserve_volume_flow_mode ) 913 CALL rrd_mpi_io( 'constant_flux_layer', constant_flux_layer ) 914 CALL rrd_mpi_io( 'coupling_start_time', coupling_start_time ) 915 CALL rrd_mpi_io( 'current_timestep_number', current_timestep_number ) 916 CALL rrd_mpi_io( 'cycle_mg', cycle_mg ) 917 CALL rrd_mpi_io( 'damp_level_1d', damp_level_1d ) 918 CALL rrd_mpi_io( 'dissipation_1d', dissipation_1d ) 919 CALL rrd_mpi_io_global_array( 'do2d_xy_time_count', do2d_xy_time_count ) 920 CALL rrd_mpi_io_global_array( 'do2d_xz_time_count', do2d_xz_time_count ) 921 CALL rrd_mpi_io_global_array( 'do2d_yz_time_count', do2d_yz_time_count ) 922 CALL rrd_mpi_io_global_array( 'do3d_time_count', do3d_time_count ) 923 CALL rrd_mpi_io( 'dp_external', dp_external ) 924 CALL rrd_mpi_io( 'dp_level_b', dp_level_b ) 925 CALL rrd_mpi_io( 'dp_smooth', dp_smooth ) 926 CALL rrd_mpi_io_global_array( 'dpdxy', dpdxy ) 927 CALL rrd_mpi_io( 'dt_3d', dt_3d ) 928 CALL rrd_mpi_io( 'dt_pr_1d', dt_pr_1d ) 929 CALL rrd_mpi_io( 'dt_run_control_1d', dt_run_control_1d ) 930 CALL rrd_mpi_io( 'dx', dx ) 931 CALL rrd_mpi_io( 'dy', dy ) 932 CALL rrd_mpi_io_global_array( 'dz', dz ) 933 CALL rrd_mpi_io( 'dz_max', dz_max ) 934 CALL rrd_mpi_io( 'dz_stretch_factor', dz_stretch_factor ) 935 CALL rrd_mpi_io_global_array( 'dz_stretch_factor_array', dz_stretch_factor_array ) 936 CALL rrd_mpi_io( 'dz_stretch_level', dz_stretch_level ) 937 CALL rrd_mpi_io_global_array( 'dz_stretch_level_end', dz_stretch_level_end ) 938 CALL rrd_mpi_io_global_array( 'dz_stretch_level_start', dz_stretch_level_start ) 939 CALL rrd_mpi_io( 'e_min', e_min ) 940 CALL rrd_mpi_io( 'end_time_1d', end_time_1d ) 941 CALL rrd_mpi_io( 'fft_method', fft_method ) 942 CALL rrd_mpi_io( 'first_call_lpm', first_call_lpm ) 943 CALL rrd_mpi_io( 'galilei_transformation', galilei_transformation ) 944 CALL rrd_mpi_io( 'gust_module_enabled', gust_module_enabled ) 945 CALL rrd_mpi_io_global_array( 'hom', hom ) 946 CALL rrd_mpi_io_global_array( 'hom_sum', hom_sum ) 947 CALL rrd_mpi_io( 'humidity', humidity ) 948 CALL rd_mpi_io_check_array( 'inflow_damping_factor', found = array_found ) 949 IF ( array_found ) THEN 950 IF ( .NOT. ALLOCATED( inflow_damping_factor ) ) THEN 951 ALLOCATE( inflow_damping_factor(0:nz+1) ) 952 ENDIF 953 CALL rrd_mpi_io_global_array( 'inflow_damping_factor', inflow_damping_factor ) 954 ENDIF 955 CALL rrd_mpi_io( 'inflow_damping_height', inflow_damping_height ) 956 CALL rrd_mpi_io( 'inflow_damping_width', inflow_damping_width ) 957 CALL rrd_mpi_io( 'inflow_disturbance_begin', inflow_disturbance_begin ) 958 CALL rrd_mpi_io( 'inflow_disturbance_end', inflow_disturbance_end ) 959 CALL rrd_mpi_io( 'km_constant', km_constant ) 960 CALL rrd_mpi_io( 'large_scale_forcing', large_scale_forcing ) 961 CALL rrd_mpi_io( 'large_scale_subsidence', large_scale_subsidence ) 962 CALL rrd_mpi_io( 'latitude', latitude ) 963 CALL rrd_mpi_io( 'longitude', longitude ) 964 CALL rrd_mpi_io( 'loop_optimization', loop_optimization ) 965 CALL rrd_mpi_io( 'masking_method', masking_method ) 966 CALL rd_mpi_io_check_array( 'mean_inflow_profiles', found = array_found ) 967 IF ( array_found) THEN 968 IF ( .NOT. ALLOCATED( mean_inflow_profiles ) ) THEN 969 ALLOCATE( mean_inflow_profiles(0:nz+1,7) ) 970 ENDIF 971 CALL rrd_mpi_io_global_array( 'mean_inflow_profiles', mean_inflow_profiles ) 972 ENDIF 973 CALL rrd_mpi_io( 'mg_cycles', mg_cycles ) 974 CALL rrd_mpi_io( 'mg_switch_to_pe0_level', mg_switch_to_pe0_level ) 975 CALL rrd_mpi_io( 'mixing_length_1d', mixing_length_1d ) 976 CALL rrd_mpi_io( 'momentum_advec', momentum_advec ) 977 ! 978 !-- There is no module procedure for CHARACTER arrays 979 DO i = 1, SIZE( netcdf_precision , 1 ) 980 WRITE( tmp_name, '(A,I2.2)' ) 'netcdf_precision_', i 981 CALL rrd_mpi_io( TRIM( tmp_name ), netcdf_precision(i) ) 798 982 ENDDO 799 800 801 CALL close_file( 13 ) 802 803 804 END SUBROUTINE rrd_global 983 CALL rrd_mpi_io( 'neutral', neutral ) 984 CALL rrd_mpi_io( 'ngsrb', ngsrb ) 985 CALL rrd_mpi_io( 'nsor', nsor ) 986 CALL rrd_mpi_io( 'nsor_ini', nsor_ini ) 987 CALL rrd_mpi_io( 'nudging', nudging ) 988 CALL rrd_mpi_io( 'num_leg', num_leg ) 989 CALL rrd_mpi_io( 'nx', nx ) 990 nx_on_file = nx 991 CALL rrd_mpi_io( 'ny', ny ) 992 ny_on_file = ny 993 CALL rrd_mpi_io( 'ocean_mode', ocean_mode ) 994 CALL rrd_mpi_io( 'omega', omega ) 995 CALL rrd_mpi_io( 'omega_sor', omega_sor ) 996 CALL rrd_mpi_io( 'origin_data_time', origin_date_time ) 997 CALL rrd_mpi_io( 'output_for_t0', output_for_t0 ) 998 CALL rrd_mpi_io( 'particle_advection', particle_advection ) 999 CALL rrd_mpi_io( 'passive_scalar', passive_scalar ) 1000 CALL rrd_mpi_io( 'prandtl_number', prandtl_number ) 1001 CALL rrd_mpi_io( 'psolver', psolver ) 1002 CALL rrd_mpi_io( 'pt_damping_factor', pt_damping_factor ) 1003 CALL rrd_mpi_io( 'pt_damping_width', pt_damping_width ) 1004 CALL rrd_mpi_io_global_array( 'pt_init', pt_init ) 1005 CALL rrd_mpi_io( 'pt_reference', pt_reference ) 1006 CALL rrd_mpi_io( 'pt_surface', pt_surface ) 1007 CALL rrd_mpi_io( 'pt_surface_initial_change', pt_surface_initial_change ) 1008 CALL rrd_mpi_io_global_array( 'pt_vertical_gradient', pt_vertical_gradient ) 1009 CALL rrd_mpi_io_global_array( 'pt_vertical_gradient_level', pt_vertical_gradient_level ) 1010 CALL rrd_mpi_io_global_array( 'pt_vertical_gradient_level_ind', pt_vertical_gradient_level_ind ) 1011 CALL rrd_mpi_io_global_array( 'q_init', q_init ) 1012 CALL rrd_mpi_io( 'q_surface', q_surface ) 1013 CALL rrd_mpi_io( 'q_surface_initial_change', q_surface_initial_change ) 1014 CALL rrd_mpi_io_global_array( 'q_vertical_gradient', q_vertical_gradient ) 1015 CALL rrd_mpi_io_global_array( 'q_vertical_gradient_level', q_vertical_gradient_level ) 1016 CALL rrd_mpi_io_global_array( 'q_vertical_gradient_level_ind', q_vertical_gradient_level_ind ) 1017 CALL rrd_mpi_io( 'random_generator', random_generator ) 1018 CALL rrd_mpi_io( 'random_heatflux', random_heatflux ) 1019 CALL rrd_mpi_io( 'rans_mode', rans_mode ) 1020 CALL rrd_mpi_io( 'rayleigh_damping_factor', rayleigh_damping_factor ) 1021 CALL rrd_mpi_io( 'rayleigh_damping_height', rayleigh_damping_height ) 1022 CALL rrd_mpi_io( 'recycling_width', recycling_width ) 1023 CALL rrd_mpi_io_global_array( 'ref_state', ref_state ) 1024 CALL rrd_mpi_io( 'reference_state', reference_state ) 1025 CALL rrd_mpi_io( 'residual_limit', residual_limit ) 1026 CALL rrd_mpi_io( 'roughness_length', roughness_length ) 1027 CALL rrd_mpi_io( 'run_coupled', run_coupled ) 1028 CALL rrd_mpi_io( 'runnr', runnr ) 1029 CALL rrd_mpi_io_global_array( 's_init', s_init ) 1030 CALL rrd_mpi_io( 's_surface', s_surface ) 1031 CALL rrd_mpi_io( 's_surface_initial_change', s_surface_initial_change ) 1032 CALL rrd_mpi_io_global_array( 's_vertical_gradient', s_vertical_gradient ) 1033 CALL rrd_mpi_io_global_array( 's_vertical_gradient_level', s_vertical_gradient_level ) 1034 CALL rrd_mpi_io_global_array( 's_vertical_gradient_level_ind', s_vertical_gradient_level_ind ) 1035 CALL rrd_mpi_io( 'scalar_advec', scalar_advec ) 1036 CALL rrd_mpi_io( 'simulated_time', simulated_time ) 1037 CALL rd_mpi_io_check_array( 'spectrum_x', found = array_found ) 1038 IF (array_found ) THEN 1039 IF ( .NOT. ALLOCATED( spectrum_x ) ) THEN 1040 ALLOCATE( spectrum_x( 1:nx/2, 1:100, 1:10 ) ) 1041 ENDIF 1042 CALL rrd_mpi_io( 'spectrum_y', spectrum_y ) 1043 ENDIF 1044 CALL rd_mpi_io_check_array( 'spectrum_y', found = array_found ) 1045 IF ( array_found ) THEN 1046 IF ( .NOT. ALLOCATED( spectrum_y ) ) THEN 1047 ALLOCATE( spectrum_y( 1:ny/2, 1:100, 1:10 ) ) 1048 ENDIF 1049 CALL rrd_mpi_io( 'spectrum_y', spectrum_y ) 1050 ENDIF 1051 CALL rrd_mpi_io( 'spinup_time ', spinup_time ) 1052 CALL rrd_mpi_io_global_array( 'subs_vertical_gradient', subs_vertical_gradient ) 1053 CALL rrd_mpi_io_global_array( 'subs_vertical_gradient_level', subs_vertical_gradient_level ) 1054 CALL rrd_mpi_io_global_array( 'subs_vertical_gradient_level_i', subs_vertical_gradient_level_i ) 1055 CALL rrd_mpi_io( 'surface_heatflux', surface_heatflux ) 1056 CALL rrd_mpi_io( 'surface_pressure', surface_pressure ) 1057 CALL rrd_mpi_io( 'surface_output', surface_output ) 1058 CALL rrd_mpi_io( 'surface_scalarflux', surface_scalarflux ) 1059 CALL rrd_mpi_io( 'surface_waterflux', surface_waterflux ) 1060 CALL rrd_mpi_io( 'syn_turb_gen', syn_turb_gen ) 1061 CALL rrd_mpi_io( 'time_coupling', time_coupling ) 1062 CALL rrd_mpi_io( 'time_disturb', time_disturb ) 1063 CALL rrd_mpi_io( 'time_do2d_xy', time_do2d_xy ) 1064 CALL rrd_mpi_io( 'time_do2d_xz', time_do2d_xz ) 1065 CALL rrd_mpi_io( 'time_do2d_yz', time_do2d_yz ) 1066 CALL rrd_mpi_io( 'time_do3d', time_do3d ) 1067 CALL rrd_mpi_io( 'time_do_av', time_do_av ) 1068 CALL rrd_mpi_io( 'time_do_sla', time_do_sla ) 1069 CALL rrd_mpi_io_global_array( 'time_domask', time_domask ) 1070 CALL rrd_mpi_io( 'time_dopr', time_dopr ) 1071 CALL rrd_mpi_io( 'time_dopr_av', time_dopr_av ) 1072 CALL rrd_mpi_io( 'time_dopr_listing', time_dopr_listing ) 1073 CALL rrd_mpi_io( 'time_dopts', time_dopts ) 1074 CALL rrd_mpi_io( 'time_dosp', time_dosp ) 1075 CALL rrd_mpi_io( 'time_dots', time_dots ) 1076 CALL rrd_mpi_io( 'time_radiation', time_radiation ) 1077 CALL rrd_mpi_io( 'time_restart', time_restart ) 1078 CALL rrd_mpi_io( 'time_run_control', time_run_control ) 1079 CALL rrd_mpi_io( 'time_since_reference_point', time_since_reference_point ) 1080 CALL rrd_mpi_io( 'time_virtual_measurement', time_virtual_measurement ) 1081 CALL rrd_mpi_io( 'timestep_scheme', timestep_scheme ) 1082 CALL rrd_mpi_io( 'top_heatflux', top_heatflux ) 1083 CALL rrd_mpi_io( 'top_momentumflux_u', top_momentumflux_u ) 1084 CALL rrd_mpi_io( 'top_momentumflux_v', top_momentumflux_v ) 1085 CALL rrd_mpi_io( 'top_scalarflux', top_scalarflux ) 1086 CALL rrd_mpi_io( 'topography', topography ) 1087 CALL rrd_mpi_io( 'topography_grid_convention', topography_grid_convention ) 1088 CALL rrd_mpi_io_global_array( 'tsc', tsc ) 1089 CALL rrd_mpi_io( 'tunnel_height', tunnel_height ) 1090 CALL rrd_mpi_io( 'tunnel_length', tunnel_length ) 1091 CALL rrd_mpi_io( 'tunnel_wall_depth', tunnel_wall_depth ) 1092 CALL rrd_mpi_io( 'tunnel_width_x', tunnel_width_x ) 1093 CALL rrd_mpi_io( 'tunnel_width_y', tunnel_width_y ) 1094 CALL rrd_mpi_io( 'turbulence_closure', turbulence_closure ) 1095 CALL rrd_mpi_io( 'turbulent_inflow', turbulent_inflow ) 1096 CALL rrd_mpi_io( 'u_bulk', u_bulk ) 1097 CALL rrd_mpi_io_global_array( 'u_init', u_init ) 1098 CALL rrd_mpi_io( 'u_max', u_max ) 1099 CALL rrd_mpi_io_global_array( 'u_max_ijk', u_max_ijk ) 1100 CALL rrd_mpi_io_global_array( 'ug', ug ) 1101 CALL rrd_mpi_io( 'ug_surface', ug_surface ) 1102 CALL rrd_mpi_io_global_array( 'ug_vertical_gradient', ug_vertical_gradient ) 1103 CALL rrd_mpi_io_global_array( 'ug_vertical_gradient_level', ug_vertical_gradient_level ) 1104 CALL rrd_mpi_io_global_array( 'ug_vertical_gradient_level_ind', ug_vertical_gradient_level_ind ) 1105 CALL rrd_mpi_io( 'use_surface_fluxes', use_surface_fluxes ) 1106 CALL rrd_mpi_io( 'use_top_fluxes', use_top_fluxes ) 1107 CALL rrd_mpi_io( 'use_ug_for_galilei_tr', use_ug_for_galilei_tr ) 1108 CALL rrd_mpi_io( 'use_upstream_for_tke', use_upstream_for_tke ) 1109 CALL rrd_mpi_io( 'user_module_enabled', user_module_enabled ) 1110 CALL rrd_mpi_io( 'v_bulk', v_bulk ) 1111 CALL rrd_mpi_io_global_array( 'v_init', v_init ) 1112 CALL rrd_mpi_io( 'v_max', v_max ) 1113 CALL rrd_mpi_io_global_array( 'v_max_ijk', v_max_ijk ) 1114 CALL rrd_mpi_io_global_array( 'vg', vg ) 1115 CALL rrd_mpi_io( 'vg_surface', vg_surface ) 1116 CALL rrd_mpi_io_global_array( 'vg_vertical_gradient', vg_vertical_gradient ) 1117 CALL rrd_mpi_io_global_array( 'vg_vertical_gradient_level', vg_vertical_gradient_level ) 1118 CALL rrd_mpi_io_global_array( 'vg_vertical_gradient_level_ind', vg_vertical_gradient_level_ind ) 1119 CALL rrd_mpi_io( 'virtual_flight', virtual_flight ) 1120 CALL rrd_mpi_io( 'vnest_init', vnest_init ) 1121 CALL rrd_mpi_io_global_array( 'volume_flow_area', volume_flow_area ) 1122 CALL rrd_mpi_io_global_array( 'volume_flow_initial', volume_flow_initial ) 1123 CALL rrd_mpi_io( 'w_max', w_max ) 1124 CALL rrd_mpi_io_global_array( 'w_max_ijk', w_max_ijk ) 1125 CALL rrd_mpi_io( 'wall_adjustment', wall_adjustment ) 1126 CALL rrd_mpi_io_global_array( 'wall_heatflux', wall_heatflux ) 1127 CALL rrd_mpi_io_global_array( 'wall_humidityflux', wall_humidityflux ) 1128 CALL rrd_mpi_io_global_array( 'wall_scalarflux', wall_scalarflux ) 1129 CALL rrd_mpi_io( 'y_shift', y_shift ) 1130 CALL rrd_mpi_io( 'z0h_factor', z0h_factor ) 1131 CALL rrd_mpi_io( 'zeta_max', zeta_max ) 1132 CALL rrd_mpi_io( 'zeta_min', zeta_min ) 1133 CALL rrd_mpi_io_global_array( 'z_i', z_i ) 1134 1135 ! 1136 !-- Read global variables from of other modules 1137 CALL module_interface_rrd_global 1138 1139 ! 1140 !-- Close restart File 1141 CALL rd_mpi_io_close 1142 1143 #if defined( __parallel ) 1144 CALL MPI_BARRIER( MPI_COMM_WORLD, ierr ) 1145 #endif 1146 1147 ENDIF 1148 1149 CALL location_message( 'read global restart data', 'finished' ) 1150 1151 END SUBROUTINE rrd_global 805 1152 806 1153 … … 1895 2242 !> Skipping the global control variables from restart-file (binary format) 1896 2243 !------------------------------------------------------------------------------! 1897 1898 SUBROUTINE rrd_skip_global 1899 1900 1901 CHARACTER (LEN=1) :: cdum 1902 1903 2244 SUBROUTINE rrd_skip_global 2245 2246 2247 CHARACTER (LEN=1) :: cdum 2248 2249 2250 READ ( 13 ) length 2251 READ ( 13 ) restart_string(1:length) 2252 2253 DO WHILE ( restart_string(1:length) /= 'binary_version_local' ) 2254 2255 READ ( 13 ) cdum 1904 2256 READ ( 13 ) length 1905 2257 READ ( 13 ) restart_string(1:length) 1906 2258 1907 DO WHILE ( restart_string(1:length) /= 'binary_version_local' ) 1908 1909 READ ( 13 ) cdum 1910 READ ( 13 ) length 1911 READ ( 13 ) restart_string(1:length) 1912 1913 ENDDO 1914 1915 BACKSPACE ( 13 ) 1916 BACKSPACE ( 13 ) 1917 1918 1919 END SUBROUTINE rrd_skip_global 2259 ENDDO 2260 2261 BACKSPACE ( 13 ) 2262 BACKSPACE ( 13 ) 2263 2264 2265 END SUBROUTINE rrd_skip_global 1920 2266 1921 2267 -
palm/trunk/SOURCE/surface_data_output_mod.f90
r4444 r4495 25 25 ! ----------------- 26 26 ! $Id$ 27 ! restart data handling with MPI-IO added 28 ! 29 ! 4444 2020-03-05 15:59:50Z raasch 27 30 ! bugfix: cpp-directives for serial mode added 28 31 ! … … 108 111 USE control_parameters, & 109 112 ONLY: coupling_char, data_output_during_spinup, end_time, & 110 message_string, r un_description_header, simulated_time_at_begin, &113 message_string, restart_data_format_output, run_description_header, simulated_time_at_begin, & 111 114 spinup_time, surface_output 112 115 … … 130 133 131 134 USE pegrid 135 136 USE restart_data_mpi_io_mod, & 137 ONLY: rrd_mpi_io, wrd_mpi_io 132 138 133 139 USE surface_mod, & … … 237 243 238 244 INTERFACE surface_data_output_rrd_global 239 MODULE PROCEDURE surface_data_output_rrd_global 245 MODULE PROCEDURE surface_data_output_rrd_global_ftn 246 MODULE PROCEDURE surface_data_output_rrd_global_mpi 240 247 END INTERFACE surface_data_output_rrd_global 241 248 … … 4507 4514 END SUBROUTINE surface_data_output_last_action 4508 4515 4516 4509 4517 !------------------------------------------------------------------------------! 4510 4518 ! Description: 4511 4519 ! ------------ 4512 !> This routine reads globally used restart data.4520 !> Read module-specific global restart data (Fortran binary format). 4513 4521 !------------------------------------------------------------------------------! 4514 SUBROUTINE surface_data_output_rrd_global ( found )4522 SUBROUTINE surface_data_output_rrd_global_ftn( found ) 4515 4523 4516 4524 … … 4536 4544 4537 4545 4538 END SUBROUTINE surface_data_output_rrd_global 4546 END SUBROUTINE surface_data_output_rrd_global_ftn 4547 4548 4549 !------------------------------------------------------------------------------! 4550 ! Description: 4551 ! ------------ 4552 !> Read module-specific global restart data (MPI-IO). 4553 !------------------------------------------------------------------------------! 4554 SUBROUTINE surface_data_output_rrd_global_mpi 4555 4556 CALL rrd_mpi_io( 'average_count_surf', average_count_surf ) 4557 4558 END SUBROUTINE surface_data_output_rrd_global_mpi 4559 4539 4560 4540 4561 !------------------------------------------------------------------------------! … … 4581 4602 IMPLICIT NONE 4582 4603 4583 CALL wrd_write_string( 'average_count_surf' ) 4584 WRITE ( 14 ) average_count_surf 4604 IF ( TRIM( restart_data_format_output ) == 'fortran_binary' ) THEN 4605 4606 CALL wrd_write_string( 'average_count_surf' ) 4607 WRITE ( 14 ) average_count_surf 4608 4609 ELSEIF ( TRIM( restart_data_format_output ) == 'mpi' ) THEN 4610 4611 CALL wrd_mpi_io( 'average_count_surf', average_count_surf ) 4612 4613 ENDIF 4585 4614 4586 4615 END SUBROUTINE surface_data_output_wrd_global … … 4595 4624 IMPLICIT NONE 4596 4625 4597 IF ( ALLOCATED( surfaces%var_av ) ) THEN 4598 CALL wrd_write_string( 'surfaces%var_av' ) 4599 WRITE ( 14 ) surfaces%var_av 4600 ENDIF 4601 4626 IF ( TRIM( restart_data_format_output ) == 'fortran_binary' ) THEN 4627 4628 IF ( ALLOCATED( surfaces%var_av ) ) THEN 4629 CALL wrd_write_string( 'surfaces%var_av' ) 4630 WRITE ( 14 ) surfaces%var_av 4631 ENDIF 4632 4633 ELSEIF ( TRIM( restart_data_format_output ) == 'mpi' ) THEN 4634 4635 IF ( ALLOCATED( surfaces%var_av ) ) CALL wrd_mpi_io( 'surfaces%var_av', surfaces%var_av ) 4636 4637 ENDIF 4602 4638 4603 4639 END SUBROUTINE surface_data_output_wrd_local -
palm/trunk/SOURCE/surface_mod.f90
r4366 r4495 26 26 ! ----------------- 27 27 ! $Id$ 28 ! restart data handling with MPI-IO added 29 ! 30 ! 4366 2020-01-09 08:12:43Z raasch 28 31 ! workaround implemented to avoid vectorization bug on NEC Aurora 29 32 ! … … 138 141 ONLY: rif1d, us1d, usws1d, vsws1d 139 142 143 USE restart_data_mpi_io_mod, & 144 ONLY: rd_mpi_io_surface_filetypes, total_number_of_surface_values, wrd_mpi_io, & 145 wrd_mpi_io_global_array, wrd_mpi_io_surface 140 146 141 147 IMPLICIT NONE … … 2980 2986 INTEGER(iwp), DIMENSION(0:3) :: mm !< running index for surface elements on gathered surface array 2981 2987 INTEGER(iwp), DIMENSION(0:3) :: start_index_v !< start index for vertical surface elements on gathered surface array 2988 2989 INTEGER(iwp),DIMENSION(nys:nyn,nxl:nxr) :: global_start_index !< index for surface data (MPI-IO) 2990 2991 LOGICAL :: surface_data_to_write !< switch for MPI-I/O if PE has surface data to write 2982 2992 2983 2993 TYPE(surf_type), DIMENSION(0:2) :: surf_h !< gathered horizontal surfaces, contains all surface types … … 3165 3175 IF ( ALLOCATED( surf_usm_h%pt_surface ) ) & 3166 3176 surf_h(l)%pt_surface(mm(l)) = surf_usm_h%pt_surface(m) 3167 IF ( ALLOCATED( surf_usm_h%q_surface ) )&3177 IF ( ALLOCATED( surf_usm_h%q_surface ) ) & 3168 3178 surf_h(l)%q_surface(mm(l)) = surf_usm_h%q_surface(m) 3169 3179 IF ( ALLOCATED( surf_usm_h%vpt_surface ) ) & … … 3476 3486 3477 3487 ENDDO 3478 ! 3479 !-- Output strings for the total number of upward / downward-facing surfaces 3480 !-- on subdomain. 3481 CALL wrd_write_string( 'ns_h_on_file' ) 3482 WRITE ( 14 ) ns_h_on_file 3483 ! 3484 !-- Output strings for the total number of north/south/east/westward-facing surfaces 3485 !-- on subdomain. 3486 CALL wrd_write_string( 'ns_v_on_file' ) 3487 WRITE ( 14 ) ns_v_on_file 3488 3489 ! 3490 !-- Write required restart data. 3491 !-- Start with horizontal surfaces (upward-, downward-facing, and model top). 3492 !-- Always start with %start_index followed by %end_index 3493 DO l = 0, 2 3494 WRITE( dum, '(I1)') l 3495 3496 CALL wrd_write_string( 'surf_h(' // dum // ')%start_index' ) 3497 WRITE ( 14 ) surf_h(l)%start_index 3498 3499 CALL wrd_write_string( 'surf_h(' // dum // ')%end_index' ) 3500 WRITE ( 14 ) surf_h(l)%end_index 3501 3502 IF ( ALLOCATED ( surf_h(l)%us ) ) THEN 3503 CALL wrd_write_string( 'surf_h(' // dum // ')%us' ) 3504 WRITE ( 14 ) surf_h(l)%us 3505 ENDIF 3506 3507 IF ( ALLOCATED ( surf_h(l)%ts ) ) THEN 3508 CALL wrd_write_string( 'surf_h(' // dum // ')%ts' ) 3509 WRITE ( 14 ) surf_h(l)%ts 3510 ENDIF 3488 3489 ! 3490 !-- Now start writing restart data to file 3491 IF ( TRIM( restart_data_format_output ) == 'fortran_binary' ) THEN 3492 3493 ! 3494 !-- Output strings for the total number of upward / downward-facing surfaces 3495 !-- on subdomain. 3496 CALL wrd_write_string( 'ns_h_on_file' ) 3497 WRITE ( 14 ) ns_h_on_file 3498 ! 3499 !-- Output strings for the total number of north/south/east/westward-facing surfaces 3500 !-- on subdomain. 3501 CALL wrd_write_string( 'ns_v_on_file' ) 3502 WRITE ( 14 ) ns_v_on_file 3503 3504 ! 3505 !-- Horizontal surfaces (upward-, downward-facing, and model top). 3506 !-- Always start with %start_index followed by %end_index 3507 DO l = 0, 2 3508 WRITE( dum, '(I1)') l 3509 3510 CALL wrd_write_string( 'surf_h(' // dum // ')%start_index' ) 3511 WRITE ( 14 ) surf_h(l)%start_index 3512 3513 CALL wrd_write_string( 'surf_h(' // dum // ')%end_index' ) 3514 WRITE ( 14 ) surf_h(l)%end_index 3515 3516 IF ( ALLOCATED ( surf_h(l)%us ) ) THEN 3517 CALL wrd_write_string( 'surf_h(' // dum // ')%us' ) 3518 WRITE ( 14 ) surf_h(l)%us 3519 ENDIF 3520 3521 IF ( ALLOCATED ( surf_h(l)%ts ) ) THEN 3522 CALL wrd_write_string( 'surf_h(' // dum // ')%ts' ) 3523 WRITE ( 14 ) surf_h(l)%ts 3524 ENDIF 3511 3525 3512 IF ( ALLOCATED ( surf_h(l)%qs ) ) THEN3513 CALL wrd_write_string( 'surf_h(' // dum // ')%qs' )3514 WRITE ( 14 ) surf_h(l)%qs3515 ENDIF3516 3517 IF ( ALLOCATED ( surf_h(l)%ss ) ) THEN3518 CALL wrd_write_string( 'surf_h(' // dum // ')%ss' )3519 WRITE ( 14 ) surf_h(l)%ss3520 ENDIF3521 3522 IF ( ALLOCATED ( surf_h(l)%qcs ) ) THEN3523 CALL wrd_write_string( 'surf_h(' // dum // ')%qcs' )3524 WRITE ( 14 ) surf_h(l)%qcs3525 ENDIF3526 3527 IF ( ALLOCATED ( surf_h(l)%ncs ) ) THEN3528 CALL wrd_write_string( 'surf_h(' // dum // ')%ncs' )3529 WRITE ( 14 ) surf_h(l)%ncs3530 ENDIF3531 3532 IF ( ALLOCATED ( surf_h(l)%qrs ) ) THEN3533 CALL wrd_write_string( 'surf_h(' // dum // ')%qrs' )3534 WRITE ( 14 ) surf_h(l)%qrs3535 ENDIF3536 3537 IF ( ALLOCATED ( surf_h(l)%nrs ) ) THEN3538 CALL wrd_write_string( 'surf_h(' // dum // ')%nrs' )3539 WRITE ( 14 ) surf_h(l)%nrs3540 ENDIF3541 3542 IF ( ALLOCATED ( surf_h(l)%ol ) ) THEN3543 CALL wrd_write_string( 'surf_h(' // dum // ')%ol' )3544 WRITE ( 14 ) surf_h(l)%ol3545 ENDIF3546 3547 IF ( ALLOCATED ( surf_h(l)%rib ) ) THEN3548 CALL wrd_write_string( 'surf_h(' // dum // ')%rib' )3549 WRITE ( 14 ) surf_h(l)%rib3550 ENDIF3551 3552 IF ( ALLOCATED ( surf_h(l)%pt_surface ) ) THEN3553 CALL wrd_write_string( 'surf_h(' // dum // ')%pt_surface' )3554 WRITE ( 14 ) surf_h(l)%pt_surface3555 ENDIF3526 IF ( ALLOCATED ( surf_h(l)%qs ) ) THEN 3527 CALL wrd_write_string( 'surf_h(' // dum // ')%qs' ) 3528 WRITE ( 14 ) surf_h(l)%qs 3529 ENDIF 3530 3531 IF ( ALLOCATED ( surf_h(l)%ss ) ) THEN 3532 CALL wrd_write_string( 'surf_h(' // dum // ')%ss' ) 3533 WRITE ( 14 ) surf_h(l)%ss 3534 ENDIF 3535 3536 IF ( ALLOCATED ( surf_h(l)%qcs ) ) THEN 3537 CALL wrd_write_string( 'surf_h(' // dum // ')%qcs' ) 3538 WRITE ( 14 ) surf_h(l)%qcs 3539 ENDIF 3540 3541 IF ( ALLOCATED ( surf_h(l)%ncs ) ) THEN 3542 CALL wrd_write_string( 'surf_h(' // dum // ')%ncs' ) 3543 WRITE ( 14 ) surf_h(l)%ncs 3544 ENDIF 3545 3546 IF ( ALLOCATED ( surf_h(l)%qrs ) ) THEN 3547 CALL wrd_write_string( 'surf_h(' // dum // ')%qrs' ) 3548 WRITE ( 14 ) surf_h(l)%qrs 3549 ENDIF 3550 3551 IF ( ALLOCATED ( surf_h(l)%nrs ) ) THEN 3552 CALL wrd_write_string( 'surf_h(' // dum // ')%nrs' ) 3553 WRITE ( 14 ) surf_h(l)%nrs 3554 ENDIF 3555 3556 IF ( ALLOCATED ( surf_h(l)%ol ) ) THEN 3557 CALL wrd_write_string( 'surf_h(' // dum // ')%ol' ) 3558 WRITE ( 14 ) surf_h(l)%ol 3559 ENDIF 3560 3561 IF ( ALLOCATED ( surf_h(l)%rib ) ) THEN 3562 CALL wrd_write_string( 'surf_h(' // dum // ')%rib' ) 3563 WRITE ( 14 ) surf_h(l)%rib 3564 ENDIF 3565 3566 IF ( ALLOCATED ( surf_h(l)%pt_surface ) ) THEN 3567 CALL wrd_write_string( 'surf_h(' // dum // ')%pt_surface' ) 3568 WRITE ( 14 ) surf_h(l)%pt_surface 3569 ENDIF 3556 3570 3557 IF ( ALLOCATED ( surf_h(l)%q_surface ) ) THEN3558 CALL wrd_write_string( 'surf_h(' // dum // ')%q_surface' )3559 WRITE ( 14 ) surf_h(l)%q_surface3560 ENDIF3561 3562 IF ( ALLOCATED ( surf_h(l)%vpt_surface ) ) THEN3563 CALL wrd_write_string( 'surf_h(' // dum // ')%vpt_surface' )3564 WRITE ( 14 ) surf_h(l)%vpt_surface3565 ENDIF3566 3567 IF ( ALLOCATED ( surf_h(l)%usws ) ) THEN3568 CALL wrd_write_string( 'surf_h(' // dum // ')%usws' )3569 WRITE ( 14 ) surf_h(l)%usws3570 ENDIF3571 3572 IF ( ALLOCATED ( surf_h(l)%vsws ) ) THEN3573 CALL wrd_write_string( 'surf_h(' // dum // ')%vsws' )3574 WRITE ( 14 ) surf_h(l)%vsws3575 ENDIF3571 IF ( ALLOCATED ( surf_h(l)%q_surface ) ) THEN 3572 CALL wrd_write_string( 'surf_h(' // dum // ')%q_surface' ) 3573 WRITE ( 14 ) surf_h(l)%q_surface 3574 ENDIF 3575 3576 IF ( ALLOCATED ( surf_h(l)%vpt_surface ) ) THEN 3577 CALL wrd_write_string( 'surf_h(' // dum // ')%vpt_surface' ) 3578 WRITE ( 14 ) surf_h(l)%vpt_surface 3579 ENDIF 3580 3581 IF ( ALLOCATED ( surf_h(l)%usws ) ) THEN 3582 CALL wrd_write_string( 'surf_h(' // dum // ')%usws' ) 3583 WRITE ( 14 ) surf_h(l)%usws 3584 ENDIF 3585 3586 IF ( ALLOCATED ( surf_h(l)%vsws ) ) THEN 3587 CALL wrd_write_string( 'surf_h(' // dum // ')%vsws' ) 3588 WRITE ( 14 ) surf_h(l)%vsws 3589 ENDIF 3576 3590 3577 IF ( ALLOCATED ( surf_h(l)%shf ) ) THEN3578 CALL wrd_write_string( 'surf_h(' // dum // ')%shf' )3579 WRITE ( 14 ) surf_h(l)%shf3580 ENDIF3581 3582 IF ( ALLOCATED ( surf_h(l)%qsws ) ) THEN3583 CALL wrd_write_string( 'surf_h(' // dum // ')%qsws' )3584 WRITE ( 14 ) surf_h(l)%qsws3585 ENDIF3586 3587 IF ( ALLOCATED ( surf_h(l)%ssws ) ) THEN3588 CALL wrd_write_string( 'surf_h(' // dum // ')%ssws' )3589 WRITE ( 14 ) surf_h(l)%ssws3590 ENDIF3591 3592 IF ( ALLOCATED ( surf_h(l)%css ) ) THEN3593 CALL wrd_write_string( 'surf_h(' // dum // ')%css' )3594 WRITE ( 14 ) surf_h(l)%css3595 ENDIF3596 3597 IF ( ALLOCATED ( surf_h(l)%cssws ) ) THEN3598 CALL wrd_write_string( 'surf_h(' // dum // ')%cssws' )3599 WRITE ( 14 ) surf_h(l)%cssws3600 ENDIF3601 3602 IF ( ALLOCATED ( surf_h(l)%qcsws ) ) THEN3603 CALL wrd_write_string( 'surf_h(' // dum // ')%qcsws' )3604 WRITE ( 14 ) surf_h(l)%qcsws3605 ENDIF3606 3607 IF ( ALLOCATED ( surf_h(l)%ncsws ) ) THEN3608 CALL wrd_write_string( 'surf_h(' // dum // ')%ncsws' )3609 WRITE ( 14 ) surf_h(l)%ncsws3610 ENDIF3611 3612 IF ( ALLOCATED ( surf_h(l)%qrsws ) ) THEN3613 CALL wrd_write_string( 'surf_h(' // dum // ')%qrsws' )3614 WRITE ( 14 ) surf_h(l)%qrsws3615 ENDIF3616 3617 IF ( ALLOCATED ( surf_h(l)%nrsws ) ) THEN3618 CALL wrd_write_string( 'surf_h(' // dum // ')%nrsws' )3619 WRITE ( 14 ) surf_h(l)%nrsws3620 ENDIF3621 3622 IF ( ALLOCATED ( surf_h(l)%sasws ) ) THEN3623 CALL wrd_write_string( 'surf_h(' // dum // ')%sasws' )3624 WRITE ( 14 ) surf_h(l)%sasws3625 ENDIF3591 IF ( ALLOCATED ( surf_h(l)%shf ) ) THEN 3592 CALL wrd_write_string( 'surf_h(' // dum // ')%shf' ) 3593 WRITE ( 14 ) surf_h(l)%shf 3594 ENDIF 3595 3596 IF ( ALLOCATED ( surf_h(l)%qsws ) ) THEN 3597 CALL wrd_write_string( 'surf_h(' // dum // ')%qsws' ) 3598 WRITE ( 14 ) surf_h(l)%qsws 3599 ENDIF 3600 3601 IF ( ALLOCATED ( surf_h(l)%ssws ) ) THEN 3602 CALL wrd_write_string( 'surf_h(' // dum // ')%ssws' ) 3603 WRITE ( 14 ) surf_h(l)%ssws 3604 ENDIF 3605 3606 IF ( ALLOCATED ( surf_h(l)%css ) ) THEN 3607 CALL wrd_write_string( 'surf_h(' // dum // ')%css' ) 3608 WRITE ( 14 ) surf_h(l)%css 3609 ENDIF 3610 3611 IF ( ALLOCATED ( surf_h(l)%cssws ) ) THEN 3612 CALL wrd_write_string( 'surf_h(' // dum // ')%cssws' ) 3613 WRITE ( 14 ) surf_h(l)%cssws 3614 ENDIF 3615 3616 IF ( ALLOCATED ( surf_h(l)%qcsws ) ) THEN 3617 CALL wrd_write_string( 'surf_h(' // dum // ')%qcsws' ) 3618 WRITE ( 14 ) surf_h(l)%qcsws 3619 ENDIF 3620 3621 IF ( ALLOCATED ( surf_h(l)%ncsws ) ) THEN 3622 CALL wrd_write_string( 'surf_h(' // dum // ')%ncsws' ) 3623 WRITE ( 14 ) surf_h(l)%ncsws 3624 ENDIF 3625 3626 IF ( ALLOCATED ( surf_h(l)%qrsws ) ) THEN 3627 CALL wrd_write_string( 'surf_h(' // dum // ')%qrsws' ) 3628 WRITE ( 14 ) surf_h(l)%qrsws 3629 ENDIF 3630 3631 IF ( ALLOCATED ( surf_h(l)%nrsws ) ) THEN 3632 CALL wrd_write_string( 'surf_h(' // dum // ')%nrsws' ) 3633 WRITE ( 14 ) surf_h(l)%nrsws 3634 ENDIF 3635 3636 IF ( ALLOCATED ( surf_h(l)%sasws ) ) THEN 3637 CALL wrd_write_string( 'surf_h(' // dum // ')%sasws' ) 3638 WRITE ( 14 ) surf_h(l)%sasws 3639 ENDIF 3626 3640 3627 ENDDO3628 ! 3629 !-- Write vertical surfaces.3630 !-- Always start with %start_index followed by %end_index.3631 DO l = 0, 33632 WRITE( dum, '(I1)') l3633 3634 CALL wrd_write_string( 'surf_v(' // dum // ')%start_index' )3635 WRITE ( 14 ) surf_v(l)%start_index3636 3637 CALL wrd_write_string( 'surf_v(' // dum // ')%end_index' )3638 WRITE ( 14 ) surf_v(l)%end_index3639 3640 IF ( ALLOCATED ( surf_v(l)%us ) ) THEN3641 CALL wrd_write_string( 'surf_v(' // dum // ')%us' )3642 WRITE ( 14 ) surf_v(l)%us3643 ENDIF3644 3645 IF ( ALLOCATED ( surf_v(l)%ts ) ) THEN3646 CALL wrd_write_string( 'surf_v(' // dum // ')%ts' )3647 WRITE ( 14 ) surf_v(l)%ts3648 ENDIF3649 3650 IF ( ALLOCATED ( surf_v(l)%qs ) ) THEN3651 CALL wrd_write_string( 'surf_v(' // dum // ')%qs' )3652 WRITE ( 14 ) surf_v(l)%qs3653 ENDIF3654 3655 IF ( ALLOCATED ( surf_v(l)%ss ) ) THEN3656 CALL wrd_write_string( 'surf_v(' // dum // ')%ss' )3657 WRITE ( 14 ) surf_v(l)%ss3658 ENDIF3641 ENDDO 3642 ! 3643 !-- Write vertical surfaces. 3644 !-- Always start with %start_index followed by %end_index. 3645 DO l = 0, 3 3646 WRITE( dum, '(I1)') l 3647 3648 CALL wrd_write_string( 'surf_v(' // dum // ')%start_index' ) 3649 WRITE ( 14 ) surf_v(l)%start_index 3650 3651 CALL wrd_write_string( 'surf_v(' // dum // ')%end_index' ) 3652 WRITE ( 14 ) surf_v(l)%end_index 3653 3654 IF ( ALLOCATED ( surf_v(l)%us ) ) THEN 3655 CALL wrd_write_string( 'surf_v(' // dum // ')%us' ) 3656 WRITE ( 14 ) surf_v(l)%us 3657 ENDIF 3658 3659 IF ( ALLOCATED ( surf_v(l)%ts ) ) THEN 3660 CALL wrd_write_string( 'surf_v(' // dum // ')%ts' ) 3661 WRITE ( 14 ) surf_v(l)%ts 3662 ENDIF 3663 3664 IF ( ALLOCATED ( surf_v(l)%qs ) ) THEN 3665 CALL wrd_write_string( 'surf_v(' // dum // ')%qs' ) 3666 WRITE ( 14 ) surf_v(l)%qs 3667 ENDIF 3668 3669 IF ( ALLOCATED ( surf_v(l)%ss ) ) THEN 3670 CALL wrd_write_string( 'surf_v(' // dum // ')%ss' ) 3671 WRITE ( 14 ) surf_v(l)%ss 3672 ENDIF 3659 3673 3660 IF ( ALLOCATED ( surf_v(l)%qcs ) ) THEN3661 CALL wrd_write_string( 'surf_v(' // dum // ')%qcs' )3662 WRITE ( 14 ) surf_v(l)%qcs3663 ENDIF3664 3665 IF ( ALLOCATED ( surf_v(l)%ncs ) ) THEN3666 CALL wrd_write_string( 'surf_v(' // dum // ')%ncs' )3667 WRITE ( 14 ) surf_v(l)%ncs3668 ENDIF3669 3670 IF ( ALLOCATED ( surf_v(l)%qrs ) ) THEN3671 CALL wrd_write_string( 'surf_v(' // dum // ')%qrs' )3672 WRITE ( 14 ) surf_v(l)%qrs3673 ENDIF3674 3675 IF ( ALLOCATED ( surf_v(l)%nrs ) ) THEN3676 CALL wrd_write_string( 'surf_v(' // dum // ')%nrs' )3677 WRITE ( 14 ) surf_v(l)%nrs3678 ENDIF3679 3680 IF ( ALLOCATED ( surf_v(l)%ol ) ) THEN3681 CALL wrd_write_string( 'surf_v(' // dum // ')%ol' )3682 WRITE ( 14 ) surf_v(l)%ol3683 ENDIF3684 3685 IF ( ALLOCATED ( surf_v(l)%rib ) ) THEN3686 CALL wrd_write_string( 'surf_v(' // dum // ')%rib' )3687 WRITE ( 14 ) surf_v(l)%rib3688 ENDIF3689 3690 IF ( ALLOCATED ( surf_v(l)%pt_surface ) ) THEN3691 CALL wrd_write_string( 'surf_v(' // dum // ')%pt_surface' )3692 WRITE ( 14 ) surf_v(l)%pt_surface3693 ENDIF3674 IF ( ALLOCATED ( surf_v(l)%qcs ) ) THEN 3675 CALL wrd_write_string( 'surf_v(' // dum // ')%qcs' ) 3676 WRITE ( 14 ) surf_v(l)%qcs 3677 ENDIF 3678 3679 IF ( ALLOCATED ( surf_v(l)%ncs ) ) THEN 3680 CALL wrd_write_string( 'surf_v(' // dum // ')%ncs' ) 3681 WRITE ( 14 ) surf_v(l)%ncs 3682 ENDIF 3683 3684 IF ( ALLOCATED ( surf_v(l)%qrs ) ) THEN 3685 CALL wrd_write_string( 'surf_v(' // dum // ')%qrs' ) 3686 WRITE ( 14 ) surf_v(l)%qrs 3687 ENDIF 3688 3689 IF ( ALLOCATED ( surf_v(l)%nrs ) ) THEN 3690 CALL wrd_write_string( 'surf_v(' // dum // ')%nrs' ) 3691 WRITE ( 14 ) surf_v(l)%nrs 3692 ENDIF 3693 3694 IF ( ALLOCATED ( surf_v(l)%ol ) ) THEN 3695 CALL wrd_write_string( 'surf_v(' // dum // ')%ol' ) 3696 WRITE ( 14 ) surf_v(l)%ol 3697 ENDIF 3698 3699 IF ( ALLOCATED ( surf_v(l)%rib ) ) THEN 3700 CALL wrd_write_string( 'surf_v(' // dum // ')%rib' ) 3701 WRITE ( 14 ) surf_v(l)%rib 3702 ENDIF 3703 3704 IF ( ALLOCATED ( surf_v(l)%pt_surface ) ) THEN 3705 CALL wrd_write_string( 'surf_v(' // dum // ')%pt_surface' ) 3706 WRITE ( 14 ) surf_v(l)%pt_surface 3707 ENDIF 3694 3708 3695 IF ( ALLOCATED ( surf_v(l)%q_surface ) ) THEN 3696 CALL wrd_write_string( 'surf_v(' // dum // ')%q_surface' ) 3697 WRITE ( 14 ) surf_v(l)%q_surface 3698 ENDIF 3699 3700 IF ( ALLOCATED ( surf_v(l)%vpt_surface ) ) THEN 3701 CALL wrd_write_string( 'surf_v(' // dum // ')%vpt_surface' ) 3702 WRITE ( 14 ) surf_v(l)%vpt_surface 3703 ENDIF 3704 3705 IF ( ALLOCATED ( surf_v(l)%shf ) ) THEN 3706 CALL wrd_write_string( 'surf_v(' // dum // ')%shf' ) 3707 WRITE ( 14 ) surf_v(l)%shf 3708 ENDIF 3709 3710 IF ( ALLOCATED ( surf_v(l)%qsws ) ) THEN 3711 CALL wrd_write_string( 'surf_v(' // dum // ')%qsws' ) 3712 WRITE ( 14 ) surf_v(l)%qsws 3713 ENDIF 3714 3715 IF ( ALLOCATED ( surf_v(l)%ssws ) ) THEN 3716 CALL wrd_write_string( 'surf_v(' // dum // ')%ssws' ) 3717 WRITE ( 14 ) surf_v(l)%ssws 3718 ENDIF 3719 3720 IF ( ALLOCATED ( surf_v(l)%css ) ) THEN 3721 CALL wrd_write_string( 'surf_v(' // dum // ')%css' ) 3722 WRITE ( 14 ) surf_v(l)%css 3723 ENDIF 3724 3725 IF ( ALLOCATED ( surf_v(l)%cssws ) ) THEN 3726 CALL wrd_write_string( 'surf_v(' // dum // ')%cssws' ) 3727 WRITE ( 14 ) surf_v(l)%cssws 3728 ENDIF 3729 3730 IF ( ALLOCATED ( surf_v(l)%qcsws ) ) THEN 3731 CALL wrd_write_string( 'surf_v(' // dum // ')%qcsws' ) 3732 WRITE ( 14 ) surf_v(l)%qcsws 3733 ENDIF 3734 3735 IF ( ALLOCATED ( surf_v(l)%ncsws ) ) THEN 3736 CALL wrd_write_string( 'surf_v(' // dum // ')%ncsws' ) 3737 WRITE ( 14 ) surf_v(l)%ncsws 3738 ENDIF 3739 3740 IF ( ALLOCATED ( surf_v(l)%qrsws ) ) THEN 3741 CALL wrd_write_string( 'surf_v(' // dum // ')%qrsws' ) 3742 WRITE ( 14 ) surf_v(l)%qrsws 3743 ENDIF 3744 3745 IF ( ALLOCATED ( surf_v(l)%nrsws ) ) THEN 3746 CALL wrd_write_string( 'surf_v(' // dum // ')%nrsws' ) 3747 WRITE ( 14 ) surf_v(l)%nrsws 3748 ENDIF 3749 3750 IF ( ALLOCATED ( surf_v(l)%sasws ) ) THEN 3751 CALL wrd_write_string( 'surf_v(' // dum // ')%sasws' ) 3752 WRITE ( 14 ) surf_v(l)%sasws 3753 ENDIF 3754 3755 IF ( ALLOCATED ( surf_v(l)%mom_flux_uv ) ) THEN 3756 CALL wrd_write_string( 'surf_v(' // dum // ')%mom_uv' ) 3757 WRITE ( 14 ) surf_v(l)%mom_flux_uv 3758 ENDIF 3759 3760 IF ( ALLOCATED ( surf_v(l)%mom_flux_w ) ) THEN 3761 CALL wrd_write_string( 'surf_v(' // dum // ')%mom_w' ) 3762 WRITE ( 14 ) surf_v(l)%mom_flux_w 3763 ENDIF 3764 3765 IF ( ALLOCATED ( surf_v(l)%mom_flux_tke ) ) THEN 3766 CALL wrd_write_string( 'surf_v(' // dum // ')%mom_tke' ) 3767 WRITE ( 14 ) surf_v(l)%mom_flux_tke 3768 ENDIF 3769 3770 ENDDO 3771 3709 IF ( ALLOCATED ( surf_v(l)%q_surface ) ) THEN 3710 CALL wrd_write_string( 'surf_v(' // dum // ')%q_surface' ) 3711 WRITE ( 14 ) surf_v(l)%q_surface 3712 ENDIF 3713 3714 IF ( ALLOCATED ( surf_v(l)%vpt_surface ) ) THEN 3715 CALL wrd_write_string( 'surf_v(' // dum // ')%vpt_surface' ) 3716 WRITE ( 14 ) surf_v(l)%vpt_surface 3717 ENDIF 3718 3719 IF ( ALLOCATED ( surf_v(l)%shf ) ) THEN 3720 CALL wrd_write_string( 'surf_v(' // dum // ')%shf' ) 3721 WRITE ( 14 ) surf_v(l)%shf 3722 ENDIF 3723 3724 IF ( ALLOCATED ( surf_v(l)%qsws ) ) THEN 3725 CALL wrd_write_string( 'surf_v(' // dum // ')%qsws' ) 3726 WRITE ( 14 ) surf_v(l)%qsws 3727 ENDIF 3728 3729 IF ( ALLOCATED ( surf_v(l)%ssws ) ) THEN 3730 CALL wrd_write_string( 'surf_v(' // dum // ')%ssws' ) 3731 WRITE ( 14 ) surf_v(l)%ssws 3732 ENDIF 3733 3734 IF ( ALLOCATED ( surf_v(l)%css ) ) THEN 3735 CALL wrd_write_string( 'surf_v(' // dum // ')%css' ) 3736 WRITE ( 14 ) surf_v(l)%css 3737 ENDIF 3738 3739 IF ( ALLOCATED ( surf_v(l)%cssws ) ) THEN 3740 CALL wrd_write_string( 'surf_v(' // dum // ')%cssws' ) 3741 WRITE ( 14 ) surf_v(l)%cssws 3742 ENDIF 3743 3744 IF ( ALLOCATED ( surf_v(l)%qcsws ) ) THEN 3745 CALL wrd_write_string( 'surf_v(' // dum // ')%qcsws' ) 3746 WRITE ( 14 ) surf_v(l)%qcsws 3747 ENDIF 3748 3749 IF ( ALLOCATED ( surf_v(l)%ncsws ) ) THEN 3750 CALL wrd_write_string( 'surf_v(' // dum // ')%ncsws' ) 3751 WRITE ( 14 ) surf_v(l)%ncsws 3752 ENDIF 3753 3754 IF ( ALLOCATED ( surf_v(l)%qrsws ) ) THEN 3755 CALL wrd_write_string( 'surf_v(' // dum // ')%qrsws' ) 3756 WRITE ( 14 ) surf_v(l)%qrsws 3757 ENDIF 3758 3759 IF ( ALLOCATED ( surf_v(l)%nrsws ) ) THEN 3760 CALL wrd_write_string( 'surf_v(' // dum // ')%nrsws' ) 3761 WRITE ( 14 ) surf_v(l)%nrsws 3762 ENDIF 3763 3764 IF ( ALLOCATED ( surf_v(l)%sasws ) ) THEN 3765 CALL wrd_write_string( 'surf_v(' // dum // ')%sasws' ) 3766 WRITE ( 14 ) surf_v(l)%sasws 3767 ENDIF 3768 3769 IF ( ALLOCATED ( surf_v(l)%mom_flux_uv ) ) THEN 3770 CALL wrd_write_string( 'surf_v(' // dum // ')%mom_uv' ) 3771 WRITE ( 14 ) surf_v(l)%mom_flux_uv 3772 ENDIF 3773 3774 IF ( ALLOCATED ( surf_v(l)%mom_flux_w ) ) THEN 3775 CALL wrd_write_string( 'surf_v(' // dum // ')%mom_w' ) 3776 WRITE ( 14 ) surf_v(l)%mom_flux_w 3777 ENDIF 3778 3779 IF ( ALLOCATED ( surf_v(l)%mom_flux_tke ) ) THEN 3780 CALL wrd_write_string( 'surf_v(' // dum // ')%mom_tke' ) 3781 WRITE ( 14 ) surf_v(l)%mom_flux_tke 3782 ENDIF 3783 3784 ENDDO 3785 3786 ELSEIF ( TRIM( restart_data_format_output ) == 'mpi' ) THEN 3787 3788 ! 3789 !-- Start with horizontal surfaces (upward-, downward-facing, and model top). 3790 !-- All data writen with rd_mpi_io_write_surface are globally indexed 1d-arrays. 3791 ns_h_on_file = 0 3792 ns_v_on_file = 0 3793 3794 DO l = 0, 2 3795 3796 WRITE( dum, '(I1)') l 3797 3798 CALL rd_mpi_io_surface_filetypes( surf_h(l)%start_index, surf_h(l)%end_index, & 3799 surface_data_to_write, global_start_index ) 3800 IF ( .NOT. surface_data_to_write ) CYCLE 3801 3802 ns_h_on_file(l) = total_number_of_surface_values 3803 3804 CALL wrd_mpi_io( 'surf_h(' // dum // ')%start_index', surf_h(l)%start_index ) 3805 CALL wrd_mpi_io( 'surf_h(' // dum // ')%end_index', surf_h(l)%end_index ) 3806 CALL wrd_mpi_io( 'global_start_index_h_' // dum , global_start_index ) 3807 3808 IF ( ALLOCATED ( surf_h(l)%us ) ) THEN 3809 CALL wrd_mpi_io_surface ( 'surf_h(' // dum // ')%us', surf_h(l)%us ) 3810 ENDIF 3811 3812 IF ( ALLOCATED ( surf_h(l)%ts ) ) THEN 3813 CALL wrd_mpi_io_surface ( 'surf_h(' // dum // ')%ts', surf_h(l)%ts ) 3814 ENDIF 3815 3816 IF ( ALLOCATED ( surf_h(l)%qs ) ) THEN 3817 CALL wrd_mpi_io_surface ( 'surf_h(' // dum // ')%qs', surf_h(l)%qs ) 3818 ENDIF 3819 3820 IF ( ALLOCATED ( surf_h(l)%ss ) ) THEN 3821 CALL wrd_mpi_io_surface( 'surf_h(' // dum // ')%ss', surf_h(l)%ss ) 3822 ENDIF 3823 3824 IF ( ALLOCATED ( surf_h(l)%qcs ) ) THEN 3825 CALL wrd_mpi_io_surface( 'surf_h(' // dum // ')%qcs', surf_h(l)%qcs ) 3826 ENDIF 3827 3828 IF ( ALLOCATED ( surf_h(l)%ncs ) ) THEN 3829 CALL wrd_mpi_io_surface( 'surf_h(' // dum // ')%ncs', surf_h(l)%ncs ) 3830 ENDIF 3831 3832 IF ( ALLOCATED ( surf_h(l)%qrs ) ) THEN 3833 CALL wrd_mpi_io_surface( 'surf_h(' // dum // ')%qrs', surf_h(l)%qrs ) 3834 ENDIF 3835 3836 IF ( ALLOCATED ( surf_h(l)%nrs ) ) THEN 3837 CALL wrd_mpi_io_surface( 'surf_h(' // dum // ')%nrs', surf_h(l)%nrs ) 3838 ENDIF 3839 3840 IF ( ALLOCATED ( surf_h(l)%ol ) ) THEN 3841 CALL wrd_mpi_io_surface( 'surf_h(' // dum // ')%ol', surf_h(l)%ol ) 3842 ENDIF 3843 3844 IF ( ALLOCATED ( surf_h(l)%rib ) ) THEN 3845 CALL wrd_mpi_io_surface( 'surf_h(' // dum // ')%rib', surf_h(l)%rib ) 3846 ENDIF 3847 3848 IF ( ALLOCATED ( surf_h(l)%pt_surface ) ) THEN 3849 CALL wrd_mpi_io_surface( 'surf_h(' // dum // ')%pt_surface', surf_h(l)%pt_surface ) 3850 ENDIF 3851 3852 IF ( ALLOCATED ( surf_h(l)%q_surface ) ) THEN 3853 CALL wrd_mpi_io_surface( 'surf_h(' // dum // ')%q_surface', surf_h(l)%q_surface ) 3854 ENDIF 3855 3856 IF ( ALLOCATED ( surf_h(l)%vpt_surface ) ) THEN 3857 CALL wrd_mpi_io_surface( 'surf_h(' // dum // ')%vpt_surface', surf_h(l)%vpt_surface ) 3858 ENDIF 3859 3860 IF ( ALLOCATED ( surf_h(l)%usws ) ) THEN 3861 CALL wrd_mpi_io_surface( 'surf_h(' // dum // ')%usws', surf_h(l)%usws ) 3862 ENDIF 3863 3864 IF ( ALLOCATED ( surf_h(l)%vsws ) ) THEN 3865 CALL wrd_mpi_io_surface( 'surf_h(' // dum // ')%vsws', surf_h(l)%vsws ) 3866 ENDIF 3867 3868 IF ( ALLOCATED ( surf_h(l)%shf ) ) THEN 3869 CALL wrd_mpi_io_surface( 'surf_h(' // dum // ')%shf', surf_h(l)%shf ) 3870 ENDIF 3871 3872 IF ( ALLOCATED ( surf_h(l)%qsws ) ) THEN 3873 CALL wrd_mpi_io_surface( 'surf_h(' // dum // ')%qsws', surf_h(l)%qsws ) 3874 ENDIF 3875 3876 IF ( ALLOCATED ( surf_h(l)%ssws ) ) THEN 3877 CALL wrd_mpi_io_surface( 'surf_h(' // dum // ')%ssws', surf_h(l)%ssws ) 3878 ENDIF 3879 3880 IF ( ALLOCATED ( surf_h(l)%css ) ) THEN 3881 CALL wrd_mpi_io_surface( 'surf_h(' // dum // ')%css', surf_h(l)%css ) 3882 ENDIF 3883 3884 IF ( ALLOCATED ( surf_h(l)%cssws ) ) THEN 3885 CALL wrd_mpi_io_surface( 'surf_h(' // dum // ')%cssws', surf_h(l)%cssws ) 3886 ENDIF 3887 3888 IF ( ALLOCATED ( surf_h(l)%qcsws ) ) THEN 3889 CALL wrd_mpi_io_surface( 'surf_h(' // dum // ')%qcsws', surf_h(l)%qcsws ) 3890 ENDIF 3891 3892 IF ( ALLOCATED ( surf_h(l)%ncsws ) ) THEN 3893 CALL wrd_mpi_io_surface( 'surf_h(' // dum // ')%ncsws', surf_h(l)%ncsws ) 3894 ENDIF 3895 3896 IF ( ALLOCATED ( surf_h(l)%qrsws ) ) THEN 3897 CALL wrd_mpi_io_surface( 'surf_h(' // dum // ')%qrsws', surf_h(l)%qrsws ) 3898 ENDIF 3899 3900 IF ( ALLOCATED ( surf_h(l)%nrsws ) ) THEN 3901 CALL wrd_mpi_io_surface( 'surf_h(' // dum // ')%nrsws', surf_h(l)%nrsws ) 3902 ENDIF 3903 3904 IF ( ALLOCATED ( surf_h(l)%sasws ) ) THEN 3905 CALL wrd_mpi_io_surface( 'surf_h(' // dum // ')%sasws', surf_h(l)%sasws ) 3906 ENDIF 3907 3908 ENDDO 3909 ! 3910 !-- Write vertical surfaces 3911 DO l = 0, 3 3912 3913 WRITE( dum, '(I1)') l 3914 3915 CALL rd_mpi_io_surface_filetypes( surf_v(l)%start_index, surf_v(l)%end_index, & 3916 surface_data_to_write, global_start_index ) 3917 3918 ns_v_on_file(l) = total_number_of_surface_values 3919 3920 CALL wrd_mpi_io( 'surf_v(' // dum // ')%start_index', surf_v(l)%start_index ) 3921 CALL wrd_mpi_io( 'surf_v(' // dum // ')%end_index', surf_v(l)%end_index ) 3922 CALL wrd_mpi_io( 'global_start_index_v_' // dum , global_start_index ) 3923 3924 IF ( .NOT. surface_data_to_write ) CYCLE 3925 3926 IF ( ALLOCATED ( surf_v(l)%us ) ) THEN 3927 CALL wrd_mpi_io_surface( 'surf_v(' // dum // ')%us', surf_v(l)%us ) 3928 ENDIF 3929 3930 IF ( ALLOCATED ( surf_v(l)%ts ) ) THEN 3931 CALL wrd_mpi_io_surface( 'surf_v(' // dum // ')%ts', surf_v(l)%ts ) 3932 ENDIF 3933 3934 IF ( ALLOCATED ( surf_v(l)%qs ) ) THEN 3935 CALL wrd_mpi_io_surface( 'surf_v(' // dum // ')%qs', surf_v(l)%qs ) 3936 ENDIF 3937 3938 IF ( ALLOCATED ( surf_v(l)%ss ) ) THEN 3939 CALL wrd_mpi_io_surface( 'surf_v(' // dum // ')%ss', surf_v(l)%ss ) 3940 ENDIF 3941 3942 IF ( ALLOCATED ( surf_v(l)%qcs ) ) THEN 3943 CALL wrd_mpi_io_surface( 'surf_v(' // dum // ')%qcs', surf_v(l)%qcs ) 3944 ENDIF 3945 3946 IF ( ALLOCATED ( surf_v(l)%ncs ) ) THEN 3947 CALL wrd_mpi_io_surface( 'surf_v(' // dum // ')%ncs', surf_v(l)%ncs ) 3948 ENDIF 3949 3950 IF ( ALLOCATED ( surf_v(l)%qrs ) ) THEN 3951 CALL wrd_mpi_io_surface( 'surf_v(' // dum // ')%qrs', surf_v(l)%qrs ) 3952 ENDIF 3953 3954 IF ( ALLOCATED ( surf_v(l)%nrs ) ) THEN 3955 CALL wrd_mpi_io_surface( 'surf_v(' // dum // ')%nrs', surf_v(l)%nrs ) 3956 ENDIF 3957 3958 IF ( ALLOCATED ( surf_v(l)%ol ) ) THEN 3959 CALL wrd_mpi_io_surface( 'surf_v(' // dum // ')%ol', surf_v(l)%ol ) 3960 ENDIF 3961 3962 IF ( ALLOCATED ( surf_v(l)%rib ) ) THEN 3963 CALL wrd_mpi_io_surface( 'surf_v(' // dum // ')%rib', surf_v(l)%rib ) 3964 ENDIF 3965 3966 IF ( ALLOCATED ( surf_v(l)%pt_surface ) ) THEN 3967 CALL wrd_mpi_io_surface( 'surf_v(' // dum // ')%pt_surface', surf_v(l)%pt_surface ) 3968 ENDIF 3969 3970 IF ( ALLOCATED ( surf_v(l)%q_surface ) ) THEN 3971 CALL wrd_mpi_io_surface( 'surf_v(' // dum // ')%q_surface', surf_v(l)%q_surface ) 3972 ENDIF 3973 3974 IF ( ALLOCATED ( surf_v(l)%vpt_surface ) ) THEN 3975 CALL wrd_mpi_io_surface( 'surf_v(' // dum // ')%vpt_surface', surf_v(l)%vpt_surface ) 3976 ENDIF 3977 3978 IF ( ALLOCATED ( surf_v(l)%shf ) ) THEN 3979 CALL wrd_mpi_io_surface( 'surf_v(' // dum // ')%shf', surf_v(l)%shf ) 3980 ENDIF 3981 3982 IF ( ALLOCATED ( surf_v(l)%qsws ) ) THEN 3983 CALL wrd_mpi_io_surface( 'surf_v(' // dum // ')%qsws', surf_v(l)%qsws ) 3984 ENDIF 3985 3986 IF ( ALLOCATED ( surf_v(l)%ssws ) ) THEN 3987 CALL wrd_mpi_io_surface( 'surf_v(' // dum // ')%ssws', surf_v(l)%ssws ) 3988 ENDIF 3989 3990 IF ( ALLOCATED ( surf_v(l)%css ) ) THEN 3991 CALL wrd_mpi_io_surface( 'surf_v(' // dum // ')%css', surf_v(l)%css ) 3992 ENDIF 3993 3994 IF ( ALLOCATED ( surf_v(l)%cssws ) ) THEN 3995 CALL wrd_mpi_io_surface( 'surf_v(' // dum // ')%cssws', surf_v(l)%cssws ) 3996 ENDIF 3997 3998 IF ( ALLOCATED ( surf_v(l)%qcsws ) ) THEN 3999 CALL wrd_mpi_io_surface( 'surf_v(' // dum // ')%qcsws', surf_v(l)%qcsws ) 4000 ENDIF 4001 4002 IF ( ALLOCATED ( surf_v(l)%ncsws ) ) THEN 4003 CALL wrd_mpi_io_surface( 'surf_v(' // dum // ')%ncsws', surf_v(l)%ncsws ) 4004 ENDIF 4005 4006 IF ( ALLOCATED ( surf_v(l)%qrsws ) ) THEN 4007 CALL wrd_mpi_io_surface( 'surf_v(' // dum // ')%qrsws', surf_v(l)%qrsws ) 4008 ENDIF 4009 4010 IF ( ALLOCATED ( surf_v(l)%nrsws ) ) THEN 4011 CALL wrd_mpi_io_surface( 'surf_v(' // dum // ')%nrsws', surf_v(l)%nrsws ) 4012 ENDIF 4013 4014 IF ( ALLOCATED ( surf_v(l)%sasws ) ) THEN 4015 CALL wrd_mpi_io_surface( 'surf_v(' // dum // ')%sasws', surf_v(l)%sasws ) 4016 ENDIF 4017 4018 IF ( ALLOCATED ( surf_v(l)%mom_flux_uv ) ) THEN 4019 CALL wrd_mpi_io_surface( 'surf_v(' // dum // ')%mom_uv', surf_v(l)%mom_flux_uv ) 4020 ENDIF 4021 4022 IF ( ALLOCATED ( surf_v(l)%mom_flux_w ) ) THEN 4023 CALL wrd_mpi_io_surface( 'surf_v(' // dum // ')%mom_w', surf_v(l)%mom_flux_w ) 4024 ENDIF 4025 4026 IF ( ALLOCATED ( surf_v(l)%mom_flux_tke ) ) THEN 4027 CALL wrd_mpi_io_surface( 'surf_v(' // dum // ')%mom_tke', surf_v(l)%mom_flux_tke ) 4028 ENDIF 4029 4030 ENDDO 4031 4032 CALL wrd_mpi_io_global_array( 'ns_h_on_file', ns_h_on_file ) 4033 CALL wrd_mpi_io_global_array( 'ns_v_on_file', ns_v_on_file ) 4034 4035 ENDIF 3772 4036 3773 4037 END SUBROUTINE surface_wrd_local -
palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90
r4481 r4495 25 25 ! ----------------- 26 26 ! $Id$ 27 ! restart data handling with MPI-IO added 28 ! 29 ! 4481 2020-03-31 18:55:54Z maronga 27 30 ! bugfix: cpp-directives for serial mode added, dummy statements to prevent compile errors added 28 31 ! … … 200 203 random_generator, & 201 204 rans_mode, & 205 restart_data_format_output, & 202 206 restart_string, & 203 207 syn_turb_gen, & … … 257 261 random_number_parallel, & 258 262 random_seed_parallel 263 264 USE restart_data_mpi_io_mod, & 265 ONLY: rrd_mpi_io, & 266 wrd_mpi_io 259 267 260 268 USE transpose_indices, & … … 437 445 !-- Reading of parameters for restart runs 438 446 INTERFACE stg_rrd_global 439 MODULE PROCEDURE stg_rrd_global 447 MODULE PROCEDURE stg_rrd_global_ftn 448 MODULE PROCEDURE stg_rrd_global_mpi 440 449 END INTERFACE stg_rrd_global 441 450 … … 1198 1207 ! Description: 1199 1208 ! ------------ 1200 !> This routine reads the respective restart data.1201 !------------------------------------------------------------------------------! 1202 SUBROUTINE stg_rrd_global ( found )1209 !> Read module-specific global restart data (Fortran binary format). 1210 !------------------------------------------------------------------------------! 1211 SUBROUTINE stg_rrd_global_ftn( found ) 1203 1212 1204 1213 LOGICAL, INTENT(OUT) :: found !< flag indicating if variable was found … … 1225 1234 1226 1235 1227 END SUBROUTINE stg_rrd_global 1236 END SUBROUTINE stg_rrd_global_ftn 1237 1238 1239 !------------------------------------------------------------------------------! 1240 ! Description: 1241 ! ------------ 1242 !> Read module-specific global restart data (MPI-IO). 1243 !------------------------------------------------------------------------------! 1244 SUBROUTINE stg_rrd_global_mpi 1245 1246 CALL rrd_mpi_io( 'time_stg_adjust', time_stg_adjust ) 1247 CALL rrd_mpi_io( 'time_stg_call', time_stg_call ) 1248 CALL rrd_mpi_io( 'use_syn_turb_gen', use_syn_turb_gen ) 1249 1250 END SUBROUTINE stg_rrd_global_mpi 1228 1251 1229 1252 … … 1235 1258 SUBROUTINE stg_wrd_global 1236 1259 1237 CALL wrd_write_string( 'time_stg_adjust' ) 1238 WRITE ( 14 ) time_stg_adjust 1239 1240 CALL wrd_write_string( 'time_stg_call' ) 1241 WRITE ( 14 ) time_stg_call 1242 1243 CALL wrd_write_string( 'use_syn_turb_gen' ) 1244 WRITE ( 14 ) use_syn_turb_gen 1245 1260 IF ( TRIM( restart_data_format_output ) == 'fortran_binary' ) THEN 1261 1262 CALL wrd_write_string( 'time_stg_adjust' ) 1263 WRITE ( 14 ) time_stg_adjust 1264 1265 CALL wrd_write_string( 'time_stg_call' ) 1266 WRITE ( 14 ) time_stg_call 1267 1268 CALL wrd_write_string( 'use_syn_turb_gen' ) 1269 WRITE ( 14 ) use_syn_turb_gen 1270 1271 ELSEIF ( TRIM( restart_data_format_output ) == 'mpi' ) THEN 1272 1273 CALL wrd_mpi_io( 'time_stg_adjust', time_stg_adjust ) 1274 CALL wrd_mpi_io( 'time_stg_call', time_stg_call ) 1275 CALL wrd_mpi_io( 'use_syn_turb_gen', use_syn_turb_gen ) 1276 1277 ENDIF 1246 1278 1247 1279 END SUBROUTINE stg_wrd_global -
palm/trunk/SOURCE/turbulence_closure_mod.f90
r4486 r4495 25 25 ! ----------------- 26 26 ! $Id$ 27 ! workaround for Intel14 compiler added 28 ! 29 ! 4486 2020-04-02 20:45:12Z maronga 27 30 ! Bugfix: include topography in calculation of distance_to_wall (1.5-order-dai 28 31 ! closure) … … 4903 4906 !-- reason for this behaviour is unknown, however). 4904 4907 dvar_dz = atmos_ocean_sign * ( var(k+1,j,i) - var(k-1,j,i) ) * dd2zu(k) 4905 IF ( dvar_dz > 0.0_wp ) THEN4908 IF ( dvar_dz > 0.0_wp ) THEN 4906 4909 IF ( use_single_reference_value ) THEN 4907 4910 ml_stratification(k) = 0.76_wp * SQRT( e(k,j,i) ) & 4911 #if defined( __imuk_old ) 4912 / SQRT( g / var_reference * ( ABS( dvar_dz ) + 1.0E-10_wp ) ) + 1E-5_wp ! required for intel14 4913 #else 4908 4914 / SQRT( g / var_reference * dvar_dz ) + 1E-5_wp 4915 #endif 4909 4916 ELSE 4910 4917 ml_stratification(k) = 0.76_wp * SQRT( e(k,j,i) ) & 4918 #if defined( __imuk_old ) 4919 / SQRT( g / var(k,j,i) * ( ABS( dvar_dz ) + 1.0E-10_wp ) ) + 1E-5_wp ! required for intel14 4920 #else 4911 4921 / SQRT( g / var(k,j,i) * dvar_dz ) + 1E-5_wp 4922 #endif 4912 4923 ENDIF 4913 4924 ELSE … … 4961 4972 IF ( use_single_reference_value ) THEN 4962 4973 ml_stratification(k) = 0.76_wp * SQRT( e(k,j,i) ) & 4963 / SQRT( g / var_reference * dvar_dz ) + 1E-5_wp 4974 #if defined( __imuk_old ) 4975 / SQRT( g / var_reference * ( ABS( dvar_dz ) + 1.0E-10_wp ) ) + 1E-5_wp ! required for intel14 4976 #else 4977 / SQRT( g / var_reference * dvar_dz ) + 1E-5_wp 4978 #endif 4964 4979 ELSE 4965 4980 ml_stratification(k) = 0.76_wp * SQRT( e(k,j,i) ) & 4966 / SQRT( g / var(k,j,i) * dvar_dz ) + 1E-5_wp 4981 #if defined( __imuk_old ) 4982 / SQRT( g / var(k,j,i) * ( ABS( dvar_dz ) + 1.0E-10_wp ) ) + 1E-5_wp ! required for intel14 4983 #else 4984 / SQRT( g / var(k,j,i) * dvar_dz ) + 1E-5_wp 4985 #endif 4967 4986 ENDIF 4968 4987 -
palm/trunk/SOURCE/urban_surface_mod.f90
r4493 r4495 28 28 ! ----------------- 29 29 ! $Id$ 30 ! restart data handling with MPI-IO added 31 ! 32 ! 4493 2020-04-10 09:49:43Z pavelkrc 30 33 ! J.Resler, 2020/03/19 31 34 ! - remove reading of deprecated input parameters c_surface and lambda_surf … … 252 255 pt_surface, large_scale_forcing, lsf_surf, & 253 256 spinup_pt_mean, spinup_time, time_do3d, dt_do3d, & 254 average_count_3d, varnamelength, urban_surface, dz 257 average_count_3d, varnamelength, urban_surface, dz, restart_data_format_output 255 258 256 259 USE bulk_cloud_model_mod, & … … 282 285 iwest_u, iup_l, inorth_l, isouth_l, ieast_l, iwest_l, id, & 283 286 nz_urban_b, nz_urban_t, unscheduled_radiation_calls 287 288 USE restart_data_mpi_io_mod, & 289 ONLY: rd_mpi_io_surface_filetypes, wrd_mpi_io, wrd_mpi_io_surface 284 290 285 291 USE statistics, & … … 8909 8915 !> Subroutine writes t_surf and t_wall data into restart files 8910 8916 !------------------------------------------------------------------------------! 8911 8917 SUBROUTINE usm_wrd_local 8912 8918 8913 8919 8914 8920 IMPLICIT NONE 8915 8921 8916 CHARACTER(LEN=1) :: dum !< dummy string to create output-variable name 8917 INTEGER(iwp) :: l !< index surface type orientation 8922 CHARACTER(LEN=1) :: dum !< dummy string to create output-variable name 8923 8924 INTEGER(iwp) :: l !< index surface type orientation 8925 8926 INTEGER(iwp),DIMENSION(nys:nyn,nxl:nxr) :: global_start_index !< index for surface data (MPI-IO) 8927 8928 LOGICAL :: surface_data_to_write !< switch for MPI-I/O if PE has surface data to write 8918 8929 8919 CALL wrd_write_string( 'ns_h_on_file_usm' ) 8920 WRITE ( 14 ) surf_usm_h%ns 8930 8931 IF ( TRIM( restart_data_format_output ) == 'fortran_binary' ) THEN 8932 8933 CALL wrd_write_string( 'ns_h_on_file_usm' ) 8934 WRITE ( 14 ) surf_usm_h%ns 8935 8936 CALL wrd_write_string( 'ns_v_on_file_usm' ) 8937 WRITE ( 14 ) surf_usm_v(0:3)%ns 8938 8939 CALL wrd_write_string( 'usm_start_index_h' ) 8940 WRITE ( 14 ) surf_usm_h%start_index 8941 8942 CALL wrd_write_string( 'usm_end_index_h' ) 8943 WRITE ( 14 ) surf_usm_h%end_index 8944 8945 CALL wrd_write_string( 't_surf_wall_h' ) 8946 WRITE ( 14 ) t_surf_wall_h 8947 8948 CALL wrd_write_string( 't_surf_window_h' ) 8949 WRITE ( 14 ) t_surf_window_h 8950 8951 CALL wrd_write_string( 't_surf_green_h' ) 8952 WRITE ( 14 ) t_surf_green_h 8953 8954 CALL wrd_write_string( 'm_liq_usm_h' ) 8955 WRITE ( 14 ) m_liq_usm_h%var_usm_1d 8956 ! 8957 !-- Write restart data which is especially needed for the urban-surface 8958 !-- model. In order to do not fill up the restart routines in surface_mod. 8959 !-- Output of waste heat from indoor model. Restart data is required in 8960 !-- this special case, because the indoor model where waste heat is 8961 !-- computed is call each hour (current default), so that waste heat would 8962 !-- have zero value until next call of indoor model. 8963 IF ( indoor_model ) THEN 8964 CALL wrd_write_string( 'waste_heat_h' ) 8965 WRITE ( 14 ) surf_usm_h%waste_heat 8966 ENDIF 8967 8968 DO l = 0, 3 8921 8969 8922 CALL wrd_write_string( 'ns_v_on_file_usm' ) 8923 WRITE ( 14 ) surf_usm_v(0:3)%ns 8970 CALL wrd_write_string( 'usm_start_index_v' ) 8971 WRITE ( 14 ) surf_usm_v(l)%start_index 8972 8973 CALL wrd_write_string( 'usm_end_index_v' ) 8974 WRITE ( 14 ) surf_usm_v(l)%end_index 8975 8976 WRITE( dum, '(I1)') l 8977 8978 CALL wrd_write_string( 't_surf_wall_v(' // dum // ')' ) 8979 WRITE ( 14 ) t_surf_wall_v(l)%t 8980 8981 CALL wrd_write_string( 't_surf_window_v(' // dum // ')' ) 8982 WRITE ( 14 ) t_surf_window_v(l)%t 8983 8984 CALL wrd_write_string( 't_surf_green_v(' // dum // ')' ) 8985 WRITE ( 14 ) t_surf_green_v(l)%t 8986 8987 IF ( indoor_model ) THEN 8988 CALL wrd_write_string( 'waste_heat_v(' // dum // ')' ) 8989 WRITE ( 14 ) surf_usm_v(l)%waste_heat 8990 ENDIF 8991 8992 ENDDO 8924 8993 8925 CALL wrd_write_string( 'usm_start_index_h' ) 8926 WRITE ( 14 ) surf_usm_h%start_index 8927 8928 CALL wrd_write_string( 'usm_end_index_h' ) 8929 WRITE ( 14 ) surf_usm_h%end_index 8930 8931 CALL wrd_write_string( 't_surf_wall_h' ) 8932 WRITE ( 14 ) t_surf_wall_h 8933 8934 CALL wrd_write_string( 't_surf_window_h' ) 8935 WRITE ( 14 ) t_surf_window_h 8936 8937 CALL wrd_write_string( 't_surf_green_h' ) 8938 WRITE ( 14 ) t_surf_green_h 8939 8940 CALL wrd_write_string( 'm_liq_usm_h' ) 8941 WRITE ( 14 ) m_liq_usm_h%var_usm_1d 8942 ! 8943 !-- Write restart data which is especially needed for the urban-surface 8944 !-- model. In order to do not fill up the restart routines in 8945 !-- surface_mod. 8946 !-- Output of waste heat from indoor model. Restart data is required in 8947 !-- this special case, because the indoor model where waste heat is 8948 !-- computed is call each hour (current default), so that waste heat would 8949 !-- have zero value until next call of indoor model. 8950 IF ( indoor_model ) THEN 8951 CALL wrd_write_string( 'waste_heat_h' ) 8952 WRITE ( 14 ) surf_usm_h%waste_heat 8953 ENDIF 8954 8955 DO l = 0, 3 8956 8957 CALL wrd_write_string( 'usm_start_index_v' ) 8958 WRITE ( 14 ) surf_usm_v(l)%start_index 8959 8960 CALL wrd_write_string( 'usm_end_index_v' ) 8961 WRITE ( 14 ) surf_usm_v(l)%end_index 8962 8963 WRITE( dum, '(I1)') l 8964 8965 CALL wrd_write_string( 't_surf_wall_v(' // dum // ')' ) 8966 WRITE ( 14 ) t_surf_wall_v(l)%t 8967 8968 CALL wrd_write_string( 't_surf_window_v(' // dum // ')' ) 8969 WRITE ( 14 ) t_surf_window_v(l)%t 8970 8971 CALL wrd_write_string( 't_surf_green_v(' // dum // ')' ) 8972 WRITE ( 14 ) t_surf_green_v(l)%t 8973 8974 IF ( indoor_model ) THEN 8975 CALL wrd_write_string( 'waste_heat_v(' // dum // ')' ) 8976 WRITE ( 14 ) surf_usm_v(l)%waste_heat 8977 ENDIF 8978 8979 ENDDO 8980 8981 CALL wrd_write_string( 'usm_start_index_h' ) 8982 WRITE ( 14 ) surf_usm_h%start_index 8983 8984 CALL wrd_write_string( 'usm_end_index_h' ) 8985 WRITE ( 14 ) surf_usm_h%end_index 8986 8987 CALL wrd_write_string( 't_wall_h' ) 8988 WRITE ( 14 ) t_wall_h 8989 8990 CALL wrd_write_string( 't_window_h' ) 8991 WRITE ( 14 ) t_window_h 8992 8993 CALL wrd_write_string( 't_green_h' ) 8994 WRITE ( 14 ) t_green_h 8995 8996 DO l = 0, 3 8997 8998 CALL wrd_write_string( 'usm_start_index_v' ) 8999 WRITE ( 14 ) surf_usm_v(l)%start_index 9000 9001 CALL wrd_write_string( 'usm_end_index_v' ) 9002 WRITE ( 14 ) surf_usm_v(l)%end_index 9003 9004 WRITE( dum, '(I1)') l 9005 9006 CALL wrd_write_string( 't_wall_v(' // dum // ')' ) 9007 WRITE ( 14 ) t_wall_v(l)%t 9008 9009 CALL wrd_write_string( 't_window_v(' // dum // ')' ) 9010 WRITE ( 14 ) t_window_v(l)%t 9011 9012 CALL wrd_write_string( 't_green_v(' // dum // ')' ) 9013 WRITE ( 14 ) t_green_v(l)%t 9014 9015 ENDDO 9016 9017 END SUBROUTINE usm_wrd_local 8994 CALL wrd_write_string( 'usm_start_index_h' ) 8995 WRITE ( 14 ) surf_usm_h%start_index 8996 8997 CALL wrd_write_string( 'usm_end_index_h' ) 8998 WRITE ( 14 ) surf_usm_h%end_index 8999 9000 CALL wrd_write_string( 't_wall_h' ) 9001 WRITE ( 14 ) t_wall_h 9002 9003 CALL wrd_write_string( 't_window_h' ) 9004 WRITE ( 14 ) t_window_h 9005 9006 CALL wrd_write_string( 't_green_h' ) 9007 WRITE ( 14 ) t_green_h 9008 9009 DO l = 0, 3 9010 9011 CALL wrd_write_string( 'usm_start_index_v' ) 9012 WRITE ( 14 ) surf_usm_v(l)%start_index 9013 9014 CALL wrd_write_string( 'usm_end_index_v' ) 9015 WRITE ( 14 ) surf_usm_v(l)%end_index 9016 9017 WRITE( dum, '(I1)') l 9018 9019 CALL wrd_write_string( 't_wall_v(' // dum // ')' ) 9020 WRITE ( 14 ) t_wall_v(l)%t 9021 9022 CALL wrd_write_string( 't_window_v(' // dum // ')' ) 9023 WRITE ( 14 ) t_window_v(l)%t 9024 9025 CALL wrd_write_string( 't_green_v(' // dum // ')' ) 9026 WRITE ( 14 ) t_green_v(l)%t 9027 9028 ENDDO 9029 9030 ELSEIF ( TRIM( restart_data_format_output ) == 'mpi' ) THEN 9031 ! 9032 !-- There is no information about the PE-grid necessary because the restart files consists 9033 !-- the whole domain. Therefore, ns_h_on_file_usm and ns_v_on_file_usm are not used with 9034 !-- MPI-IO. 9035 CALL rd_mpi_io_surface_filetypes( surf_usm_h%start_index, surf_usm_h%end_index, & 9036 surface_data_to_write, global_start_index ) 9037 9038 CALL wrd_mpi_io( 'usm_start_index_h', surf_usm_h%start_index ) 9039 CALL wrd_mpi_io( 'usm_end_index_h', surf_usm_h%end_index ) 9040 CALL wrd_mpi_io( 'usm_global_start_h', global_start_index ) 9041 9042 CALL wrd_mpi_io_surface( 't_surf_wall_h', t_surf_wall_h ) 9043 CALL wrd_mpi_io_surface( 't_surf_window_h', t_surf_window_h ) 9044 CALL wrd_mpi_io_surface( 't_surf_green_h', t_surf_green_h ) 9045 9046 CALL wrd_mpi_io_surface( 'm_liq_usm_h', m_liq_usm_h%var_usm_1d ) 9047 IF ( indoor_model ) THEN 9048 CALL wrd_mpi_io_surface( 'waste_heat_h', surf_usm_h%waste_heat ) ! NEED TO BE CHECKED!!!!! 9049 ENDIF 9050 9051 DO l = 0, 3 9052 9053 WRITE( dum, '(I1)') l 9054 9055 CALL rd_mpi_io_surface_filetypes( surf_usm_v(l)%start_index, surf_usm_v(l)%end_index, & 9056 surface_data_to_write, global_start_index ) 9057 9058 CALL wrd_mpi_io( 'usm_start_index_v_' // dum, surf_usm_v(l)%start_index ) 9059 CALL wrd_mpi_io( 'usm_end_index_v_' // dum, surf_usm_v(l)%end_index ) 9060 CALL wrd_mpi_io( 'usm_global_start_v_' // dum, global_start_index ) 9061 9062 IF ( .NOT. surface_data_to_write ) CYCLE 9063 9064 CALL wrd_mpi_io_surface( 't_surf_wall_v(' // dum // ')', t_surf_wall_v(l)%t ) 9065 CALL wrd_mpi_io_surface( 't_surf_window_v(' // dum // ')', t_surf_window_v(l)%t ) 9066 CALL wrd_mpi_io_surface( 't_surf_green_v(' // dum // ')', t_surf_green_v(l)%t ) 9067 9068 ENDDO 9069 9070 CALL rd_mpi_io_surface_filetypes( surf_usm_h%start_index, surf_usm_h%end_index, & 9071 surface_data_to_write, global_start_index ) 9072 9073 CALL wrd_mpi_io( 'usm_start_index_h_2', surf_usm_h%start_index ) 9074 CALL wrd_mpi_io( 'usm_end_index_h_2', surf_usm_h%end_index ) 9075 CALL wrd_mpi_io( 'usm_global_start_h_2', global_start_index ) 9076 9077 CALL wrd_mpi_io_surface( 't_wall_h', t_wall_h ) 9078 CALL wrd_mpi_io_surface( 't_window_h', t_window_h ) 9079 CALL wrd_mpi_io_surface( 't_green_h', t_green_h ) 9080 9081 DO l = 0, 3 9082 9083 WRITE( dum, '(I1)') l 9084 9085 CALL rd_mpi_io_surface_filetypes( surf_usm_v(l)%start_index, surf_usm_v(l)%end_index, & 9086 surface_data_to_write, global_start_index ) 9087 9088 CALL wrd_mpi_io( 'usm_start_index_v_2_' //dum, surf_usm_v(l)%start_index ) 9089 CALL wrd_mpi_io( 'usm_end_index_v_2_' // dum, surf_usm_v(l)%end_index ) 9090 CALL wrd_mpi_io( 'usm_global_start_v_2_' // dum, global_start_index ) 9091 9092 IF ( .NOT. surface_data_to_write ) CYCLE 9093 9094 CALL wrd_mpi_io_surface( 't_wall_v(' // dum // ')', t_wall_v(l)%t ) 9095 CALL wrd_mpi_io_surface( 't_window_v(' // dum // ')', t_window_v(l)%t ) 9096 CALL wrd_mpi_io_surface( 't_green_v(' // dum // ')', t_green_v(l)%t ) 9097 9098 ENDDO 9099 9100 ENDIF 9101 9102 END SUBROUTINE usm_wrd_local 9018 9103 9019 9104 -
palm/trunk/SOURCE/user_module.f90
r4360 r4495 25 25 ! ----------------- 26 26 ! $Id$ 27 ! restart data handling with MPI-IO added 28 ! 29 ! 4360 2020-01-07 11:25:50Z suehring 27 30 ! Introduction of wall_flags_total_0, which currently sets bits based on static 28 31 ! topography information used in wall_flags_static_0 … … 193 196 194 197 INTERFACE user_rrd_global 195 MODULE PROCEDURE user_rrd_global 198 MODULE PROCEDURE user_rrd_global_ftn 199 MODULE PROCEDURE user_rrd_global_mpi 196 200 END INTERFACE user_rrd_global 197 201 … … 247 251 !-- current revision does not match with previous revisions (e.g. if routines 248 252 !-- have been added/deleted or if parameter lists in subroutines have been changed). 249 user_interface_current_revision = 'r 3703'253 user_interface_current_revision = 'r4495' 250 254 251 255 ! … … 1106 1110 ! Description: 1107 1111 ! ------------ 1108 !> Read ing global restart data that has been defined by the user.1109 !------------------------------------------------------------------------------! 1110 SUBROUTINE user_rrd_global ( found )1112 !> Read module-specific global restart data (Fortran binary format). 1113 !------------------------------------------------------------------------------! 1114 SUBROUTINE user_rrd_global_ftn( found ) 1111 1115 1112 1116 … … 1129 1133 1130 1134 1131 END SUBROUTINE user_rrd_global 1135 END SUBROUTINE user_rrd_global_ftn 1136 1137 1138 !------------------------------------------------------------------------------! 1139 ! Description: 1140 ! ------------ 1141 !> Read module-specific global restart data (MPI-IO). 1142 !------------------------------------------------------------------------------! 1143 SUBROUTINE user_rrd_global_mpi 1144 1145 ! CALL rrd_mpi_io( 'global_parameter', global_parameter ) 1146 CONTINUE 1147 1148 END SUBROUTINE user_rrd_global_mpi 1132 1149 1133 1150 … … 1204 1221 SUBROUTINE user_wrd_global 1205 1222 1206 ! CALL wrd_write_string( 'global_parameter' ) 1207 ! WRITE ( 14 ) global_parameter 1223 IF ( TRIM( restart_data_format_output ) == 'fortran_binary' ) THEN 1224 1225 ! CALL wrd_write_string( 'global_parameter' ) 1226 ! WRITE ( 14 ) global_parameter 1227 1228 ELSEIF ( TRIM( restart_data_format_output ) == 'mpi' ) THEN 1229 1230 ! CALL rrd_mpi_io( 'global_parameter', global_parameter ) 1231 1232 ENDIF 1208 1233 1209 1234 END SUBROUTINE user_wrd_global … … 1221 1246 !-- Here the user-defined actions at the end of a job follow. 1222 1247 !-- Sample for user-defined output: 1223 ! IF ( ALLOCATED( u2_av ) ) THEN 1224 ! CALL wrd_write_string( 'u2_av' ) 1225 ! WRITE ( 14 ) u2_av 1226 ! ENDIF 1248 IF ( TRIM( restart_data_format_output ) == 'fortran_binary' ) THEN 1249 1250 ! IF ( ALLOCATED( u2_av ) ) THEN 1251 ! CALL wrd_write_string( 'u2_av' ) 1252 ! WRITE ( 14 ) u2_av 1253 ! ENDIF 1254 1255 ELSEIF ( TRIM( restart_data_format_output ) == 'mpi' ) THEN 1256 1257 ! IF ( ALLOCATED( u2_av ) ) CALL wrd_mpi_io( 'u2_av', u2_av ) 1258 1259 ENDIF 1227 1260 1228 1261 END SUBROUTINE user_wrd_local -
palm/trunk/SOURCE/virtual_flight_mod.f90
r4360 r4495 25 25 ! ----------------- 26 26 ! $Id$ 27 ! restart data handling with MPI-IO added 28 ! 29 ! 4360 2020-01-07 11:25:50Z suehring 27 30 ! Corrected "Former revisions" section 28 31 ! … … 47 50 MODULE flight_mod 48 51 49 USE control_parameters, & 50 ONLY: debug_output, fl_max, num_leg, num_var_fl, num_var_fl_user, virtual_flight 52 USE control_parameters, & 53 ONLY: debug_output, fl_max, num_leg, num_var_fl, num_var_fl_user, & 54 restart_data_format_output, virtual_flight 51 55 52 56 USE kinds 57 58 USE restart_data_mpi_io_mod, & 59 ONLY: rd_mpi_io_check_array, rrd_mpi_io_global_array, wrd_mpi_io_global_array 60 53 61 54 62 CHARACTER(LEN=6), DIMENSION(fl_max) :: leg_mode = 'cyclic' !< flight mode through the model domain, either 'cyclic' or 'return' … … 117 125 118 126 INTERFACE flight_rrd_global 119 MODULE PROCEDURE flight_rrd_global 127 MODULE PROCEDURE flight_rrd_global_ftn 128 MODULE PROCEDURE flight_rrd_global_mpi 120 129 END INTERFACE flight_rrd_global 121 130 … … 919 928 ! Description: 920 929 ! ------------ 921 !> This routine reads the respective restart data.922 !------------------------------------------------------------------------------! 923 SUBROUTINE flight_rrd_global ( found )930 !> Read module-specific global restart data (Fortran binary format). 931 !------------------------------------------------------------------------------! 932 SUBROUTINE flight_rrd_global_ftn( found ) 924 933 925 934 … … 964 973 965 974 966 END SUBROUTINE flight_rrd_global 975 END SUBROUTINE flight_rrd_global_ftn 976 977 978 !------------------------------------------------------------------------------! 979 ! Description: 980 ! ------------ 981 !> Read module-specific global restart data (MPI-IO). 982 !------------------------------------------------------------------------------! 983 SUBROUTINE flight_rrd_global_mpi 984 985 986 IMPLICIT NONE 987 988 LOGICAL :: array_found !< flag indicating if respective array is found in restart file 989 990 991 CALL rd_mpi_io_check_array( 'u_agl', found = array_found ) 992 IF ( array_found) THEN 993 IF ( .NOT. ALLOCATED( u_agl ) ) ALLOCATE( u_agl(1:num_leg) ) 994 CALL rrd_mpi_io_global_array( 'u_agl', u_agl ) 995 ENDIF 996 CALL rd_mpi_io_check_array( 'v_agl', found = array_found ) 997 IF ( array_found) THEN 998 IF ( .NOT. ALLOCATED( v_agl ) ) ALLOCATE( v_agl(1:num_leg) ) 999 CALL rrd_mpi_io_global_array( 'v_agl', v_agl ) 1000 ENDIF 1001 CALL rd_mpi_io_check_array( 'w_agl', found = array_found ) 1002 IF ( array_found) THEN 1003 IF ( .NOT. ALLOCATED( w_agl ) ) ALLOCATE( w_agl(1:num_leg) ) 1004 CALL rrd_mpi_io_global_array( 'w_agl', w_agl ) 1005 ENDIF 1006 CALL rd_mpi_io_check_array( 'x_pos', found = array_found ) 1007 IF ( array_found) THEN 1008 IF ( .NOT. ALLOCATED( x_pos ) ) ALLOCATE( x_pos(1:num_leg) ) 1009 CALL rrd_mpi_io_global_array( 'x_pos', x_pos ) 1010 ENDIF 1011 CALL rd_mpi_io_check_array( 'y_pos', found = array_found ) 1012 IF ( array_found) THEN 1013 IF ( .NOT. ALLOCATED( y_pos ) ) ALLOCATE( y_pos(1:num_leg) ) 1014 CALL rrd_mpi_io_global_array( 'y_pos', y_pos ) 1015 ENDIF 1016 CALL rd_mpi_io_check_array( 'z_pos', found = array_found ) 1017 IF ( array_found) THEN 1018 IF ( .NOT. ALLOCATED( z_pos ) ) ALLOCATE( z_pos(1:num_leg) ) 1019 CALL rrd_mpi_io_global_array( 'z_pos', z_pos ) 1020 ENDIF 1021 1022 END SUBROUTINE flight_rrd_global_mpi 1023 967 1024 968 1025 !------------------------------------------------------------------------------! … … 976 1033 IMPLICIT NONE 977 1034 978 CALL wrd_write_string( 'u_agl' ) 979 WRITE ( 14 ) u_agl 980 981 CALL wrd_write_string( 'v_agl' ) 982 983 WRITE ( 14 ) v_agl 984 985 CALL wrd_write_string( 'w_agl' ) 986 WRITE ( 14 ) w_agl 987 988 CALL wrd_write_string( 'x_pos' ) 989 WRITE ( 14 ) x_pos 990 991 CALL wrd_write_string( 'y_pos' ) 992 WRITE ( 14 ) y_pos 993 994 CALL wrd_write_string( 'z_pos' ) 995 WRITE ( 14 ) z_pos 996 1035 1036 IF ( TRIM( restart_data_format_output ) == 'fortran_binary' ) THEN 1037 1038 CALL wrd_write_string( 'u_agl' ) 1039 WRITE ( 14 ) u_agl 1040 1041 CALL wrd_write_string( 'v_agl' ) 1042 WRITE ( 14 ) v_agl 1043 1044 CALL wrd_write_string( 'w_agl' ) 1045 WRITE ( 14 ) w_agl 1046 1047 CALL wrd_write_string( 'x_pos' ) 1048 WRITE ( 14 ) x_pos 1049 1050 CALL wrd_write_string( 'y_pos' ) 1051 WRITE ( 14 ) y_pos 1052 1053 CALL wrd_write_string( 'z_pos' ) 1054 WRITE ( 14 ) z_pos 1055 1056 ELSEIF ( TRIM( restart_data_format_output ) == 'mpi' ) THEN 1057 1058 CALL wrd_mpi_io_global_array( 'u_agl', u_agl ) 1059 CALL wrd_mpi_io_global_array( 'v_agl', v_agl ) 1060 CALL wrd_mpi_io_global_array( 'w_agl', w_agl ) 1061 CALL wrd_mpi_io_global_array( 'x_pos', x_pos ) 1062 CALL wrd_mpi_io_global_array( 'y_pos', y_pos ) 1063 CALL wrd_mpi_io_global_array( 'z_pos', z_pos ) 1064 1065 ENDIF 1066 997 1067 END SUBROUTINE flight_wrd_global 998 1068 -
palm/trunk/SOURCE/wind_turbine_model_mod.f90
r4481 r4495 26 26 ! ----------------- 27 27 ! $Id$ 28 ! restart data handling with MPI-IO added 29 ! 30 ! 4481 2020-03-31 18:55:54Z maronga 28 31 ! ASCII output cleanup 29 32 ! … … 154 157 ONLY: coupling_char, & 155 158 debug_output, & 156 dt_3d, dz, end_time, message_string, time_since_reference_point,&159 dt_3d, dz, end_time, message_string, restart_data_format_output, time_since_reference_point,& 157 160 wind_turbine, initializing_actions, origin_date_time 158 161 … … 185 188 186 189 USE pegrid 190 191 USE restart_data_mpi_io_mod, & 192 ONLY: rrd_mpi_io_global_array, wrd_mpi_io_global_array 187 193 188 194 … … 474 480 475 481 INTERFACE wtm_rrd_global 476 MODULE PROCEDURE wtm_rrd_global 482 MODULE PROCEDURE wtm_rrd_global_ftn 483 MODULE PROCEDURE wtm_rrd_global_mpi 477 484 END INTERFACE wtm_rrd_global 478 485 … … 565 572 566 573 567 CALL wrd_write_string( 'generator_speed' ) 568 WRITE ( 14 ) generator_speed 569 570 CALL wrd_write_string( 'generator_speed_f' ) 571 WRITE ( 14 ) generator_speed_f 572 573 CALL wrd_write_string( 'generator_speed_f_old' ) 574 WRITE ( 14 ) generator_speed_f_old 575 576 CALL wrd_write_string( 'generator_speed_old' ) 577 WRITE ( 14 ) generator_speed_old 578 579 CALL wrd_write_string( 'rotor_speed' ) 580 WRITE ( 14 ) rotor_speed 581 582 CALL wrd_write_string( 'yaw_angle' ) 583 WRITE ( 14 ) yaw_angle 584 585 CALL wrd_write_string( 'pitch_angle' ) 586 WRITE ( 14 ) pitch_angle 587 588 CALL wrd_write_string( 'pitch_angle_old' ) 589 WRITE ( 14 ) pitch_angle_old 590 591 CALL wrd_write_string( 'torque_gen' ) 592 WRITE ( 14 ) torque_gen 593 594 CALL wrd_write_string( 'torque_gen_old' ) 595 WRITE ( 14 ) torque_gen_old 596 574 IF ( TRIM( restart_data_format_output ) == 'fortran_binary' ) THEN 575 576 CALL wrd_write_string( 'generator_speed' ) 577 WRITE ( 14 ) generator_speed 578 579 CALL wrd_write_string( 'generator_speed_f' ) 580 WRITE ( 14 ) generator_speed_f 581 582 CALL wrd_write_string( 'generator_speed_f_old' ) 583 WRITE ( 14 ) generator_speed_f_old 584 585 CALL wrd_write_string( 'generator_speed_old' ) 586 WRITE ( 14 ) generator_speed_old 587 588 CALL wrd_write_string( 'rotor_speed' ) 589 WRITE ( 14 ) rotor_speed 590 591 CALL wrd_write_string( 'yaw_angle' ) 592 WRITE ( 14 ) yaw_angle 593 594 CALL wrd_write_string( 'pitch_angle' ) 595 WRITE ( 14 ) pitch_angle 596 597 CALL wrd_write_string( 'pitch_angle_old' ) 598 WRITE ( 14 ) pitch_angle_old 599 600 CALL wrd_write_string( 'torque_gen' ) 601 WRITE ( 14 ) torque_gen 602 603 CALL wrd_write_string( 'torque_gen_old' ) 604 WRITE ( 14 ) torque_gen_old 605 606 ELSEIF ( TRIM( restart_data_format_output ) == 'mpi' ) THEN 607 608 CALL wrd_mpi_io_global_array( 'generator_speed', generator_speed ) 609 CALL wrd_mpi_io_global_array( 'generator_speed_f', generator_speed_f ) 610 CALL wrd_mpi_io_global_array( 'generator_speed_f_old', generator_speed_f_old ) 611 CALL wrd_mpi_io_global_array( 'generator_speed_old', generator_speed_old ) 612 CALL wrd_mpi_io_global_array( 'rotor_speed', rotor_speed ) 613 CALL wrd_mpi_io_global_array( 'yaw_angle', yaw_angle ) 614 CALL wrd_mpi_io_global_array( 'pitch_angle', pitch_angle ) 615 CALL wrd_mpi_io_global_array( 'pitch_angle_old', pitch_angle_old ) 616 CALL wrd_mpi_io_global_array( 'torque_gen', torque_gen ) 617 CALL wrd_mpi_io_global_array( 'torque_gen_old', torque_gen_old ) 618 619 ENDIF 597 620 598 621 END SUBROUTINE wtm_wrd_global … … 602 625 ! Description: 603 626 ! ------------ 604 !> This routine reads the respective restart data.605 !------------------------------------------------------------------------------! 606 SUBROUTINE wtm_rrd_global ( found )627 !> Read module-specific global restart data (Fortran binary format). 628 !------------------------------------------------------------------------------! 629 SUBROUTINE wtm_rrd_global_ftn( found ) 607 630 608 631 … … 649 672 650 673 651 END SUBROUTINE wtm_rrd_global 674 END SUBROUTINE wtm_rrd_global_ftn 675 676 677 !------------------------------------------------------------------------------! 678 ! Description: 679 ! ------------ 680 !> Read module-specific global restart data (MPI-IO). 681 !------------------------------------------------------------------------------! 682 SUBROUTINE wtm_rrd_global_mpi 683 684 CALL rrd_mpi_io_global_array( 'generator_speed', generator_speed ) 685 CALL rrd_mpi_io_global_array( 'generator_speed_f', generator_speed_f ) 686 CALL rrd_mpi_io_global_array( 'generator_speed_f_old', generator_speed_f_old ) 687 CALL rrd_mpi_io_global_array( 'generator_speed_old', generator_speed_old ) 688 CALL rrd_mpi_io_global_array( 'rotor_speed', rotor_speed ) 689 CALL rrd_mpi_io_global_array( 'yaw_angle', yaw_angle ) 690 CALL rrd_mpi_io_global_array( 'pitch_angle', pitch_angle ) 691 CALL rrd_mpi_io_global_array( 'pitch_angle_old', pitch_angle_old ) 692 CALL rrd_mpi_io_global_array( 'torque_gen', torque_gen ) 693 CALL rrd_mpi_io_global_array( 'torque_gen_old', torque_gen_old ) 694 695 END SUBROUTINE wtm_rrd_global_mpi 652 696 653 697 -
palm/trunk/SOURCE/write_restart_data_mod.f90
r4489 r4495 24 24 ! ----------------- 25 25 ! $Id$ 26 ! restart data handling with MPI-IO added 27 ! 28 ! 4489 2020-04-04 10:54:08Z raasch 26 29 ! file re-formatted to follow the PALM coding standard 27 30 ! … … 74 77 USE averaging 75 78 79 USE bulk_cloud_model_mod, & 80 ONLY: bulk_cloud_model 81 76 82 USE control_parameters 77 83 78 84 USE grid_variables, & 79 85 ONLY: dx, dy 86 87 USE gust_mod, & 88 ONLY: gust_module_enabled 80 89 81 90 USE indices, & … … 94 103 ONLY: netcdf_precision, output_for_t0 95 104 105 USE particle_attributes, & 106 ONLY: particle_advection 107 96 108 USE pegrid, & 97 109 ONLY: collective_wait, hor_index_bounds, myid, numprocs … … 105 117 USE random_generator_parallel, & 106 118 ONLY: id_random_array, seq_random_array 119 120 USE restart_data_mpi_io_mod, & 121 ONLY: wrd_mpi_io, wrd_mpi_io_global_array 107 122 108 123 USE spectra_mod, & … … 116 131 ONLY: surface_wrd_local 117 132 133 USE user, & 134 ONLY: user_module_enabled 135 118 136 USE vertical_nesting_mod, & 119 137 ONLY: vnest_init … … 143 161 ! Description: 144 162 ! ------------ 145 !> Global data of control variables and arrays is written out for restarts (binary format). 146 !> This information is only written to the file opened by PE0. 163 !> Global data of control variables and arrays is written out for restarts. 164 !> In case of output in Fortran binary format, this information is only written to the file 165 !> opened by PE0. 147 166 !--------------------------------------------------------------------------------------------------! 148 167 … … 151 170 152 171 153 CHARACTER(LEN=10) :: binary_version_global !< 154 172 CHARACTER(LEN=10) :: binary_version_global !< 173 CHARACTER(LEN=20) :: tmp_name !< temporary variable 174 175 INTEGER :: i !< loop index 155 176 156 177 binary_version_global = '4.9' 157 178 158 CALL wrd_write_string( 'binary_version_global' ) 159 WRITE ( 14 ) binary_version_global 160 161 CALL wrd_write_string( 'numprocs' ) 162 WRITE ( 14 ) numprocs 163 164 CALL wrd_write_string( 'hor_index_bounds' ) 165 WRITE ( 14 ) hor_index_bounds 166 167 CALL wrd_write_string( 'nz' ) 168 WRITE ( 14 ) nz 169 170 CALL wrd_write_string( 'max_pr_user' ) 171 WRITE ( 14 ) max_pr_user 172 173 CALL wrd_write_string( 'statistic_regions' ) 174 WRITE ( 14 ) statistic_regions 175 176 ! 177 !-- Caution: After changes in the following parameter-list, the version number stored in the 178 !-- -------- variable binary_version_global has to be increased. The same changes must also be done 179 !-- in the parameter-list in rrd_global. 180 181 CALL wrd_write_string( 'advected_distance_x' ) 182 WRITE ( 14 ) advected_distance_x 183 184 CALL wrd_write_string( 'advected_distance_y' ) 185 WRITE ( 14 ) advected_distance_y 186 187 CALL wrd_write_string( 'alpha_surface' ) 188 WRITE ( 14 ) alpha_surface 189 190 CALL wrd_write_string( 'average_count_pr' ) 191 WRITE ( 14 ) average_count_pr 192 193 CALL wrd_write_string( 'average_count_sp' ) 194 WRITE ( 14 ) average_count_sp 195 196 CALL wrd_write_string( 'average_count_3d' ) 197 WRITE ( 14 ) average_count_3d 198 199 CALL wrd_write_string( 'bc_e_b' ) 200 WRITE ( 14 ) bc_e_b 201 202 CALL wrd_write_string( 'bc_lr' ) 203 WRITE ( 14 ) bc_lr 204 205 CALL wrd_write_string( 'bc_ns' ) 206 WRITE ( 14 ) bc_ns 207 208 CALL wrd_write_string( 'bc_p_b' ) 209 WRITE ( 14 ) bc_p_b 210 211 CALL wrd_write_string( 'bc_p_t' ) 212 WRITE ( 14 ) bc_p_t 213 214 CALL wrd_write_string( 'bc_pt_b' ) 215 WRITE ( 14 ) bc_pt_b 216 217 CALL wrd_write_string( 'bc_pt_t' ) 218 WRITE ( 14 ) bc_pt_t 219 220 CALL wrd_write_string( 'bc_pt_t_val' ) 221 WRITE ( 14 ) bc_pt_t_val 222 223 CALL wrd_write_string( 'bc_q_b' ) 224 WRITE ( 14 ) bc_q_b 225 226 CALL wrd_write_string( 'bc_q_t' ) 227 WRITE ( 14 ) bc_q_t 228 229 CALL wrd_write_string( 'bc_q_t_val' ) 230 WRITE ( 14 ) bc_q_t_val 231 232 CALL wrd_write_string( 'bc_s_b' ) 233 WRITE ( 14 ) bc_s_b 234 235 CALL wrd_write_string( 'bc_s_t' ) 236 WRITE ( 14 ) bc_s_t 237 238 CALL wrd_write_string( 'bc_uv_b' ) 239 WRITE ( 14 ) bc_uv_b 240 241 CALL wrd_write_string( 'bc_uv_t' ) 242 WRITE ( 14 ) bc_uv_t 243 244 CALL wrd_write_string( 'building_height' ) 245 WRITE ( 14 ) building_height 246 247 CALL wrd_write_string( 'building_length_x' ) 248 WRITE ( 14 ) building_length_x 249 250 CALL wrd_write_string( 'building_length_y' ) 251 WRITE ( 14 ) building_length_y 252 253 CALL wrd_write_string( 'building_wall_left' ) 254 WRITE ( 14 ) building_wall_left 255 256 CALL wrd_write_string( 'building_wall_south' ) 257 WRITE ( 14 ) building_wall_south 258 259 CALL wrd_write_string( 'call_psolver_at_all_substeps' ) 260 WRITE ( 14 ) call_psolver_at_all_substeps 261 262 CALL wrd_write_string( 'canyon_height' ) 263 WRITE ( 14 ) canyon_height 264 265 CALL wrd_write_string( 'canyon_wall_left' ) 266 WRITE ( 14 ) canyon_wall_left 267 268 CALL wrd_write_string( 'canyon_wall_south' ) 269 WRITE ( 14 ) canyon_wall_south 270 271 CALL wrd_write_string( 'canyon_width_x' ) 272 WRITE ( 14 ) canyon_width_x 273 274 CALL wrd_write_string( 'canyon_width_y' ) 275 WRITE ( 14 ) canyon_width_y 276 277 CALL wrd_write_string( 'cfl_factor' ) 278 WRITE ( 14 ) cfl_factor 279 280 CALL wrd_write_string( 'cloud_droplets' ) 281 WRITE ( 14 ) cloud_droplets 282 283 CALL wrd_write_string( 'collective_wait' ) 284 WRITE ( 14 ) collective_wait 285 286 CALL wrd_write_string( 'conserve_volume_flow' ) 287 WRITE ( 14 ) conserve_volume_flow 288 289 CALL wrd_write_string( 'conserve_volume_flow_mode' ) 290 WRITE ( 14 ) conserve_volume_flow_mode 291 292 CALL wrd_write_string( 'constant_flux_layer' ) 293 WRITE ( 14 ) constant_flux_layer 294 295 CALL wrd_write_string( 'coupling_start_time' ) 296 WRITE ( 14 ) coupling_start_time 297 298 CALL wrd_write_string( 'current_timestep_number' ) 299 WRITE ( 14 ) current_timestep_number 300 301 CALL wrd_write_string( 'cycle_mg' ) 302 WRITE ( 14 ) cycle_mg 303 304 CALL wrd_write_string( 'damp_level_1d' ) 305 WRITE ( 14 ) damp_level_1d 306 307 CALL wrd_write_string( 'origin_date_time' ) 308 WRITE ( 14 ) origin_date_time 309 310 CALL wrd_write_string( 'dissipation_1d' ) 311 WRITE ( 14 ) dissipation_1d 312 313 CALL wrd_write_string( 'do2d_xy_time_count' ) 314 WRITE ( 14 ) do2d_xy_time_count 315 316 CALL wrd_write_string( 'do2d_xz_time_count' ) 317 WRITE ( 14 ) do2d_xz_time_count 318 319 CALL wrd_write_string( 'do2d_yz_time_count' ) 320 WRITE ( 14 ) do2d_yz_time_count 321 322 CALL wrd_write_string( 'do3d_time_count' ) 323 WRITE ( 14 ) do3d_time_count 324 325 CALL wrd_write_string( 'dp_external' ) 326 WRITE ( 14 ) dp_external 327 328 CALL wrd_write_string( 'dp_level_b' ) 329 WRITE ( 14 ) dp_level_b 330 331 CALL wrd_write_string( 'dp_smooth' ) 332 WRITE ( 14 ) dp_smooth 333 334 CALL wrd_write_string( 'dpdxy' ) 335 WRITE ( 14 ) dpdxy 336 337 CALL wrd_write_string( 'dt_3d' ) 338 WRITE ( 14 ) dt_3d 179 IF ( restart_data_format_output == 'fortran_binary' ) THEN 180 ! 181 !-- Output in Fortran binary format 182 CALL wrd_write_string( 'binary_version_global' ) 183 WRITE ( 14 ) binary_version_global 184 185 CALL wrd_write_string( 'numprocs' ) 186 WRITE ( 14 ) numprocs 187 188 CALL wrd_write_string( 'hor_index_bounds' ) 189 WRITE ( 14 ) hor_index_bounds 190 191 CALL wrd_write_string( 'nz' ) 192 WRITE ( 14 ) nz 193 194 CALL wrd_write_string( 'max_pr_user' ) 195 WRITE ( 14 ) max_pr_user 196 197 CALL wrd_write_string( 'statistic_regions' ) 198 WRITE ( 14 ) statistic_regions 199 200 ! 201 !-- Caution: After changes in the following parameter-list, the version number stored in the 202 !-- -------- variable binary_version_global has to be increased. The same changes must also be 203 !-- done in the parameter-list in rrd_global. 204 CALL wrd_write_string( 'advected_distance_x' ) 205 WRITE ( 14 ) advected_distance_x 206 207 CALL wrd_write_string( 'advected_distance_y' ) 208 WRITE ( 14 ) advected_distance_y 209 210 CALL wrd_write_string( 'alpha_surface' ) 211 WRITE ( 14 ) alpha_surface 212 213 CALL wrd_write_string( 'average_count_pr' ) 214 WRITE ( 14 ) average_count_pr 215 216 CALL wrd_write_string( 'average_count_sp' ) 217 WRITE ( 14 ) average_count_sp 218 219 CALL wrd_write_string( 'average_count_3d' ) 220 WRITE ( 14 ) average_count_3d 221 222 CALL wrd_write_string( 'bc_e_b' ) 223 WRITE ( 14 ) bc_e_b 224 225 CALL wrd_write_string( 'bc_lr' ) 226 WRITE ( 14 ) bc_lr 227 228 CALL wrd_write_string( 'bc_ns' ) 229 WRITE ( 14 ) bc_ns 230 231 CALL wrd_write_string( 'bc_p_b' ) 232 WRITE ( 14 ) bc_p_b 233 234 CALL wrd_write_string( 'bc_p_t' ) 235 WRITE ( 14 ) bc_p_t 236 237 CALL wrd_write_string( 'bc_pt_b' ) 238 WRITE ( 14 ) bc_pt_b 239 240 CALL wrd_write_string( 'bc_pt_t' ) 241 WRITE ( 14 ) bc_pt_t 242 243 CALL wrd_write_string( 'bc_pt_t_val' ) 244 WRITE ( 14 ) bc_pt_t_val 245 246 CALL wrd_write_string( 'bc_q_b' ) 247 WRITE ( 14 ) bc_q_b 248 249 CALL wrd_write_string( 'bc_q_t' ) 250 WRITE ( 14 ) bc_q_t 251 252 CALL wrd_write_string( 'bc_q_t_val' ) 253 WRITE ( 14 ) bc_q_t_val 254 255 CALL wrd_write_string( 'bc_s_b' ) 256 WRITE ( 14 ) bc_s_b 257 258 CALL wrd_write_string( 'bc_s_t' ) 259 WRITE ( 14 ) bc_s_t 260 261 CALL wrd_write_string( 'bc_uv_b' ) 262 WRITE ( 14 ) bc_uv_b 263 264 CALL wrd_write_string( 'bc_uv_t' ) 265 WRITE ( 14 ) bc_uv_t 266 267 CALL wrd_write_string( 'building_height' ) 268 WRITE ( 14 ) building_height 269 270 CALL wrd_write_string( 'building_length_x' ) 271 WRITE ( 14 ) building_length_x 272 273 CALL wrd_write_string( 'building_length_y' ) 274 WRITE ( 14 ) building_length_y 275 276 CALL wrd_write_string( 'building_wall_left' ) 277 WRITE ( 14 ) building_wall_left 278 279 CALL wrd_write_string( 'building_wall_south' ) 280 WRITE ( 14 ) building_wall_south 281 282 CALL wrd_write_string( 'call_psolver_at_all_substeps' ) 283 WRITE ( 14 ) call_psolver_at_all_substeps 284 285 CALL wrd_write_string( 'canyon_height' ) 286 WRITE ( 14 ) canyon_height 287 288 CALL wrd_write_string( 'canyon_wall_left' ) 289 WRITE ( 14 ) canyon_wall_left 290 291 CALL wrd_write_string( 'canyon_wall_south' ) 292 WRITE ( 14 ) canyon_wall_south 293 294 CALL wrd_write_string( 'canyon_width_x' ) 295 WRITE ( 14 ) canyon_width_x 296 297 CALL wrd_write_string( 'canyon_width_y' ) 298 WRITE ( 14 ) canyon_width_y 299 300 CALL wrd_write_string( 'cfl_factor' ) 301 WRITE ( 14 ) cfl_factor 302 303 CALL wrd_write_string( 'cloud_droplets' ) 304 WRITE ( 14 ) cloud_droplets 305 306 CALL wrd_write_string( 'collective_wait' ) 307 WRITE ( 14 ) collective_wait 308 309 CALL wrd_write_string( 'conserve_volume_flow' ) 310 WRITE ( 14 ) conserve_volume_flow 311 312 CALL wrd_write_string( 'conserve_volume_flow_mode' ) 313 WRITE ( 14 ) conserve_volume_flow_mode 314 315 CALL wrd_write_string( 'constant_flux_layer' ) 316 WRITE ( 14 ) constant_flux_layer 317 318 CALL wrd_write_string( 'coupling_start_time' ) 319 WRITE ( 14 ) coupling_start_time 320 321 CALL wrd_write_string( 'current_timestep_number' ) 322 WRITE ( 14 ) current_timestep_number 323 324 CALL wrd_write_string( 'cycle_mg' ) 325 WRITE ( 14 ) cycle_mg 326 327 CALL wrd_write_string( 'damp_level_1d' ) 328 WRITE ( 14 ) damp_level_1d 329 330 CALL wrd_write_string( 'origin_date_time' ) 331 WRITE ( 14 ) origin_date_time 332 333 CALL wrd_write_string( 'dissipation_1d' ) 334 WRITE ( 14 ) dissipation_1d 335 336 CALL wrd_write_string( 'do2d_xy_time_count' ) 337 WRITE ( 14 ) do2d_xy_time_count 338 339 CALL wrd_write_string( 'do2d_xz_time_count' ) 340 WRITE ( 14 ) do2d_xz_time_count 341 342 CALL wrd_write_string( 'do2d_yz_time_count' ) 343 WRITE ( 14 ) do2d_yz_time_count 344 345 CALL wrd_write_string( 'do3d_time_count' ) 346 WRITE ( 14 ) do3d_time_count 347 348 CALL wrd_write_string( 'dp_external' ) 349 WRITE ( 14 ) dp_external 350 351 CALL wrd_write_string( 'dp_level_b' ) 352 WRITE ( 14 ) dp_level_b 353 354 CALL wrd_write_string( 'dp_smooth' ) 355 WRITE ( 14 ) dp_smooth 356 357 CALL wrd_write_string( 'dpdxy' ) 358 WRITE ( 14 ) dpdxy 359 360 CALL wrd_write_string( 'dt_3d' ) 361 WRITE ( 14 ) dt_3d 339 362 340 363 CALL wrd_write_string( 'dt_pr_1d' ) 341 364 WRITE ( 14 ) dt_pr_1d 342 365 343 CALL wrd_write_string( 'dt_run_control_1d' ) 344 WRITE ( 14 ) dt_run_control_1d 345 346 CALL wrd_write_string( 'dx' ) 347 WRITE ( 14 ) dx 348 349 CALL wrd_write_string( 'dy' ) 350 WRITE ( 14 ) dy 351 352 CALL wrd_write_string( 'dz' ) 353 WRITE ( 14 ) dz 354 355 CALL wrd_write_string( 'dz_max' ) 356 WRITE ( 14 ) dz_max 357 358 CALL wrd_write_string( 'dz_stretch_factor' ) 359 WRITE ( 14 ) dz_stretch_factor 360 361 CALL wrd_write_string( 'dz_stretch_factor_array' ) 362 WRITE ( 14 ) dz_stretch_factor_array 363 364 CALL wrd_write_string( 'dz_stretch_level' ) 365 WRITE ( 14 ) dz_stretch_level 366 367 CALL wrd_write_string( 'dz_stretch_level_end' ) 368 WRITE ( 14 ) dz_stretch_level_end 369 370 CALL wrd_write_string( 'dz_stretch_level_start' ) 371 WRITE ( 14 ) dz_stretch_level_start 372 373 CALL wrd_write_string( 'e_min' ) 374 WRITE ( 14 ) e_min 375 376 CALL wrd_write_string( 'end_time_1d' ) 377 WRITE ( 14 ) end_time_1d 378 379 CALL wrd_write_string( 'fft_method' ) 380 WRITE ( 14 ) fft_method 381 382 CALL wrd_write_string( 'first_call_lpm' ) 383 WRITE ( 14 ) first_call_lpm 384 385 CALL wrd_write_string( 'galilei_transformation' ) 386 WRITE ( 14 ) galilei_transformation 387 388 CALL wrd_write_string( 'hom' ) 389 WRITE ( 14 ) hom 390 391 CALL wrd_write_string( 'hom_sum' ) 392 WRITE ( 14 ) hom_sum 393 394 CALL wrd_write_string( 'humidity' ) 395 WRITE ( 14 ) humidity 396 397 IF ( ALLOCATED( inflow_damping_factor ) ) THEN 398 CALL wrd_write_string( 'inflow_damping_factor' ) 399 WRITE ( 14 ) inflow_damping_factor 366 CALL wrd_write_string( 'dt_run_control_1d' ) 367 WRITE ( 14 ) dt_run_control_1d 368 369 CALL wrd_write_string( 'dx' ) 370 WRITE ( 14 ) dx 371 372 CALL wrd_write_string( 'dy' ) 373 WRITE ( 14 ) dy 374 375 CALL wrd_write_string( 'dz' ) 376 WRITE ( 14 ) dz 377 378 CALL wrd_write_string( 'dz_max' ) 379 WRITE ( 14 ) dz_max 380 381 CALL wrd_write_string( 'dz_stretch_factor' ) 382 WRITE ( 14 ) dz_stretch_factor 383 384 CALL wrd_write_string( 'dz_stretch_factor_array' ) 385 WRITE ( 14 ) dz_stretch_factor_array 386 387 CALL wrd_write_string( 'dz_stretch_level' ) 388 WRITE ( 14 ) dz_stretch_level 389 390 CALL wrd_write_string( 'dz_stretch_level_end' ) 391 WRITE ( 14 ) dz_stretch_level_end 392 393 CALL wrd_write_string( 'dz_stretch_level_start' ) 394 WRITE ( 14 ) dz_stretch_level_start 395 396 CALL wrd_write_string( 'e_min' ) 397 WRITE ( 14 ) e_min 398 399 CALL wrd_write_string( 'end_time_1d' ) 400 WRITE ( 14 ) end_time_1d 401 402 CALL wrd_write_string( 'fft_method' ) 403 WRITE ( 14 ) fft_method 404 405 CALL wrd_write_string( 'first_call_lpm' ) 406 WRITE ( 14 ) first_call_lpm 407 408 CALL wrd_write_string( 'galilei_transformation' ) 409 WRITE ( 14 ) galilei_transformation 410 411 CALL wrd_write_string( 'hom' ) 412 WRITE ( 14 ) hom 413 414 CALL wrd_write_string( 'hom_sum' ) 415 WRITE ( 14 ) hom_sum 416 417 CALL wrd_write_string( 'humidity' ) 418 WRITE ( 14 ) humidity 419 420 IF ( ALLOCATED( inflow_damping_factor ) ) THEN 421 CALL wrd_write_string( 'inflow_damping_factor' ) 422 WRITE ( 14 ) inflow_damping_factor 423 ENDIF 424 425 CALL wrd_write_string( 'inflow_damping_height' ) 426 WRITE ( 14 ) inflow_damping_height 427 428 CALL wrd_write_string( 'inflow_damping_width' ) 429 WRITE ( 14 ) inflow_damping_width 430 431 CALL wrd_write_string( 'inflow_disturbance_begin' ) 432 WRITE ( 14 ) inflow_disturbance_begin 433 434 CALL wrd_write_string( 'inflow_disturbance_end' ) 435 WRITE ( 14 ) inflow_disturbance_end 436 437 CALL wrd_write_string( 'km_constant' ) 438 WRITE ( 14 ) km_constant 439 440 CALL wrd_write_string( 'large_scale_forcing' ) 441 WRITE ( 14 ) large_scale_forcing 442 443 CALL wrd_write_string( 'large_scale_subsidence' ) 444 WRITE ( 14 ) large_scale_subsidence 445 446 CALL wrd_write_string( 'latitude' ) 447 WRITE ( 14 ) latitude 448 449 CALL wrd_write_string( 'longitude' ) 450 WRITE ( 14 ) longitude 451 452 CALL wrd_write_string( 'loop_optimization' ) 453 WRITE ( 14 ) loop_optimization 454 455 CALL wrd_write_string( 'masking_method' ) 456 WRITE ( 14 ) masking_method 457 458 IF ( ALLOCATED( mean_inflow_profiles ) ) THEN 459 CALL wrd_write_string( 'mean_inflow_profiles' ) 460 WRITE ( 14 ) mean_inflow_profiles 461 ENDIF 462 463 CALL wrd_write_string( 'mg_cycles' ) 464 WRITE ( 14 ) mg_cycles 465 466 CALL wrd_write_string( 'mg_switch_to_pe0_level' ) 467 WRITE ( 14 ) mg_switch_to_pe0_level 468 469 CALL wrd_write_string( 'mixing_length_1d' ) 470 WRITE ( 14 ) mixing_length_1d 471 472 CALL wrd_write_string( 'momentum_advec' ) 473 WRITE ( 14 ) momentum_advec 474 475 CALL wrd_write_string( 'netcdf_precision' ) 476 WRITE ( 14 ) netcdf_precision 477 478 CALL wrd_write_string( 'neutral' ) 479 WRITE ( 14 ) neutral 480 481 CALL wrd_write_string( 'ngsrb' ) 482 WRITE ( 14 ) ngsrb 483 484 CALL wrd_write_string( 'nsor' ) 485 WRITE ( 14 ) nsor 486 487 CALL wrd_write_string( 'nsor_ini' ) 488 WRITE ( 14 ) nsor_ini 489 490 CALL wrd_write_string( 'nudging' ) 491 WRITE ( 14 ) nudging 492 493 CALL wrd_write_string( 'num_leg' ) 494 WRITE ( 14 ) num_leg 495 496 CALL wrd_write_string( 'nx' ) 497 WRITE ( 14 ) nx 498 499 CALL wrd_write_string( 'ny' ) 500 WRITE ( 14 ) ny 501 502 CALL wrd_write_string( 'ocean_mode' ) 503 WRITE ( 14 ) ocean_mode 504 505 CALL wrd_write_string( 'omega' ) 506 WRITE ( 14 ) omega 507 508 CALL wrd_write_string( 'omega_sor' ) 509 WRITE ( 14 ) omega_sor 510 511 CALL wrd_write_string( 'output_for_t0' ) 512 WRITE ( 14 ) output_for_t0 513 514 CALL wrd_write_string( 'passive_scalar' ) 515 WRITE ( 14 ) passive_scalar 516 517 CALL wrd_write_string( 'prandtl_number' ) 518 WRITE ( 14 ) prandtl_number 519 520 CALL wrd_write_string( 'psolver' ) 521 WRITE ( 14 ) psolver 522 523 CALL wrd_write_string( 'pt_damping_factor' ) 524 WRITE ( 14 ) pt_damping_factor 525 526 CALL wrd_write_string( 'pt_damping_width' ) 527 WRITE ( 14 ) pt_damping_width 528 529 CALL wrd_write_string( 'pt_init' ) 530 WRITE ( 14 ) pt_init 531 532 CALL wrd_write_string( 'pt_reference' ) 533 WRITE ( 14 ) pt_reference 534 535 CALL wrd_write_string( 'pt_surface' ) 536 WRITE ( 14 ) pt_surface 537 538 CALL wrd_write_string( 'pt_surface_initial_change' ) 539 WRITE ( 14 ) pt_surface_initial_change 540 541 CALL wrd_write_string( 'pt_vertical_gradient' ) 542 WRITE ( 14 ) pt_vertical_gradient 543 544 CALL wrd_write_string( 'pt_vertical_gradient_level' ) 545 WRITE ( 14 ) pt_vertical_gradient_level 546 547 CALL wrd_write_string( 'pt_vertical_gradient_level_ind' ) 548 WRITE ( 14 ) pt_vertical_gradient_level_ind 549 550 CALL wrd_write_string( 'q_init' ) 551 WRITE ( 14 ) q_init 552 553 CALL wrd_write_string( 'q_surface' ) 554 WRITE ( 14 ) q_surface 555 556 CALL wrd_write_string( 'q_surface_initial_change' ) 557 WRITE ( 14 ) q_surface_initial_change 558 559 CALL wrd_write_string( 'q_vertical_gradient' ) 560 WRITE ( 14 ) q_vertical_gradient 561 562 CALL wrd_write_string( 'q_vertical_gradient_level' ) 563 WRITE ( 14 ) q_vertical_gradient_level 564 565 CALL wrd_write_string( 'q_vertical_gradient_level_ind' ) 566 WRITE ( 14 ) q_vertical_gradient_level_ind 567 568 CALL wrd_write_string( 'random_generator' ) 569 WRITE ( 14 ) random_generator 570 571 CALL wrd_write_string( 'random_heatflux' ) 572 WRITE ( 14 ) random_heatflux 573 574 CALL wrd_write_string( 'rans_mode' ) 575 WRITE ( 14 ) rans_mode 576 577 CALL wrd_write_string( 'rayleigh_damping_factor' ) 578 WRITE ( 14 ) rayleigh_damping_factor 579 580 CALL wrd_write_string( 'rayleigh_damping_height' ) 581 WRITE ( 14 ) rayleigh_damping_height 582 583 CALL wrd_write_string( 'recycling_width' ) 584 WRITE ( 14 ) recycling_width 585 586 CALL wrd_write_string( 'ref_state' ) 587 WRITE ( 14 ) ref_state 588 589 CALL wrd_write_string( 'reference_state' ) 590 WRITE ( 14 ) reference_state 591 592 CALL wrd_write_string( 'residual_limit' ) 593 WRITE ( 14 ) residual_limit 594 595 CALL wrd_write_string( 'roughness_length' ) 596 WRITE ( 14 ) roughness_length 597 598 CALL wrd_write_string( 'run_coupled' ) 599 WRITE ( 14 ) run_coupled 600 601 CALL wrd_write_string( 'runnr' ) 602 WRITE ( 14 ) runnr 603 604 CALL wrd_write_string( 's_init' ) 605 WRITE ( 14 ) s_init 606 607 CALL wrd_write_string( 's_surface' ) 608 WRITE ( 14 ) s_surface 609 610 CALL wrd_write_string( 's_surface_initial_change' ) 611 WRITE ( 14 ) s_surface_initial_change 612 613 CALL wrd_write_string( 's_vertical_gradient' ) 614 WRITE ( 14 ) s_vertical_gradient 615 616 CALL wrd_write_string( 's_vertical_gradient_level' ) 617 WRITE ( 14 ) s_vertical_gradient_level 618 619 CALL wrd_write_string( 's_vertical_gradient_level_ind' ) 620 WRITE ( 14 ) s_vertical_gradient_level_ind 621 622 CALL wrd_write_string( 'scalar_advec' ) 623 WRITE ( 14 ) scalar_advec 624 625 CALL wrd_write_string( 'simulated_time' ) 626 WRITE ( 14 ) simulated_time 627 628 IF ( ALLOCATED( spectrum_x ) ) THEN 629 CALL wrd_write_string( 'spectrum_x' ) 630 WRITE ( 14 ) spectrum_x 631 CALL wrd_write_string( 'spectrum_y' ) 632 WRITE ( 14 ) spectrum_y 633 ENDIF 634 635 CALL wrd_write_string( 'spinup_time ' ) 636 WRITE ( 14 ) spinup_time 637 638 CALL wrd_write_string( 'subs_vertical_gradient' ) 639 WRITE ( 14 ) subs_vertical_gradient 640 641 CALL wrd_write_string( 'subs_vertical_gradient_level' ) 642 WRITE ( 14 ) subs_vertical_gradient_level 643 644 CALL wrd_write_string( 'subs_vertical_gradient_level_i' ) 645 WRITE ( 14 ) subs_vertical_gradient_level_i 646 647 CALL wrd_write_string( 'surface_heatflux' ) 648 WRITE ( 14 ) surface_heatflux 649 650 CALL wrd_write_string( 'surface_pressure' ) 651 WRITE ( 14 ) surface_pressure 652 653 CALL wrd_write_string( 'surface_scalarflux' ) 654 WRITE ( 14 ) surface_scalarflux 655 656 CALL wrd_write_string( 'surface_waterflux' ) 657 WRITE ( 14 ) surface_waterflux 658 659 CALL wrd_write_string( 'time_coupling' ) 660 WRITE ( 14 ) time_coupling 661 662 CALL wrd_write_string( 'time_disturb' ) 663 WRITE ( 14 ) time_disturb 664 665 CALL wrd_write_string( 'time_do2d_xy' ) 666 WRITE ( 14 ) time_do2d_xy 667 668 CALL wrd_write_string( 'time_do2d_xz' ) 669 WRITE ( 14 ) time_do2d_xz 670 671 CALL wrd_write_string( 'time_do2d_yz' ) 672 WRITE ( 14 ) time_do2d_yz 673 674 CALL wrd_write_string( 'time_do3d' ) 675 WRITE ( 14 ) time_do3d 676 677 CALL wrd_write_string( 'time_do_av' ) 678 WRITE ( 14 ) time_do_av 679 680 CALL wrd_write_string( 'time_do_sla' ) 681 WRITE ( 14 ) time_do_sla 682 683 CALL wrd_write_string( 'time_domask' ) 684 WRITE ( 14 ) time_domask 685 686 CALL wrd_write_string( 'time_dopr' ) 687 WRITE ( 14 ) time_dopr 688 689 CALL wrd_write_string( 'time_dopr_av' ) 690 WRITE ( 14 ) time_dopr_av 691 692 CALL wrd_write_string( 'time_dopr_listing' ) 693 WRITE ( 14 ) time_dopr_listing 694 695 CALL wrd_write_string( 'time_dopts' ) 696 WRITE ( 14 ) time_dopts 697 698 CALL wrd_write_string( 'time_dosp' ) 699 WRITE ( 14 ) time_dosp 700 701 CALL wrd_write_string( 'time_dots' ) 702 WRITE ( 14 ) time_dots 703 704 CALL wrd_write_string( 'time_radiation' ) 705 WRITE ( 14 ) time_radiation 706 707 CALL wrd_write_string( 'time_restart' ) 708 WRITE ( 14 ) time_restart 709 710 CALL wrd_write_string( 'time_run_control' ) 711 WRITE ( 14 ) time_run_control 712 713 CALL wrd_write_string( 'time_since_reference_point' ) 714 WRITE ( 14 ) time_since_reference_point 715 716 CALL wrd_write_string( 'time_virtual_measurement' ) 717 WRITE ( 14 ) time_virtual_measurement 718 719 CALL wrd_write_string( 'timestep_scheme' ) 720 WRITE ( 14 ) timestep_scheme 721 722 CALL wrd_write_string( 'top_heatflux' ) 723 WRITE ( 14 ) top_heatflux 724 725 CALL wrd_write_string( 'top_momentumflux_u' ) 726 WRITE ( 14 ) top_momentumflux_u 727 728 CALL wrd_write_string( 'top_momentumflux_v' ) 729 WRITE ( 14 ) top_momentumflux_v 730 731 CALL wrd_write_string( 'top_scalarflux' ) 732 WRITE ( 14 ) top_scalarflux 733 734 CALL wrd_write_string( 'topography' ) 735 WRITE ( 14 ) topography 736 737 CALL wrd_write_string( 'topography_grid_convention' ) 738 WRITE ( 14 ) topography_grid_convention 739 740 CALL wrd_write_string( 'tsc' ) 741 WRITE ( 14 ) tsc 742 743 CALL wrd_write_string( 'tunnel_height' ) 744 WRITE ( 14 ) tunnel_height 745 746 CALL wrd_write_string( 'tunnel_length' ) 747 WRITE ( 14 ) tunnel_length 748 749 CALL wrd_write_string( 'tunnel_wall_depth' ) 750 WRITE ( 14 ) tunnel_wall_depth 751 752 CALL wrd_write_string( 'tunnel_width_x' ) 753 WRITE ( 14 ) tunnel_width_x 754 755 CALL wrd_write_string( 'tunnel_width_y' ) 756 WRITE ( 14 ) tunnel_width_y 757 758 CALL wrd_write_string( 'turbulence_closure' ) 759 WRITE ( 14 ) turbulence_closure 760 761 CALL wrd_write_string( 'turbulent_inflow' ) 762 WRITE ( 14 ) turbulent_inflow 763 764 CALL wrd_write_string( 'u_bulk' ) 765 WRITE ( 14 ) u_bulk 766 767 CALL wrd_write_string( 'u_init' ) 768 WRITE ( 14 ) u_init 769 770 CALL wrd_write_string( 'u_max' ) 771 WRITE ( 14 ) u_max 772 773 CALL wrd_write_string( 'u_max_ijk' ) 774 WRITE ( 14 ) u_max_ijk 775 776 CALL wrd_write_string( 'ug' ) 777 WRITE ( 14 ) ug 778 779 CALL wrd_write_string( 'ug_surface' ) 780 WRITE ( 14 ) ug_surface 781 782 CALL wrd_write_string( 'ug_vertical_gradient' ) 783 WRITE ( 14 ) ug_vertical_gradient 784 785 CALL wrd_write_string( 'ug_vertical_gradient_level' ) 786 WRITE ( 14 ) ug_vertical_gradient_level 787 788 CALL wrd_write_string( 'ug_vertical_gradient_level_ind' ) 789 WRITE ( 14 ) ug_vertical_gradient_level_ind 790 791 CALL wrd_write_string( 'use_surface_fluxes' ) 792 WRITE ( 14 ) use_surface_fluxes 793 794 CALL wrd_write_string( 'use_top_fluxes' ) 795 WRITE ( 14 ) use_top_fluxes 796 797 CALL wrd_write_string( 'use_ug_for_galilei_tr' ) 798 WRITE ( 14 ) use_ug_for_galilei_tr 799 800 CALL wrd_write_string( 'use_upstream_for_tke' ) 801 WRITE ( 14 ) use_upstream_for_tke 802 803 CALL wrd_write_string( 'v_bulk' ) 804 WRITE ( 14 ) v_bulk 805 806 CALL wrd_write_string( 'v_init' ) 807 WRITE ( 14 ) v_init 808 809 CALL wrd_write_string( 'v_max' ) 810 WRITE ( 14 ) v_max 811 812 CALL wrd_write_string( 'v_max_ijk' ) 813 WRITE ( 14 ) v_max_ijk 814 815 CALL wrd_write_string( 'vg' ) 816 WRITE ( 14 ) vg 817 818 CALL wrd_write_string( 'vg_surface' ) 819 WRITE ( 14 ) vg_surface 820 821 CALL wrd_write_string( 'vg_vertical_gradient' ) 822 WRITE ( 14 ) vg_vertical_gradient 823 824 CALL wrd_write_string( 'vg_vertical_gradient_level' ) 825 WRITE ( 14 ) vg_vertical_gradient_level 826 827 CALL wrd_write_string( 'vg_vertical_gradient_level_ind' ) 828 WRITE ( 14 ) vg_vertical_gradient_level_ind 829 830 CALL wrd_write_string( 'virtual_flight' ) 831 WRITE ( 14 ) virtual_flight 832 833 CALL wrd_write_string( 'vnest_init' ) 834 WRITE ( 14 ) vnest_init 835 836 CALL wrd_write_string( 'volume_flow_area' ) 837 WRITE ( 14 ) volume_flow_area 838 839 CALL wrd_write_string( 'volume_flow_initial' ) 840 WRITE ( 14 ) volume_flow_initial 841 842 CALL wrd_write_string( 'w_max' ) 843 WRITE ( 14 ) w_max 844 845 CALL wrd_write_string( 'w_max_ijk' ) 846 WRITE ( 14 ) w_max_ijk 847 848 CALL wrd_write_string( 'wall_adjustment' ) 849 WRITE ( 14 ) wall_adjustment 850 851 CALL wrd_write_string( 'wall_heatflux' ) 852 WRITE ( 14 ) wall_heatflux 853 854 CALL wrd_write_string( 'wall_humidityflux' ) 855 WRITE ( 14 ) wall_humidityflux 856 857 CALL wrd_write_string( 'wall_scalarflux' ) 858 WRITE ( 14 ) wall_scalarflux 859 860 CALL wrd_write_string( 'y_shift' ) 861 WRITE ( 14 ) y_shift 862 863 CALL wrd_write_string( 'z0h_factor' ) 864 WRITE ( 14 ) z0h_factor 865 866 CALL wrd_write_string( 'zeta_max' ) 867 WRITE ( 14 ) zeta_max 868 869 CALL wrd_write_string( 'zeta_min' ) 870 WRITE ( 14 ) zeta_min 871 872 CALL wrd_write_string( 'z_i' ) 873 WRITE ( 14 ) z_i 874 875 ELSEIF ( restart_data_format_output == 'mpi' ) THEN 876 ! 877 !-- Write global restart data using MPI-IO 878 !-- ATTENTION: Arrays need to be written with routine wrd_mpi_io_global_array! 879 CALL wrd_mpi_io( 'binary_version_global', binary_version_global ) 880 CALL wrd_mpi_io( 'numprocs', numprocs ) 881 CALL wrd_mpi_io( 'nz' , nz ) 882 CALL wrd_mpi_io( 'max_pr_user', max_pr_user ) 883 CALL wrd_mpi_io( 'statistic_regions', statistic_regions ) 884 885 ! 886 !-- Caution: After changes in the following parameter-list, the version number stored in the 887 !-- -------- variable binary_version_global has to be increased. The same changes must also be 888 !-- done in the parameter-list in rrd_global. 889 CALL wrd_mpi_io( 'advected_distance_x', advected_distance_x ) 890 CALL wrd_mpi_io( 'advected_distance_y', advected_distance_y ) 891 CALL wrd_mpi_io( 'alpha_surface', alpha_surface ) 892 CALL wrd_mpi_io( 'average_count_pr', average_count_pr ) 893 CALL wrd_mpi_io( 'average_count_sp', average_count_sp ) 894 CALL wrd_mpi_io( 'average_count_3d', average_count_3d ) 895 CALL wrd_mpi_io( 'bc_e_b', bc_e_b ) 896 CALL wrd_mpi_io( 'bc_lr', bc_lr ) 897 CALL wrd_mpi_io( 'bc_ns', bc_ns ) 898 CALL wrd_mpi_io( 'bc_p_b', bc_p_b ) 899 CALL wrd_mpi_io( 'bc_p_t', bc_p_t ) 900 CALL wrd_mpi_io( 'bc_pt_b', bc_pt_b ) 901 CALL wrd_mpi_io( 'bc_pt_t', bc_pt_t ) 902 CALL wrd_mpi_io( 'bc_pt_t_val', bc_pt_t_val ) 903 CALL wrd_mpi_io( 'bc_q_b', bc_q_b ) 904 CALL wrd_mpi_io( 'bc_q_t', bc_q_t ) 905 CALL wrd_mpi_io( 'bc_q_t_val', bc_q_t_val ) 906 CALL wrd_mpi_io( 'bc_s_b', bc_s_b ) 907 CALL wrd_mpi_io( 'bc_s_t', bc_s_t ) 908 CALL wrd_mpi_io( 'bc_uv_b', bc_uv_b ) 909 CALL wrd_mpi_io( 'bc_uv_t', bc_uv_t ) 910 CALL wrd_mpi_io( 'biometeorology', biometeorology ) 911 CALL wrd_mpi_io( 'building_height', building_height ) 912 CALL wrd_mpi_io( 'building_length_x', building_length_x ) 913 CALL wrd_mpi_io( 'building_length_y', building_length_y ) 914 CALL wrd_mpi_io( 'building_wall_left', building_wall_left ) 915 CALL wrd_mpi_io( 'building_wall_south', building_wall_south ) 916 CALL wrd_mpi_io( 'bulk_cloud_model', bulk_cloud_model ) 917 CALL wrd_mpi_io( 'call_psolver_at_all_substeps', call_psolver_at_all_substeps ) 918 CALL wrd_mpi_io( 'canyon_height', canyon_height ) 919 CALL wrd_mpi_io( 'canyon_wall_left', canyon_wall_left ) 920 CALL wrd_mpi_io( 'canyon_wall_south', canyon_wall_south ) 921 CALL wrd_mpi_io( 'canyon_width_x', canyon_width_x ) 922 CALL wrd_mpi_io( 'canyon_width_y', canyon_width_y ) 923 CALL wrd_mpi_io( 'cfl_factor', cfl_factor ) 924 CALL wrd_mpi_io( 'cloud_droplets', cloud_droplets ) 925 CALL wrd_mpi_io( 'collective_wait', collective_wait ) 926 CALL wrd_mpi_io( 'conserve_volume_flow', conserve_volume_flow ) 927 CALL wrd_mpi_io( 'conserve_volume_flow_mode', conserve_volume_flow_mode ) 928 CALL wrd_mpi_io( 'constant_flux_layer', constant_flux_layer ) 929 CALL wrd_mpi_io( 'coupling_start_time', coupling_start_time ) 930 CALL wrd_mpi_io( 'current_timestep_number', current_timestep_number ) 931 CALL wrd_mpi_io( 'cycle_mg', cycle_mg ) 932 CALL wrd_mpi_io( 'damp_level_1d', damp_level_1d ) 933 CALL wrd_mpi_io( 'dissipation_1d', dissipation_1d ) 934 CALL wrd_mpi_io_global_array( 'do2d_xy_time_count', do2d_xy_time_count ) 935 CALL wrd_mpi_io_global_array( 'do2d_xz_time_count', do2d_xz_time_count ) 936 CALL wrd_mpi_io_global_array( 'do2d_yz_time_count', do2d_yz_time_count ) 937 CALL wrd_mpi_io_global_array( 'do3d_time_count', do3d_time_count ) 938 CALL wrd_mpi_io( 'dp_external', dp_external ) 939 CALL wrd_mpi_io( 'dp_level_b', dp_level_b ) 940 CALL wrd_mpi_io( 'dp_smooth', dp_smooth ) 941 CALL wrd_mpi_io_global_array( 'dpdxy', dpdxy ) 942 CALL wrd_mpi_io( 'dt_3d', dt_3d ) 943 CALL wrd_mpi_io( 'dt_pr_1d', dt_pr_1d ) 944 CALL wrd_mpi_io( 'dt_run_control_1d', dt_run_control_1d ) 945 CALL wrd_mpi_io( 'dx', dx ) 946 CALL wrd_mpi_io( 'dy', dy ) 947 CALL wrd_mpi_io_global_array( 'dz', dz ) 948 CALL wrd_mpi_io( 'dz_max', dz_max ) 949 CALL wrd_mpi_io( 'dz_stretch_factor', dz_stretch_factor ) 950 CALL wrd_mpi_io_global_array( 'dz_stretch_factor_array', dz_stretch_factor_array ) 951 CALL wrd_mpi_io( 'dz_stretch_level', dz_stretch_level ) 952 CALL wrd_mpi_io_global_array( 'dz_stretch_level_end', dz_stretch_level_end ) 953 CALL wrd_mpi_io_global_array( 'dz_stretch_level_start', dz_stretch_level_start ) 954 CALL wrd_mpi_io( 'e_min', e_min ) 955 CALL wrd_mpi_io( 'end_time_1d', end_time_1d ) 956 CALL wrd_mpi_io( 'fft_method', fft_method ) 957 CALL wrd_mpi_io( 'first_call_lpm', first_call_lpm ) 958 CALL wrd_mpi_io( 'galilei_transformation', galilei_transformation ) 959 CALL wrd_mpi_io( 'gust_module_enabled', gust_module_enabled ) 960 CALL wrd_mpi_io_global_array( 'hom', hom ) 961 CALL wrd_mpi_io_global_array( 'hom_sum', hom_sum ) 962 CALL wrd_mpi_io( 'humidity', humidity ) 963 IF ( ALLOCATED( inflow_damping_factor ) ) THEN 964 CALL wrd_mpi_io_global_array( 'inflow_damping_factor', inflow_damping_factor ) 965 ENDIF 966 CALL wrd_mpi_io( 'inflow_damping_height', inflow_damping_height ) 967 CALL wrd_mpi_io( 'inflow_damping_width', inflow_damping_width ) 968 CALL wrd_mpi_io( 'inflow_disturbance_begin', inflow_disturbance_begin ) 969 CALL wrd_mpi_io( 'inflow_disturbance_end', inflow_disturbance_end ) 970 CALL wrd_mpi_io( 'km_constant', km_constant ) 971 CALL wrd_mpi_io( 'large_scale_forcing', large_scale_forcing ) 972 CALL wrd_mpi_io( 'large_scale_subsidence', large_scale_subsidence ) 973 CALL wrd_mpi_io( 'latitude', latitude ) 974 CALL wrd_mpi_io( 'longitude', longitude ) 975 CALL wrd_mpi_io( 'loop_optimization', loop_optimization ) 976 CALL wrd_mpi_io( 'masking_method', masking_method ) 977 IF ( ALLOCATED( mean_inflow_profiles ) ) THEN 978 CALL wrd_mpi_io_global_array( 'mean_inflow_profiles', mean_inflow_profiles ) 979 ENDIF 980 CALL wrd_mpi_io( 'mg_cycles', mg_cycles ) 981 CALL wrd_mpi_io( 'mg_switch_to_pe0_level', mg_switch_to_pe0_level ) 982 CALL wrd_mpi_io( 'mixing_length_1d', mixing_length_1d ) 983 CALL wrd_mpi_io( 'momentum_advec', momentum_advec ) 984 ! 985 !-- There is no module procedure for CHARACTER arrays 986 DO i = 1, SIZE( netcdf_precision, 1 ) 987 WRITE ( tmp_name, '(A,I2.2)' ) 'netcdf_precision_', i 988 CALL wrd_mpi_io( TRIM( tmp_name ), netcdf_precision(i) ) 989 ENDDO 990 CALL wrd_mpi_io( 'neutral', neutral ) 991 CALL wrd_mpi_io( 'ngsrb', ngsrb ) 992 CALL wrd_mpi_io( 'nsor', nsor ) 993 CALL wrd_mpi_io( 'nsor_ini', nsor_ini ) 994 CALL wrd_mpi_io( 'nudging', nudging ) 995 CALL wrd_mpi_io( 'num_leg', num_leg ) 996 CALL wrd_mpi_io( 'nx', nx ) 997 CALL wrd_mpi_io( 'ny', ny ) 998 CALL wrd_mpi_io( 'ocean_mode', ocean_mode ) 999 CALL wrd_mpi_io( 'omega', omega ) 1000 CALL wrd_mpi_io( 'omega_sor', omega_sor ) 1001 CALL wrd_mpi_io( 'origin_date_time', origin_date_time ) 1002 CALL wrd_mpi_io( 'output_for_t0', output_for_t0 ) 1003 CALL wrd_mpi_io( 'particle_advection', particle_advection ) 1004 CALL wrd_mpi_io( 'passive_scalar', passive_scalar ) 1005 CALL wrd_mpi_io( 'prandtl_number', prandtl_number ) 1006 CALL wrd_mpi_io( 'psolver', psolver ) 1007 CALL wrd_mpi_io( 'pt_damping_factor', pt_damping_factor ) 1008 CALL wrd_mpi_io( 'pt_damping_width', pt_damping_width ) 1009 CALL wrd_mpi_io_global_array( 'pt_init', pt_init ) 1010 CALL wrd_mpi_io( 'pt_reference', pt_reference ) 1011 CALL wrd_mpi_io( 'pt_surface', pt_surface ) 1012 CALL wrd_mpi_io( 'pt_surface_initial_change', pt_surface_initial_change ) 1013 CALL wrd_mpi_io_global_array( 'pt_vertical_gradient', pt_vertical_gradient ) 1014 CALL wrd_mpi_io_global_array( 'pt_vertical_gradient_level', pt_vertical_gradient_level ) 1015 CALL wrd_mpi_io_global_array( 'pt_vertical_gradient_level_ind', pt_vertical_gradient_level_ind ) 1016 CALL wrd_mpi_io_global_array( 'q_init', q_init ) 1017 CALL wrd_mpi_io( 'q_surface', q_surface ) 1018 CALL wrd_mpi_io( 'q_surface_initial_change', q_surface_initial_change ) 1019 CALL wrd_mpi_io_global_array( 'q_vertical_gradient', q_vertical_gradient ) 1020 CALL wrd_mpi_io_global_array( 'q_vertical_gradient_level', q_vertical_gradient_level ) 1021 CALL wrd_mpi_io_global_array( 'q_vertical_gradient_level_ind', q_vertical_gradient_level_ind ) 1022 CALL wrd_mpi_io( 'random_generator', random_generator ) 1023 CALL wrd_mpi_io( 'random_heatflux', random_heatflux ) 1024 CALL wrd_mpi_io( 'rans_mode', rans_mode ) 1025 CALL wrd_mpi_io( 'rayleigh_damping_factor', rayleigh_damping_factor ) 1026 CALL wrd_mpi_io( 'rayleigh_damping_height', rayleigh_damping_height ) 1027 CALL wrd_mpi_io( 'recycling_width', recycling_width ) 1028 CALL wrd_mpi_io_global_array( 'ref_state', ref_state ) 1029 CALL wrd_mpi_io( 'reference_state', reference_state ) 1030 CALL wrd_mpi_io( 'residual_limit', residual_limit ) 1031 CALL wrd_mpi_io( 'roughness_length', roughness_length ) 1032 CALL wrd_mpi_io( 'run_coupled', run_coupled ) 1033 CALL wrd_mpi_io( 'runnr', runnr ) 1034 CALL wrd_mpi_io_global_array( 's_init', s_init ) 1035 CALL wrd_mpi_io( 's_surface', s_surface ) 1036 CALL wrd_mpi_io( 's_surface_initial_change', s_surface_initial_change ) 1037 CALL wrd_mpi_io_global_array( 's_vertical_gradient', s_vertical_gradient ) 1038 CALL wrd_mpi_io_global_array( 's_vertical_gradient_level', s_vertical_gradient_level ) 1039 CALL wrd_mpi_io_global_array( 's_vertical_gradient_level_ind', s_vertical_gradient_level_ind ) 1040 CALL wrd_mpi_io( 'scalar_advec', scalar_advec ) 1041 CALL wrd_mpi_io( 'simulated_time', simulated_time ) 1042 IF ( ALLOCATED( spectrum_x ) ) THEN 1043 CALL wrd_mpi_io( 'spectrum_x', spectrum_x ) 1044 CALL wrd_mpi_io( 'spectrum_y', spectrum_y ) 1045 ENDIF 1046 CALL wrd_mpi_io( 'spinup_time ', spinup_time ) 1047 CALL wrd_mpi_io_global_array( 'subs_vertical_gradient', subs_vertical_gradient ) 1048 CALL wrd_mpi_io_global_array( 'subs_vertical_gradient_level', subs_vertical_gradient_level ) 1049 CALL wrd_mpi_io_global_array( 'subs_vertical_gradient_level_i', subs_vertical_gradient_level_i ) 1050 CALL wrd_mpi_io( 'surface_heatflux', surface_heatflux ) 1051 CALL wrd_mpi_io( 'surface_output', surface_output ) 1052 CALL wrd_mpi_io( 'surface_pressure', surface_pressure ) 1053 CALL wrd_mpi_io( 'surface_scalarflux', surface_scalarflux ) 1054 CALL wrd_mpi_io( 'surface_waterflux', surface_waterflux ) 1055 CALL wrd_mpi_io( 'syn_turb_gen', syn_turb_gen ) 1056 CALL wrd_mpi_io( 'time_coupling', time_coupling ) 1057 CALL wrd_mpi_io( 'time_disturb', time_disturb ) 1058 CALL wrd_mpi_io( 'time_do2d_xy', time_do2d_xy ) 1059 CALL wrd_mpi_io( 'time_do2d_xz', time_do2d_xz ) 1060 CALL wrd_mpi_io( 'time_do2d_yz', time_do2d_yz ) 1061 CALL wrd_mpi_io( 'time_do3d', time_do3d ) 1062 CALL wrd_mpi_io( 'time_do_av', time_do_av ) 1063 CALL wrd_mpi_io( 'time_do_sla', time_do_sla ) 1064 CALL wrd_mpi_io_global_array( 'time_domask', time_domask ) 1065 CALL wrd_mpi_io( 'time_dopr', time_dopr ) 1066 CALL wrd_mpi_io( 'time_dopr_av', time_dopr_av ) 1067 CALL wrd_mpi_io( 'time_dopr_listing', time_dopr_listing ) 1068 CALL wrd_mpi_io( 'time_dopts', time_dopts ) 1069 CALL wrd_mpi_io( 'time_dosp', time_dosp ) 1070 CALL wrd_mpi_io( 'time_dots', time_dots ) 1071 CALL wrd_mpi_io( 'time_radiation', time_radiation ) 1072 CALL wrd_mpi_io( 'time_restart', time_restart ) 1073 CALL wrd_mpi_io( 'time_run_control', time_run_control ) 1074 CALL wrd_mpi_io( 'time_since_reference_point', time_since_reference_point ) 1075 CALL wrd_mpi_io( 'time_virtual_measurement', time_virtual_measurement ) 1076 CALL wrd_mpi_io( 'timestep_scheme', timestep_scheme ) 1077 CALL wrd_mpi_io( 'top_heatflux', top_heatflux ) 1078 CALL wrd_mpi_io( 'top_momentumflux_u', top_momentumflux_u ) 1079 CALL wrd_mpi_io( 'top_momentumflux_v', top_momentumflux_v ) 1080 CALL wrd_mpi_io( 'top_scalarflux', top_scalarflux ) 1081 CALL wrd_mpi_io( 'topography', topography ) 1082 CALL wrd_mpi_io( 'topography_grid_convention', topography_grid_convention ) 1083 CALL wrd_mpi_io_global_array( 'tsc', tsc ) 1084 CALL wrd_mpi_io( 'tunnel_height', tunnel_height ) 1085 CALL wrd_mpi_io( 'tunnel_length', tunnel_length ) 1086 CALL wrd_mpi_io( 'tunnel_wall_depth', tunnel_wall_depth ) 1087 CALL wrd_mpi_io( 'tunnel_width_x', tunnel_width_x ) 1088 CALL wrd_mpi_io( 'tunnel_width_y', tunnel_width_y ) 1089 CALL wrd_mpi_io( 'turbulence_closure', turbulence_closure ) 1090 CALL wrd_mpi_io( 'turbulent_inflow', turbulent_inflow ) 1091 CALL wrd_mpi_io( 'u_bulk', u_bulk ) 1092 CALL wrd_mpi_io_global_array( 'u_init', u_init ) 1093 CALL wrd_mpi_io( 'u_max', u_max ) 1094 CALL wrd_mpi_io_global_array( 'u_max_ijk', u_max_ijk ) 1095 CALL wrd_mpi_io_global_array( 'ug', ug ) 1096 CALL wrd_mpi_io( 'ug_surface', ug_surface ) 1097 CALL wrd_mpi_io_global_array( 'ug_vertical_gradient', ug_vertical_gradient ) 1098 CALL wrd_mpi_io_global_array( 'ug_vertical_gradient_level', ug_vertical_gradient_level ) 1099 CALL wrd_mpi_io_global_array( 'ug_vertical_gradient_level_ind', ug_vertical_gradient_level_ind ) 1100 CALL wrd_mpi_io( 'use_surface_fluxes', use_surface_fluxes ) 1101 CALL wrd_mpi_io( 'use_top_fluxes', use_top_fluxes ) 1102 CALL wrd_mpi_io( 'use_ug_for_galilei_tr', use_ug_for_galilei_tr ) 1103 CALL wrd_mpi_io( 'use_upstream_for_tke', use_upstream_for_tke ) 1104 CALL wrd_mpi_io( 'user_module_enabled', user_module_enabled ) 1105 CALL wrd_mpi_io( 'v_bulk', v_bulk ) 1106 CALL wrd_mpi_io_global_array( 'v_init', v_init ) 1107 CALL wrd_mpi_io( 'v_max', v_max ) 1108 CALL wrd_mpi_io_global_array( 'v_max_ijk', v_max_ijk ) 1109 CALL wrd_mpi_io_global_array( 'vg', vg ) 1110 CALL wrd_mpi_io( 'vg_surface', vg_surface ) 1111 CALL wrd_mpi_io_global_array( 'vg_vertical_gradient', vg_vertical_gradient ) 1112 CALL wrd_mpi_io_global_array( 'vg_vertical_gradient_level', vg_vertical_gradient_level ) 1113 CALL wrd_mpi_io_global_array( 'vg_vertical_gradient_level_ind', vg_vertical_gradient_level_ind ) 1114 CALL wrd_mpi_io( 'virtual_flight', virtual_flight ) 1115 CALL wrd_mpi_io( 'vnest_init', vnest_init ) 1116 CALL wrd_mpi_io_global_array( 'volume_flow_area', volume_flow_area ) 1117 CALL wrd_mpi_io_global_array( 'volume_flow_initial', volume_flow_initial ) 1118 CALL wrd_mpi_io( 'w_max', w_max ) 1119 CALL wrd_mpi_io_global_array( 'w_max_ijk', w_max_ijk ) 1120 CALL wrd_mpi_io( 'wall_adjustment', wall_adjustment ) 1121 CALL wrd_mpi_io_global_array( 'wall_heatflux', wall_heatflux ) 1122 CALL wrd_mpi_io_global_array( 'wall_humidityflux', wall_humidityflux ) 1123 CALL wrd_mpi_io_global_array( 'wall_scalarflux', wall_scalarflux ) 1124 CALL wrd_mpi_io( 'y_shift', y_shift ) 1125 CALL wrd_mpi_io( 'z0h_factor', z0h_factor ) 1126 CALL wrd_mpi_io( 'zeta_max', zeta_max ) 1127 CALL wrd_mpi_io( 'zeta_min', zeta_min ) 1128 CALL wrd_mpi_io_global_array( 'z_i', z_i ) 1129 400 1130 ENDIF 401 402 CALL wrd_write_string( 'inflow_damping_height' )403 WRITE ( 14 ) inflow_damping_height404 405 CALL wrd_write_string( 'inflow_damping_width' )406 WRITE ( 14 ) inflow_damping_width407 408 CALL wrd_write_string( 'inflow_disturbance_begin' )409 WRITE ( 14 ) inflow_disturbance_begin410 411 CALL wrd_write_string( 'inflow_disturbance_end' )412 WRITE ( 14 ) inflow_disturbance_end413 414 CALL wrd_write_string( 'km_constant' )415 WRITE ( 14 ) km_constant416 417 CALL wrd_write_string( 'large_scale_forcing' )418 WRITE ( 14 ) large_scale_forcing419 420 CALL wrd_write_string( 'large_scale_subsidence' )421 WRITE ( 14 ) large_scale_subsidence422 423 CALL wrd_write_string( 'latitude' )424 WRITE ( 14 ) latitude425 426 CALL wrd_write_string( 'longitude' )427 WRITE ( 14 ) longitude428 429 CALL wrd_write_string( 'loop_optimization' )430 WRITE ( 14 ) loop_optimization431 432 CALL wrd_write_string( 'masking_method' )433 WRITE ( 14 ) masking_method434 435 IF ( ALLOCATED( mean_inflow_profiles ) ) THEN436 CALL wrd_write_string( 'mean_inflow_profiles' )437 WRITE ( 14 ) mean_inflow_profiles438 ENDIF439 440 CALL wrd_write_string( 'mg_cycles' )441 WRITE ( 14 ) mg_cycles442 443 CALL wrd_write_string( 'mg_switch_to_pe0_level' )444 WRITE ( 14 ) mg_switch_to_pe0_level445 446 CALL wrd_write_string( 'mixing_length_1d' )447 WRITE ( 14 ) mixing_length_1d448 449 CALL wrd_write_string( 'momentum_advec' )450 WRITE ( 14 ) momentum_advec451 452 CALL wrd_write_string( 'netcdf_precision' )453 WRITE ( 14 ) netcdf_precision454 455 CALL wrd_write_string( 'neutral' )456 WRITE ( 14 ) neutral457 458 CALL wrd_write_string( 'ngsrb' )459 WRITE ( 14 ) ngsrb460 461 CALL wrd_write_string( 'nsor' )462 WRITE ( 14 ) nsor463 464 CALL wrd_write_string( 'nsor_ini' )465 WRITE ( 14 ) nsor_ini466 467 CALL wrd_write_string( 'nudging' )468 WRITE ( 14 ) nudging469 470 CALL wrd_write_string( 'num_leg' )471 WRITE ( 14 ) num_leg472 473 CALL wrd_write_string( 'nx' )474 WRITE ( 14 ) nx475 476 CALL wrd_write_string( 'ny' )477 WRITE ( 14 ) ny478 479 CALL wrd_write_string( 'ocean_mode' )480 WRITE ( 14 ) ocean_mode481 482 CALL wrd_write_string( 'omega' )483 WRITE ( 14 ) omega484 485 CALL wrd_write_string( 'omega_sor' )486 WRITE ( 14 ) omega_sor487 488 CALL wrd_write_string( 'output_for_t0' )489 WRITE ( 14 ) output_for_t0490 491 CALL wrd_write_string( 'passive_scalar' )492 WRITE ( 14 ) passive_scalar493 494 CALL wrd_write_string( 'prandtl_number' )495 WRITE ( 14 ) prandtl_number496 497 CALL wrd_write_string( 'psolver' )498 WRITE ( 14 ) psolver499 500 CALL wrd_write_string( 'pt_damping_factor' )501 WRITE ( 14 ) pt_damping_factor502 503 CALL wrd_write_string( 'pt_damping_width' )504 WRITE ( 14 ) pt_damping_width505 506 CALL wrd_write_string( 'pt_init' )507 WRITE ( 14 ) pt_init508 509 CALL wrd_write_string( 'pt_reference' )510 WRITE ( 14 ) pt_reference511 512 CALL wrd_write_string( 'pt_surface' )513 WRITE ( 14 ) pt_surface514 515 CALL wrd_write_string( 'pt_surface_initial_change' )516 WRITE ( 14 ) pt_surface_initial_change517 518 CALL wrd_write_string( 'pt_vertical_gradient' )519 WRITE ( 14 ) pt_vertical_gradient520 521 CALL wrd_write_string( 'pt_vertical_gradient_level' )522 WRITE ( 14 ) pt_vertical_gradient_level523 524 CALL wrd_write_string( 'pt_vertical_gradient_level_ind' )525 WRITE ( 14 ) pt_vertical_gradient_level_ind526 527 CALL wrd_write_string( 'q_init' )528 WRITE ( 14 ) q_init529 530 CALL wrd_write_string( 'q_surface' )531 WRITE ( 14 ) q_surface532 533 CALL wrd_write_string( 'q_surface_initial_change' )534 WRITE ( 14 ) q_surface_initial_change535 536 CALL wrd_write_string( 'q_vertical_gradient' )537 WRITE ( 14 ) q_vertical_gradient538 539 CALL wrd_write_string( 'q_vertical_gradient_level' )540 WRITE ( 14 ) q_vertical_gradient_level541 542 CALL wrd_write_string( 'q_vertical_gradient_level_ind' )543 WRITE ( 14 ) q_vertical_gradient_level_ind544 545 CALL wrd_write_string( 'random_generator' )546 WRITE ( 14 ) random_generator547 548 CALL wrd_write_string( 'random_heatflux' )549 WRITE ( 14 ) random_heatflux550 551 CALL wrd_write_string( 'rans_mode' )552 WRITE ( 14 ) rans_mode553 554 CALL wrd_write_string( 'rayleigh_damping_factor' )555 WRITE ( 14 ) rayleigh_damping_factor556 557 CALL wrd_write_string( 'rayleigh_damping_height' )558 WRITE ( 14 ) rayleigh_damping_height559 560 CALL wrd_write_string( 'recycling_width' )561 WRITE ( 14 ) recycling_width562 563 CALL wrd_write_string( 'ref_state' )564 WRITE ( 14 ) ref_state565 566 CALL wrd_write_string( 'reference_state' )567 WRITE ( 14 ) reference_state568 569 CALL wrd_write_string( 'residual_limit' )570 WRITE ( 14 ) residual_limit571 572 CALL wrd_write_string( 'roughness_length' )573 WRITE ( 14 ) roughness_length574 575 CALL wrd_write_string( 'run_coupled' )576 WRITE ( 14 ) run_coupled577 578 CALL wrd_write_string( 'runnr' )579 WRITE ( 14 ) runnr580 581 CALL wrd_write_string( 's_init' )582 WRITE ( 14 ) s_init583 584 CALL wrd_write_string( 's_surface' )585 WRITE ( 14 ) s_surface586 587 CALL wrd_write_string( 's_surface_initial_change' )588 WRITE ( 14 ) s_surface_initial_change589 590 CALL wrd_write_string( 's_vertical_gradient' )591 WRITE ( 14 ) s_vertical_gradient592 593 CALL wrd_write_string( 's_vertical_gradient_level' )594 WRITE ( 14 ) s_vertical_gradient_level595 596 CALL wrd_write_string( 's_vertical_gradient_level_ind' )597 WRITE ( 14 ) s_vertical_gradient_level_ind598 599 CALL wrd_write_string( 'scalar_advec' )600 WRITE ( 14 ) scalar_advec601 602 CALL wrd_write_string( 'simulated_time' )603 WRITE ( 14 ) simulated_time604 605 IF ( ALLOCATED( spectrum_x ) ) THEN606 CALL wrd_write_string( 'spectrum_x' )607 WRITE ( 14 ) spectrum_x608 CALL wrd_write_string( 'spectrum_y' )609 WRITE ( 14 ) spectrum_y610 ENDIF611 612 CALL wrd_write_string( 'spinup_time ' )613 WRITE ( 14 ) spinup_time614 615 CALL wrd_write_string( 'surface_heatflux' )616 WRITE ( 14 ) surface_heatflux617 618 CALL wrd_write_string( 'surface_pressure' )619 WRITE ( 14 ) surface_pressure620 621 CALL wrd_write_string( 'surface_scalarflux' )622 WRITE ( 14 ) surface_scalarflux623 624 CALL wrd_write_string( 'surface_waterflux' )625 WRITE ( 14 ) surface_waterflux626 627 CALL wrd_write_string( 'time_coupling' )628 WRITE ( 14 ) time_coupling629 630 CALL wrd_write_string( 'time_disturb' )631 WRITE ( 14 ) time_disturb632 633 CALL wrd_write_string( 'time_do2d_xy' )634 WRITE ( 14 ) time_do2d_xy635 636 CALL wrd_write_string( 'time_do2d_xz' )637 WRITE ( 14 ) time_do2d_xz638 639 CALL wrd_write_string( 'time_do2d_yz' )640 WRITE ( 14 ) time_do2d_yz641 642 CALL wrd_write_string( 'time_do3d' )643 WRITE ( 14 ) time_do3d644 645 CALL wrd_write_string( 'time_do_av' )646 WRITE ( 14 ) time_do_av647 648 CALL wrd_write_string( 'time_do_sla' )649 WRITE ( 14 ) time_do_sla650 651 CALL wrd_write_string( 'time_domask' )652 WRITE ( 14 ) time_domask653 654 CALL wrd_write_string( 'time_dopr' )655 WRITE ( 14 ) time_dopr656 657 CALL wrd_write_string( 'time_dopr_av' )658 WRITE ( 14 ) time_dopr_av659 660 CALL wrd_write_string( 'time_dopr_listing' )661 WRITE ( 14 ) time_dopr_listing662 663 CALL wrd_write_string( 'time_dopts' )664 WRITE ( 14 ) time_dopts665 666 CALL wrd_write_string( 'time_dosp' )667 WRITE ( 14 ) time_dosp668 669 CALL wrd_write_string( 'time_dots' )670 WRITE ( 14 ) time_dots671 672 CALL wrd_write_string( 'time_radiation' )673 WRITE ( 14 ) time_radiation674 675 CALL wrd_write_string( 'time_restart' )676 WRITE ( 14 ) time_restart677 678 CALL wrd_write_string( 'time_run_control' )679 WRITE ( 14 ) time_run_control680 681 CALL wrd_write_string( 'time_since_reference_point' )682 WRITE ( 14 ) time_since_reference_point683 684 CALL wrd_write_string( 'time_virtual_measurement' )685 WRITE ( 14 ) time_virtual_measurement686 687 CALL wrd_write_string( 'timestep_scheme' )688 WRITE ( 14 ) timestep_scheme689 690 CALL wrd_write_string( 'top_heatflux' )691 WRITE ( 14 ) top_heatflux692 693 CALL wrd_write_string( 'top_momentumflux_u' )694 WRITE ( 14 ) top_momentumflux_u695 696 CALL wrd_write_string( 'top_momentumflux_v' )697 WRITE ( 14 ) top_momentumflux_v698 699 CALL wrd_write_string( 'top_scalarflux' )700 WRITE ( 14 ) top_scalarflux701 702 CALL wrd_write_string( 'topography' )703 WRITE ( 14 ) topography704 705 CALL wrd_write_string( 'topography_grid_convention' )706 WRITE ( 14 ) topography_grid_convention707 708 CALL wrd_write_string( 'tsc' )709 WRITE ( 14 ) tsc710 711 CALL wrd_write_string( 'tunnel_height' )712 WRITE ( 14 ) tunnel_height713 714 CALL wrd_write_string( 'tunnel_length' )715 WRITE ( 14 ) tunnel_length716 717 CALL wrd_write_string( 'tunnel_wall_depth' )718 WRITE ( 14 ) tunnel_wall_depth719 720 CALL wrd_write_string( 'tunnel_width_x' )721 WRITE ( 14 ) tunnel_width_x722 723 CALL wrd_write_string( 'tunnel_width_y' )724 WRITE ( 14 ) tunnel_width_y725 726 CALL wrd_write_string( 'turbulence_closure' )727 WRITE ( 14 ) turbulence_closure728 729 CALL wrd_write_string( 'turbulent_inflow' )730 WRITE ( 14 ) turbulent_inflow731 732 CALL wrd_write_string( 'u_bulk' )733 WRITE ( 14 ) u_bulk734 735 CALL wrd_write_string( 'u_init' )736 WRITE ( 14 ) u_init737 738 CALL wrd_write_string( 'u_max' )739 WRITE ( 14 ) u_max740 741 CALL wrd_write_string( 'u_max_ijk' )742 WRITE ( 14 ) u_max_ijk743 744 CALL wrd_write_string( 'ug' )745 WRITE ( 14 ) ug746 747 CALL wrd_write_string( 'ug_surface' )748 WRITE ( 14 ) ug_surface749 750 CALL wrd_write_string( 'ug_vertical_gradient' )751 WRITE ( 14 ) ug_vertical_gradient752 753 CALL wrd_write_string( 'ug_vertical_gradient_level' )754 WRITE ( 14 ) ug_vertical_gradient_level755 756 CALL wrd_write_string( 'ug_vertical_gradient_level_ind' )757 WRITE ( 14 ) ug_vertical_gradient_level_ind758 759 CALL wrd_write_string( 'use_surface_fluxes' )760 WRITE ( 14 ) use_surface_fluxes761 762 CALL wrd_write_string( 'use_top_fluxes' )763 WRITE ( 14 ) use_top_fluxes764 765 CALL wrd_write_string( 'use_ug_for_galilei_tr' )766 WRITE ( 14 ) use_ug_for_galilei_tr767 768 CALL wrd_write_string( 'use_upstream_for_tke' )769 WRITE ( 14 ) use_upstream_for_tke770 771 CALL wrd_write_string( 'v_bulk' )772 WRITE ( 14 ) v_bulk773 774 CALL wrd_write_string( 'v_init' )775 WRITE ( 14 ) v_init776 777 CALL wrd_write_string( 'v_max' )778 WRITE ( 14 ) v_max779 780 CALL wrd_write_string( 'v_max_ijk' )781 WRITE ( 14 ) v_max_ijk782 783 CALL wrd_write_string( 'vg' )784 WRITE ( 14 ) vg785 786 CALL wrd_write_string( 'vg_surface' )787 WRITE ( 14 ) vg_surface788 789 CALL wrd_write_string( 'vg_vertical_gradient' )790 WRITE ( 14 ) vg_vertical_gradient791 792 CALL wrd_write_string( 'vg_vertical_gradient_level' )793 WRITE ( 14 ) vg_vertical_gradient_level794 795 CALL wrd_write_string( 'vg_vertical_gradient_level_ind' )796 WRITE ( 14 ) vg_vertical_gradient_level_ind797 798 CALL wrd_write_string( 'virtual_flight' )799 WRITE ( 14 ) virtual_flight800 801 CALL wrd_write_string( 'vnest_init' )802 WRITE ( 14 ) vnest_init803 804 CALL wrd_write_string( 'volume_flow_area' )805 WRITE ( 14 ) volume_flow_area806 807 CALL wrd_write_string( 'volume_flow_initial' )808 WRITE ( 14 ) volume_flow_initial809 810 CALL wrd_write_string( 'subs_vertical_gradient' )811 WRITE ( 14 ) subs_vertical_gradient812 813 CALL wrd_write_string( 'subs_vertical_gradient_level' )814 WRITE ( 14 ) subs_vertical_gradient_level815 816 CALL wrd_write_string( 'subs_vertical_gradient_level_i' )817 WRITE ( 14 ) subs_vertical_gradient_level_i818 819 CALL wrd_write_string( 'w_max' )820 WRITE ( 14 ) w_max821 822 CALL wrd_write_string( 'w_max_ijk' )823 WRITE ( 14 ) w_max_ijk824 825 CALL wrd_write_string( 'wall_adjustment' )826 WRITE ( 14 ) wall_adjustment827 828 CALL wrd_write_string( 'wall_heatflux' )829 WRITE ( 14 ) wall_heatflux830 831 CALL wrd_write_string( 'wall_humidityflux' )832 WRITE ( 14 ) wall_humidityflux833 834 CALL wrd_write_string( 'wall_scalarflux' )835 WRITE ( 14 ) wall_scalarflux836 837 CALL wrd_write_string( 'y_shift' )838 WRITE ( 14 ) y_shift839 840 CALL wrd_write_string( 'z0h_factor' )841 WRITE ( 14 ) z0h_factor842 843 CALL wrd_write_string( 'zeta_max' )844 WRITE ( 14 ) zeta_max845 846 CALL wrd_write_string( 'zeta_min' )847 WRITE ( 14 ) zeta_min848 849 CALL wrd_write_string( 'z_i' )850 WRITE ( 14 ) z_i851 1131 852 1132 ! … … 869 1149 870 1150 871 CHARACTER(LEN=10) :: binary_version_local !< 1151 CHARACTER(LEN=10) :: binary_version_local !< 1152 CHARACTER(LEN=20) :: tmp_name !< temporary variable 1153 1154 INTEGER :: i !< loop index 872 1155 873 1156 ! … … 875 1158 binary_version_local = '4.7' 876 1159 877 CALL wrd_write_string( 'binary_version_local' ) 878 WRITE ( 14 ) binary_version_local 879 880 WRITE ( 14 ) numprocs, myid, nxl, nxr, nys, nyn, nzb, nzt 881 882 ! 883 !-- Attention: After changes to the following output commands the version number of the variable 884 !-- ---------- binary_version_local must be changed! 885 !-- Also, the list of arrays to be read in rrd_local must be adjusted accordingly. 886 CALL wrd_write_string( 'e' ) 887 WRITE ( 14 ) e 888 889 IF ( ALLOCATED( e_av ) ) THEN 890 CALL wrd_write_string( 'e_av' ) 891 WRITE ( 14 ) e_av 892 ENDIF 893 894 CALL wrd_write_string( 'kh' ) 895 WRITE ( 14 ) kh 896 897 898 IF ( ALLOCATED( kh_av ) ) THEN 899 CALL wrd_write_string( 'kh_av' ) 900 WRITE ( 14 ) kh_av 901 ENDIF 902 903 CALL wrd_write_string( 'km' ) 904 WRITE ( 14 ) km 905 906 IF ( ALLOCATED( km_av ) ) THEN 907 CALL wrd_write_string( 'km_av' ) 908 WRITE ( 14 ) km_av 909 ENDIF 910 911 IF ( ALLOCATED( lpt_av ) ) THEN 912 CALL wrd_write_string( 'lpt_av' ) 913 WRITE ( 14 ) lpt_av 914 ENDIF 915 916 IF ( ALLOCATED( lwp_av ) ) THEN 917 CALL wrd_write_string( 'lwp_av' ) 918 WRITE ( 14 ) lwp_av 919 ENDIF 920 921 CALL wrd_write_string( 'p' ) 922 WRITE ( 14 ) p 923 924 IF ( ALLOCATED( p_av ) ) THEN 925 CALL wrd_write_string( 'p_av' ) 926 WRITE ( 14 ) p_av 927 ENDIF 928 929 IF ( ALLOCATED( pc_av ) ) THEN 930 CALL wrd_write_string( 'pc_av' ) 931 WRITE ( 14 ) pc_av 932 ENDIF 933 934 IF ( ALLOCATED( pr_av ) ) THEN 935 CALL wrd_write_string( 'pr_av' ) 936 WRITE ( 14 ) pr_av 937 ENDIF 938 939 CALL wrd_write_string( 'pt' ) 940 WRITE ( 14 ) pt 941 942 IF ( ALLOCATED( pt_av ) ) THEN 943 CALL wrd_write_string( 'pt_av' ) 944 WRITE ( 14 ) pt_av 945 ENDIF 946 947 IF ( humidity ) THEN 948 949 CALL wrd_write_string( 'q' ) 950 WRITE ( 14 ) q 951 952 IF ( ALLOCATED( q_av ) ) THEN 953 CALL wrd_write_string( 'q_av' ) 954 WRITE ( 14 ) q_av 955 ENDIF 956 957 IF ( cloud_droplets ) THEN 958 959 CALL wrd_write_string( 'ql' ) 960 WRITE ( 14 ) ql 961 962 IF ( ALLOCATED( ql_av ) ) THEN 963 CALL wrd_write_string( 'ql_av' ) 964 WRITE ( 14 ) ql_av 1160 IF ( TRIM( restart_data_format_output ) == 'fortran_binary' ) THEN 1161 ! 1162 !-- Output in Fortran binary format 1163 1164 CALL wrd_write_string( 'binary_version_local' ) 1165 WRITE ( 14 ) binary_version_local 1166 1167 WRITE ( 14 ) numprocs, myid, nxl, nxr, nys, nyn, nzb, nzt 1168 1169 ! 1170 !-- Attention: After changes to the following output commands the version number of the variable 1171 !-- ---------- binary_version_local must be changed! 1172 !-- Also, the list of arrays to be read in rrd_local must be adjusted accordingly. 1173 CALL wrd_write_string( 'e' ) 1174 WRITE ( 14 ) e 1175 1176 IF ( ALLOCATED( e_av ) ) THEN 1177 CALL wrd_write_string( 'e_av' ) 1178 WRITE ( 14 ) e_av 1179 ENDIF 1180 1181 CALL wrd_write_string( 'kh' ) 1182 WRITE ( 14 ) kh 1183 1184 1185 IF ( ALLOCATED( kh_av ) ) THEN 1186 CALL wrd_write_string( 'kh_av' ) 1187 WRITE ( 14 ) kh_av 1188 ENDIF 1189 1190 CALL wrd_write_string( 'km' ) 1191 WRITE ( 14 ) km 1192 1193 IF ( ALLOCATED( km_av ) ) THEN 1194 CALL wrd_write_string( 'km_av' ) 1195 WRITE ( 14 ) km_av 1196 ENDIF 1197 1198 IF ( ALLOCATED( lpt_av ) ) THEN 1199 CALL wrd_write_string( 'lpt_av' ) 1200 WRITE ( 14 ) lpt_av 1201 ENDIF 1202 1203 IF ( ALLOCATED( lwp_av ) ) THEN 1204 CALL wrd_write_string( 'lwp_av' ) 1205 WRITE ( 14 ) lwp_av 1206 ENDIF 1207 1208 CALL wrd_write_string( 'p' ) 1209 WRITE ( 14 ) p 1210 1211 IF ( ALLOCATED( p_av ) ) THEN 1212 CALL wrd_write_string( 'p_av' ) 1213 WRITE ( 14 ) p_av 1214 ENDIF 1215 1216 IF ( ALLOCATED( pc_av ) ) THEN 1217 CALL wrd_write_string( 'pc_av' ) 1218 WRITE ( 14 ) pc_av 1219 ENDIF 1220 1221 IF ( ALLOCATED( pr_av ) ) THEN 1222 CALL wrd_write_string( 'pr_av' ) 1223 WRITE ( 14 ) pr_av 1224 ENDIF 1225 1226 CALL wrd_write_string( 'pt' ) 1227 WRITE ( 14 ) pt 1228 1229 IF ( ALLOCATED( pt_av ) ) THEN 1230 CALL wrd_write_string( 'pt_av' ) 1231 WRITE ( 14 ) pt_av 1232 ENDIF 1233 1234 IF ( humidity ) THEN 1235 1236 CALL wrd_write_string( 'q' ) 1237 WRITE ( 14 ) q 1238 1239 IF ( ALLOCATED( q_av ) ) THEN 1240 CALL wrd_write_string( 'q_av' ) 1241 WRITE ( 14 ) q_av 965 1242 ENDIF 966 1243 967 ENDIF 968 969 IF ( ALLOCATED( qsws_av ) ) THEN 970 CALL wrd_write_string( 'qsws_av' ) 971 WRITE ( 14 ) qsws_av 972 ENDIF 973 974 ENDIF 975 976 IF ( passive_scalar ) THEN 977 978 CALL wrd_write_string( 's' ) 979 WRITE ( 14 ) s 1244 IF ( cloud_droplets ) THEN 1245 1246 CALL wrd_write_string( 'ql' ) 1247 WRITE ( 14 ) ql 1248 1249 IF ( ALLOCATED( ql_av ) ) THEN 1250 CALL wrd_write_string( 'ql_av' ) 1251 WRITE ( 14 ) ql_av 1252 ENDIF 1253 1254 ENDIF 1255 1256 IF ( ALLOCATED( qsws_av ) ) THEN 1257 CALL wrd_write_string( 'qsws_av' ) 1258 WRITE ( 14 ) qsws_av 1259 ENDIF 1260 1261 ENDIF 1262 1263 IF ( passive_scalar ) THEN 1264 1265 CALL wrd_write_string( 's' ) 1266 WRITE ( 14 ) s 1267 1268 IF ( ALLOCATED( s_av ) ) THEN 1269 CALL wrd_write_string( 's_av' ) 1270 WRITE ( 14 ) s_av 1271 ENDIF 1272 1273 IF ( ALLOCATED( ssws_av ) ) THEN 1274 CALL wrd_write_string( 'ssws_av' ) 1275 WRITE ( 14 ) ssws_av 1276 ENDIF 1277 1278 ENDIF 1279 1280 IF ( ALLOCATED( ql_c_av ) ) THEN 1281 CALL wrd_write_string( 'ql_c_av' ) 1282 WRITE ( 14 ) ql_c_av 1283 ENDIF 1284 1285 IF ( ALLOCATED( ql_v_av ) ) THEN 1286 CALL wrd_write_string( 'ql_v_av' ) 1287 WRITE ( 14 ) ql_v_av 1288 ENDIF 1289 1290 IF ( ALLOCATED( ql_vp_av ) ) THEN 1291 CALL wrd_write_string( 'ql_vp_av' ) 1292 WRITE ( 14 ) ql_vp_av 1293 ENDIF 1294 1295 IF ( ALLOCATED( qv_av ) ) THEN 1296 CALL wrd_write_string( 'qv_av' ) 1297 WRITE ( 14 ) qv_av 1298 ENDIF 1299 1300 CALL wrd_write_string( 'random_iv' ) 1301 WRITE ( 14 ) random_iv 1302 WRITE ( 14 ) random_iy 1303 1304 IF ( ALLOCATED( seq_random_array ) ) THEN 1305 CALL wrd_write_string( 'seq_random_array' ) 1306 WRITE ( 14 ) id_random_array 1307 WRITE ( 14 ) seq_random_array 1308 ENDIF 980 1309 981 1310 IF ( ALLOCATED( s_av ) ) THEN … … 984 1313 ENDIF 985 1314 986 IF ( ALLOCATED( ssws_av ) ) THEN 987 CALL wrd_write_string( 'ssws_av' ) 988 WRITE ( 14 ) ssws_av 989 ENDIF 1315 IF ( ALLOCATED( shf_av ) ) THEN 1316 CALL wrd_write_string( 'shf_av' ) 1317 WRITE ( 14 ) shf_av 1318 ENDIF 1319 1320 IF ( ALLOCATED( ts_av ) ) THEN 1321 CALL wrd_write_string( 'ts_av' ) 1322 WRITE ( 14 ) ts_av 1323 ENDIF 1324 1325 CALL wrd_write_string( 'u' ) 1326 WRITE ( 14 ) u 1327 1328 IF ( ALLOCATED( u_av ) ) THEN 1329 CALL wrd_write_string( 'u_av' ) 1330 WRITE ( 14 ) u_av 1331 ENDIF 1332 1333 IF ( ALLOCATED( u_m_l ) ) THEN 1334 CALL wrd_write_string( 'u_m_l' ) 1335 WRITE ( 14 ) u_m_l 1336 ENDIF 1337 1338 IF ( ALLOCATED( u_m_n ) ) THEN 1339 CALL wrd_write_string( 'u_m_n' ) 1340 WRITE ( 14 ) u_m_n 1341 ENDIF 1342 1343 IF ( ALLOCATED( u_m_r ) ) THEN 1344 CALL wrd_write_string( 'u_m_r' ) 1345 WRITE ( 14 ) u_m_r 1346 ENDIF 1347 1348 IF ( ALLOCATED( u_m_s ) ) THEN 1349 CALL wrd_write_string( 'u_m_s' ) 1350 WRITE ( 14 ) u_m_s 1351 ENDIF 1352 1353 IF ( ALLOCATED( us_av ) ) THEN 1354 CALL wrd_write_string( 'us_av' ) 1355 WRITE ( 14 ) us_av 1356 ENDIF 1357 1358 CALL wrd_write_string( 'v' ) 1359 WRITE ( 14 ) v 1360 1361 IF ( ALLOCATED( v_av ) ) THEN 1362 CALL wrd_write_string( 'v_av' ) 1363 WRITE ( 14 ) v_av 1364 ENDIF 1365 1366 IF ( ALLOCATED( v_m_l ) ) THEN 1367 CALL wrd_write_string( 'v_m_l' ) 1368 WRITE ( 14 ) v_m_l 1369 ENDIF 1370 1371 IF ( ALLOCATED( v_m_n ) ) THEN 1372 CALL wrd_write_string( 'v_m_n' ) 1373 WRITE ( 14 ) v_m_n 1374 ENDIF 1375 1376 IF ( ALLOCATED( v_m_r ) ) THEN 1377 CALL wrd_write_string( 'v_m_r' ) 1378 WRITE ( 14 ) v_m_r 1379 ENDIF 1380 1381 IF ( ALLOCATED( v_m_s ) ) THEN 1382 CALL wrd_write_string( 'v_m_s' ) 1383 WRITE ( 14 ) v_m_s 1384 ENDIF 1385 1386 IF ( humidity ) THEN 1387 1388 CALL wrd_write_string( 'vpt' ) 1389 WRITE ( 14 ) vpt 1390 1391 IF ( ALLOCATED( vpt_av ) ) THEN 1392 CALL wrd_write_string( 'vpt_av' ) 1393 WRITE ( 14 ) vpt_av 1394 ENDIF 1395 1396 ENDIF 1397 1398 CALL wrd_write_string( 'w' ) 1399 WRITE ( 14 ) w 1400 1401 IF ( ALLOCATED( w_av ) ) THEN 1402 CALL wrd_write_string( 'w_av' ) 1403 WRITE ( 14 ) w_av 1404 ENDIF 1405 1406 IF ( ALLOCATED( w_m_l ) ) THEN 1407 CALL wrd_write_string( 'w_m_l' ) 1408 WRITE ( 14 ) w_m_l 1409 ENDIF 1410 1411 IF ( ALLOCATED( w_m_n ) ) THEN 1412 CALL wrd_write_string( 'w_m_n' ) 1413 WRITE ( 14 ) w_m_n 1414 ENDIF 1415 1416 IF ( ALLOCATED( w_m_r ) ) THEN 1417 CALL wrd_write_string( 'w_m_r' ) 1418 WRITE ( 14 ) w_m_r 1419 ENDIF 1420 1421 IF ( ALLOCATED( w_m_s ) ) THEN 1422 CALL wrd_write_string( 'w_m_s' ) 1423 WRITE ( 14 ) w_m_s 1424 ENDIF 1425 1426 IF ( ALLOCATED( z0_av ) ) THEN 1427 CALL wrd_write_string( 'z0_av' ) 1428 WRITE ( 14 ) z0_av 1429 ENDIF 1430 1431 IF ( ALLOCATED( z0h_av ) ) THEN 1432 CALL wrd_write_string( 'z0h_av' ) 1433 WRITE ( 14 ) z0h_av 1434 ENDIF 1435 1436 IF ( ALLOCATED( z0q_av ) ) THEN 1437 CALL wrd_write_string( 'z0q_av' ) 1438 WRITE ( 14 ) z0q_av 1439 ENDIF 1440 1441 IF ( land_surface .OR. urban_surface ) THEN 1442 1443 IF ( ALLOCATED( ghf_av ) ) THEN 1444 CALL wrd_write_string( 'ghf_av' ) 1445 WRITE ( 14 ) ghf_av 1446 ENDIF 1447 1448 IF ( ALLOCATED( r_a_av ) ) THEN 1449 CALL wrd_write_string( 'r_a_av' ) 1450 WRITE ( 14 ) r_a_av 1451 ENDIF 1452 1453 ENDIF 1454 1455 IF ( ALLOCATED( tsurf_av ) ) THEN 1456 CALL wrd_write_string( 'tsurf_av' ) 1457 WRITE ( 14 ) tsurf_av 1458 ENDIF 1459 1460 ELSEIF ( restart_data_format_output == 'mpi' ) THEN 1461 ! 1462 !-- Write local restart data using MPI-IO 1463 !-- Attention: After changes to the following output commands the version number 1464 !-- --------- of the variable binary_version must be changed! 1465 !-- Also, the list of arrays to be read in rrd_local must be adjusted accordingly. 1466 CALL wrd_mpi_io( 'e', e) 1467 IF ( ALLOCATED( e_av ) ) CALL wrd_mpi_io( 'e_av', e_av) 1468 CALL wrd_mpi_io( 'kh', kh ) 1469 IF ( ALLOCATED( kh_av ) ) CALL wrd_mpi_io( 'kh_av', kh_av ) 1470 CALL wrd_mpi_io( 'km' , km ) 1471 IF ( ALLOCATED( km_av ) ) CALL wrd_mpi_io( 'km_av', km_av ) 1472 IF ( ALLOCATED( lpt_av ) ) CALL wrd_mpi_io( 'lpt_av', lpt_av ) 1473 IF ( ALLOCATED( lwp_av ) ) CALL wrd_mpi_io( 'lwp_av', lwp_av ) 1474 CALL wrd_mpi_io( 'p', p ) 1475 IF ( ALLOCATED( p_av ) ) CALL wrd_mpi_io( 'p_av', p_av ) 1476 IF ( ALLOCATED( pc_av ) ) CALL wrd_mpi_io( 'pc_av', pc_av ) 1477 IF ( ALLOCATED( pr_av ) ) CALL wrd_mpi_io( 'pr_av', pr_av ) 1478 CALL wrd_mpi_io( 'pt', pt ) 1479 IF ( ALLOCATED( pt_av ) ) CALL wrd_mpi_io( 'pt_av', pt_av ) 1480 1481 IF ( humidity ) THEN 1482 1483 CALL wrd_mpi_io( 'q', q ) 1484 IF ( ALLOCATED( q_av ) ) CALL wrd_mpi_io( 'q_av', q_av ) 1485 1486 IF ( cloud_droplets ) THEN 1487 1488 CALL wrd_mpi_io( 'ql', ql ) 1489 IF ( ALLOCATED( ql_av ) ) CALL wrd_mpi_io( 'ql_av', ql_av ) 1490 1491 ENDIF 1492 1493 IF ( ALLOCATED( qsws_av ) ) CALL wrd_mpi_io( 'qsws_av', qsws_av ) 1494 1495 ENDIF 1496 1497 IF ( passive_scalar ) THEN 1498 1499 CALL wrd_mpi_io( 's', s ) 1500 IF ( ALLOCATED( s_av ) ) CALL wrd_mpi_io( 's_av', s_av ) 1501 IF ( ALLOCATED( ssws_av ) ) CALL wrd_mpi_io( 'ssws_av', ssws_av ) 1502 1503 ENDIF 1504 1505 IF ( ALLOCATED( ql_c_av ) ) CALL wrd_mpi_io( 'ql_c_av', ql_c_av ) 1506 IF ( ALLOCATED( ql_v_av ) ) CALL wrd_mpi_io( 'ql_v_av', ql_v_av ) 1507 IF ( ALLOCATED( ql_vp_av ) ) CALL wrd_mpi_io( 'ql_vp_av', ql_vp_av ) 1508 IF ( ALLOCATED( qv_av ) ) CALL wrd_mpi_io( 'qv_av', qv_av ) 1509 ! 1510 !-- Only PE0 writes random_iv and random_iy to restart file. 1511 !-- ATTENTION: If one value for every PE is required, the general approach of PE indendent 1512 !-- restart will be lost. That means that in general the parallel random number generator 1513 !-- in random_generatot_parallel_mod should be used! 1514 CALL wrd_mpi_io_global_array( 'random_iv', random_iv ) 1515 CALL wrd_mpi_io( 'random_iy', random_iy ) 1516 1517 IF ( ALLOCATED( seq_random_array ) ) THEN 1518 CALL wrd_mpi_io( 'id_random_array', id_random_array ) 1519 DO i = 1, SIZE( seq_random_array, 1 ) 1520 WRITE( tmp_name, '(A,I2.2)' ) 'seq_random_array', i 1521 CALL wrd_mpi_io( TRIM( tmp_name ), seq_random_array(i,:,:) ) 1522 ENDDO 1523 ENDIF 1524 IF ( ALLOCATED( s_av ) ) CALL wrd_mpi_io( 's_av', s_av ) 1525 IF ( ALLOCATED( shf_av ) ) CALL wrd_mpi_io( 'shf_av', shf_av ) 1526 IF ( ALLOCATED( ts_av ) ) CALL wrd_mpi_io( 'ts_av', ts_av ) 1527 CALL wrd_mpi_io( 'u', u) 1528 IF ( ALLOCATED( u_av ) ) CALL wrd_mpi_io( 'u_av', u_av ) 1529 IF ( ALLOCATED( u_m_l ) ) CALL wrd_mpi_io( 'u_m_l', u_m_l ) 1530 IF ( ALLOCATED( u_m_n ) ) CALL wrd_mpi_io( 'u_m_n', u_m_n ) 1531 IF ( ALLOCATED( u_m_r ) ) CALL wrd_mpi_io( 'u_m_r', u_m_r ) 1532 IF ( ALLOCATED( u_m_s ) ) CALL wrd_mpi_io( 'u_m_s', u_m_s ) 1533 IF ( ALLOCATED( us_av ) ) CALL wrd_mpi_io( 'us_av', us_av ) 1534 CALL wrd_mpi_io( 'v', v ) 1535 IF ( ALLOCATED( v_av ) ) CALL wrd_mpi_io( 'v_av', v_av ) 1536 IF ( ALLOCATED( v_m_l ) ) CALL wrd_mpi_io( 'v_m_l', v_m_l ) 1537 IF ( ALLOCATED( v_m_n ) ) CALL wrd_mpi_io( 'v_m_n', v_m_n ) 1538 IF ( ALLOCATED( v_m_r ) ) CALL wrd_mpi_io( 'v_m_r', v_m_r ) 1539 IF ( ALLOCATED( v_m_s ) ) CALL wrd_mpi_io( 'v_m_s', v_m_s ) 1540 IF ( humidity ) THEN 1541 CALL wrd_mpi_io( 'vpt', vpt ) 1542 IF ( ALLOCATED( vpt_av ) ) CALL wrd_mpi_io( 'vpt_av', vpt_av ) 1543 ENDIF 1544 CALL wrd_mpi_io( 'w', w) 1545 IF ( ALLOCATED( w_av ) ) CALL wrd_mpi_io( 'w_av', w_av ) 1546 IF ( ALLOCATED( w_m_l ) ) CALL wrd_mpi_io( 'w_m_l', w_m_l ) 1547 IF ( ALLOCATED( w_m_n ) ) CALL wrd_mpi_io( 'w_m_n', w_m_n ) 1548 IF ( ALLOCATED( w_m_r ) ) CALL wrd_mpi_io( 'w_m_r', w_m_r ) 1549 IF ( ALLOCATED( w_m_s ) ) CALL wrd_mpi_io( 'w_m_s', w_m_s ) 1550 IF ( ALLOCATED( z0_av ) ) CALL wrd_mpi_io( 'z0_av', z0_av ) 1551 IF ( ALLOCATED( z0h_av ) ) CALL wrd_mpi_io( 'z0h_av', z0h_av ) 1552 IF ( ALLOCATED( z0q_av ) ) CALL wrd_mpi_io( 'z0q_av', z0q_av ) 1553 IF ( land_surface .OR. urban_surface ) THEN 1554 IF ( ALLOCATED( ghf_av ) ) CALL wrd_mpi_io( 'ghf_av', ghf_av ) 1555 IF ( ALLOCATED( r_a_av ) ) CALL wrd_mpi_io( 'r_a_av', r_a_av ) 1556 ENDIF 1557 IF ( ALLOCATED( tsurf_av ) ) CALL wrd_mpi_io( 'tsurf_av', tsurf_av ) 990 1558 991 1559 ENDIF 992 993 IF ( ALLOCATED( ql_c_av ) ) THEN994 CALL wrd_write_string( 'ql_c_av' )995 WRITE ( 14 ) ql_c_av996 ENDIF997 998 IF ( ALLOCATED( ql_v_av ) ) THEN999 CALL wrd_write_string( 'ql_v_av' )1000 WRITE ( 14 ) ql_v_av1001 ENDIF1002 1003 IF ( ALLOCATED( ql_vp_av ) ) THEN1004 CALL wrd_write_string( 'ql_vp_av' )1005 WRITE ( 14 ) ql_vp_av1006 ENDIF1007 1008 IF ( ALLOCATED( qv_av ) ) THEN1009 CALL wrd_write_string( 'qv_av' )1010 WRITE ( 14 ) qv_av1011 ENDIF1012 1013 CALL wrd_write_string( 'random_iv' )1014 WRITE ( 14 ) random_iv1015 WRITE ( 14 ) random_iy1016 1017 IF ( ALLOCATED( seq_random_array ) ) THEN1018 CALL wrd_write_string( 'seq_random_array' )1019 WRITE ( 14 ) id_random_array1020 WRITE ( 14 ) seq_random_array1021 ENDIF1022 1023 IF ( ALLOCATED( s_av ) ) THEN1024 CALL wrd_write_string( 's_av' )1025 WRITE ( 14 ) s_av1026 ENDIF1027 1028 IF ( ALLOCATED( shf_av ) ) THEN1029 CALL wrd_write_string( 'shf_av' )1030 WRITE ( 14 ) shf_av1031 ENDIF1032 1033 IF ( ALLOCATED( ts_av ) ) THEN1034 CALL wrd_write_string( 'ts_av' )1035 WRITE ( 14 ) ts_av1036 ENDIF1037 1038 CALL wrd_write_string( 'u' )1039 WRITE ( 14 ) u1040 1041 IF ( ALLOCATED( u_av ) ) THEN1042 CALL wrd_write_string( 'u_av' )1043 WRITE ( 14 ) u_av1044 ENDIF1045 1046 IF ( ALLOCATED( u_m_l ) ) THEN1047 CALL wrd_write_string( 'u_m_l' )1048 WRITE ( 14 ) u_m_l1049 ENDIF1050 1051 IF ( ALLOCATED( u_m_n ) ) THEN1052 CALL wrd_write_string( 'u_m_n' )1053 WRITE ( 14 ) u_m_n1054 ENDIF1055 1056 IF ( ALLOCATED( u_m_r ) ) THEN1057 CALL wrd_write_string( 'u_m_r' )1058 WRITE ( 14 ) u_m_r1059 ENDIF1060 1061 IF ( ALLOCATED( u_m_s ) ) THEN1062 CALL wrd_write_string( 'u_m_s' )1063 WRITE ( 14 ) u_m_s1064 ENDIF1065 1066 IF ( ALLOCATED( us_av ) ) THEN1067 CALL wrd_write_string( 'us_av' )1068 WRITE ( 14 ) us_av1069 ENDIF1070 1071 CALL wrd_write_string( 'v' )1072 WRITE ( 14 ) v1073 1074 IF ( ALLOCATED( v_av ) ) THEN1075 CALL wrd_write_string( 'v_av' )1076 WRITE ( 14 ) v_av1077 ENDIF1078 1079 IF ( ALLOCATED( v_m_l ) ) THEN1080 CALL wrd_write_string( 'v_m_l' )1081 WRITE ( 14 ) v_m_l1082 ENDIF1083 1084 IF ( ALLOCATED( v_m_n ) ) THEN1085 CALL wrd_write_string( 'v_m_n' )1086 WRITE ( 14 ) v_m_n1087 ENDIF1088 1089 IF ( ALLOCATED( v_m_r ) ) THEN1090 CALL wrd_write_string( 'v_m_r' )1091 WRITE ( 14 ) v_m_r1092 ENDIF1093 1094 IF ( ALLOCATED( v_m_s ) ) THEN1095 CALL wrd_write_string( 'v_m_s' )1096 WRITE ( 14 ) v_m_s1097 ENDIF1098 1099 IF ( humidity ) THEN1100 1101 CALL wrd_write_string( 'vpt' )1102 WRITE ( 14 ) vpt1103 1104 IF ( ALLOCATED( vpt_av ) ) THEN1105 CALL wrd_write_string( 'vpt_av' )1106 WRITE ( 14 ) vpt_av1107 ENDIF1108 1109 ENDIF1110 1111 CALL wrd_write_string( 'w' )1112 WRITE ( 14 ) w1113 1114 IF ( ALLOCATED( w_av ) ) THEN1115 CALL wrd_write_string( 'w_av' )1116 WRITE ( 14 ) w_av1117 ENDIF1118 1119 IF ( ALLOCATED( w_m_l ) ) THEN1120 CALL wrd_write_string( 'w_m_l' )1121 WRITE ( 14 ) w_m_l1122 ENDIF1123 1124 IF ( ALLOCATED( w_m_n ) ) THEN1125 CALL wrd_write_string( 'w_m_n' )1126 WRITE ( 14 ) w_m_n1127 ENDIF1128 1129 IF ( ALLOCATED( w_m_r ) ) THEN1130 CALL wrd_write_string( 'w_m_r' )1131 WRITE ( 14 ) w_m_r1132 ENDIF1133 1134 IF ( ALLOCATED( w_m_s ) ) THEN1135 CALL wrd_write_string( 'w_m_s' )1136 WRITE ( 14 ) w_m_s1137 ENDIF1138 1139 IF ( ALLOCATED( z0_av ) ) THEN1140 CALL wrd_write_string( 'z0_av' )1141 WRITE ( 14 ) z0_av1142 ENDIF1143 1144 IF ( ALLOCATED( z0h_av ) ) THEN1145 CALL wrd_write_string( 'z0h_av' )1146 WRITE ( 14 ) z0h_av1147 ENDIF1148 1149 IF ( ALLOCATED( z0q_av ) ) THEN1150 CALL wrd_write_string( 'z0q_av' )1151 WRITE ( 14 ) z0q_av1152 ENDIF1153 1154 IF ( land_surface .OR. urban_surface ) THEN1155 1156 IF ( ALLOCATED( ghf_av ) ) THEN1157 CALL wrd_write_string( 'ghf_av' )1158 WRITE ( 14 ) ghf_av1159 ENDIF1160 1161 IF ( ALLOCATED( r_a_av ) ) THEN1162 CALL wrd_write_string( 'r_a_av' )1163 WRITE ( 14 ) r_a_av1164 ENDIF1165 1166 ENDIF1167 1168 IF ( ALLOCATED( tsurf_av ) ) THEN1169 CALL wrd_write_string( 'tsurf_av' )1170 WRITE ( 14 ) tsurf_av1171 ENDIF1172 1173 1560 1174 1561 CALL surface_wrd_local … … 1180 1567 ! 1181 1568 !-- Write end label 1182 CALL wrd_write_string( '*** end ***' ) 1569 IF ( restart_data_format_output == 'fortran_binary' ) THEN 1570 CALL wrd_write_string( '*** end ***' ) 1571 ENDIF 1183 1572 1184 1573 END SUBROUTINE wrd_local
Note: See TracChangeset
for help on using the changeset viewer.