Changeset 5675 for LMDZ6/trunk/libf


Ignore:
Timestamp:
May 23, 2025, 2:36:20 PM (4 weeks ago)
Author:
lguez
Message:

Allow saving input of ECRad

Setting do_save_inputs=t saves input of ECRad at the first time step
of physics, in a format expected by the ECRad offline program. This is
useful in particular to test ECRad offline with LMDZ aerosol types.

Location:
LMDZ6/trunk/libf/phylmd/ecrad/lmdz
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified LMDZ6/trunk/libf/phylmd/ecrad/lmdz/radiation_scheme_mod.f90

    r5655 r5675  
    6565
    6666USE mod_phys_lmdz_para
     67use geometry_mod, only: longitude_deg, latitude_deg
    6768
    6869IMPLICIT NONE
     
    260261  if (debut_ecrad) then
    261262   call SETUP_RADIATION_SCHEME(loutput,namelist_file,rad_config,driver_config)
    262    debut_ecrad=.false.
    263263  endif
    264264!$OMP END MASTER
     
    541541!    endif
    542542!   endif
     543if (debut_ecrad .and. driver_config%do_save_inputs) &
     544     call save_inputs('inputs.nc', rad_config, single_level, thermodynamics, &
     545     gas, cloud, aerosol, lat = latitude_deg, lon = longitude_deg)
     546
    543547CALL radiation(KLON, KLEV, KIDIA, KFDIA, rad_config, &
    544548     &  single_level, thermodynamics, gas, cloud, aerosol, flux)
     
    658662
    659663IF (LHOOK) CALL DR_HOOK('RADIATION_SCHEME',1,ZHOOK_HANDLE)
     664debut_ecrad=.false.
    660665
    661666END SUBROUTINE RADIATION_SCHEME
  • TabularUnified LMDZ6/trunk/libf/phylmd/ecrad/lmdz/setup_config_from_lmdz.f90

    r5268 r5675  
    2727     real(jprb) :: high_decorrelation_length = 2000.0_jprb
    2828
     29     ! Save inputs in "inputs.nc"
     30     logical :: do_save_inputs
    2931 contains
    3032 procedure :: read => read_config_from_namelist
     
    5759    real(jprb) :: mid_decorrelation_length
    5860    real(jprb) :: high_decorrelation_length
     61    logical :: do_save_inputs
    5962
    6063    namelist /radiation_driver/ ok_effective_size, ok_separation, &
     
    6366         &  high_inv_effective_size, middle_inv_effective_size, low_inv_effective_size, &
    6467         &  cloud_inhom_separation_factor, cloud_separation_scale_surface, &
    65          &  cloud_separation_scale_toa, cloud_separation_scale_power
     68         &  cloud_separation_scale_toa, cloud_separation_scale_power, &
     69         do_save_inputs
    6670
    6771    ok_effective_size = .false.
     
    8084    mid_decorrelation_length = 2000.0_jprb
    8185    high_decorrelation_length = 2000.0_jprb
     86    do_save_inputs = .false.
    8287
    8388    ! Open the namelist file and read the radiation_driver namelist
     
    118123    this%middle_inv_effective_size = middle_inv_effective_size
    119124    this%low_inv_effective_size = low_inv_effective_size
     125    this%do_save_inputs = do_save_inputs
    120126
    121127  end subroutine read_config_from_namelist         
Note: See TracChangeset for help on using the changeset viewer.