Skip to content

Commit

Permalink
Some cleaning up since last commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
dustinswales committed Jun 6, 2019
1 parent a4bdffe commit 6e2c8bd
Show file tree
Hide file tree
Showing 12 changed files with 273 additions and 512 deletions.
7 changes: 2 additions & 5 deletions physics/GFS_rrtmgp_lw_post.F90
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module GFS_rrtmgp_lw_post
use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp
use mo_fluxes_byband, only: ty_fluxes_byband
use mo_heating_rates, only: compute_heating_rate
use rrtmgp_lw_gas_optics, only: check_error_msg
use rrtmgp_aux, only: check_error_msg
implicit none

public GFS_rrtmgp_lw_post_init,GFS_rrtmgp_lw_post_run,GFS_rrtmgp_lw_post_finalize
Expand Down Expand Up @@ -42,7 +42,6 @@ end subroutine GFS_rrtmgp_lw_post_init
!! | fluxlwDOWN_allsky | lw_flux_profile_downward_allsky | RRTMGP downward longwave all-sky flux profile | W m-2 | 2 | real | kind_phys | in | F |
!! | fluxlwUP_clrsky | lw_flux_profile_upward_clrsky | RRTMGP upward longwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | in | F |
!! | fluxlwDOWN_clrsky | lw_flux_profile_downward_clrsky | RRTMGP downward longwave clr-sky flux profile | W m-2 | 2 | real | kind_phys | in | F |
!! | lw_gas_props | coefficients_for_lw_gas_optics | DDT containing spectral information for RRTMGP LW radiation scheme | DDT | 0 | ty_gas_optics_rrtmgp | | in | F |
!! | hlwc | tendency_of_air_temperature_due_to_longwave_heating_on_radiation_time_step | longwave total sky heating rate | K s-1 | 2 | real | kind_phys | out | F |
!! | topflx_lw | lw_fluxes_top_atmosphere | longwave total sky fluxes at the top of the atm | W m-2 | 1 | topflw_type | | inout | F |
!! | sfcflx_lw | lw_fluxes_sfc | longwave total sky fluxes at the Earth surface | W m-2 | 1 | sfcflw_type | | inout | F |
Expand All @@ -53,7 +52,7 @@ end subroutine GFS_rrtmgp_lw_post_init
!!
#endif
subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Diag, Radtend, Statein, &
Coupling, im, p_lev, lw_gas_props, &
Coupling, im, p_lev, &
tsfa, fluxlwUP_allsky, fluxlwDOWN_allsky, fluxlwUP_clrsky, fluxlwDOWN_clrsky, &
hlwc, topflx_lw, sfcflx_lw, flxprf_lw, hlw0, errmsg, errflg)

Expand All @@ -74,8 +73,6 @@ subroutine GFS_rrtmgp_lw_post_run (Model, Grid, Diag, Radtend, Statein, &
im ! Horizontal loop extent
real(kind_phys), dimension(size(Grid%xlon,1)), intent(in) :: &
tsfa ! Lowest model layer air temperature for radiation
type(ty_gas_optics_rrtmgp),intent(in) :: &
lw_gas_props ! DDT containing LW spectral information
real(kind_phys), dimension(size(Grid%xlon,1), Model%levs+1), intent(in) :: &
p_lev ! Pressure @ model layer-interfaces (hPa)
real(kind_phys), dimension(size(Grid%xlon,1), Model%levs+1), intent(in) :: &
Expand Down
11 changes: 1 addition & 10 deletions physics/GFS_rrtmgp_post.F90
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,5 @@ end subroutine GFS_rrtmgp_post_run
subroutine GFS_rrtmgp_post_finalize ()

end subroutine GFS_rrtmgp_post_finalize
subroutine check_error_msg(routine_name, error_msg)
character(len=*), intent(in) :: &
error_msg, routine_name

if(error_msg /= "") then
print*,"ERROR("//trim(routine_name)//"): "
print*,trim(error_msg)
return
end if
end subroutine check_error_msg

end module GFS_rrtmgp_post
2 changes: 1 addition & 1 deletion physics/GFS_rrtmgp_pre.F90
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ module GFS_rrtmgp_pre
! RRTMGP types
use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp
use mo_gas_concentrations, only: ty_gas_concs
use rrtmgp_lw_gas_optics, only: check_error_msg
use rrtmgp_aux, only: check_error_msg

real(kind_phys), parameter :: &
amd = 28.9644_kind_phys, & ! Molecular weight of dry-air (g/mol)
Expand Down
2 changes: 1 addition & 1 deletion physics/GFS_rrtmgp_sw_post.F90
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module GFS_rrtmgp_sw_post
use mo_gas_optics_rrtmgp, only: ty_gas_optics_rrtmgp
use mo_fluxes_byband, only: ty_fluxes_byband
use mo_heating_rates, only: compute_heating_rate
use rrtmgp_sw_gas_optics, only: check_error_msg
use rrtmgp_aux, only: check_error_msg
implicit none

public GFS_rrtmgp_sw_post_init,GFS_rrtmgp_sw_post_run,GFS_rrtmgp_sw_post_finalize
Expand Down
118 changes: 0 additions & 118 deletions physics/GFS_rrtmgp_sw_pre.F90

This file was deleted.

27 changes: 27 additions & 0 deletions physics/rrtmgp_aux.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module rrtmgp_aux
implicit none
contains
!
subroutine rrtmgp_aux_init()
end subroutine rrtmgp_aux_init
!
subroutine rrtmgp_aux_run()
end subroutine rrtmgp_aux_run
!
subroutine rrtmgp_aux_finalize()
end subroutine rrtmgp_aux_finalize

! #########################################################################################
! SUBROUTINE check_error_msg
! #########################################################################################
subroutine check_error_msg(routine_name, error_msg)
character(len=*), intent(in) :: &
error_msg, routine_name

if(error_msg /= "") then
print*,"ERROR("//trim(routine_name)//"): "
print*,trim(error_msg)
return
end if
end subroutine check_error_msg
end module rrtmgp_aux
Loading

0 comments on commit 6e2c8bd

Please sign in to comment.