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 hugevalue and tinyvalue, correct buildlib path, fix rc intent in … #65

Merged
merged 1 commit into from
Feb 13, 2025
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 buildlib.csm_share
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python3
import sys,os
_CIMEROOT = os.getenv("CIMEROOT")
sys.path.append(os.path.join(_CIMEROOT,"scripts","Tools"))
sys.path.append(os.path.join(_CIMEROOT,"CIME","Tools"))

from standard_script_setup import *
from CIME.utils import copyifnewer, run_bld_cmd_ensure_logging, expect, symlink_force
Expand Down
10 changes: 7 additions & 3 deletions src/shr_abort_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,14 @@ subroutine shr_abort_abort(string,rc, line, file)

!----- arguments -----
character(len=*) , intent(in), optional :: string ! error message string
integer(shr_kind_in), intent(inout), optional :: rc ! error code
integer(shr_kind_in), intent(in), optional :: rc ! error code
integer(shr_kind_in), intent(in), optional :: line
character(len=*), intent(in), optional :: file

! Local version of the string.
! (Gets a default value if string is not present.)
character(len=shr_kind_cx) :: local_string
integer :: lrc
!-------------------------------------------------------------------------------

if (present(string)) then
Expand All @@ -54,9 +55,12 @@ subroutine shr_abort_abort(string,rc, line, file)
end if
if(present(rc)) then
write(local_string, *) trim(local_string), ' rc=',rc
lrc = rc
else
lrc = 0
endif

call shr_log_error(local_string, rc=rc, line=line, file=file)
call shr_log_error(local_string, rc=lrc, line=line, file=file)

call shr_abort_backtrace()

Expand Down
4 changes: 3 additions & 1 deletion src/shr_kind_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ MODULE shr_kind_mod
!----------------------------------------------------------------------------
! precision/kind constants add data public
!----------------------------------------------------------------------------

public
integer,parameter :: SHR_KIND_R8 = selected_real_kind(12) ! 8 byte real
integer,parameter :: SHR_KIND_R4 = selected_real_kind( 6) ! 4 byte real
Expand All @@ -16,5 +17,6 @@ MODULE shr_kind_mod
integer,parameter :: SHR_KIND_CL = 256 ! long char
integer,parameter :: SHR_KIND_CX = 512 ! extra-long char
integer,parameter :: SHR_KIND_CXX= 4096 ! extra-extra-long char

real(kind=shr_kind_r8),parameter :: tinyvalue = tiny(1._shr_kind_R8) ! tiny value
real(kind=shr_kind_r8),parameter :: hugevalue = huge(1._shr_kind_r8) ! huge value
END MODULE shr_kind_mod