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

Local w3emc module #1070

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,10 @@ if(CMAKE_BUILD_TYPE STREQUAL "Release" AND ${CMAKE_Fortran_COMPILER_ID} STREQUAL
endif()

#------------------------------------------------------------------------------
set(LOCAL_W3EMC
${LOCAL_CURRENT_SOURCE_DIR}/physics/tools/w3emc.F90)

add_library(ccpp_physics STATIC ${SCHEMES} ${SCHEMES_OPENMP_OFF} ${SCHEMES_DYNAMICS} ${CAPS})
add_library(ccpp_physics STATIC ${LOCAL_W3EMC} ${SCHEMES} ${SCHEMES_OPENMP_OFF} ${SCHEMES_DYNAMICS} ${CAPS})
# Generate list of Fortran modules from defined sources
foreach(source_f90 ${CAPS})
get_filename_component(tmp_source_f90 ${source_f90} NAME)
Expand All @@ -183,9 +185,7 @@ set_target_properties(ccpp_physics PROPERTIES VERSION ${PROJECT_VERSION}
target_include_directories(ccpp_physics PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)

target_link_libraries(ccpp_physics PUBLIC w3emc::w3emc_d
sp::sp_d
NetCDF::NetCDF_Fortran)
target_link_libraries(ccpp_physics PUBLIC NetCDF::NetCDF_Fortran)

# Define where to install the library
install(TARGETS ccpp_physics
Expand Down
2 changes: 1 addition & 1 deletion physics/GWD/cires_tauamf_data.F90
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module cires_tauamf_data

use w3emc, only: w3doxdat, w3kind, w3movdat
use machine, only: kind_phys
!...........................................................................................
! tabulated GW-sources: GRACILE/Ern et al., 2018 and/or Resolved GWs from C384-Annual run
Expand Down
10 changes: 5 additions & 5 deletions physics/GWD/cires_ugwpv1_module.F90
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ module cires_ugwpv1_module
!...................................................................................
!
!
use machine, only : kind_phys
use ugwp_common, only : arad, pi, pi2, hpscale, rhp, rhp2, rh4, rhp4, khp, hpskm
use ugwp_wmsdis_init, only : ilaunch, nslope, lhmet, lzmax, lzmin, lzstar
use ugwp_wmsdis_init, only : tau_min, tamp_mpa
use machine, only : kind_phys
use ugwp_common, only : arad, pi, pi2, hpscale, rhp, rhp2, rh4, rhp4, khp, hpskm
use ugwp_wmsdis_init, only : ilaunch, nslope, lhmet, lzmax, lzmin, lzstar
use ugwp_wmsdis_init, only : tau_min, tamp_mpa
use w3emc, only : iw3jdn

implicit none
logical :: module_is_initialized
Expand Down Expand Up @@ -436,7 +437,6 @@ subroutine calendar_ugwp(yr, mm, dd, ddd_ugwp)
integer, intent(in) :: yr, mm, dd
integer :: ddd_ugwp

integer :: iw3jdn
integer :: jd1, jddd
jd1 = iw3jdn(yr,1,1)
jddd = iw3jdn(yr,mm,dd)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ module GFS_phys_time_vary

use machine, only : kind_phys, kind_dbl_prec, kind_sngl_prec

use w3emc, only : w3movdat

use mersenne_twister, only: random_setseed, random_number

use module_ozphys, only: ty_ozphys
Expand Down Expand Up @@ -458,7 +460,7 @@ subroutine GFS_phys_time_vary_init (
!$OMP shared(isbarren_table,isice_table,isurban_table) &
!$omp shared(iswater_table,laim_table,sla_table,bexp_table) &
!$omp shared(stc,smc,slc,tg3,snowxy,tsnoxy,snicexy,snliqxy) &
!$omp shared(zsnsoxy,stype,smcmax_table,smcwlt_table,zs,dzs) &
!$omp shared(zsnsoxy,stype,smcmax_table,smcwlt_table,zs,dzs) &
!$omp shared(dwsat_table,dksat_table,psisat_table,smoiseq) &
!$OMP shared(smcwtdxy,deeprechxy,rechxy,errmsg,errflg) &
!$OMP private(vegtyp,masslai,masssai,snd,dzsno,dzsnso,isnow) &
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
!> @{
module GFS_phys_time_vary

use w3emc, only: w3doxdat, w3kind, w3movdat

use machine, only : kind_phys, kind_dbl_prec, kind_sngl_prec

use mersenne_twister, only: random_setseed, random_number
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ subroutine GFS_time_vary_pre_timestep_init (jdat, idat, dtp, nsswr,
kdt, julian, yearlen, ipt, lprnt, lssav, lsswr, lslwr, solhr, errmsg, errflg)

use machine, only: kind_phys, kind_dbl_prec, kind_sngl_prec

use w3emc, only: w3difdat
implicit none

integer, intent(in) :: idate(:)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

module GFS_time_vary_pre

use w3emc, only: iw3jdn, w3difdat, w3kind

use funcphys, only: gfuncphys

implicit none
Expand Down Expand Up @@ -93,7 +95,7 @@ subroutine GFS_time_vary_pre_timestep_init (jdat, idat, dtp, nsswr, &
real(kind=kind_phys), parameter :: con_hr = 3600.0_kind_phys
real(kind=kind_dbl_prec) :: rinc8(5)

integer :: iw3jdn
integer :: w3kindreal,w3kindint
integer :: jd0, jd1
real :: fjd

Expand Down
2 changes: 2 additions & 0 deletions physics/Interstitials/UFS_SCM_NEPTUNE/iccninterp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
!! IN and CCN data.
module iccninterp

use w3emc, only: w3doxdat, w3kind, w3movdat

implicit none

private
Expand Down
Loading
Loading