Changeset 3475


Ignore:
Timestamp:
Oct 30, 2018 9:16:31 PM (5 years ago)
Author:
kanani
Message:

Add option for using MRT from RTM instead of simplified global value

File:
1 edited

Legend:

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

    • Property svn:mergeinfo set to (toggle deleted branches)
      /palm/branches/chemistry/SOURCE/biometeorology_mod.f902047-3190,​3218-3297
      /palm/branches/resler/SOURCE/biometeorology_mod.f902023-3474
      /palm/branches/salsa/SOURCE/biometeorology_mod.f902503-3460
      /palm/branches/forwind/SOURCE/biometeorology_mod.f901564-1913
      /palm/branches/fricke/SOURCE/biometeorology_mod.f90942-977
      /palm/branches/hoffmann/SOURCE/biometeorology_mod.f90989-1052
      /palm/branches/letzel/masked_output/SOURCE/biometeorology_mod.f90296-409
      /palm/branches/palm4u/SOURCE/biometeorology_mod.f902540-2692
      /palm/branches/rans/SOURCE/biometeorology_mod.f902078-3128
      /palm/branches/suehring/biometeorology_mod.f90423-666
    r3464 r3475  
    2727! -----------------
    2828! $Id$
     29! Add option for using MRT from RTM instead of simplified global value
     30!
     31! 3464 2018-10-30 18:08:55Z kanani
    2932! From branch resler@3462, pavelkrc:
    3033! make use of basic_constants_and_equations_mod
     
    9194    USE radiation_model_mod,                                                   &
    9295       ONLY: ix, iy, iz, id, mrt_nlevels, mrt_include_sw,                      &
    93              mrtinsw, mrtinlw, mrtbl, nmrtbl, radiation, rad_sw_in,            &
     96             mrtinsw, mrtinlw, mrtbl, nmrtbl, radiation,                       &
     97             radiation_interactions, rad_sw_in,                                &
    9498             rad_sw_out, rad_lw_in, rad_lw_out
    9599
     
    130134    LOGICAL ::  average_trigger_pet  = .FALSE.  !< update averaged input on call to biom_pet?
    131135
     136    LOGICAL ::  mrt_from_rtm   = .TRUE.   !< switch: use mrt calculated by RTM for calculation of thermal indices
    132137    LOGICAL ::  biom_pt        = .TRUE.   !< Turn index PT (instant. input) on or off
    133138    LOGICAL ::  biom_pt_av     = .TRUE.   !< Turn index PT (averaged input) on or off
     
    539544       ENDIF
    540545
    541 
    542546 END SUBROUTINE biom_check_parameters
    543547
     
    871875 SUBROUTINE biom_init
    872876
     877    USE control_parameters,                                                 &
     878        ONLY: message_string
     879
    873880    IMPLICIT NONE
    874881
     
    888895    biom_cell_level = INT ( 1.099_wp / dz(1) )
    889896    biom_output_height = biom_output_height + biom_cell_level * dz(1)
     897
     898    IF ( .NOT. radiation_interactions .AND. mrt_from_rtm ) THEN
     899       message_string = 'The mrt_from_rtm switch require ' // &
     900                        'enabled radiation_interactions but it ' // &
     901                        'is disabled! Set mrt_from_rtm to .F.'
     902       CALL message( 'check_parameters', 'PAHU03', 0, 0, -1, 6, 0 )
     903       mrt_from_rtm = .FALSE.
     904    ENDIF
    890905
    891906 END SUBROUTINE biom_init
     
    961976    CHARACTER (LEN=80) ::  line  !< Dummy string for current line in parameter file
    962977
    963     NAMELIST /biometeorology_parameters/  biom_pet,                            &
     978    NAMELIST /biometeorology_parameters/  mrt_from_rtm,                        &
     979                                          biom_pet,                            &
    964980                                          biom_pet_av,                         &
    965981                                          biom_pt,                             &
     
    12571273    tmrt = ta
    12581274    IF ( radiation ) THEN
    1259        CALL calculate_tmrt_2_directions (rad_sw_in(0, j, i),                   &
    1260           rad_sw_out(0, j, i), rad_lw_in(0, j, i), rad_lw_out(0, j, i), ta,    &
    1261           tmrt )
     1275       IF ( mrt_from_rtm ) THEN
     1276          tmrt = tmrt_grid(j, i)
     1277       ELSE
     1278          CALL calculate_tmrt_2_directions (rad_sw_in(0, j, i),                &
     1279             rad_sw_out(0, j, i), rad_lw_in(0, j, i), rad_lw_out(0, j, i), ta, &
     1280             tmrt )
     1281       ENDIF
    12621282    ENDIF
    12631283
     
    12791299
    12801300!-- Internal variables
    1281     INTEGER(iwp) ::  i, j      !< Running index
     1301    INTEGER(iwp) ::  i, j, k, l   !< Running index
    12821302
    12831303    REAL(wp) ::  ta            !< Air temperature                  (°C)
     
    12931313    CALL biom_init_arrays
    12941314
     1315    IF ( mrt_from_rtm ) THEN
     1316       tmrt_grid = -999._wp
     1317       DO  l = 1, nmrtbl
     1318           i = mrtbl(ix,l)
     1319           j = mrtbl(iy,l)
     1320           k = mrtbl(iz,l)
     1321           IF ( k - get_topography_top_index_ji( j, i, 's' ) == 1  ) THEN
     1322              IF ( mrt_include_sw )  THEN
     1323                  tmrt_tmp = ((human_absorb*mrtinsw(l) + human_emiss*mrtinlw(l)) &
     1324                             / (human_emiss*sigma_sb)) ** .25_wp
     1325              ELSE
     1326                  tmrt_tmp = (human_emiss*mrtinlw(l) / sigma_sb) ** .25_wp
     1327              ENDIF
     1328              tmrt_grid(j, i) = tmrt_tmp - degc_to_k
     1329           ENDIF
     1330       ENDDO
     1331    ENDIF
     1332
    12951333    DO i = nxl, nxr
    12961334       DO j = nys, nyn
    12971335!--       Determine local input conditions
    12981336          CALL biom_determine_input_at ( average_input, i, j, ta, vp, ws,      &
    1299              pair, tmrt_tmp )
     1337               pair, tmrt_tmp )
    13001338          tmrt_grid(j, i) = tmrt_tmp
    13011339
Note: See TracChangeset for help on using the changeset viewer.