Changeset 2320 for palm


Ignore:
Timestamp:
Jul 21, 2017 12:47:43 PM (4 years ago)
Author:
suehring
Message:

large-scale forcing and nudging modularized

Location:
palm/trunk/SOURCE
Files:
1 added
2 deleted
11 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/Makefile

    r2318 r2320  
    2525# -----------------
    2626# $Id$
     27# -ls_forcing nudging
     28# +large_scale_forcing_nudging
     29#
     30# 2318 2017-07-20 17:27:44Z suehring
    2731# Add further dependencies on surface_mod
    2832#
     
    370374        lpm_set_attributes.f90 lpm_splitting.f90 \
    371375        lpm_write_exchange_statistics.f90 lpm_write_restart_file.f90 \
    372         ls_forcing_mod.f90 message.f90 microphysics_mod.f90 modules.f90 mod_kinds.f90 \
    373         mod_particle_attributes.f90 netcdf_interface_mod.f90 nudging_mod.f90 \
     376        large_scale_forcing_nudging_mod.f90 message.f90 microphysics_mod.f90 \
     377        modules.f90 mod_kinds.f90 mod_particle_attributes.f90 netcdf_interface_mod.f90 \
    374378        outflow_turbulence.f90 package_parin.f90 palm.f90 parin.f90 plant_canopy_model_mod.f90 \
    375379        pmc_interface_mod.f90 pmc_child_mod.f90 pmc_general_mod.f90 pmc_handle_communicator_mod.f90 \
     
    453457check_open.o: modules.o mod_kinds.o mod_particle_attributes.o \
    454458        netcdf_interface_mod.o posix_calls_from_fortran.o
    455 check_parameters.o: modules.o mod_kinds.o land_surface_model_mod.o \
     459check_parameters.o: modules.o mod_kinds.o land_surface_model_mod.o large_scale_forcing_nudging_mod.o \
    456460        microphysics_mod.o netcdf_interface_mod.o plant_canopy_model_mod.o pmc_interface_mod.o \
    457461        radiation_model_mod.o spectra_mod.o subsidence_mod.o synthetic_turbulence_generator_mod.o \
     
    493497fft_xy_mod.o: modules.o mod_kinds.o singleton_mod.o temperton_fft_mod.o
    494498flow_statistics.o: modules.o cpulog_mod.o mod_kinds.o land_surface_model_mod.o \
    495    netcdf_interface_mod.o radiation_model_mod.o surface_mod.o
     499                   large_scale_forcing_nudging_mod.o netcdf_interface_mod.o radiation_model_mod.o surface_mod.o
    496500global_min_max.o: modules.o mod_kinds.o
    497 header.o: modules.o cpulog_mod.o mod_kinds.o netcdf_interface_mod.o land_surface_model_mod.o\
    498    microphysics_mod.o plant_canopy_model_mod.o pmc_handle_communicator_mod.o pmc_interface_mod.o \
    499    radiation_model_mod.o spectra_mod.o subsidence_mod.o surface_mod.o virtual_flight_mod.o
     501header.o: modules.o cpulog_mod.o mod_kinds.o large_scale_forcing_nudging_mod.o netcdf_interface_mod.o \
     502   land_surface_model_mod.o microphysics_mod.o plant_canopy_model_mod.o pmc_handle_communicator_mod.o \
     503   pmc_interface_mod.o radiation_model_mod.o spectra_mod.o subsidence_mod.o surface_mod.o virtual_flight_mod.o
    500504inflow_turbulence.o: modules.o cpulog_mod.o mod_kinds.o
    501505init_1d_model.o: modules.o mod_kinds.o
    502506init_3d_model.o: modules.o mod_kinds.o advec_ws.o cpulog_mod.o disturb_heatflux.o land_surface_model_mod.o \
    503    lpm_init.o ls_forcing_mod.o netcdf_interface_mod.o plant_canopy_model_mod.o \
    504    radiation_model_mod.o random_function_mod.o random_generator_parallel_mod.o \
     507   large_scale_forcing_nudging_mod.o lpm_init.o netcdf_interface_mod.o \
     508   plant_canopy_model_mod.o radiation_model_mod.o random_function_mod.o random_generator_parallel_mod.o \
    505509   microphysics_mod.o mod_particle_attributes.o surface_layer_fluxes_mod.o \
    506510   urban_surface_mod.o virtual_flight_mod.o surface_mod.o wind_turbine_model_mod.o
     
    518522interaction_droplets_ptq.o: modules.o mod_kinds.o
    519523land_surface_model_mod.o: modules.o mod_kinds.o radiation_model_mod.o surface_mod.o
     524large_scale_forcing_nudging_mod.o: modules.o cpulog_mod.o mod_kinds.o surface_mod.o
    520525local_stop.o: modules.o mod_kinds.o pmc_interface_mod.o
    521526local_tremain.o: modules.o cpulog_mod.o mod_kinds.o
     
    551556lpm_write_exchange_statistics.o: modules.o mod_kinds.o mod_particle_attributes.o
    552557lpm_write_restart_file.o: modules.o mod_kinds.o mod_particle_attributes.o
    553 ls_forcing_mod.o: modules.o cpulog_mod.o mod_kinds.o surface_mod.o
    554558message.o: modules.o mod_kinds.o pmc_interface_mod.o
    555559microphysics_mod.o: modules.o cpulog_mod.o mod_kinds.o surface_mod.o
     
    559563netcdf_interface_mod.o: netcdf_interface_mod.f90 modules.o mod_kinds.o \
    560564   land_surface_model_mod.o radiation_model_mod.o spectra_mod.o urban_surface_mod.o
    561 nudging_mod.o: modules.o cpulog_mod.o mod_kinds.o
    562565outflow_turbulence.o: modules.o cpulog_mod.o mod_kinds.o
    563566package_parin.o: modules.o mod_kinds.o mod_particle_attributes.o
    564 palm.o: modules.o cpulog_mod.o land_surface_model_mod.o ls_forcing_mod.o mod_kinds.o nudging_mod.o\
     567palm.o: modules.o cpulog_mod.o land_surface_model_mod.o mod_kinds.o \
    565568        pmc_interface_mod.o surface_layer_fluxes_mod.o
    566569parin.o: modules.o cpulog_mod.o land_surface_model_mod.o mod_kinds.o netcdf_interface_mod.o \
     
    589592        advec_ws.o buoyancy.o calc_radiation.o coriolis.o \
    590593        cpulog_mod.o diffusion_e.o diffusion_s.o diffusion_u.o diffusion_v.o diffusion_w.o \
    591         eqn_state_seawater.o mod_kinds.o microphysics_mod.o \
    592         nudging_mod.o plant_canopy_model_mod.o production_e.o radiation_model_mod.o \
     594        eqn_state_seawater.o large_scale_forcing_nudging_mod.o modules.o cpulog_mod.o mod_kinds.o surface_mod.o \
     595        mod_kinds.o microphysics_mod.o \
     596        plant_canopy_model_mod.o production_e.o radiation_model_mod.o \
    593597        subsidence_mod.o surface_mod.o user_actions.o wind_turbine_model_mod.o
    594598progress_bar_mod.o: modules.o mod_kinds.o
     
    620624time_integration.o: modules.o advec_ws.o buoyancy.o calc_mean_profile.o \
    621625        cpulog_mod.o data_output_flight.o disturb_heatflux.o interaction_droplets_ptq.o land_surface_model_mod.o \
    622         ls_forcing_mod.o mod_kinds.o nudging_mod.o pmc_interface_mod.o production_e.o \
     626        large_scale_forcing_nudging_mod.o mod_kinds.o pmc_interface_mod.o production_e.o \
    623627        prognostic_equations.o progress_bar_mod.o radiation_model_mod.o \
    624628        spectra_mod.o user_actions.o microphysics_mod.o synthetic_turbulence_generator_mod.o \
  • palm/trunk/SOURCE/boundary_conds.f90

    r2292 r2320  
    2525! -----------------
    2626! $Id$
     27! Remove unused control parameter large_scale_forcing from only-list
     28!
     29! 2292 2017-06-20 09:51:42Z schwenkel
    2730! Implementation of new microphysic scheme: cloud_scheme = 'morrison'
    2831! includes two more prognostic equations for cloud drop concentration (nc) 
     
    166169               ibc_pt_b, ibc_pt_t, ibc_q_b, ibc_q_t, ibc_s_b, ibc_s_t,         &
    167170               ibc_sa_t, ibc_uv_b, ibc_uv_t, inflow_l, inflow_n, inflow_r,     &
    168                inflow_s, intermediate_timestep_count, large_scale_forcing,     &
     171               inflow_s, intermediate_timestep_count,                          &
    169172               microphysics_morrison, microphysics_seifert, nest_domain,       &
    170173               nest_bound_l, nest_bound_s, nudging, ocean, outflow_l,          &
  • palm/trunk/SOURCE/check_parameters.f90

    r2312 r2320  
    2020! Current revisions:
    2121! -----------------
    22 !
    23 !
     22! 
     23! 
    2424! Former revisions:
    2525! -----------------
    2626! $Id$
     27! Modularize large-scale forcing and nudging
     28!
     29! 2312 2017-07-14 20:26:51Z hoffmann
    2730! PA0349 and PA0420 removed.
    2831!
     
    498501        ONLY: lsm_check_data_output, lsm_check_data_output_pr,                 &
    499502              lsm_check_parameters
     503
     504    USE lsf_nudging_mod,                                                       &
     505        ONLY:  lsf_nudging_check_parameters, lsf_nudging_check_data_output_pr, &
     506               qsws_surf, shf_surf
    500507
    501508    USE kinds
     
    12271234!-- When radiation model is used, peform addtional checks
    12281235    IF ( radiation )  CALL radiation_check_parameters
     1236!
     1237!-- When large-scale forcing or nudging is used, peform addtional checks
     1238    IF ( large_scale_forcing  .OR.  nudging )  CALL lsf_nudging_check_parameters
     1239
    12291240
    12301241
     
    28482859             ENDIF
    28492860
    2850           CASE ( 'td_lsa_lpt' )
    2851              IF (  .NOT.  large_scale_forcing )  THEN
    2852                 message_string = 'data_output_pr = ' //                        &
    2853                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
    2854                                  'lemented for large_scale_forcing = .FALSE.'
    2855                 CALL message( 'check_parameters', 'PA0393', 1, 2, 0, 6, 0 )
    2856              ELSE
    2857                 dopr_index(i) = 81
    2858                 dopr_unit(i)  = 'K/s'
    2859                 hom(:,2,81,:) = SPREAD( zu, 2, statistic_regions+1 )
    2860              ENDIF
    2861 
    2862           CASE ( 'td_lsa_q' )
    2863              IF (  .NOT.  large_scale_forcing )  THEN
    2864                 message_string = 'data_output_pr = ' //                        &
    2865                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
    2866                                  'lemented for large_scale_forcing = .FALSE.'
    2867                 CALL message( 'check_parameters', 'PA0393', 1, 2, 0, 6, 0 )
    2868              ELSE
    2869                 dopr_index(i) = 82
    2870                 dopr_unit(i)  = 'kg/kgs'
    2871                 hom(:,2,82,:) = SPREAD( zu, 2, statistic_regions+1 )
    2872              ENDIF
    2873 
    2874           CASE ( 'td_sub_lpt' )
    2875              IF (  .NOT.  large_scale_forcing )  THEN
    2876                 message_string = 'data_output_pr = ' //                        &
    2877                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
    2878                                  'lemented for large_scale_forcing = .FALSE.'
    2879                 CALL message( 'check_parameters', 'PA0393', 1, 2, 0, 6, 0 )
    2880              ELSE
    2881                 dopr_index(i) = 83
    2882                 dopr_unit(i)  = 'K/s'
    2883                 hom(:,2,83,:) = SPREAD( zu, 2, statistic_regions+1 )
    2884              ENDIF
    2885 
    2886           CASE ( 'td_sub_q' )
    2887              IF (  .NOT.  large_scale_forcing )  THEN
    2888                 message_string = 'data_output_pr = ' //                        &
    2889                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
    2890                                  'lemented for large_scale_forcing = .FALSE.'
    2891                 CALL message( 'check_parameters', 'PA0393', 1, 2, 0, 6, 0 )
    2892              ELSE
    2893                 dopr_index(i) = 84
    2894                 dopr_unit(i)  = 'kg/kgs'
    2895                 hom(:,2,84,:) = SPREAD( zu, 2, statistic_regions+1 )
    2896              ENDIF
    2897 
    2898           CASE ( 'td_nud_lpt' )
    2899              IF (  .NOT.  nudging )  THEN
    2900                 message_string = 'data_output_pr = ' //                        &
    2901                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
    2902                                  'lemented for nudging = .FALSE.'
    2903                 CALL message( 'check_parameters', 'PA0394', 1, 2, 0, 6, 0 )
    2904              ELSE
    2905                 dopr_index(i) = 85
    2906                 dopr_unit(i)  = 'K/s'
    2907                 hom(:,2,85,:) = SPREAD( zu, 2, statistic_regions+1 )
    2908              ENDIF
    2909 
    2910           CASE ( 'td_nud_q' )
    2911              IF (  .NOT.  nudging )  THEN
    2912                 message_string = 'data_output_pr = ' //                        &
    2913                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
    2914                                  'lemented for nudging = .FALSE.'
    2915                 CALL message( 'check_parameters', 'PA0394', 1, 2, 0, 6, 0 )
    2916              ELSE
    2917                 dopr_index(i) = 86
    2918                 dopr_unit(i)  = 'kg/kgs'
    2919                 hom(:,2,86,:) = SPREAD( zu, 2, statistic_regions+1 )
    2920              ENDIF
    2921 
    2922           CASE ( 'td_nud_u' )
    2923              IF (  .NOT.  nudging )  THEN
    2924                 message_string = 'data_output_pr = ' //                        &
    2925                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
    2926                                  'lemented for nudging = .FALSE.'
    2927                 CALL message( 'check_parameters', 'PA0394', 1, 2, 0, 6, 0 )
    2928              ELSE
    2929                 dopr_index(i) = 87
    2930                 dopr_unit(i)  = 'm/s2'
    2931                 hom(:,2,87,:) = SPREAD( zu, 2, statistic_regions+1 )
    2932              ENDIF
    2933 
    2934           CASE ( 'td_nud_v' )
    2935              IF (  .NOT.  nudging )  THEN
    2936                 message_string = 'data_output_pr = ' //                        &
    2937                                  TRIM( data_output_pr(i) ) // ' is not imp' // &
    2938                                  'lemented for nudging = .FALSE.'
    2939                 CALL message( 'check_parameters', 'PA0394', 1, 2, 0, 6, 0 )
    2940              ELSE
    2941                 dopr_index(i) = 88
    2942                 dopr_unit(i)  = 'm/s2'
    2943                 hom(:,2,88,:) = SPREAD( zu, 2, statistic_regions+1 )
    2944              ENDIF
    2945 
    29462861          CASE ( 's*2' )
    29472862             IF (  .NOT.  passive_scalar )  THEN
     
    29622877             CALL lsm_check_data_output_pr( data_output_pr(i), i, unit,        &
    29632878                                            dopr_unit(i) )
     2879
     2880             CALL lsf_nudging_check_data_output_pr( data_output_pr(i), i,      &
     2881                                                    unit, dopr_unit(i) )
    29642882
    29652883             IF ( unit == 'illegal' )  THEN
     
    38853803
    38863804!
    3887 !-- Check nudging and large scale forcing from external file
    3888     IF ( nudging  .AND.  (  .NOT.  large_scale_forcing ) )  THEN
    3889        message_string = 'Nudging requires large_scale_forcing = .T.. &'//      &
    3890                         'Surface fluxes and geostrophic wind should be &'//    &
    3891                         'prescribed in file LSF_DATA'
    3892        CALL message( 'check_parameters', 'PA0374', 1, 2, 0, 6, 0 )
    3893     ENDIF
    3894 
    3895     IF ( large_scale_forcing  .AND.  ( bc_lr /= 'cyclic'  .OR.                 &
    3896                                     bc_ns /= 'cyclic' ) )  THEN
    3897        message_string = 'Non-cyclic lateral boundaries do not allow for &' //  &
    3898                         'the usage of large scale forcing from external file.'
    3899        CALL message( 'check_parameters', 'PA0375', 1, 2, 0, 6, 0 )
    3900     ENDIF
    3901 
    3902     IF ( large_scale_forcing  .AND.  (  .NOT.  humidity ) )  THEN
    3903        message_string = 'The usage of large scale forcing from external &'//   &
    3904                         'file LSF_DATA requires humidity = .T..'
    3905        CALL message( 'check_parameters', 'PA0376', 1, 2, 0, 6, 0 )
    3906     ENDIF
    3907 
    3908     IF ( large_scale_forcing  .AND.  passive_scalar )  THEN
    3909        message_string = 'The usage of large scale forcing from external &'//   &
    3910                         'file LSF_DATA is not implemented for passive scalars'
    3911        CALL message( 'check_parameters', 'PA0440', 1, 2, 0, 6, 0 )
    3912     ENDIF
    3913 
    3914     IF ( large_scale_forcing  .AND.  topography /= 'flat'                      &
    3915                               .AND.  .NOT.  lsf_exception )  THEN
    3916        message_string = 'The usage of large scale forcing from external &'//   &
    3917                         'file LSF_DATA is not implemented for non-flat topography'
    3918        CALL message( 'check_parameters', 'PA0377', 1, 2, 0, 6, 0 )
    3919     ENDIF
    3920 
    3921     IF ( large_scale_forcing  .AND.  ocean )  THEN
    3922        message_string = 'The usage of large scale forcing from external &'//   &
    3923                         'file LSF_DATA is not implemented for ocean runs'
    3924        CALL message( 'check_parameters', 'PA0378', 1, 2, 0, 6, 0 )
    3925     ENDIF
    3926 
    3927 !
    39283805!-- Prevent empty time records in volume, cross-section and masked data in case
    39293806!-- of non-parallel netcdf-output in restart runs
  • palm/trunk/SOURCE/flow_statistics.f90

    r2296 r2320  
    2525! -----------------
    2626! $Id$
     27! Modularize large-scale forcing and nudging
     28!
     29! 2296 2017-06-28 07:53:56Z maronga
    2730! Enabled output of radiation quantities for radiation_scheme = 'constant'
    2831!
     
    243246               momentumflux_output_conversion, nc, nr, p, prho, prr, pt, q,    &
    244247               qc, ql, qr, rho_air, rho_air_zw, rho_ocean, s,                  &
    245                sa, td_lsa_lpt, td_lsa_q, td_sub_lpt, td_sub_q, time_vert, u,   &
    246                ug, v, vg, vpt, w, w_subs, waterflux_output_conversion, zw
     248               sa, u, ug, v, vg, vpt, w, w_subs, waterflux_output_conversion, zw
    247249       
    248250    USE cloud_parameters,                                                      &
     
    272274    USE land_surface_model_mod,                                                &
    273275        ONLY:   m_soil_h, nzb_soil, nzt_soil, t_soil_h
     276
     277    USE lsf_nudging_mod,                                                       &
     278        ONLY:   td_lsa_lpt, td_lsa_q, td_sub_lpt, td_sub_q, time_vert
    274279
    275280    USE netcdf_interface,                                                      &
  • palm/trunk/SOURCE/header.f90

    r2300 r2320  
    2525! -----------------
    2626! $Id$
     27! Modularize large-scale forcing and nudging
     28!
     29! 2300 2017-06-29 13:31:14Z raasch
    2730! host-specific code removed
    2831!
     
    342345    USE land_surface_model_mod,                                                &
    343346        ONLY: lsm_header
     347
     348    USE lsf_nudging_mod,                                                       &
     349        ONLY:  lsf_nudging_header
    344350
    345351    USE microphysics_mod,                                                      &
     
    746752!
    747753!-- Large scale forcing and nudging
    748     WRITE ( io, 160 )
    749     IF ( large_scale_forcing )  THEN
    750        WRITE ( io, 162 )
    751        WRITE ( io, 163 )
    752 
    753        IF ( large_scale_subsidence )  THEN
    754           IF ( .NOT. use_subsidence_tendencies )  THEN
    755              WRITE ( io, 164 )
    756           ELSE
    757              WRITE ( io, 165 )
    758           ENDIF
    759        ENDIF
    760 
    761        IF ( bc_pt_b == 'dirichlet' )  THEN
    762           WRITE ( io, 180 )
    763        ELSEIF ( bc_pt_b == 'neumann' )  THEN
    764           WRITE ( io, 181 )
    765        ENDIF
    766 
    767        IF ( bc_q_b == 'dirichlet' )  THEN
    768           WRITE ( io, 182 )
    769        ELSEIF ( bc_q_b == 'neumann' )  THEN
    770           WRITE ( io, 183 )
    771        ENDIF
    772 
    773        WRITE ( io, 167 )
    774        IF ( nudging )  THEN
    775           WRITE ( io, 170 )
    776        ENDIF
    777     ELSE
    778        WRITE ( io, 161 )
    779        WRITE ( io, 171 )
    780     ENDIF
    781     IF ( large_scale_subsidence )  THEN
    782        WRITE ( io, 168 )
    783        WRITE ( io, 169 )
    784     ENDIF
     754    IF ( large_scale_forcing )  CALL lsf_nudging_header( io )
    785755
    786756!
     
    20121982           /'     ',2(1X,E12.5),'Pa/m in x/y direction', &
    20131983           /'     starting from dp_level_b =', F8.3, 'm', A /)
    2014 160 FORMAT (//' Large scale forcing and nudging:'/ &
    2015               ' -------------------------------'/)
    2016 161 FORMAT (' --> No large scale forcing from external is used (default) ')
    2017 162 FORMAT (' --> Large scale forcing from external file LSF_DATA is used: ')
    2018 163 FORMAT ('     - large scale advection tendencies ')
    2019 164 FORMAT ('     - large scale subsidence velocity w_subs ')
    2020 165 FORMAT ('     - large scale subsidence tendencies ')
    2021 167 FORMAT ('     - and geostrophic wind components ug and vg')
    2022 168 FORMAT (' --> Large-scale vertical motion is used in the ', &
    2023                   'prognostic equation(s) for')
    2024 169 FORMAT ('     the scalar(s) only')
    2025 170 FORMAT (' --> Nudging is used')
    2026 171 FORMAT (' --> No nudging is used (default) ')
    2027 180 FORMAT ('     - prescribed surface values for temperature')
    2028 181 FORMAT ('     - prescribed surface fluxes for temperature')
    2029 182 FORMAT ('     - prescribed surface values for humidity')
    2030 183 FORMAT ('     - prescribed surface fluxes for humidity')
    20311984200 FORMAT (//' Run time and time step information:'/ &
    20321985             ' ----------------------------------'/)
  • palm/trunk/SOURCE/init_3d_model.f90

    r2292 r2320  
    2525! -----------------
    2626! $Id$
     27! Modularize large-scale forcing and nudging
     28!
     29! 2292 2017-06-20 09:51:42Z schwenkel
    2730! Implementation of new microphysic scheme: cloud_scheme = 'morrison'
    2831! includes two more prognostic equations for cloud drop concentration (nc) 
     
    372375        ONLY:  lsm_init, lsm_init_arrays
    373376 
    374     USE ls_forcing_mod
     377    USE lsf_nudging_mod,                                                       &
     378        ONLY:  lsf_init, ls_forcing_surf, nudge_init
    375379
    376380    USE microphysics_mod,                                                      &
     
    956960
    957961!
     962!-- Initialize nudging if required
     963    IF ( nudging )  THEN
     964       CALL nudge_init
     965    ENDIF
     966
     967!
     968!-- Initialize reading of large scale forcing from external file - if required
     969    IF ( large_scale_forcing )  THEN
     970       CALL lsf_init
     971    ENDIF
     972
     973!
    958974!-- Allocate arrays containing the RK coefficient for calculation of
    959975!-- perturbation pressure and turbulent fluxes. At this point values are
     
    10921108
    10931109          CALL location_message( 'initializing with constant profiles', .FALSE. )
    1094 !
    1095 !--       Overwrite initial profiles in case of nudging
    1096           IF ( nudging )  THEN
    1097              pt_init = ptnudge(:,1)
    1098              u_init  = unudge(:,1)
    1099              v_init  = vnudge(:,1)
    1100              IF ( humidity  )  THEN ! is passive_scalar correct???
    1101                 q_init = qnudge(:,1)
    1102              ENDIF
    1103 
    1104              WRITE( message_string, * ) 'Initial profiles of u, v and ',       &
    1105                  'scalars from NUDGING_DATA are used.'
    1106              CALL message( 'init_3d_model', 'PA0370', 0, 0, 0, 6, 0 )
    1107           ENDIF
    1108 
    11091110!
    11101111!--       Overwrite initial profiles in case of synthetic turbulence generator
  • palm/trunk/SOURCE/modules.f90

    r2300 r2320  
    2525! -----------------
    2626! $Id$
     27! -ptnudge, qnudge, tnudge, td_lsa_lpt, td_lsa_q, td_sub_lpt, td_sub_q, ug_vert,
     28!  vg_vert, unudge, vnudge, wsubs_vert, shf_surf, p_surf, pt_surf, q_surt,
     29!  qsws_surf, tmp_tnudge, timenudge, time_surf, time_vert
     30!
     31! 2300 2017-06-29 13:31:14Z raasch
    2732! default value for host changed to '????', default value for loop_optimization
    2833! changed to 'cache', default value for termination_time_needed set to 35.0
     
    532537    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ptdf_x                 !< damping factor for potential temperature in x-direction
    533538    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ptdf_y                 !< damping factor for potential temperature in y-direction
    534     REAL(wp), DIMENSION(:), ALLOCATABLE ::  p_surf                 !< time-dependent surface pressure (large scale forcing)
    535     REAL(wp), DIMENSION(:), ALLOCATABLE ::  pt_surf                !< time-dependent surface temperature (large scale forcing)
    536539    REAL(wp), DIMENSION(:), ALLOCATABLE ::  pt_init                !< initial profile of potential temperature
    537     REAL(wp), DIMENSION(:), ALLOCATABLE ::  qsws_surf              !< time-dependent surface latent heat flux (large scale forcing)
    538540    REAL(wp), DIMENSION(:), ALLOCATABLE ::  q_init                 !< initial profile of specific humidity
    539541                                                                   !< (or total water content with active cloud physics)
    540     REAL(wp), DIMENSION(:), ALLOCATABLE ::  q_surf                 !< time-dependent surface specific humidity (large scale forcing)
    541542    REAL(wp), DIMENSION(:), ALLOCATABLE ::  rdf                    !< rayleigh damping factor for velocity components
    542543    REAL(wp), DIMENSION(:), ALLOCATABLE ::  rdf_sc                 !< rayleigh damping factor for scalar quantities
     
    545546    REAL(wp), DIMENSION(:), ALLOCATABLE ::  s_init                 !< initial profile of passive scalar concentration
    546547    REAL(wp), DIMENSION(:), ALLOCATABLE ::  sa_init                !< initial profile of salinity (ocean)
    547     REAL(wp), DIMENSION(:), ALLOCATABLE ::  shf_surf               !< time-dependent surface sensible heat flux (large scale forcing)
    548     REAL(wp), DIMENSION(:), ALLOCATABLE ::  timenudge              !< times at which vertical profiles are defined in NUDGING_DATA (nudging)
    549     REAL(wp), DIMENSION(:), ALLOCATABLE ::  time_surf              !< times at which surface values/fluxes are defined in LSF_DATA (large scale forcing)
    550     REAL(wp), DIMENSION(:), ALLOCATABLE ::  time_vert              !< times at which vertical profiles are defined in LSF_DATA (large scale forcing)
    551     REAL(wp), DIMENSION(:), ALLOCATABLE ::  tmp_tnudge             !< current nudging time scale
    552548    REAL(wp), DIMENSION(:), ALLOCATABLE ::  ug                     !< geostrophic wind component in x-direction
    553549    REAL(wp), DIMENSION(:), ALLOCATABLE ::  u_init                 !< initial profile of horizontal velocity component u
     
    593589    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  precipitation_amount  !< precipitation amount due to gravitational settling (bulk microphysics)
    594590    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  precipitation_rate    !< precipitation rate (bulk microphysics)
    595     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ptnudge               !< vertical profile of pot. temperature interpolated to vertical grid (nudging)
    596591    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  pt_slope_ref          !< potential temperature in rotated coordinate system
    597592                                                                    !< (in case of sloped surface)
    598     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  qnudge                !< vertical profile of specific humidity interpolated to vertical grid (nudging)
    599     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  tnudge                !< vertical profile of nudging time scale interpolated to vertical grid (nudging) 
    600     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  td_lsa_lpt            !< temperature tendency due to large scale advection (large scale forcing)
    601     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  td_lsa_q              !< specific humidity tendency due to large scale advection (large scale forcing)
    602     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  td_sub_lpt            !< temperature tendency due to subsidence/ascent (large scale forcing)
    603     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  td_sub_q              !< specific humidity tendency due to subsidence/ascent (large scale forcing)
    604593    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  total_2d_a            !< horizontal array to store the total domain data, used for atmosphere-ocean coupling (atmosphere data)
    605594    REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  total_2d_o            !< horizontal array to store the total domain data, used for atmosphere-ocean coupling (ocean data)
    606     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  ug_vert               !< vertical profile of geostrophic wind component in x-direction interpolated to vertical grid (large scale forcing)
    607     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  unudge                !< vertical profile of wind component in x-direction interpolated to vertical grid (nudging)
    608     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  vnudge                !< vertical profile of wind component in y-direction interpolated to vertical grid (nudging)
    609     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  vg_vert               !< vertical profile of geostrophic wind component in y-direction interpolated to vertical grid (large scale forcing)
    610     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  wnudge                !< vertical profile of subsidence/ascent velocity interpolated to vertical grid (nudging) ???
    611     REAL(wp), DIMENSION(:,:), ALLOCATABLE ::  wsubs_vert            !< vertical profile of wind component in z-direction interpolated to vertical grid (nudging) ???
    612595   
    613596    REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::  d          !< divergence
     
    10611044    INTEGER(iwp) ::  mg_switch_to_pe0_level = -1       !< namelist parameter
    10621045    INTEGER(iwp) ::  mid                               !< masked output running index
    1063     INTEGER(iwp) ::  nlsf = 1000                       !< maximum number of profiles in LSF_DATA (large scale forcing)
    1064     INTEGER(iwp) ::  ntnudge = 1000                    !< maximum number of profiles in NUDGING_DATA (nudging)
    10651046    INTEGER(iwp) ::  ngsrb = 2                         !< namelist parameter
    10661047    INTEGER(iwp) ::  nr_timesteps_this_run = 0         !< number of timesteps (cpu time measurements)
  • palm/trunk/SOURCE/palm.f90

    r2298 r2320  
    2525! -----------------
    2626! $Id$
     27! Modularize large-scale forcing and nudging
     28!
     29! 2298 2017-06-29 09:28:18Z raasch
    2730! type of write_binary changed from CHARACTER to LOGICAL,
    2831! user interface required revision updated, MPI2 related part removed
     
    207210        ONLY:  lsm_last_actions
    208211
    209     USE ls_forcing_mod,                                                        &
    210         ONLY:  init_ls_forcing
    211 
    212     USE nudge_mod,                                                             &
    213         ONLY:  init_nudge
    214 
    215212    USE particle_attributes,                                                   &
    216213        ONLY:  particle_advection
     
    330327!-- Generate grid parameters
    331328    CALL init_grid
    332 
    333 !
    334 !-- Initialize nudging if required
    335     IF ( nudging )  THEN
    336        CALL init_nudge
    337     ENDIF
    338 
    339 !
    340 !-- Initialize reading of large scale forcing from external file - if required
    341     IF ( large_scale_forcing )  THEN
    342        CALL init_ls_forcing
    343     ENDIF
    344329
    345330!
  • palm/trunk/SOURCE/prognostic_equations.f90

    r2292 r2320  
    2525! -----------------
    2626! $Id$
     27! Modularize large-scale forcing and nudging
     28!
     29! 2292 2017-06-20 09:51:42Z schwenkel
    2730! Implementation of new microphysic scheme: cloud_scheme = 'morrison'
    2831! includes two more prognostic equations for cloud drop concentration (nc) 
     
    325328    USE kinds
    326329
    327     USE ls_forcing_mod,                                                        &
    328         ONLY:  ls_advec
     330    USE lsf_nudging_mod,                                                       &
     331        ONLY:  ls_advec, nudge
    329332
    330333    USE microphysics_mod,                                                      &
    331334        ONLY:  microphysics_control
    332 
    333     USE nudge_mod,                                                             &
    334         ONLY:  nudge
    335335
    336336    USE plant_canopy_model_mod,                                                &
  • palm/trunk/SOURCE/read_var_list.f90

    r2265 r2320  
    2525! -----------------
    2626! $Id$
     27! Formatting adjustment
     28!
     29! 2265 2017-06-08 16:58:28Z schwenkel
    2730! Unused variables removed.
    2831!
     
    504507          CASE ( 'large_scale_forcing' )
    505508             READ ( 13 )  large_scale_forcing
    506            CASE ( 'large_scale_subsidence' )
     509          CASE ( 'large_scale_subsidence' )
    507510             READ ( 13 )  large_scale_subsidence
    508511          CASE ( 'limiter_sedimentation' )
  • palm/trunk/SOURCE/time_integration.f90

    r2311 r2320  
    343343               skip_time_do_lsm
    344344
    345     USE ls_forcing_mod,                                                        &
    346         ONLY:  ls_forcing_surf, ls_forcing_vert
     345    USE lsf_nudging_mod,                                                       &
     346        ONLY:  calc_tnudge, ls_forcing_surf, ls_forcing_vert, nudge_ref
    347347
    348348    USE microphysics_mod,                                                      &
    349349        ONLY: collision_turbulence
    350 
    351     USE nudge_mod,                                                             &
    352         ONLY:  calc_tnudge, nudge_ref
    353350
    354351    USE particle_attributes,                                                   &
     
    764761                 intermediate_timestep_count == intermediate_timestep_count_max )&
    765762             THEN
    766                 CALL ls_forcing_surf ( simulated_time )
     763                CALL ls_forcing_surf( simulated_time )
    767764             ENDIF
    768765
Note: See TracChangeset for help on using the changeset viewer.