Changeset 4315 for palm/trunk/SOURCE


Ignore:
Timestamp:
Dec 2, 2019 9:20:07 AM (4 years ago)
Author:
monakurppa
Message:

salsa_mod: add additional check for time in PIDS_SALSA and update the urban_environment_salsa_salsa input file in the test case urban_environment_salsa

File:
1 edited

Legend:

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

    r4298 r4315  
    2626! -----------------
    2727! $Id$
     28! Add an additional check for the time dimension PIDS_SALSA in
     29! salsa_emission_setup and correct some error message identifiers.
     30!
     31! 4298 2019-11-21 15:59:16Z suehring
    2832! Bugfix, close netcdf input files after reading
    2933!
     
    297301    REAL(wp), PARAMETER ::  ambc     = 12.0E-3_wp     !< black carbon (BC)
    298302    REAL(wp), PARAMETER ::  amdair   = 28.970E-3_wp   !< dry air
    299     REAL(wp), PARAMETER ::  amdu     = 100.E-3_wp     !< mineral dust
     303    REAL(wp), PARAMETER ::  amdu     = 100.0E-3_wp    !< mineral dust
    300304    REAL(wp), PARAMETER ::  amh2o    = 18.0154E-3_wp  !< H2O
    301305    REAL(wp), PARAMETER ::  amh2so4  = 98.06E-3_wp    !< H2SO4
     
    305309    REAL(wp), PARAMETER ::  amo2     = 31.9988E-3_wp  !< O2
    306310    REAL(wp), PARAMETER ::  amo3     = 47.998E-3_wp   !< O3
    307     REAL(wp), PARAMETER ::  amoc     = 150.E-3_wp     !< organic carbon (OC)
     311    REAL(wp), PARAMETER ::  amoc     = 150.0E-3_wp    !< organic carbon (OC)
    308312    REAL(wp), PARAMETER ::  amss     = 58.44E-3_wp    !< sea salt (NaCl)
    309313!
     
    56545658    IF ( ptemp < 240.0_wp  .OR.  ptemp > 300.0_wp )  THEN
    56555659       message_string = 'Invalid input value: ptemp'
    5656        CALL message( 'salsa_mod: ternucl', 'PA0648', 1, 2, 0, 6, 0 )
     5660       CALL message( 'salsa_mod: ternucl', 'PA0689', 1, 2, 0, 6, 0 )
    56575661    ENDIF
    56585662    IF ( prh < 0.05_wp  .OR.  prh > 0.95_wp )  THEN
     
    86028606 SUBROUTINE salsa_emission_setup( init )
    86038607
     8608    USE control_parameters,                                                                        &
     8609        ONLY:  end_time, spinup_time
     8610
    86048611    USE netcdf_data_input_mod,                                                                     &
    86058612        ONLY:  check_existence, close_input_file, get_attribute, get_variable,                     &
     
    87008707                   WRITE( message_string, * ) 'salsa_emission_mode = "parameterized" but the '//  &
    87018708                                              'street_type data is missing.'
    8702                    CALL message( 'salsa_emission_setup', 'PA0661', 1, 2, 0, 6, 0 )
     8709                   CALL message( 'salsa_emission_setup', 'PA0695', 1, 2, 0, 6, 0 )
    87038710                ENDIF
    87048711             ENDIF
     
    88238830             ELSE
    88248831                message_string = 'Missing emission_mass_fracs in ' //  TRIM( input_file_salsa )
    8825                 CALL message( 'salsa_emission_setup', 'PA0659', 1, 2, 0, 6, 0 )
     8832                CALL message( 'salsa_emission_setup', 'PA0694', 1, 2, 0, 6, 0 )
    88268833             ENDIF
    88278834!
     
    90139020                ENDIF
    90149021!
     9022!--             Check if the provided data covers the entire simulation. The spinup time is added
     9023!--             to the end_time, this must be considered here.
     9024                IF ( end_time - spinup_time > aero_emission_att%time(aero_emission_att%nt-1) )  THEN
     9025                   message_string = 'end_time of the simulation exceeds the time dimension in ' // &
     9026                                    'the salsa input file.'
     9027                   CALL message( 'salsa_emission_setup', 'PA0692', 1, 2, 0, 6, 0 )
     9028                ENDIF
     9029!
    90159030!--             Read emission number fractions per category
    90169031                IF ( check_existence( aero_emission_att%var_names, 'emission_number_fracs' ) )  THEN
     
    90199034                ELSE
    90209035                   message_string = 'Missing emission_number_fracs in ' //  TRIM( input_file_salsa )
    9021                    CALL message( 'salsa_emission_setup', 'PA0659', 1, 2, 0, 6, 0 )
     9036                   CALL message( 'salsa_emission_setup', 'PA0694', 1, 2, 0, 6, 0 )
    90229037                ENDIF
    90239038
    90249039             ELSE
    90259040                message_string = 'Unknown lod for aerosol_emission_values.'
    9026                 CALL message( 'salsa_emission','PA0637', 1, 2, 0, 6, 0 )
     9041                CALL message( 'salsa_emission_setup','PA0637', 1, 2, 0, 6, 0 )
    90279042
    90289043             ENDIF  ! lod
     
    1254012555          message_string = 'end_time of the simulation exceeds the time dimension in the dynamic'//&
    1254112556                           ' input file.'
    12542           CALL message( 'salsa_nesting_offl_init', 'PA0681', 1, 2, 0, 6, 0 )
     12557          CALL message( 'salsa_nesting_offl_init', 'PA0690', 1, 2, 0, 6, 0 )
    1254312558       ENDIF
    1254412559
    1254512560       IF ( salsa_nest_offl%time(0) /= time_utc_init )  THEN
    1254612561          message_string = 'Offline nesting: time dimension must start at time_utc_init.'
    12547           CALL message( 'salsa_nesting_offl_init', 'PA0682', 1, 2, 0, 6, 0 )
     12562          CALL message( 'salsa_nesting_offl_init', 'PA0691', 1, 2, 0, 6, 0 )
    1254812563       ENDIF
    1254912564!
     
    1266912684!
    1267012685!--    Read the vertical dimension
    12671        CALL get_dimension_length( salsa_nest_offl%id_dynamic,                    &
    12672                                                     salsa_nest_offl%nzu, 'z' )
     12686       CALL get_dimension_length( salsa_nest_offl%id_dynamic, salsa_nest_offl%nzu, 'z' )
    1267312687       ALLOCATE( salsa_nest_offl%zu_atmos(1:salsa_nest_offl%nzu) )
    1267412688       CALL get_variable( salsa_nest_offl%id_dynamic, 'z', salsa_nest_offl%zu_atmos )
    1267512689!
    1267612690!--    Read the number of aerosol chemical components
    12677        CALL get_dimension_length( salsa_nest_offl%id_dynamic,                    &
    12678                                                     salsa_nest_offl%ncc, 'composition_index' )
     12691       CALL get_dimension_length( salsa_nest_offl%id_dynamic, salsa_nest_offl%ncc,                 &
     12692                                  'composition_index' )
    1267912693!
    1268012694!--    Read the names of aerosol chemical components
     
    1270412718          message_string = 'None of the aerosol chemical components in ' //                        &
    1270512719                           TRIM( input_file_dynamic ) // ' correspond to ones applied in SALSA.'
    12706           CALL message( 'salsa_mod: salsa_nesting_offl_input',                      &
    12707                         'PA0662', 2, 2, 0, 6, 0 )
     12720          CALL message( 'salsa_mod: salsa_nesting_offl_input', 'PA0693', 2, 2, 0, 6, 0 )
    1270812721       ENDIF
    1270912722       
Note: See TracChangeset for help on using the changeset viewer.