Changeset 4495 for palm/trunk/SOURCE/bulk_cloud_model_mod.f90
- Timestamp:
- Apr 13, 2020 8:11:20 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note: See TracChangeset
for help on using the changeset viewer.