Changeset 4897 for palm/trunk/SOURCE


Ignore:
Timestamp:
Mar 4, 2021 9:08:58 AM (4 years ago)
Author:
forkel
Message:

Few informative messages removed, small changes in comments and chemistry header

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/chemistry_model_mod.f90

    r4895 r4897  
    2626! -----------------
    2727! $Id$
     28! Few informative messages removed, small changes in comments and chemistry header
     29!
     30!
     31! 4895 2021-03-03 15:39:08Z suehring
    2832! Remove offset in terrain-following masked output
    2933!
     
    309313!> @todo Adjust chem_rrd_local to CASE structure of others modules. It is not allowed to use the
    310314!>       chemistry model in a precursor run and additionally not using it in a main run
    311 !> @todo Implement turbulent inflow of chem spcs in inflow_turbulence.
    312 !> @todo Separate boundary conditions for each chem spcs to be implemented
    313 !> @todo Currently only total concentration are calculated. Resolved, parameterized and chemistry
    314 !>       fluxes although partially and some completely coded but are not operational/activated in
    315 !>       this version. bK.
    316 !> @todo slight differences in passive scalar and chem spcs when chem reactions turned off. Need to
    317 !>       be fixed. bK
    318 !> @todo chemistry error messages
     315!> @todo Implement turbulent inflow of chem spcs in inflow_turbulence. Do we need this? Not done for salsa either.
    319316!
    320317!--------------------------------------------------------------------------------------------------!
     
    369366                message_string,                                                                    &
    370367                monotonic_limiter_z,                                                               &
     368                nesting_offline,                                                                   &
    371369                omega,                                                                             &
    372370                restart_data_format_output,                                                        &
     
    799797!--    Boundary condtions for chemical species at horizontal walls
    800798       DO  lsp = 1, nspec
    801 
    802           IF ( ibc_cs_b == 0 )  THEN
     799!
     800!--       Surface conditions:
     801          IF ( ibc_cs_b == 0 )  THEN    ! Dirichlet
     802!
     803!--          Run loop over all non-natural and natural walls. Note, in wall-datatype the k
     804!--          coordinate belongs to the atmospheric grid point, therefore, set s_p at k-1
    803805             DO  l = 0, 1
    804806                !$OMP PARALLEL DO PRIVATE( i, j, k )
     
    812814             ENDDO
    813815
    814           ELSEIF ( ibc_cs_b == 1 )  THEN
    815 !
    816 !--          In boundary_conds there is som extra loop over m here for passive tracer
    817 !>           TODO: clarify the meaning of the above comment. Explain in more detail or remove it. (Siggi)
     816          ELSEIF ( ibc_cs_b == 1 )  THEN     ! Neumann
     817!
    818818             DO  l = 0, 1
    819819                !$OMP PARALLEL DO PRIVATE( i, j, k )
     
    830830
    831831!
    832 !--    Top boundary conditions for chemical species - Should this not be done for all species?
    833 !>     TODO: This question also needs to be clarified. I guess it can be removed because the loop
    834 !>           already runs over all species? (Siggi)
     832!--    Top boundary conditions for chemical species
    835833       DO  lsp = 1, nspec
    836834          IF ( ibc_cs_t == 0 )  THEN
     
    12411239
    12421240!
    1243 !-- Check for chemical reactions status
    1244     IF ( chem_gasphase_on )  THEN
    1245        message_string = 'Chemical reactions: ON'
    1246        CALL message( 'chem_check_parameters', 'PA0517', 0, 0, 0, 6, 0 )
    1247     ELSEIF ( .NOT. ( chem_gasphase_on ) )  THEN
    1248        message_string = 'Chemical reactions: OFF'
    1249        CALL message( 'chem_check_parameters', 'PA0517', 0, 0, 0, 6, 0 )
    1250     ENDIF
    1251 !
    12521241!-- Check for chemistry time-step
    12531242    IF ( call_chem_at_all_substeps )  THEN
    1254        message_string = 'Chemistry is calculated at all meteorology time-step'
     1243       message_string =                                                                            &
     1244       'Warning: call_chem_at_all_substeps shoukld only be used for test purposes! '
    12551245       CALL message( 'chem_check_parameters', 'PA0522', 0, 0, 0, 6, 0 )
    1256     ELSEIF ( .NOT. ( call_chem_at_all_substeps ) )  THEN
    1257        message_string = 'Sub-time-steps are skipped for chemistry time-steps'
    1258        CALL message( 'chem_check_parameters', 'PA0518', 0, 0, 0, 6, 0 )
    12591246    ENDIF
    12601247!
     
    14051392!-- chem_check_parameters is called before the array chem_species is allocated!
    14061393!-- temporary switch of this part of the check
    1407 !    RETURN                !bK commented
    14081394!> TODO: this workaround definitely needs to be removed from here!!!
    14091395    CALL chem_init_internal
     
    18681854    ENDIF
    18691855!
    1870 !-- Chemistry time-step
    1871     WRITE ( io, 4 ) cs_time_step
    1872 !
    18731856!-- Emission mode info
     1857    WRITE ( io, 4 ) emiss_read_legacy_mode
    18741858!-- At the moment the evaluation is done with both emiss_lod and mode_emis but once salsa has been
    18751859!-- migrated to emiss_lod the .OR. mode_emis conditions can be removed (ecc 20190513)
     
    19221906
    19231907    IF ( nesting_chem )  WRITE( io, 12 )  nesting_chem
    1924     IF ( nesting_offline_chem )  WRITE( io, 13 )  nesting_offline_chem
     1908    IF ( nesting_offline_chem .AND. nesting_offline )  WRITE( io, 13 )  nesting_offline_chem
    19251909
    19261910    WRITE( io, 14 )  TRIM( bc_cs_b ), TRIM( bc_cs_t ), TRIM( bc_cs_s ), TRIM( bc_cs_n ),           &
     
    19301914!-- Number of variable and fix chemical species and number of reactions
    19311915    cs_fixed = nspec - nvar
    1932     WRITE ( io, * ) '   --> Chemical Mechanism        : ', cs_mech
    1933     WRITE ( io, * ) '   --> Chemical species, variable: ', nvar
    1934     WRITE ( io, * ) '   --> Chemical species, fixed   : ', cs_fixed
    1935     WRITE ( io, * ) '   --> Total number of reactions : ', nreact
     1916    WRITE ( io, * ) '   --> Chemical Mechanism          : ', cs_mech
     1917    WRITE ( io, * ) '   --> Chemical species, variable  : ', nvar
     1918    WRITE ( io, * ) '   --> Chemical species, fixed     : ', cs_fixed
     1919    WRITE ( io, * ) '   --> Total number of reactions   : ', nreact
     1920    WRITE ( io, * ) '   --> Gas phase chemistry solver  : ', icntrl(3)
     1921    WRITE ( io, * ) '   --> Vector length (vector mode if > 1): ', vl_dim
    19361922
    19371923
     
    193919252   FORMAT ('    --> Chemical reactions are turned on')
    194019263   FORMAT ('    --> Chemical reactions are turned off')
    1941 4   FORMAT ('    --> Time-step for chemical species: ',F6.2, ' s')
     19274   FORMAT ('    --> Legacy emission read mode: ',L3,/,                                            &
     1928            '        All emissions data will be loaded prior to start of simulation')
    194219295   FORMAT ('    --> Emission mode = DEFAULT ')
    1943 6   FORMAT ('    --> Emission mode = PARAMETERIZED ')
    1944 7   FORMAT ('    --> Emission mode = PRE-PROCESSED ')
     19306   FORMAT ('    --> Emission mode = PARAMETERIZED (LOD 0)')
     19317   FORMAT ('    --> Emission mode = PRE-PROCESSED (LOD 2)')
    194519328   FORMAT ('    --> Photolysis scheme used =  simple ')
    194619339   FORMAT ('    --> Photolysis scheme used =  constant ')
    1947193410  FORMAT (/'    ',A)
    1948193511  FORMAT (/'    ',A)
    1949 12  FORMAT (/'   Nesting for chemistry variables: ', L1 )
    1950 13  FORMAT (/'   Offline nesting for chemistry variables: ', L1 )
    1951 14  FORMAT (/'   Boundary conditions for chemical species:', /                                     &
    1952              '      bottom/top:   ',A10,' / ',A10, /                                               &
    1953              '      north/south:  ',A10,' / ',A10, /                                               &
    1954              '      left/right:   ',A10,' / ',A10)
     193612  FORMAT (/'    Self nesting for chemistry variables (if nested_run): ', L1 )
     193713  FORMAT (/'    Offline nesting for chemistry variables : ', L1 )
     193814  FORMAT (/'    Boundary conditions for chemical species:', /                                     &
     1939             '       bottom/top:   ',A10,' / ',A10, /                                               &
     1940             '       north/south:  ',A10,' / ',A10, /                                               &
     1941             '       left/right:   ',A10,' / ',A10)
    19551942
    19561943 END SUBROUTINE chem_header
     
    21262113
    21272114!
    2128 !-- For some passive scalars decycling may be enabled. This case, the lateral boundary conditions
    2129 !-- are non-cyclic for these scalars (chemical species and aerosols), while the other scalars may
    2130 !-- have cyclic boundary conditions. However, large gradients near the boundaries may produce
    2131 !-- stationary numerical oscillations near the lateral boundaries when a higher-order scheme is
     2115!-- For chemistry variables lateral boundary conditions can be set non-cyclic while
     2116!-- the other scalars may have cyclic boundary conditions.
     2117!-- However, large gradients near the boundaries may produce stationary numerical
     2118!-- oscillations near the lateral boundaries when a higher-order scheme is
    21322119!-- applied near these boundaries.
    21332120!-- To get rid-off this, set-up additional flags that control the order of the scalar advection
    2134 !-- scheme near the lateral boundaries for passive scalars with decycling.
     2121!-- scheme near the lateral boundaries for passive scalars with  non-cyclic bcs
    21352122    IF ( scalar_advec == 'ws-scheme' )  THEN
    21362123       ALLOCATE( cs_advc_flags_s(nzb:nzt+1,nysg:nyng,nxlg:nxrg) )
    21372124!
    2138 !--    In case of decyling, set Neumann boundary conditions for wall_flags_total_0 bit 31 instead of
    2139 !--    cyclic boundary conditions.
    2140 !--    Bit 31 is used to identify extended degradation zones (please see following comment).
     2125!--    In case of non-cyclic boundary conditions set wall_flags_total_0 bit 31
     2126!--    Bit 31 is used to identify extended degradation zones.
    21412127!--    Note, since several also other modules like Salsa or other future one may access this bit but
    21422128!--    may have other boundary conditions, the original value of wall_flags_total_0 bit 31 must not
     
    26132599
    26142600!
    2615 ! For reference (ecc)
    2616 !    IF ( (mode_emis /= 'PARAMETERIZED')  .AND. ( mode_emis /= 'DEFAULT' ) .AND. ( mode_emis /= 'PRE-PROCESSED'  ) )  THEN
    2617 !       message_string = 'Incorrect mode_emiss  option select. Please check spelling'
    2618 !       CALL message( 'chem_parin', 'PA0731', 1, 2, 0, 6, 0 )
    2619 !    ENDIF
    2620 
    2621 !
    26222601!-- Conflict resolution for emiss_lod and mode_emis
    26232602!-- 1) if emiss_lod is defined, have mode_emis assume same setting as emiss_lod
     
    26292608
    26302609          SELECT CASE  ( emiss_lod )
     2610!
     2611!-- Synchronize mode_emis to defined emiss_lod (mode_emis will be depreciated in future releases)
    26312612             CASE (0)  !- parameterized mode
    26322613                mode_emis = 'PARAMETERIZED'
     
    26362617                mode_emis = 'PRE-PROCESSED'
    26372618          END SELECT
    2638 
    2639           message_string = 'Synchronizing mode_emis to defined emiss_lod&'              //         &
    2640                            'NOTE - mode_emis will be depreciated in future releases&'   //         &
    2641                            'please use emiss_lod to define emission mode'
    2642           CALL message( 'chem_parin', 'PA0733', 0, 0, 0, 6, 0 )
    26432619
    26442620       ELSE ! if emiss_lod is not set
     
    27422718    END IF
    27432719
    2744 !
    2745 !--   todo: remove or replace by "CALL message" mechanism (kanani)
    2746 !       write(text,*) 'gas_phase chemistry: solver_type = ',TRIM( solver_type )
    2747 !kk    Has to be changed to right calling sequence
    2748 !        IF(myid == 0)  THEN
    2749 !           write(9,*) ' '
    2750 !           write(9,*) 'kpp setup '
    2751 !           write(9,*) ' '
    2752 !           write(9,*) '    gas_phase chemistry: solver_type = ',TRIM( solver_type )
    2753 !           write(9,*) ' '
    2754 !           write(9,*) '    Hstart  = ',rcntrl(3)
    2755 !           write(9,*) '    FacMin  = ',rcntrl(4)
    2756 !           write(9,*) '    FacMax  = ',rcntrl(5)
    2757 !           write(9,*) ' '
    2758 !           IF(vl_dim > 1)  THEN
    2759 !              write(9,*) '    Vector mode                   vektor length = ',vl_dim
    2760 !           ELSE
    2761 !              write(9,*) '    Scalar mode'
    2762 !           ENDIF
    2763 !           write(9,*) ' '
    2764 !        END IF
    2765 
    27662720    RETURN
    27672721
     
    28932847!
    28942848!-- Calculation of chemical reactions and deposition.
    2895 !-- !> TODO
    2896 !-- WARNING: time measurements within i,j loops degrade performance because cpu-log routine is
    2897 !--          called extremely often. Furthermore, because of that, the counter for this measurement
    2898 !--          will get an extremely huge value, too.
    2899 !--          Should be removed, because in other _ij routines no measurements are done because of
    2900 !--          the reasons given above.
     2849!-- It would have been nice to have time measurements for chemistry and deposition here.
     2850!-- Unfortunately measurements within i,j loops degrade performance ince they are calles so often
     2851!-- and the counter for this measurement gets extremely huge values. Therefore, no measurements here.
    29012852    IF ( intermediate_timestep_count == 1  .OR.  call_chem_at_all_substeps )  THEN
    29022853
    29032854       IF ( chem_gasphase_on )  THEN
    29042855          !$OMP MASTER
    2905           CALL cpu_log( log_point_s(19), 'chem.reactions', 'start' )
    29062856          !$OMP END MASTER
    29072857          CALL chem_integrate( i, j )
    29082858          !$OMP MASTER
    2909           CALL cpu_log( log_point_s(19), 'chem.reactions', 'stop' )
    29102859          !$OMP END MASTER
    29112860       ENDIF
     
    29132862       IF ( deposition_dry )  THEN
    29142863          !$OMP MASTER
    2915           CALL cpu_log( log_point_s(24), 'chem.deposition', 'start' )
    29162864          !$OMP END MASTER
    29172865          CALL chem_depo( i, j )
    29182866          !$OMP MASTER
    2919           CALL cpu_log( log_point_s(24), 'chem.deposition', 'stop' )
    29202867          !$OMP END MASTER
    29212868       ENDIF
Note: See TracChangeset for help on using the changeset viewer.