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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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 
Note: See TracChangeset for help on using the changeset viewer.