Ignore:
Timestamp:
Mar 31, 2023, 8:42:57 PM (17 months ago)
Author:
lguez
Message:

Merge LMDZ_ECRad branch back into trunk!

Location:
LMDZ6/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk

  • LMDZ6/trunk/libf/phylmd/ecrad/radiation_cloud_optics.F90

    r3908 r4489  
    1919
    2020  implicit none
     21
    2122  public
    2223
     
    271272    type(cloud_optics_type), pointer :: ho
    272273
    273     integer    :: jcol, jlev
     274    integer    :: jcol, jlev, jb
    274275
    275276    real(jprb) :: hook_handle
     
    345346            end if
    346347
     348            ! Delta-Eddington scaling in the shortwave only
    347349            if (.not. config%do_sw_delta_scaling_with_gases) then
    348               ! Delta-Eddington scaling in the shortwave only
    349350              call delta_eddington_scat_od(od_sw_liq, scat_od_sw_liq, g_sw_liq)
    350351            end if
     352            !call delta_eddington_scat_od(od_lw_liq, scat_od_lw_liq, g_lw_liq)
     353
    351354          else
    352355            ! Liquid not present: set properties to zero
     
    437440            end if
    438441
     442            ! Delta-Eddington scaling in both longwave and shortwave
     443            ! (assume that particles are larger than wavelength even
     444            ! in longwave)
    439445            if (.not. config%do_sw_delta_scaling_with_gases) then
    440               ! Delta-Eddington scaling in both longwave and shortwave
    441               ! (assume that particles are larger than wavelength even
    442               ! in longwave)
    443446              call delta_eddington_scat_od(od_sw_ice, scat_od_sw_ice, g_sw_ice)
    444447            end if
    445 
    446448            call delta_eddington_scat_od(od_lw_ice, scat_od_lw_ice, g_lw_ice)
     449
    447450          else
    448451            ! Ice not present: set properties to zero
     
    458461          ! Combine liquid and ice
    459462          if (config%do_lw_cloud_scattering) then
    460             od_lw_cloud(:,jlev,jcol) = od_lw_liq + od_lw_ice
    461             where (scat_od_lw_liq+scat_od_lw_ice > 0.0_jprb)
    462               g_lw_cloud(:,jlev,jcol) = (g_lw_liq * scat_od_lw_liq &
    463                    &  + g_lw_ice * scat_od_lw_ice) &
    464                    &  / (scat_od_lw_liq+scat_od_lw_ice)
    465             elsewhere
    466               g_lw_cloud(:,jlev,jcol) = 0.0_jprb
    467             end where
    468             ssa_lw_cloud(:,jlev,jcol) = (scat_od_lw_liq + scat_od_lw_ice) &
    469                  &                    / (od_lw_liq + od_lw_ice)
     463! Added for DWD (2020)
     464!NEC$ shortloop
     465            do jb = 1, config%n_bands_lw
     466              od_lw_cloud(jb,jlev,jcol) = od_lw_liq(jb) + od_lw_ice(jb)
     467              if (scat_od_lw_liq(jb)+scat_od_lw_ice(jb) > 0.0_jprb) then
     468                g_lw_cloud(jb,jlev,jcol) = (g_lw_liq(jb) * scat_od_lw_liq(jb) &
     469                   &  + g_lw_ice(jb) * scat_od_lw_ice(jb)) &
     470                   &  / (scat_od_lw_liq(jb)+scat_od_lw_ice(jb))
     471              else
     472                g_lw_cloud(jb,jlev,jcol) = 0.0_jprb
     473              end if
     474              ssa_lw_cloud(jb,jlev,jcol) = (scat_od_lw_liq(jb) + scat_od_lw_ice(jb)) &
     475                 &                    / (od_lw_liq(jb) + od_lw_ice(jb))
     476            end do
    470477          else
    471478            ! If longwave scattering is to be neglected then the
    472479            ! best approximation is to set the optical depth equal
    473480            ! to the absorption optical depth
    474             od_lw_cloud(:,jlev,jcol) = od_lw_liq - scat_od_lw_liq &
    475                  &                   + od_lw_ice - scat_od_lw_ice
     481! Added for DWD (2020)
     482!NEC$ shortloop
     483            do jb = 1, config%n_bands_lw
     484              od_lw_cloud(jb,jlev,jcol) = od_lw_liq(jb) - scat_od_lw_liq(jb) &
     485                    &                   + od_lw_ice(jb) - scat_od_lw_ice(jb)
     486            end do
    476487          end if
    477           od_sw_cloud(:,jlev,jcol) = od_sw_liq + od_sw_ice
    478           g_sw_cloud(:,jlev,jcol) = (g_sw_liq * scat_od_sw_liq &
    479                &  + g_sw_ice * scat_od_sw_ice) &
    480                &  / (scat_od_sw_liq + scat_od_sw_ice)
    481           ssa_sw_cloud(:,jlev,jcol) &
    482                &  = (scat_od_sw_liq + scat_od_sw_ice) / (od_sw_liq + od_sw_ice)
     488! Added for DWD (2020)
     489!NEC$ shortloop
     490          do jb = 1, config%n_bands_sw
     491            od_sw_cloud(jb,jlev,jcol) = od_sw_liq(jb) + od_sw_ice(jb)
     492            g_sw_cloud(jb,jlev,jcol) = (g_sw_liq(jb) * scat_od_sw_liq(jb) &
     493               &  + g_sw_ice(jb) * scat_od_sw_ice(jb)) &
     494               &  / (scat_od_sw_liq(jb) + scat_od_sw_ice(jb))
     495            ssa_sw_cloud(jb,jlev,jcol) &
     496               &  = (scat_od_sw_liq(jb) + scat_od_sw_ice(jb)) / (od_sw_liq(jb) + od_sw_ice(jb))
     497          end do
    483498        end if ! Cloud present
    484499      end do ! Loop over column
Note: See TracChangeset for help on using the changeset viewer.