! ! This work (Common Community Physics Package Framework), identified by ! NOAA, NCAR, CU/CIRES, is free of known copyright restrictions and is ! placed in the public domain. ! ! THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR ! IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, ! FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ! THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER ! IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ! CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. !> !! @brief Auto-generated cap for MusicBox calls to CCPP API !! ! module MusicBox_ccpp_cap use ccpp_kinds use MusicBox_mod, only: TimeStart use MusicBox_mod, only: njRxt use MusicBox_mod, only: nlevel use MusicBox_mod, only: nkRxt use MusicBox_mod, only: press_top use MusicBox_mod, only: nSpecies use MusicBox_mod, only: nbox use MusicBox_mod, only: dt use MusicBox_mod, only: TimeEnd use MusicBox_mod, only: nlayer use MusicBox_mod, only: realkind use MusicBox_mod, only: ntimes use MusicBox_mod, only: jnames use MusicBox_mod, only: ntuvRates use MusicBox_mod, only: cnst_info implicit none private public :: MusicBox_ccpp_physics_timestep_initial public :: MusicBox_ccpp_physics_timestep_final public :: MusicBox_ccpp_physics_initialize public :: MusicBox_ccpp_physics_finalize public :: MusicBox_ccpp_physics_run public :: ccpp_physics_suite_list public :: ccpp_physics_suite_part_list contains subroutine MusicBox_ccpp_physics_timestep_initial(suite_name, box_press, box_temp, relhum, & box_h2o, zenith, albedo, density, photo_lev, alt, temp, cldfrc, cldwat, o2vmrcol, & o3vmrcol, so2vmrcol, no2vmrcol, press_mid, press_int, vmr, mbar, errmsg, errflg) use ccpp_MusicBox_suite_cap, only: MusicBox_suite_timestep_initial character(len=*), intent(in) :: suite_name real(kind_phys), intent(inout) :: box_press real(kind_phys), intent(inout) :: box_temp real(kind_phys), intent(inout) :: relhum real(kind_phys), intent(inout) :: box_h2o real(kind_phys), intent(inout) :: zenith real(kind_phys), intent(inout) :: albedo real(kind_phys), intent(inout) :: density integer, intent(inout) :: photo_lev real(kind_phys), intent(inout) :: alt(:) real(kind_phys), intent(inout) :: temp(:) real(kind_phys), intent(inout) :: cldfrc(:) real(kind_phys), intent(inout) :: cldwat(:) real(kind_phys), intent(inout) :: o2vmrcol(:) real(kind_phys), intent(inout) :: o3vmrcol(:) real(kind_phys), intent(inout) :: so2vmrcol(:) real(kind_phys), intent(inout) :: no2vmrcol(:) real(kind_phys), intent(inout) :: press_mid(:) real(kind_phys), intent(inout) :: press_int(:) real(kind_phys), intent(inout) :: vmr(:) real(kind_phys), intent(inout) :: mbar character(len=512), intent(inout) :: errmsg integer, intent(inout) :: errflg errflg = 0 errmsg = "" if (trim(suite_name) == 'MusicBox_suite') then call MusicBox_suite_timestep_initial(errflg, errmsg) else write(errmsg, '(3a)')"No suite named ", trim(suite_name), "found" errflg = 1 end if end subroutine MusicBox_ccpp_physics_timestep_initial subroutine MusicBox_ccpp_physics_timestep_final(suite_name, box_press, box_temp, relhum, & box_h2o, zenith, albedo, density, photo_lev, alt, temp, cldfrc, cldwat, o2vmrcol, & o3vmrcol, so2vmrcol, no2vmrcol, press_mid, press_int, vmr, mbar, errmsg, errflg) use ccpp_MusicBox_suite_cap, only: MusicBox_suite_timestep_final character(len=*), intent(in) :: suite_name real(kind_phys), intent(inout) :: box_press real(kind_phys), intent(inout) :: box_temp real(kind_phys), intent(inout) :: relhum real(kind_phys), intent(inout) :: box_h2o real(kind_phys), intent(inout) :: zenith real(kind_phys), intent(inout) :: albedo real(kind_phys), intent(inout) :: density integer, intent(inout) :: photo_lev real(kind_phys), intent(inout) :: alt(:) real(kind_phys), intent(inout) :: temp(:) real(kind_phys), intent(inout) :: cldfrc(:) real(kind_phys), intent(inout) :: cldwat(:) real(kind_phys), intent(inout) :: o2vmrcol(:) real(kind_phys), intent(inout) :: o3vmrcol(:) real(kind_phys), intent(inout) :: so2vmrcol(:) real(kind_phys), intent(inout) :: no2vmrcol(:) real(kind_phys), intent(inout) :: press_mid(:) real(kind_phys), intent(inout) :: press_int(:) real(kind_phys), intent(inout) :: vmr(:) real(kind_phys), intent(inout) :: mbar character(len=512), intent(inout) :: errmsg integer, intent(inout) :: errflg errflg = 0 errmsg = "" if (trim(suite_name) == 'MusicBox_suite') then call MusicBox_suite_timestep_final(errflg, errmsg) else write(errmsg, '(3a)')"No suite named ", trim(suite_name), "found" errflg = 1 end if end subroutine MusicBox_ccpp_physics_timestep_final subroutine MusicBox_ccpp_physics_initialize(suite_name, box_press, box_temp, relhum, box_h2o, & zenith, albedo, density, photo_lev, alt, temp, cldfrc, cldwat, o2vmrcol, o3vmrcol, & so2vmrcol, no2vmrcol, press_mid, press_int, vmr, mbar, errmsg, errflg) use ccpp_MusicBox_suite_cap, only: MusicBox_suite_initialize character(len=*), intent(in) :: suite_name real(kind_phys), intent(inout) :: box_press real(kind_phys), intent(inout) :: box_temp real(kind_phys), intent(inout) :: relhum real(kind_phys), intent(inout) :: box_h2o real(kind_phys), intent(inout) :: zenith real(kind_phys), intent(inout) :: albedo real(kind_phys), intent(inout) :: density integer, intent(inout) :: photo_lev real(kind_phys), intent(inout) :: alt(:) real(kind_phys), intent(inout) :: temp(:) real(kind_phys), intent(inout) :: cldfrc(:) real(kind_phys), intent(inout) :: cldwat(:) real(kind_phys), intent(inout) :: o2vmrcol(:) real(kind_phys), intent(inout) :: o3vmrcol(:) real(kind_phys), intent(inout) :: so2vmrcol(:) real(kind_phys), intent(inout) :: no2vmrcol(:) real(kind_phys), intent(inout) :: press_mid(:) real(kind_phys), intent(inout) :: press_int(:) real(kind_phys), intent(inout) :: vmr(:) real(kind_phys), intent(inout) :: mbar character(len=512), intent(inout) :: errmsg integer, intent(inout) :: errflg errflg = 0 errmsg = "" if (trim(suite_name) == 'MusicBox_suite') then call MusicBox_suite_initialize(errflg, errmsg, nSpecies, nkRxt, njRxt, TimeStart, & TimeEnd, dt, cnst_info, realkind, nlayer, jnames) else write(errmsg, '(3a)')"No suite named ", trim(suite_name), "found" errflg = 1 end if end subroutine MusicBox_ccpp_physics_initialize subroutine MusicBox_ccpp_physics_finalize(suite_name, box_press, box_temp, relhum, box_h2o, & zenith, albedo, density, photo_lev, alt, temp, cldfrc, cldwat, o2vmrcol, o3vmrcol, & so2vmrcol, no2vmrcol, press_mid, press_int, vmr, mbar, errmsg, errflg) use ccpp_MusicBox_suite_cap, only: MusicBox_suite_finalize character(len=*), intent(in) :: suite_name real(kind_phys), intent(inout) :: box_press real(kind_phys), intent(inout) :: box_temp real(kind_phys), intent(inout) :: relhum real(kind_phys), intent(inout) :: box_h2o real(kind_phys), intent(inout) :: zenith real(kind_phys), intent(inout) :: albedo real(kind_phys), intent(inout) :: density integer, intent(inout) :: photo_lev real(kind_phys), intent(inout) :: alt(:) real(kind_phys), intent(inout) :: temp(:) real(kind_phys), intent(inout) :: cldfrc(:) real(kind_phys), intent(inout) :: cldwat(:) real(kind_phys), intent(inout) :: o2vmrcol(:) real(kind_phys), intent(inout) :: o3vmrcol(:) real(kind_phys), intent(inout) :: so2vmrcol(:) real(kind_phys), intent(inout) :: no2vmrcol(:) real(kind_phys), intent(inout) :: press_mid(:) real(kind_phys), intent(inout) :: press_int(:) real(kind_phys), intent(inout) :: vmr(:) real(kind_phys), intent(inout) :: mbar character(len=512), intent(inout) :: errmsg integer, intent(inout) :: errflg errflg = 0 errmsg = "" if (trim(suite_name) == 'MusicBox_suite') then call MusicBox_suite_finalize(errflg, errmsg) else write(errmsg, '(3a)')"No suite named ", trim(suite_name), "found" errflg = 1 end if end subroutine MusicBox_ccpp_physics_finalize subroutine MusicBox_ccpp_physics_run(suite_name, suite_part, box_press, box_temp, relhum, & box_h2o, zenith, albedo, density, photo_lev, alt, temp, cldfrc, cldwat, o2vmrcol, & o3vmrcol, so2vmrcol, no2vmrcol, press_mid, press_int, vmr, mbar, col_start, col_end, & errmsg, errflg) use ccpp_MusicBox_suite_cap, only: MusicBox_suite_physics character(len=*), intent(in) :: suite_name character(len=*), intent(in) :: suite_part real(kind_phys), intent(inout) :: box_press real(kind_phys), intent(inout) :: box_temp real(kind_phys), intent(inout) :: relhum real(kind_phys), intent(inout) :: box_h2o real(kind_phys), intent(inout) :: zenith real(kind_phys), intent(inout) :: albedo real(kind_phys), intent(inout) :: density integer, intent(inout) :: photo_lev real(kind_phys), intent(inout) :: alt(:) real(kind_phys), intent(inout) :: temp(:) real(kind_phys), intent(inout) :: cldfrc(:) real(kind_phys), intent(inout) :: cldwat(:) real(kind_phys), intent(inout) :: o2vmrcol(:) real(kind_phys), intent(inout) :: o3vmrcol(:) real(kind_phys), intent(inout) :: so2vmrcol(:) real(kind_phys), intent(inout) :: no2vmrcol(:) real(kind_phys), intent(inout) :: press_mid(:) real(kind_phys), intent(inout) :: press_int(:) real(kind_phys), intent(inout) :: vmr(:) real(kind_phys), intent(inout) :: mbar integer, intent(inout) :: col_start integer, intent(inout) :: col_end character(len=512), intent(inout) :: errmsg integer, intent(inout) :: errflg errflg = 0 errmsg = "" if (trim(suite_name) == 'MusicBox_suite') then if (trim(suite_part) == 'physics') then call MusicBox_suite_physics(errflg, errmsg, box_temp, box_press, box_h2o, relhum, & density, vmr(1:nSpecies), mbar, nkRxt, njRxt, nlayer, zenith, alt(1:nlayer), & temp(1:nlayer), press_mid(1:nlayer), press_top, o2vmrcol(1:nlayer), albedo, & o3vmrcol(1:nlayer), so2vmrcol(1:nlayer), no2vmrcol(1:nlayer), cldfrc(1:nlayer), & cldwat(1:nlayer), photo_lev, TimeStart, TimeEnd) else write(errmsg, '(3a)')"No suite part named ", trim(suite_part), & " found in suite MusicBox_suite" errflg = 1 end if else write(errmsg, '(3a)')"No suite named ", trim(suite_name), "found" errflg = 1 end if end subroutine MusicBox_ccpp_physics_run subroutine ccpp_physics_suite_list(suites) character(len=*), allocatable, intent(out) :: suites(:) integer :: sindex allocate(suites(1)) do sindex = 1, 1 suites(sindex) = 'MusicBox_suite' end do end subroutine ccpp_physics_suite_list subroutine ccpp_physics_suite_part_list(suite_name, part_list, errmsg, errflg) character(len=*), intent(in) :: suite_name character(len=*), allocatable, intent(out) :: part_list(:) character(len=512), intent(out) :: errmsg integer, intent(out) :: errflg integer :: pindex if(trim(suite_name) == 'MusicBox_suite') then allocate(part_list(1)) do pindex = 1, 1 part_list(pindex) = 'physics' end do else write(errmsg, '(3a)')'No suite named ', trim(suite_name), ' found' errflg = 1 end if end subroutine ccpp_physics_suite_part_list end module MusicBox_ccpp_cap