From 8accd5f9b0a390aa098ef512eebd3a5676842725 Mon Sep 17 00:00:00 2001 From: Casper Boon Date: Tue, 2 May 2023 12:53:18 +0800 Subject: [PATCH] adding support for OMP --- Makefile | 2 +- src/aed_pathogens.F90 | 12 ++++++++---- src/aed_pesticides.F90 | 9 ++++++--- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index ac8194a..b75fc3e 100644 --- a/Makefile +++ b/Makefile @@ -52,7 +52,7 @@ MDBG_FFLAGS="" ifeq ($(F90),ifort) INCLUDES+=-I/opt/intel/include DEBUG_FFLAGS=-g -traceback - OPT_FFLAGS=-O3 + OPT_FFLAGS=-O3 -qopenmp FFLAGS=-fPIC -warn all -module ${moddir} -static-intel -mp1 -stand f08 -warn nounused $(DEFINES) $(INCLUDES) ifeq ($(WITH_CHECKS),true) FFLAGS+=-check all -check noarg_temp_created diff --git a/src/aed_pathogens.F90 b/src/aed_pathogens.F90 index ef074df..96d67a8 100644 --- a/src/aed_pathogens.F90 +++ b/src/aed_pathogens.F90 @@ -462,11 +462,15 @@ SUBROUTINE aed_pathogens_load_params(data, dbase, count, list) data%id_growth(i) = aed_define_diag_variable( TRIM(data%pathogens(i)%p_name)//'_g', 'orgs/m3/day', 'growth') data%id_sunlight(i) = aed_define_diag_variable( TRIM(data%pathogens(i)%p_name)//'_l', 'orgs/m3/day', 'sunlight') data%id_mortality(i) = aed_define_diag_variable( TRIM(data%pathogens(i)%p_name)//'_m', 'orgs/m3/day', 'mortality') - data%id_pth_f_sed(i) = aed_define_diag_variable( TRIM(data%pathogens(i)%p_name)//'_f_set', 'orgs/m3/d', 'alive sedimentation') - data%id_pth_d_sed(i) = aed_define_diag_variable( TRIM(data%pathogens(i)%p_name)//'_d_set', 'orgs/m3/d', 'dead sedimentation') + data%id_pth_f_sed(i) = aed_define_diag_variable( TRIM(data%pathogens(i)%p_name)//'_f_set', & + 'orgs/m3/d', 'alive sedimentation') + data%id_pth_d_sed(i) = aed_define_diag_variable( TRIM(data%pathogens(i)%p_name)//'_d_set', & + 'orgs/m3/d', 'dead sedimentation') IF (data%pathogens(i)%coef_sett_fa > zero_) THEN - data%id_pth_a_sed(i) = aed_define_diag_variable( TRIM(data%pathogens(i)%p_name)//'_a_set', 'orgs/m3/d', 'attached sedimentation') - data%id_attachment(i) = aed_define_diag_variable( TRIM(data%pathogens(i)%p_name)//'_att', 'orgs/m3/d', 'attachment rate') + data%id_pth_a_sed(i) = aed_define_diag_variable( TRIM(data%pathogens(i)%p_name)//'_a_set', & + 'orgs/m3/d', 'attached sedimentation') + data%id_attachment(i) = aed_define_diag_variable( TRIM(data%pathogens(i)%p_name)//'_att', & + 'orgs/m3/d', 'attachment rate') END IF ENDIF ENDDO diff --git a/src/aed_pesticides.F90 b/src/aed_pesticides.F90 index eb87a5e..1158bd9 100644 --- a/src/aed_pesticides.F90 +++ b/src/aed_pesticides.F90 @@ -462,8 +462,10 @@ SUBROUTINE aed_pesticides_load_params(data, dbase, count, list) ENDIF IF (data%simSediment) THEN - data%id_psts(i) = aed_define_sheet_variable( TRIM(data%pesticides(i)%name)//'_sed', 'mg/m2', 'sorbed pesticides in sediment',data%pesticides(i)%pst_initial_sed*0.5 ) - data%id_pstw(i) = aed_define_sheet_variable( TRIM(data%pesticides(i)%name)//'_pw', 'mg/m2', 'porewater pesticides in sediment',data%pesticides(i)%pst_initial_sed*0.5) + data%id_psts(i) = aed_define_sheet_variable( TRIM(data%pesticides(i)%name)//'_sed', 'mg/m2', & + 'sorbed pesticides in sediment',data%pesticides(i)%pst_initial_sed*0.5 ) + data%id_pstw(i) = aed_define_sheet_variable( TRIM(data%pesticides(i)%name)//'_pw', 'mg/m2', & + 'porewater pesticides in sediment',data%pesticides(i)%pst_initial_sed*0.5) ENDIF !data%id_total(i) = aed_define_diag_variable( TRIM(data%pesticides(i)%name)//'_t', 'orgs/m3', 'total') @@ -482,7 +484,8 @@ SUBROUTINE aed_pesticides_load_params(data, dbase, count, list) data%id_total(i) = & aed_define_diag_variable( TRIM(data%pesticides(i)%name)//'_tot', 'mg/m3' , 'total pesticide concentration') IF (data%simSediment) data%id_tot_s(i) = & - aed_define_sheet_diag_variable( TRIM(data%pesticides(i)%name)//'_tot_sed', 'mg/m2' , 'total pesticide concentration in the sediment') + aed_define_sheet_diag_variable( TRIM(data%pesticides(i)%name)//'_tot_sed', 'mg/m2' , & + 'total pesticide concentration in the sediment') ENDIF ENDDO DEALLOCATE(pd)