Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -Wextra -Wno-compare-reals gfortran flags #306

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ all : gnu

.PHONY: gnu
gnu:
$(MAKE) -f $(MAKE_DIR)/Makefile $(LIB_DIR)/libmarbl-gnu$(MPISUF).a USE_DEPS=TRUE FC=gfortran FCFLAGS="-Wall -Werror -O2 -ffree-form -J $(OBJ_DIR)/gnu$(MPISUF) -cpp" OBJ_DIR=$(OBJ_DIR)/gnu$(MPISUF) INC_DIR=$(INC_DIR)/gnu$(MPISUF)
$(MAKE) -f $(MAKE_DIR)/Makefile $(LIB_DIR)/libmarbl-gnu$(MPISUF).a USE_DEPS=TRUE FC=gfortran FCFLAGS="-Wall -Wextra -Wno-compare-reals -Werror -O2 -ffree-form -J $(OBJ_DIR)/gnu$(MPISUF) -cpp" OBJ_DIR=$(OBJ_DIR)/gnu$(MPISUF) INC_DIR=$(INC_DIR)/gnu$(MPISUF)

.PHONY: intel
intel:
Expand Down
25 changes: 5 additions & 20 deletions src/marbl_diagnostics_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -4293,16 +4293,6 @@ subroutine marbl_diagnostics_set_surface_forcing( &
type(marbl_surface_forcing_internal_type) , intent(in) :: surface_forcing_internal
type(marbl_diagnostics_type) , intent(inout) :: surface_forcing_diags

!-----------------------------------------------------------------------
! local variables
!-----------------------------------------------------------------------
character(len=*), parameter :: subname = 'marbl_diagnostics_mod:marbl_diagnostics_set_surface_forcing'
!-----------------------------------------------------------------------

!-----------------------------------------------------------------------
! calculate gas flux quantities if necessary
!-----------------------------------------------------------------------

associate( &
ind_diag => marbl_surface_forcing_diag_ind, &
ind_forc => surface_forcing_ind, &
Expand Down Expand Up @@ -4355,6 +4345,10 @@ subroutine marbl_diagnostics_set_surface_forcing( &
docr_ind => marbl_tracer_indices%docr_ind &
)

!-----------------------------------------------------------------------
! calculate gas flux quantities if necessary
!-----------------------------------------------------------------------

if (lflux_gas_o2 .or. lflux_gas_co2) then

diags(ind_diag%ECOSYS_IFRAC)%field_2d(:) = ifrac(:)
Expand Down Expand Up @@ -4577,6 +4571,7 @@ subroutine store_diagnostics_autotrophs(marbl_domain, &
real(r8) :: autotrophC_weight(marbl_domain%km)
real(r8) :: autotrophC_zint_100m
real(r8) :: limterm(marbl_domain%km)
!-----------------------------------------------------------------------

associate( &
diags => marbl_interior_diags%diags, &
Expand Down Expand Up @@ -5759,21 +5754,11 @@ subroutine store_diagnostics_ciso_surface_forcing( &
real (r8), dimension(num_elements) , intent(in) :: eps_dic_g_surf ! equilibrium fractionation between total DIC and gaseous CO2
type(marbl_diagnostics_type) , intent(inout) :: marbl_surface_forcing_diags

!-----------------------------------------------------------------------
! local variables
!-----------------------------------------------------------------------
character(len=*), parameter :: subname = 'marbl_diagnostics_mod:store_diagnostics_ciso_surface_forcing'
!-----------------------------------------------------------------------

associate( &
diags => marbl_surface_forcing_diags%diags, &
ind => marbl_surface_forcing_diag_ind &
)

!-----------------------------------------------------------------------
! Tavg variables
!-----------------------------------------------------------------------

diags(ind%CISO_DI13C_GAS_FLUX)%field_2d(:) = FLUX13(:)
diags(ind%CISO_DI14C_GAS_FLUX)%field_2d(:) = FLUX14(:)

Expand Down
2 changes: 0 additions & 2 deletions src/marbl_init_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,6 @@ subroutine marbl_init_tracer_metadata(marbl_tracer_metadata, marbl_tracer_indice
! local variables
!-----------------------------------------------------------------------

character(len=*), parameter :: subname = 'marbl_init_mod:marbl_init_tracer_metadata'

integer (int_kind) :: n ! index for looping over tracers
integer (int_kind) :: zoo_ind ! zooplankton functional group index
integer (int_kind) :: auto_ind ! autotroph functional group index
Expand Down
2 changes: 0 additions & 2 deletions src/marbl_interface.F90
Original file line number Diff line number Diff line change
Expand Up @@ -736,8 +736,6 @@ subroutine inquire_settings_metadata_by_id(this, id, sname, lname, units, dataty
character(len=*), optional, intent(out) :: sname, lname, units
character(len=*), optional, intent(out) :: datatype

character(len=*), parameter :: subname = 'marbl_interface:inquire_settings_metadata_by_id'

call this%settings%inquire_metadata(id, &
sname = sname, &
lname = lname, &
Expand Down
2 changes: 1 addition & 1 deletion tests/driver_src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ all: gnu

.PHONY: gnu
gnu:
$(MAKE) -f $(MAKE_DIR)/Makefile $(EXE) COMP_NAME=gnu$(MPISUF) FC=gfortran FCFLAGS="-Wall -Werror -O2 -ffree-form -cpp" INC="-J $(OBJ_ROOT)/gnu$(MPISUF)" INC2="-J $(OBJ_ROOT)/gnu$(MPISUF)/driver"
$(MAKE) -f $(MAKE_DIR)/Makefile $(EXE) COMP_NAME=gnu$(MPISUF) FC=gfortran FCFLAGS="-Wall -Wextra -Wno-compare-reals -Werror -O2 -ffree-form -cpp" INC="-J $(OBJ_ROOT)/gnu$(MPISUF)" INC2="-J $(OBJ_ROOT)/gnu$(MPISUF)/driver"

.PHONY: intel
intel:
Expand Down