Changeset 3877 for palm/trunk/SOURCE


Ignore:
Timestamp:
Apr 8, 2019 7:09:16 PM (5 years ago)
Author:
knoop
Message:

Added chem_actions module interface to chemistry_model_mod and moved photolysis_control call into it

Location:
palm/trunk/SOURCE
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/Makefile

    r3876 r3877  
    866866        chem_gasphase_mod.o \
    867867        chem_modules.o \
     868        chem_photolysis_mod.o \
    868869        date_and_time_mod.o \
    869870        diffusion_s.o \
  • palm/trunk/SOURCE/chem_modules.f90

    r3876 r3877  
    8080!
    8181 MODULE chem_modules
    82 
    83     USE control_parameters,                                                    &
    84         ONLY: varnamelength
    8582
    8683    USE kinds
  • palm/trunk/SOURCE/chemistry_model_mod.f90

    r3876 r3877  
    300300         ONLY:  bc_lr_cyc, bc_ns_cyc, dt_3d, humidity, initializing_actions, message_string,       &
    301301         omega, tsc, intermediate_timestep_count, intermediate_timestep_count_max,                 &
    302          max_pr_user, timestep_scheme, use_prescribed_profile_data, ws_scheme_sca         
     302         max_pr_user, timestep_scheme, use_prescribed_profile_data, ws_scheme_sca, air_chemistry
    303303
    304304    USE arrays_3d,                                                                                 &
     
    310310
    311311    USE chem_modules
     312
     313    USE chem_photolysis_mod,                                                                       &
     314        ONLY:  photolysis_control
    312315
    313316    USE statistics
     
    478481    END INTERFACE chem_parin
    479482
     483    INTERFACE chem_actions
     484       MODULE PROCEDURE chem_actions
     485       MODULE PROCEDURE chem_actions_ij
     486    END INTERFACE chem_actions
     487
    480488    INTERFACE chem_prognostic_equations
    481489       MODULE PROCEDURE chem_prognostic_equations
     
    574582         chem_define_netcdf_grid, chem_header, chem_init, chem_init_arrays,   &
    575583         chem_init_profiles, chem_integrate, chem_parin,                      &
    576          chem_prognostic_equations, chem_rrd_local,                           &
     584         chem_actions, chem_prognostic_equations, chem_rrd_local,             &
    577585         chem_statistics, chem_swap_timelevel, chem_wrd_local, chem_depo
    578586
     
    10841092    USE arrays_3d
    10851093    USE control_parameters,                                                    &
    1086         ONLY:  air_chemistry, data_output_pr, message_string
     1094        ONLY:  data_output_pr, message_string
    10871095    USE indices
    10881096    USE profil_parameter
     
    22812289
    22822290 END SUBROUTINE chem_parin
     2291
     2292
     2293!------------------------------------------------------------------------------!
     2294! Description:
     2295! ------------
     2296!> Call for all grid points
     2297!------------------------------------------------------------------------------!
     2298    SUBROUTINE chem_actions( location )
     2299
     2300
     2301    CHARACTER (LEN=*), INTENT(IN) ::  location !< call location string
     2302
     2303    SELECT CASE ( location )
     2304
     2305       CASE ( 'before_prognostic_equations' )
     2306!
     2307!--       Chemical reactions and deposition
     2308          IF ( chem_gasphase_on ) THEN
     2309!
     2310!--          If required, calculate photolysis frequencies -
     2311!--          UNFINISHED: Why not before the intermediate timestep loop?
     2312             IF ( intermediate_timestep_count ==  1 )  THEN
     2313                CALL photolysis_control
     2314             ENDIF
     2315
     2316          ENDIF
     2317
     2318       CASE DEFAULT
     2319          CONTINUE
     2320
     2321    END SELECT
     2322
     2323    END SUBROUTINE chem_actions
     2324
     2325
     2326!------------------------------------------------------------------------------!
     2327! Description:
     2328! ------------
     2329!> Call for grid points i,j
     2330!------------------------------------------------------------------------------!
     2331
     2332    SUBROUTINE chem_actions_ij( i, j, location )
     2333
     2334
     2335    INTEGER(iwp),      INTENT(IN) ::  i         !< grid index in x-direction
     2336    INTEGER(iwp),      INTENT(IN) ::  j         !< grid index in y-direction
     2337    CHARACTER (LEN=*), INTENT(IN) ::  location  !< call location string
     2338    INTEGER(iwp)  ::  dummy  !< call location string
     2339
     2340    IF ( air_chemistry    )   dummy = i + j
     2341
     2342    SELECT CASE ( location )
     2343
     2344       CASE DEFAULT
     2345          CONTINUE
     2346
     2347    END SELECT
     2348
     2349
     2350    END SUBROUTINE chem_actions_ij
    22832351
    22842352 
  • palm/trunk/SOURCE/module_interface.f90

    r3875 r3877  
    166166              chem_init,                                                       &
    167167              chem_header,                                                     &
     168              chem_actions,                                                    &
    168169              chem_swap_timelevel,                                             &
    169170              chem_3d_data_averaging,                                          &
     
    889890
    890891    IF ( bulk_cloud_model    )  CALL bcm_actions( location )
     892    IF ( air_chemistry       )  CALL chem_actions( location )
    891893    IF ( gust_module_enabled )  CALL gust_actions( location )
    892894    IF ( ocean_mode          )  CALL ocean_actions( location )
     
    913915
    914916    IF ( bulk_cloud_model    )  CALL bcm_actions( i, j, location )
     917    IF ( air_chemistry       )  CALL chem_actions( i, j, location )
    915918    IF ( gust_module_enabled )  CALL gust_actions( i, j, location )
    916919    IF ( ocean_mode          )  CALL ocean_actions( i, j, location )
  • palm/trunk/SOURCE/prognostic_equations.f90

    r3876 r3877  
    394394        ONLY:  nspec, nvar, spc_names
    395395
    396     USE chem_photolysis_mod,                                                   &
    397         ONLY:  photolysis_control
    398 
    399396    USE chemistry_model_mod,                                                   &
    400397        ONLY:  chem_boundary_conds, chem_depo, chem_integrate,                 &
     
    536533!-- concentrations of chemical species                                   
    537534    IF ( air_chemistry )  THEN
    538        lsp_usr = 1
    539535!
    540536!--    Chemical reactions and deposition
    541537       IF ( chem_gasphase_on ) THEN
    542 !
    543 !--       If required, calculate photolysis frequencies -
    544 !--       UNFINISHED: Why not before the intermediate timestep loop?
    545           IF ( intermediate_timestep_count ==  1 )  THEN
    546              CALL photolysis_control
    547           ENDIF
    548538
    549539          IF ( intermediate_timestep_count == 1 .OR.                        &
Note: See TracChangeset for help on using the changeset viewer.