Skip to content

Commit

Permalink
Add mixed mode support to use in AM5 (#354)
Browse files Browse the repository at this point in the history
* Use constantsR4 mod instead of the constants_mod

* Add mixed version of atmosphere.F90

* more robust conversions
  • Loading branch information
uramirez8707 authored Aug 2, 2024
1 parent 69a0f01 commit f7125f7
Show file tree
Hide file tree
Showing 39 changed files with 430 additions and 232 deletions.
4 changes: 4 additions & 0 deletions GFDL_tools/fv_ada_nudge.F90
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ module fv_ada_nudge_mod

use external_sst_mod, only: i_sst, j_sst, sst_ncep, sst_anom, forecast_mode
use diag_manager_mod, only: register_diag_field, send_data
#ifdef OVERLOAD_R4
use constantsR4_mod, only: pi, grav, rdgas, cp_air, kappa, cnst_radius=>radius, seconds_per_day
#else
use constants_mod, only: pi, grav, rdgas, cp_air, kappa, cnst_radius=>radius, seconds_per_day
#endif
use fms_mod, only: write_version_number, check_nml_error
use mpp_mod, only: mpp_error, FATAL, stdlog, get_unit, mpp_pe, input_nml_file
use mpp_mod, only: mpp_root_pe, stdout ! snz
Expand Down
4 changes: 4 additions & 0 deletions GFDL_tools/fv_climate_nudge.F90
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ module fv_climate_nudge_mod
use time_interp_mod, only: time_interp
use get_cal_time_mod, only: get_cal_time
use mpp_mod, only: mpp_min, mpp_max
#ifdef OVERLOAD_R4
use constantsR4_mod, only: RDGAS, RVGAS, PI, KAPPA, CP_AIR
#else
use constants_mod, only: RDGAS, RVGAS, PI, KAPPA, CP_AIR
#endif
use fv_mapz_mod, only: mappm
implicit none
private
Expand Down
4 changes: 4 additions & 0 deletions GFDL_tools/fv_cmip_diag.F90
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ module fv_cmip_diag_mod
use diag_data_mod, only: CMOR_MISSING_VALUE, null_axis_id
use tracer_manager_mod, only: get_tracer_index
use field_manager_mod, only: MODEL_ATMOS
#ifdef OVERLOAD_R4
use constantsR4_mod, only: GRAV, RDGAS
#else
use constants_mod, only: GRAV, RDGAS
#endif

use fv_mapz_mod, only: E_Flux
use fv_arrays_mod, only: fv_atmos_type
Expand Down
4 changes: 4 additions & 0 deletions GFDL_tools/read_climate_nudge_data.F90
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,11 @@ module read_climate_nudge_data_mod
get_time_calendar, read_data, variable_att_exists, &
is_dimension_unlimited
use mpp_mod, only: input_nml_file, mpp_npes, mpp_get_current_pelist
#ifdef OVERLOAD_R4
use constantsR4_mod, only: PI, GRAV, RDGAS, RVGAS
#else
use constants_mod, only: PI, GRAV, RDGAS, RVGAS
#endif

implicit none
private
Expand Down
Loading

0 comments on commit f7125f7

Please sign in to comment.