Skip to content

Commit

Permalink
allows mix precision compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
JosephMouallem committed Oct 1, 2024
1 parent e56321f commit e86a922
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 3 additions & 1 deletion atmos_shared/atmos_global_diag.F90
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
module atmos_global_diag_mod
#include <fms_platform.h>

!----------------------------------------------------------------------
! Module for computed globally averaged atmospheric quantities
! and then registering and sending this data to the diag_manager.
!----------------------------------------------------------------------

use platform_mod, only: r8_kind, r4_kind
use mpp_mod, only: input_nml_file
use mpp_domains_mod, only: domain2d, mpp_global_sum, BITWISE_EFP_SUM, &
null_domain2d, operator(.eq.)
Expand Down Expand Up @@ -267,7 +269,7 @@ end subroutine buffer_global_diag

function send_global_diag_data (field_num, data, Time, area, mask)
integer, intent(in) :: field_num
real, intent(in) :: data(:,:)
real(r8_kind), intent(in) :: data(:,:)
type(time_type), intent(in) :: Time
real, optional, intent(in) :: area(:,:)
logical, optional, intent(in) :: mask(:,:)
Expand Down
10 changes: 6 additions & 4 deletions atmos_shared/atmos_tracer_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
!***********************************************************************

module atmos_tracer_driver_mod
#include <fms_platform.h>
! <CONTACT EMAIL="[email protected]">
! William Cooke
! </CONTACT>
Expand Down Expand Up @@ -103,6 +104,7 @@ module atmos_tracer_driver_mod

!-----------------------------------------------------------------------

use platform_mod, only: r8_kind, r4_kind
use time_manager_mod, only : time_type

implicit none
Expand Down Expand Up @@ -377,7 +379,7 @@ subroutine atmos_tracer_driver_gather_data(gas_fields, tr_bot)
use coupler_types_mod, only: coupler_2d_bc_type

type(coupler_2d_bc_type), intent(inout) :: gas_fields
real, dimension(:,:,:), intent(in) :: tr_bot
real(r8_kind), dimension(:,:,:), intent(in) :: tr_bot

!-----------------------------------------------------------------------

Expand All @@ -393,7 +395,7 @@ subroutine atmos_tracer_driver_gather_data_down(gas_fields, tr_bot)
use coupler_types_mod, only: coupler_2d_bc_type

type(coupler_2d_bc_type), intent(inout) :: gas_fields
real, dimension(:,:,:), intent(in) :: tr_bot
real(r8_kind), dimension(:,:,:), intent(in) :: tr_bot

return

Expand All @@ -414,8 +416,8 @@ function atmos_tracer_has_surf_setl_flux(tr) result(ret)
! the atmosphere for this tracer
subroutine get_atmos_tracer_surf_setl_flux(tr, setl_flux, dsetl_dtr)
integer, intent(in) :: tr ! tracer index
real, intent(out) :: setl_flux(:,:) ! sedimentation flux at the bottom of the atmosphere
real, intent(out) :: dsetl_dtr(:,:) ! derivative of sedimentation flux w.r.t.
real(r8_kind), intent(out) :: setl_flux(:,:) ! sedimentation flux at the bottom of the atmosphere
real(r8_kind), intent(out) :: dsetl_dtr(:,:) ! derivative of sedimentation flux w.r.t.
! the tracer concentration in the bottom layer

setl_flux(:,:) = 0.0 ; dsetl_dtr(:,:) = 0.0
Expand Down

0 comments on commit e86a922

Please sign in to comment.