diff --git a/schemes/rrtmgp/rrtmgp_inputs_setup.F90 b/schemes/rrtmgp/rrtmgp_inputs_setup.F90 index 3d711219..061b6db4 100644 --- a/schemes/rrtmgp/rrtmgp_inputs_setup.F90 +++ b/schemes/rrtmgp/rrtmgp_inputs_setup.F90 @@ -3,25 +3,81 @@ module rrtmgp_inputs_setup implicit none private + public :: rrtmgp_inputs_setup_register public :: rrtmgp_inputs_setup_init contains -!> \section arg_table_rrtmgp_inputs_setup_init Argument Table -!! \htmlinclude rrtmgp_inputs_setup_init.html +!> \section arg_table_rrtmgp_inputs_setup_register Argument Table +!! \htmlinclude rrtmgp_inputs_setup_register.html !! - subroutine rrtmgp_inputs_setup_init(nswbands, nlwbands, pref_edge, pver, pverp, kdist_sw, & - kdist_lw, qrl, is_first_step, use_rad_dt_cosz, timestep_size, nstep, iradsw, dt_avg, & - irad_always, is_first_restart_step, p_top_for_rrtmgp, nradgas, gasnamelength, current_cal_day, & - ktopcam, ktoprad, nlaycam, sw_low_bounds, sw_high_bounds, idx_sw_diag, idx_nir_diag, & - idx_uv_diag, idx_sw_cloudsim, idx_lw_diag, idx_lw_cloudsim, nswgpts, nlwgpts, changeseed, & - nlay, nlayp, nextsw_cday, band2gpt_sw, irad_always_out, errmsg, errflg) + subroutine rrtmgp_inputs_setup_register(kdist_sw, kdist_lw, nswbands, nlwbands, nswgpts, nlwgpts, & + sw_low_bounds, sw_high_bounds, idx_sw_diag, idx_nir_diag, idx_uv_diag, idx_sw_cloudsim, & + idx_lw_diag, idx_lw_cloudsim, band2gpt_sw, changeseed, errmsg, errflg) use ccpp_kinds, only: kind_phys use ccpp_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp_ccpp - use radiation_utils, only: radiation_utils_init, get_sw_spectral_boundaries_ccpp + use radiation_utils, only: radiation_utils_register, get_sw_spectral_boundaries_ccpp - ! Inputs integer, intent(in) :: nswbands integer, intent(in) :: nlwbands ! Number of longwave bands + type(ty_gas_optics_rrtmgp_ccpp), intent(in) :: kdist_sw ! Shortwave gas optics object + type(ty_gas_optics_rrtmgp_ccpp), intent(in) :: kdist_lw ! Longwave gas optics object + integer, intent(out) :: nlwgpts ! Number of longwave g-points + integer, intent(out) :: nswgpts ! Number of shortwave g-points + ! Indices to specific bands for diagnostic output and COSP input + integer, intent(out) :: idx_sw_diag ! Index of band containing 500-nm wave + integer, intent(out) :: idx_nir_diag ! Index of band containing 1000-nm wave + integer, intent(out) :: idx_uv_diag ! Index of band containing 400-nm wave + integer, intent(out) :: idx_sw_cloudsim ! Index of band for shortwave cosp diagnostics + integer, intent(out) :: idx_lw_diag ! Index of band containing 1000-cm-1 wave (H2O window) + integer, intent(out) :: idx_lw_cloudsim ! Index of band for longwave cosp diagnostics + integer, intent(out) :: changeseed + integer, dimension(:,:), intent(out) :: band2gpt_sw ! Array for converting shortwave band limits to g-points + real(kind_phys), dimension(:), intent(out) :: sw_low_bounds ! Lower bounds of shortwave bands + real(kind_phys), dimension(:), intent(out) :: sw_high_bounds ! Upper bounds of shortwave bands + character(len=*), intent(out) :: errmsg + integer, intent(out) :: errflg + ! Local variables + real(kind_phys), target :: wavenumber_low_shortwave(nswbands) + real(kind_phys), target :: wavenumber_high_shortwave(nswbands) + real(kind_phys), target :: wavenumber_low_longwave(nlwbands) + real(kind_phys), target :: wavenumber_high_longwave(nlwbands) + + ! Set the sw/lw band boundaries in radconstants. Also sets + ! indicies of specific bands for diagnostic output and COSP input. + call set_wavenumber_bands(kdist_sw, kdist_lw, nswbands, nlwbands, idx_sw_diag, idx_nir_diag, & + idx_uv_diag, idx_sw_cloudsim, idx_lw_diag, idx_lw_cloudsim, nswgpts, nlwgpts, & + wavenumber_low_shortwave, wavenumber_high_shortwave, wavenumber_low_longwave, & + wavenumber_high_longwave, band2gpt_sw, errmsg, errflg) + if (errflg /= 0) then + return + end if + + call radiation_utils_register(nswbands, nlwbands, wavenumber_low_shortwave, wavenumber_high_shortwave, & + wavenumber_low_longwave, wavenumber_high_longwave, errmsg, errflg) + if (errflg /= 0) then + return + end if + + ! Initialize the SW band boundaries + call get_sw_spectral_boundaries_ccpp(sw_low_bounds, sw_high_bounds, 'cm-1', errmsg, errflg) + if (errflg /= 0) then + return + end if + changeseed = nlwgpts + + end subroutine rrtmgp_inputs_setup_register + + +!> \section arg_table_rrtmgp_inputs_setup_init Argument Table +!! \htmlinclude rrtmgp_inputs_setup_init.html +!! + subroutine rrtmgp_inputs_setup_init(pref_edge, pver, pverp, qrl, is_first_step, & + use_rad_dt_cosz, timestep_size, nstep, iradsw, dt_avg, irad_always, is_first_restart_step, & + p_top_for_rrtmgp, nradgas, gasnamelength, current_cal_day, ktopcam, ktoprad, nlaycam, & + nlay, nlayp, nextsw_cday, irad_always_out, errmsg, errflg) + use ccpp_kinds, only: kind_phys + + ! Inputs integer, intent(in) :: nradgas ! Number of radiatively active gases integer, intent(in) :: pverp ! Number of vertical interfaces integer, intent(in) :: pver ! Number of vertical layers @@ -32,8 +88,6 @@ subroutine rrtmgp_inputs_setup_init(nswbands, nlwbands, pref_edge, pver, pverp, real(kind_phys), intent(in) :: timestep_size ! Timestep size (s) real(kind_phys), intent(in) :: current_cal_day ! Current calendar day real(kind_phys), dimension(:), intent(in) :: pref_edge ! Reference pressures (interfaces) (Pa) - type(ty_gas_optics_rrtmgp_ccpp), intent(in) :: kdist_sw ! Shortwave gas optics object - type(ty_gas_optics_rrtmgp_ccpp), intent(in) :: kdist_lw ! Longwave gas optics object logical, intent(in) :: is_first_step ! Flag for whether this is the first timestep (.true. = yes) logical, intent(in) :: is_first_restart_step ! Flag for whether this is the first restart step (.true. = yes) logical, intent(in) :: use_rad_dt_cosz ! Use adjusted radiation timestep for cosz calculation @@ -46,33 +100,14 @@ subroutine rrtmgp_inputs_setup_init(nswbands, nlwbands, pref_edge, pver, pverp, ! or is 1 less than nlay if "extra layer" is used in the radiation calculations integer, intent(out) :: nlay ! Number of vertical layers in radiation calculation integer, intent(out) :: nlayp ! Number of vertical interfaces in radiation calculations (nlay + 1) - ! Indices to specific bands for diagnostic output and COSP input - integer, intent(out) :: idx_sw_diag ! Index of band containing 500-nm wave - integer, intent(out) :: idx_nir_diag ! Index of band containing 1000-nm wave - integer, intent(out) :: idx_uv_diag ! Index of band containing 400-nm wave - integer, intent(out) :: idx_sw_cloudsim ! Index of band for shortwave cosp diagnostics - integer, intent(out) :: idx_lw_diag ! Index of band containing 1000-cm-1 wave (H2O window) - integer, intent(out) :: idx_lw_cloudsim ! Index of band for longwave cosp diagnostics - integer, intent(out) :: nswgpts ! Number of shortwave g-points - integer, intent(out) :: nlwgpts ! Number of longwave g-points - integer, intent(out) :: changeseed ! Random number seed for mcica longwave - integer, dimension(:,:), intent(out) :: band2gpt_sw ! Array for converting shortwave band limits to g-points real(kind_phys), intent(out) :: nextsw_cday ! The next calendar day during which the shortwave radiation calculation will be performed - real(kind_phys), dimension(:), intent(out) :: sw_low_bounds ! Lower bounds of shortwave bands - real(kind_phys), dimension(:), intent(out) :: sw_high_bounds ! Upper bounds of shortwave bands real(kind_phys), dimension(:,:), intent(inout) :: qrl ! Longwave radiative heating character(len=*), intent(out) :: errmsg integer, intent(out) :: errflg integer, intent(out) :: irad_always_out ! Number of time steps to execute radiation continuously real(kind_phys), intent(out) :: dt_avg ! averaging time interval for zenith angle - ! Local variables - real(kind_phys), target :: wavenumber_low_shortwave(nswbands) - real(kind_phys), target :: wavenumber_high_shortwave(nswbands) - real(kind_phys), target :: wavenumber_low_longwave(nlwbands) - real(kind_phys), target :: wavenumber_high_longwave(nlwbands) - ! Set error variables errflg = 0 errmsg = '' @@ -98,28 +133,6 @@ subroutine rrtmgp_inputs_setup_init(nswbands, nlwbands, pref_edge, pver, pverp, nlaycam = nlay end if - ! Set the sw/lw band boundaries in radconstants. Also sets - ! indicies of specific bands for diagnostic output and COSP input. - call set_wavenumber_bands(kdist_sw, kdist_lw, nswbands, nlwbands, idx_sw_diag, idx_nir_diag, & - idx_uv_diag, idx_sw_cloudsim, idx_lw_diag, idx_lw_cloudsim, nswgpts, nlwgpts, & - wavenumber_low_shortwave, wavenumber_high_shortwave, wavenumber_low_longwave, & - wavenumber_high_longwave, band2gpt_sw, errmsg, errflg) - if (errflg /= 0) then - return - end if - - call radiation_utils_init(nswbands, nlwbands, wavenumber_low_shortwave, wavenumber_high_shortwave, & - wavenumber_low_longwave, wavenumber_high_longwave, errmsg, errflg) - if (errflg /= 0) then - return - end if - - ! Initialize the SW band boundaries - call get_sw_spectral_boundaries_ccpp(sw_low_bounds, sw_high_bounds, 'cm-1', errmsg, errflg) - if (errflg /= 0) then - return - end if - if (is_first_step) then qrl = 0._kind_phys end if @@ -149,8 +162,6 @@ subroutine rrtmgp_inputs_setup_init(nswbands, nlwbands, pref_edge, pver, pverp, nextsw_cday = current_cal_day end if - changeseed = nlwgpts - end subroutine rrtmgp_inputs_setup_init !========================================================================================= diff --git a/schemes/rrtmgp/rrtmgp_inputs_setup.meta b/schemes/rrtmgp/rrtmgp_inputs_setup.meta index df5f5822..eae3cb10 100644 --- a/schemes/rrtmgp/rrtmgp_inputs_setup.meta +++ b/schemes/rrtmgp/rrtmgp_inputs_setup.meta @@ -4,7 +4,7 @@ dependencies = ./utils/radiation_utils.F90 [ccpp-arg-table] - name = rrtmgp_inputs_setup_init + name = rrtmgp_inputs_setup_register type = scheme [ nswbands ] standard_name = number_of_bands_for_shortwave_radiation @@ -18,6 +18,108 @@ type = integer dimensions = () intent = in +[ kdist_sw ] + standard_name = shortwave_gas_optics_object_for_RRTMGP + units = none + type = ty_gas_optics_rrtmgp_ccpp + dimensions = () + intent = in +[ kdist_lw ] + standard_name = longwave_gas_optics_object_for_RRTMGP + units = none + type = ty_gas_optics_rrtmgp_ccpp + dimensions = () + intent = in +[ sw_low_bounds ] + standard_name = min_shortwave_wavenumber_per_band + units = cm-1 + type = real | kind = kind_phys + dimensions = (number_of_bands_for_shortwave_radiation) + intent = out +[ sw_high_bounds ] + standard_name = max_shortwave_wavenumber_per_band + units = cm-1 + type = real | kind = kind_phys + dimensions = (number_of_bands_for_shortwave_radiation) + intent = out +[ idx_sw_diag ] + standard_name = index_of_shortwave_band + units = index + type = integer + dimensions = () + intent = out +[ idx_nir_diag ] + standard_name = index_of_near_IR_band + units = index + type = integer + dimensions = () + intent = out +[ idx_uv_diag ] + standard_name = index_of_UV_band + units = index + type = integer + dimensions = () + intent = out +[ idx_sw_cloudsim ] + standard_name = index_of_shortwave_band_for_COSP + units = index + type = integer + dimensions = () + intent = out +[ idx_lw_diag ] + standard_name = index_of_longwave_band + units = index + type = integer + dimensions = () + intent = out +[ idx_lw_cloudsim ] + standard_name = index_of_longwave_band_for_COSP + units = index + type = integer + dimensions = () + intent = out +[ nswgpts ] + standard_name = number_of_shortwave_g_point_intervals + units = count + type = integer + dimensions = () + intent = out +[ nlwgpts ] + standard_name = number_of_longwave_g_point_intervals + units = count + type = integer + dimensions = () + intent = out +[ band2gpt_sw ] + standard_name = shortwave_start_and_end_gpoint_for_each_band + units = index + type = integer + dimensions = (constant_dimension_two,number_of_bands_for_shortwave_radiation) + intent = out +[ changeseed ] + standard_name = random_number_seed_for_mcica_longwave + units = 1 + type = integer + dimensions = () + intent = out +[ errmsg ] + standard_name = ccpp_error_message + long_name = Error message for error handling in CCPP + units = none + type = character | kind = len=* + dimensions = () + intent = out +[ errflg ] + standard_name = ccpp_error_code + long_name = Error flag for error handling in CCPP + units = 1 + type = integer + dimensions = () + intent = out + +[ccpp-arg-table] + name = rrtmgp_inputs_setup_init + type = scheme [ pref_edge ] standard_name = reference_pressure_at_interface units = Pa @@ -36,18 +138,6 @@ type = integer dimensions = () intent = in -[ kdist_sw ] - standard_name = shortwave_gas_optics_object_for_RRTMGP - units = none - type = ty_gas_optics_rrtmgp_ccpp - dimensions = () - intent = in -[ kdist_lw ] - standard_name = longwave_gas_optics_object_for_RRTMGP - units = none - type = ty_gas_optics_rrtmgp_ccpp - dimensions = () - intent = in [ qrl ] standard_name = tendency_of_dry_air_enthalpy_at_constant_pressure_due_to_longwave_radiation_adjusted_by_air_pressure_thickness units = J Pa kg-1 s-1 @@ -144,72 +234,6 @@ type = integer dimensions = () intent = out -[ sw_low_bounds ] - standard_name = min_shortwave_wavenumber_per_band - units = cm-1 - type = real | kind = kind_phys - dimensions = (number_of_bands_for_shortwave_radiation) - intent = out -[ sw_high_bounds ] - standard_name = max_shortwave_wavenumber_per_band - units = cm-1 - type = real | kind = kind_phys - dimensions = (number_of_bands_for_shortwave_radiation) - intent = out -[ idx_sw_diag ] - standard_name = index_of_shortwave_band - units = index - type = integer - dimensions = () - intent = out -[ idx_nir_diag ] - standard_name = index_of_near_IR_band - units = index - type = integer - dimensions = () - intent = out -[ idx_uv_diag ] - standard_name = index_of_UV_band - units = index - type = integer - dimensions = () - intent = out -[ idx_sw_cloudsim ] - standard_name = index_of_shortwave_band_for_COSP - units = index - type = integer - dimensions = () - intent = out -[ idx_lw_diag ] - standard_name = index_of_longwave_band - units = index - type = integer - dimensions = () - intent = out -[ idx_lw_cloudsim ] - standard_name = index_of_longwave_band_for_COSP - units = index - type = integer - dimensions = () - intent = out -[ nswgpts ] - standard_name = number_of_shortwave_g_point_intervals - units = count - type = integer - dimensions = () - intent = out -[ nlwgpts ] - standard_name = number_of_longwave_g_point_intervals - units = count - type = integer - dimensions = () - intent = out -[ changeseed ] - standard_name = random_number_seed_for_mcica_longwave - units = 1 - type = integer - dimensions = () - intent = out [ nlay ] standard_name = number_of_vertical_layers_in_RRTMGP units = count @@ -228,12 +252,6 @@ type = real | kind = kind_phys dimensions = () intent = out -[ band2gpt_sw ] - standard_name = shortwave_start_and_end_gpoint_for_each_band - units = index - type = integer - dimensions = (constant_dimension_two,number_of_bands_for_shortwave_radiation) - intent = out [ irad_always_out ] standard_name = number_of_timesteps_to_force_radiation_calculation_after_initialization units = count diff --git a/schemes/rrtmgp/rrtmgp_lw_gas_optics.F90 b/schemes/rrtmgp/rrtmgp_lw_gas_optics.F90 index 5f258010..6db96707 100644 --- a/schemes/rrtmgp/rrtmgp_lw_gas_optics.F90 +++ b/schemes/rrtmgp/rrtmgp_lw_gas_optics.F90 @@ -7,15 +7,15 @@ module rrtmgp_lw_gas_optics implicit none private - public :: rrtmgp_lw_gas_optics_init + public :: rrtmgp_lw_gas_optics_register public :: rrtmgp_lw_gas_optics_run contains -!> \section arg_table_rrtmgp_lw_gas_optics_init Argument Table -!! \htmlinclude rrtmgp_lw_gas_optics_init.html +!> \section arg_table_rrtmgp_lw_gas_optics_register Argument Table +!! \htmlinclude rrtmgp_lw_gas_optics_register.html !! - subroutine rrtmgp_lw_gas_optics_init(lw_filename, available_gases, kdist, & + subroutine rrtmgp_lw_gas_optics_register(lw_filename, available_gases, kdist, & errmsg, errflg) use ccpp_kinds, only: kind_phys use ccpp_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp_ccpp @@ -304,13 +304,13 @@ subroutine rrtmgp_lw_gas_optics_init(lw_filename, available_gases, kdist, & totplnk, planck_frac, rayl_lower_allocatable, rayl_upper_allocatable, & optimal_angle_fit) - call check_error_msg('rrtmgp_lw_gas_optics_init_load', errmsg) + call check_error_msg('rrtmgp_lw_gas_optics_register_load', errmsg) if (len_trim(errmsg) > 0) then errflg = 1 return end if - end subroutine rrtmgp_lw_gas_optics_init + end subroutine rrtmgp_lw_gas_optics_register !> \section arg_table_rrtmgp_lw_gas_optics_run Argument Table !! \htmlinclude rrtmgp_lw_gas_optics_run.html diff --git a/schemes/rrtmgp/rrtmgp_lw_gas_optics.meta b/schemes/rrtmgp/rrtmgp_lw_gas_optics.meta index 7df76095..0b1a4ab3 100644 --- a/schemes/rrtmgp/rrtmgp_lw_gas_optics.meta +++ b/schemes/rrtmgp/rrtmgp_lw_gas_optics.meta @@ -13,7 +13,7 @@ # END IF [ccpp-arg-table] - name = rrtmgp_lw_gas_optics_init + name = rrtmgp_lw_gas_optics_register type = scheme [ lw_filename ] standard_name = filename_of_rrtmgp_longwave_k_distribution diff --git a/schemes/rrtmgp/rrtmgp_pre.F90 b/schemes/rrtmgp/rrtmgp_pre.F90 index 82820574..fcf2c189 100644 --- a/schemes/rrtmgp/rrtmgp_pre.F90 +++ b/schemes/rrtmgp/rrtmgp_pre.F90 @@ -2,17 +2,17 @@ module rrtmgp_pre implicit none private - public :: rrtmgp_pre_init + public :: rrtmgp_pre_register public :: rrtmgp_pre_timestep_init public :: rrtmgp_pre_run public :: radiation_do_ccpp ! Public because it needs to be accessed elsewhere in CAM CONTAINS -!> \section arg_table_rrtmgp_pre_init Argument Table -!! \htmlinclude rrtmgp_pre_init.html +!> \section arg_table_rrtmgp_pre_register Argument Table +!! \htmlinclude rrtmgp_pre_register.html !! - subroutine rrtmgp_pre_init(nradgas, available_gases, gaslist, gaslist_lc, errmsg, errflg) + subroutine rrtmgp_pre_register(nradgas, available_gases, gaslist, gaslist_lc, errmsg, errflg) use ccpp_gas_concentrations, only: ty_gas_concs_ccpp use atmos_phys_string_utils, only: to_lower integer, intent(in) :: nradgas ! Number of radiatively active gases @@ -41,7 +41,7 @@ subroutine rrtmgp_pre_init(nradgas, available_gases, gaslist, gaslist_lc, errmsg errflg = 1 end if - end subroutine rrtmgp_pre_init + end subroutine rrtmgp_pre_register !> \section arg_table_rrtmgp_pre_timestep_init Argument Table !! \htmlinclude rrtmgp_pre_timestep_init.html diff --git a/schemes/rrtmgp/rrtmgp_pre.meta b/schemes/rrtmgp/rrtmgp_pre.meta index 8cfe0f1e..bc022c6c 100644 --- a/schemes/rrtmgp/rrtmgp_pre.meta +++ b/schemes/rrtmgp/rrtmgp_pre.meta @@ -4,7 +4,7 @@ dependencies = ./objects/ccpp_fluxes_byband.F90 [ccpp-arg-table] - name = rrtmgp_pre_init + name = rrtmgp_pre_register type = scheme [ nradgas ] standard_name = number_of_active_gases_for_RRTMGP diff --git a/schemes/rrtmgp/rrtmgp_sw_gas_optics.F90 b/schemes/rrtmgp/rrtmgp_sw_gas_optics.F90 index 6191e7b6..ee59df16 100644 --- a/schemes/rrtmgp/rrtmgp_sw_gas_optics.F90 +++ b/schemes/rrtmgp/rrtmgp_sw_gas_optics.F90 @@ -7,14 +7,14 @@ module rrtmgp_sw_gas_optics implicit none private - public :: rrtmgp_sw_gas_optics_init + public :: rrtmgp_sw_gas_optics_register public :: rrtmgp_sw_gas_optics_run contains -!> \section arg_table_rrtmgp_sw_gas_optics_init Argument Table -!! \htmlinclude rrtmgp_sw_gas_optics_init.html +!> \section arg_table_rrtmgp_sw_gas_optics_register Argument Table +!! \htmlinclude rrtmgp_sw_gas_optics_register.html !! - subroutine rrtmgp_sw_gas_optics_init(sw_filename, available_gases, kdist, & + subroutine rrtmgp_sw_gas_optics_register(sw_filename, available_gases, kdist, & errmsg, errflg) use ccpp_kinds, only: kind_phys use ccpp_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp_ccpp @@ -320,13 +320,13 @@ subroutine rrtmgp_sw_gas_optics_init(sw_filename, available_gases, kdist, & tsi_default, mg_default, sb_default, & rayl_lower_allocatable, rayl_upper_allocatable) - call check_error_msg('rrtmgp_sw_gas_optics_init_load', errmsg) + call check_error_msg('rrtmgp_sw_gas_optics_register_load', errmsg) if (len_trim(errmsg) > 0) then errflg = 1 return end if - end subroutine rrtmgp_sw_gas_optics_init + end subroutine rrtmgp_sw_gas_optics_register !> \section arg_table_rrtmgp_sw_gas_optics_run Argument Table !! \htmlinclude rrtmgp_sw_gas_optics_run.html diff --git a/schemes/rrtmgp/rrtmgp_sw_gas_optics.meta b/schemes/rrtmgp/rrtmgp_sw_gas_optics.meta index 03771c44..3f52cb86 100644 --- a/schemes/rrtmgp/rrtmgp_sw_gas_optics.meta +++ b/schemes/rrtmgp/rrtmgp_sw_gas_optics.meta @@ -11,7 +11,7 @@ # END IF [ccpp-arg-table] - name = rrtmgp_sw_gas_optics_init + name = rrtmgp_sw_gas_optics_register type = scheme [ sw_filename ] standard_name = filename_of_rrtmgp_shortwave_k_distribution diff --git a/schemes/rrtmgp/utils/radiation_utils.F90 b/schemes/rrtmgp/utils/radiation_utils.F90 index 09cadb33..71c7ea7f 100644 --- a/schemes/rrtmgp/utils/radiation_utils.F90 +++ b/schemes/rrtmgp/utils/radiation_utils.F90 @@ -4,7 +4,7 @@ module radiation_utils implicit none private - public :: radiation_utils_init + public :: radiation_utils_register public :: get_sw_spectral_boundaries_ccpp public :: get_lw_spectral_boundaries_ccpp public :: get_mu_lambda_weights_ccpp @@ -20,7 +20,7 @@ module radiation_utils contains - subroutine radiation_utils_init(nswbands_in, nlwbands_in, low_shortwave, high_shortwave, & + subroutine radiation_utils_register(nswbands_in, nlwbands_in, low_shortwave, high_shortwave, & low_longwave, high_longwave, errmsg, errflg) integer, intent(in) :: nswbands_in ! Number of shortwave bands integer, intent(in) :: nlwbands_in ! Number of longwave bands @@ -39,22 +39,22 @@ subroutine radiation_utils_init(nswbands_in, nlwbands_in, low_shortwave, high_sh nlwbands = nlwbands_in allocate(wavenumber_low_shortwave(nswbands), stat=errflg, errmsg=alloc_errmsg) if (errflg /= 0) then - write(errmsg,'(a,a)') 'radiation_utils_init: failed to allocate wavenumber_low_shortwave, message: ', & + write(errmsg,'(a,a)') 'radiation_utils_register: failed to allocate wavenumber_low_shortwave, message: ', & alloc_errmsg end if allocate(wavenumber_high_shortwave(nswbands), stat=errflg, errmsg=alloc_errmsg) if (errflg /= 0) then - write(errmsg,'(a,a)') 'radiation_utils_init: failed to allocate wavenumber_high_shortwave, message: ', & + write(errmsg,'(a,a)') 'radiation_utils_register: failed to allocate wavenumber_high_shortwave, message: ', & alloc_errmsg end if allocate(wavenumber_low_longwave(nlwbands), stat=errflg, errmsg=alloc_errmsg) if (errflg /= 0) then - write(errmsg,'(a,a)') 'radiation_utils_init: failed to allocate wavenumber_low_longwave, message: ', & + write(errmsg,'(a,a)') 'radiation_utils_register: failed to allocate wavenumber_low_longwave, message: ', & alloc_errmsg end if allocate(wavenumber_high_longwave(nlwbands), stat=errflg, errmsg=alloc_errmsg) if (errflg /= 0) then - write(errmsg,'(a,a)') 'radiation_utils_init: failed to allocate wavenumber_high_longwave, message: ', & + write(errmsg,'(a,a)') 'radiation_utils_register: failed to allocate wavenumber_high_longwave, message: ', & alloc_errmsg end if @@ -65,7 +65,7 @@ subroutine radiation_utils_init(nswbands_in, nlwbands_in, low_shortwave, high_sh wavenumber_boundaries_set = .true. - end subroutine radiation_utils_init + end subroutine radiation_utils_register !=========================================================================================