Skip to content

Commit

Permalink
Merge tag 'ctsm5.1.dev144' into docs-week
Browse files Browse the repository at this point in the history
Removes a use of the deprecated shr_mpi_mod, replacing with ESMF_VMBroadcast. In addition, since the last tag, some minor documentation changes have been made.
  • Loading branch information
samsrabin committed Oct 19, 2023
2 parents 73f8c24 + 995e775 commit 0c18203
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 6 deletions.
57 changes: 57 additions & 0 deletions doc/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,61 @@
===============================================================
Tag name: ctsm5.1.dev144
Originator(s): samrabin (Sam Rabin, UCAR/TSS, [email protected])
Date: Thu Oct 19 13:30:02 MDT 2023
One-line Summary: Remove a deprecated shr_mpi_bcast call

Purpose and description of changes
----------------------------------

Removes a use of the deprecated shr_mpi_mod, replacing with ESMF_VMBroadcast. In addition, since the last tag, some minor documentation changes have been made.


Significant changes to scientifically-supported configurations
--------------------------------------------------------------

Does this tag change answers significantly for any of the following physics configurations?
(Details of any changes will be given in the "Answer changes" section below.)

[Put an [X] in the box for any configuration with significant answer changes.]

[ ] clm5_1

[ ] clm5_0

[ ] ctsm5_0-nwp

[ ] clm4_5


Testing summary:
----------------

[PASS means all tests PASS; OK means tests PASS other than expected fails.]

regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing):

cheyenne ---- OK
izumi ------- OK

If the tag used for baseline comparisons was NOT the previous tag, note that here: Compared ctsm5.1.dev142 to a version of this branch (1f39800e1) with ctsm5.1.dev142 merged in.


Answer changes
--------------

Changes answers relative to baseline: No

Other details
-------------
[Remove any lines that don't apply. Remove entire section if nothing applies.]

List any externals directories updated (cime, rtm, mosart, cism, fates, etc.):

Pull Requests that document the changes (include PR ids):
* #1991 (https://github.com/ESCOMP/CTSM/pull/1991)

===============================================================
===============================================================
Tag name: ctsm5.1.dev143
Originator(s): rgknox (Ryan Knox,LAWRENCE BERKELEY NATIONAL LABORATORY,510-495-)
Date: Fri Oct 13 08:53:38 MDT 2023
Expand Down
1 change: 1 addition & 0 deletions doc/ChangeSum
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Tag Who Date Summary
============================================================================================================================
ctsm5.1.dev144 samrabin 10/19/2023 Remove a deprecated shr_mpi_bcast call
ctsm5.1.dev143 rgknox 10/13/2023 Zeroing of wood product fluxes on fates columns
ctsm5.1.dev142 samrabin 09/19/2023 Merge 5 bit-for-bit pull requests
ctsm5.1.dev141 slevis 09/13/2023 Change small snocan to zero
Expand Down
26 changes: 20 additions & 6 deletions src/cpl/nuopc/lnd_import_export.F90
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ module lnd_import_export
logical :: flds_co2a ! use case
logical :: flds_co2b ! use case
logical :: flds_co2c ! use case
logical :: force_send_to_atm = .true. ! Force sending export data to atmosphere even if ATM is not prognostic
logical :: force_send_to_atm ! Force sending export data to atmosphere even if ATM is not prognostic
integer :: glc_nec ! number of glc elevation classes
integer, parameter :: debug = 0 ! internal debug level

Expand Down Expand Up @@ -201,7 +201,8 @@ subroutine advertise_fields(gcomp, flds_scalar_name, glc_present, cism_evolve, r
! Advertise export fields
!--------------------------------

call ReadCapNamelist( NLFilename )
call ReadCapNamelist( NLFilename, rc )
if (ChkErr(rc,__LINE__,u_FILE_u)) return

! Need to determine if there is no land for single column before the advertise call is done

Expand Down Expand Up @@ -1289,25 +1290,32 @@ logical function fldchk(state, fldname)
end function fldchk

!===============================================================================
subroutine ReadCapNamelist( NLFilename )
subroutine ReadCapNamelist( NLFilename, rc )

! ----------------------------------------------------
! Read in tne namelist for CTSM nuopc cap level items
! ----------------------------------------------------
use ESMF , only : ESMF_VMGetCurrent, ESMF_VMBroadcast, ESMF_VM
use clm_nlUtilsMod , only : find_nlgroup_name
use shr_mpi_mod , only : shr_mpi_bcast
use spmdMod , only : mpicom
use abortutils , only : endrun
use shr_log_mod , only : errMsg => shr_log_errMsg
! !ARGUMENTS:
character(len=*), intent(IN) :: NLFilename ! Namelist filename
integer, intent(out) :: rc ! ESMF return code
! !LOCAL VARIABLES:
integer :: nu_nml ! unit for namelist file
integer :: nml_error ! namelist i/o error flag
integer, target :: tmp(1)
type(ESMF_VM) :: vm
character(*), parameter :: nml_name = "ctsm_nuopc_cap" ! MUST match with namelist name below


namelist /ctsm_nuopc_cap/ force_send_to_atm

tmp = 0
rc = ESMF_SUCCESS
! Read namelist
force_send_to_atm = .true.
if (masterproc) then
open( newunit=nu_nml, file=trim(NLFilename), status='old', iostat=nml_error )
call find_nlgroup_name(nu_nml, nml_name, status=nml_error)
Expand All @@ -1318,10 +1326,16 @@ subroutine ReadCapNamelist( NLFilename )
end if
end if
close(nu_nml)
if (force_send_to_atm) tmp(1) = 1
endif
call ESMF_VMGetCurrent(vm, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

! Broadcast namelist to all processors
call shr_mpi_bcast(force_send_to_atm , mpicom)
call ESMF_VMBroadcast(vm, tmp, 1, 0, rc=rc)

force_send_to_atm = (tmp(1) == 1)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

end subroutine ReadCapNamelist

Expand Down

0 comments on commit 0c18203

Please sign in to comment.