Ignore:
Timestamp:
Mar 19, 2024, 3:34:21 PM (2 months ago)
Author:
idelkadi
Message:

Ecrad update in LMDZ / Implementation of Ecrad double call in LMDZ

  • version 1.6.1 (commit 210d7911380f53a788c3cad73b3cf9b4e022ef87)
  • interface routines between lmdz and ecrad grouped in a new "lmdz" directory
  • double call method redesigned so as to go through the Ecrad initialization and configuration part only once for the entire simulation
  • clean-up in the read.F routine: delete unitules arguments
  • modification of default gas model in namelist (default: ECCKD)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/ecrad/radiation/radiation_general_cloud_optics_data.F90

    r4802 r4853  
    1515!
    1616
     17#include "ecrad_config.h"
     18
    1719module radiation_general_cloud_optics_data
    1820
     
    7375
    7476    use yomhook,                       only : lhook, dr_hook, jphook
    75     use easy_netcdf,                   only : netcdf_file
     77#ifdef EASY_NETCDF_READ_MPI
     78    use easy_netcdf_read_mpi, only : netcdf_file
     79#else
     80    use easy_netcdf,          only : netcdf_file
     81#endif
    7682    use radiation_spectral_definition, only : spectral_definition_type
    7783    use radiation_io,                  only : nulout, nulerr, radiation_abort
     
    181187
    182188    ! Thin averaging
    183 
    184     ! Circumvent ifort bug (see https://github.com/ecmwf-ifs/ecrad/issues/13):
    185     allocate(this%mass_ext(size(mapping, 1), nre))
    186 
    187189    this%mass_ext  = matmul(mapping, mass_ext)
    188190    this%ssa       = matmul(mapping, mass_ext*ssa) / this%mass_ext
     
    267269         &     scat_asymmetry ! Scattering optical depth x asymmetry factor
    268270
    269     real(jprb) :: od_local(ng)
     271    real(jprb) :: od_local
    270272
    271273    real(jprb) :: re_index, weight1, weight2
    272274    integer :: ire
    273275
    274     integer :: jcol, jlev
     276    integer :: jcol, jlev, jg
    275277
    276278    real(jphook) :: hook_handle
     
    287289            weight2 = re_index - ire
    288290            weight1 = 1.0_jprb - weight2
    289             od_local = water_path(jcol, jlev) * (weight1*this%mass_ext(:,ire) &
    290                  &                              +weight2*this%mass_ext(:,ire+1))
    291             od(:,jlev,jcol) = od(:,jlev,jcol) + od_local
    292             od_local = od_local * (weight1*this%ssa(:,ire) &
    293                  &                +weight2*this%ssa(:,ire+1))
    294             scat_od(:,jlev,jcol) = scat_od(:,jlev,jcol) + od_local
    295             scat_asymmetry(:,jlev,jcol) = scat_asymmetry(:,jlev,jcol) &
    296                  & + od_local * (weight1*this%asymmetry(:,ire) &
    297                  &              +weight2*this%asymmetry(:,ire+1))
     291            do jg = 1, ng
     292              od_local = water_path(jcol, jlev) * (weight1*this%mass_ext(jg,ire) &
     293                 &                                +weight2*this%mass_ext(jg,ire+1))
     294              od(jg,jlev,jcol) = od(jg,jlev,jcol) + od_local
     295              od_local = od_local * (weight1*this%ssa(jg,ire) &
     296                 &                  +weight2*this%ssa(jg,ire+1))
     297              scat_od(jg,jlev,jcol) = scat_od(jg,jlev,jcol) + od_local
     298              scat_asymmetry(jg,jlev,jcol) = scat_asymmetry(jg,jlev,jcol) &
     299                 & + od_local * (weight1*this%asymmetry(jg,ire) &
     300                 &              +weight2*this%asymmetry(jg,ire+1))
     301            end do
     302
    298303          end if
    299304        end do
Note: See TracChangeset for help on using the changeset viewer.