Skip to content

Commit

Permalink
Merge pull request #1 from grantfirl/mynn_01March_gjf
Browse files Browse the repository at this point in the history
Remove MYNN SFC logic from noahmpdrv.F90 and fix CMakeLists.txt authors
  • Loading branch information
joeolson42 authored Mar 21, 2023
2 parents 4cc7227 + ffccfc8 commit f7a4342
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 18 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ project(ccpp_physics

#------------------------------------------------------------------------------
set(PACKAGE "ccpp-physics")
set(AUTHORS "Grant Firl" "Dom Heinzeller" "Man Zhang" "Mike Kavulich" "Chunxi Zhang")
set(AUTHORS "Grant Firl" "Dustin Swales" "Man Zhang" "Mike Kavulich" )

#------------------------------------------------------------------------------
# Set OpenMP flags for C/C++/Fortran
Expand Down Expand Up @@ -183,7 +183,9 @@ 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 NetCDF::NetCDF_Fortran)
target_link_libraries(ccpp_physics PUBLIC w3emc::w3emc_d
sp::sp_d
NetCDF::NetCDF_Fortran)

# Define where to install the library
install(TARGETS ccpp_physics
Expand Down
1 change: 1 addition & 0 deletions physics/module_mp_nssl_2mom.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1228,6 +1228,7 @@ SUBROUTINE nssl_2mom_init( &
rho_qh = nssl_params(8)
rho_qhl = nssl_params(9)
rho_qs = nssl_params(10)
alphar = nssl_params(14)

! ipelec = Nint(nssl_params(11))
! isaund = Nint(nssl_params(12))
Expand Down
5 changes: 4 additions & 1 deletion physics/mp_nssl.F90
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ subroutine mp_nssl_init(ncol, nlev, errflg, errmsg, threads, restart, &
con_t0c, con_cliq, con_csol, con_eps, &
imp_physics, imp_physics_nssl, &
nssl_cccn, nssl_alphah, nssl_alphahl, &
nssl_alphar, nssl_ehw0_in, nssl_ehlw0_in, &
nssl_ccn_on, nssl_hail_on, nssl_invertccn )


Expand All @@ -52,6 +53,7 @@ subroutine mp_nssl_init(ncol, nlev, errflg, errmsg, threads, restart, &
integer, intent(in) :: imp_physics
integer, intent(in) :: imp_physics_nssl
real(kind_phys), intent(in) :: nssl_cccn, nssl_alphah, nssl_alphahl
real(kind_phys), intent(in) :: nssl_alphar, nssl_ehw0_in, nssl_ehlw0_in
logical, intent(in) :: nssl_ccn_on, nssl_hail_on, nssl_invertccn

! Local variables: dimensions used in nssl_init
Expand Down Expand Up @@ -115,6 +117,7 @@ subroutine mp_nssl_init(ncol, nlev, errflg, errmsg, threads, restart, &
nssl_params(11) = 0 ! nssl_ipelec_tmp
nssl_params(12) = 11 ! nssl_isaund
nssl_params(13) = 0 ! 1= turn on cccna; 0 = turn off
nssl_params(14) = nssl_alphar

nssl_qccn = nssl_cccn/1.225
! if (mpirank==mpiroot) then
Expand All @@ -129,7 +132,7 @@ subroutine mp_nssl_init(ncol, nlev, errflg, errmsg, threads, restart, &

! write(0,*) 'call nssl_2mom_init'
CALL nssl_2mom_init(ims,ime, jms,jme, kms,kme,nssl_params,ipctmp=5,mixphase=0, &
ihvol=ihailv,errmsg=errmsg,errflg=errflg,myrank=mpirank,mpiroot=mpiroot)
ihvol=ihailv,nssl_ehw0=nssl_ehw0_in,nssl_ehlw0=nssl_ehlw0_in,errmsg=errmsg,errflg=errflg,myrank=mpirank,mpiroot=mpiroot)

! For restart runs, the init is done here
if (restart) then
Expand Down
40 changes: 32 additions & 8 deletions physics/mp_nssl.meta
Original file line number Diff line number Diff line change
Expand Up @@ -151,37 +151,61 @@
intent = in
[nssl_alphah]
standard_name = nssl_alpha_graupel
long_name = graupel PSD shape parameter in NSSL micro
long_name = graupel particle size distribution(PSD) shape parameter in NSSL microphysics scheme
units = none
dimensions = ()
type = real
kind = kind_phys
intent = in
[nssl_alphahl]
standard_name = nssl_alpha_hail
long_name = hail PSD shape parameter in NSSL micro
long_name = hail particle size distribution(PSD) shape parameter in NSSL microphysics scheme
units = none
dimensions = ()
type = real
kind = kind_phys
intent = in
[nssl_alphar]
standard_name = nssl_alpha_rain
long_name = rain particle size distribution(PSD) shape parameter in NSSL microphysics scheme
units = none
dimensions = ()
type = real
kind = kind_phys
intent = in
[nssl_ehw0_in]
standard_name = nssl_graupel_collection_efficiency
long_name = graupel droplet collection efficiency in NSSL microphysics scheme
units = none
dimensions = ()
type = real
kind = kind_phys
intent = in
[nssl_ehlw0_in]
standard_name = nssl_hail_collection_efficiency
long_name = hail droplet collection efficiency in NSSL microphysics scheme
units = none
dimensions = ()
type = real
kind = kind_phys
intent = in
[nssl_ccn_on]
standard_name = nssl_ccn_on
long_name = CCN activation flag in NSSL micro
long_name = CCN activation flag in NSSL microphysics scheme
units = flag
dimensions = ()
type = logical
intent = in
[nssl_hail_on]
standard_name = nssl_hail_on
long_name = hail activation flag in NSSL micro
long_name = hail activation flag in NSSL microphysics scheme
units = flag
dimensions = ()
type = logical
intent = in
[nssl_invertccn]
standard_name = nssl_invertccn
long_name = flag to invert CCN in NSSL micro
long_name = flag to invert CCN in NSSL microphysics scheme
units = flag
dimensions = ()
type = logical
Expand Down Expand Up @@ -571,21 +595,21 @@
intent = in
[nssl_ccn_on]
standard_name = nssl_ccn_on
long_name = CCN activation flag in NSSL micro
long_name = CCN activation flag in NSSL microphysics scheme
units = flag
dimensions = ()
type = logical
intent = in
[nssl_hail_on]
standard_name = nssl_hail_on
long_name = hail activation flag in NSSL micro
long_name = hail activation flag in NSSL microphysics scheme
units = flag
dimensions = ()
type = logical
intent = in
[nssl_invertccn]
standard_name = nssl_invertccn
long_name = flag to invert CCN in NSSL micro
long_name = flag to invert CCN in NSSL microphysics scheme
units = flag
dimensions = ()
type = logical
Expand Down
7 changes: 0 additions & 7 deletions physics/noahmpdrv.F90
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,6 @@ subroutine noahmpdrv_init(lsm, lsm_noahmp, me, isot, ivegsrc, &
return
end if

if (.not. do_mynnsfclay .and. do_mynnedmf) then
errmsg = 'Problem : do_mynnsfclay = .false.' // &
'but mynnpbl is .true.. Exiting ...'
errflg = 1
return
end if

if ( do_mynnsfclay .and. .not. do_mynnedmf) then
errmsg = 'Problem : do_mynnsfclay = .true.' // &
'but mynnpbl is .false.. Exiting ...'
Expand Down

0 comments on commit f7a4342

Please sign in to comment.