Skip to content

Commit

Permalink
update files from capbuild branch
Browse files Browse the repository at this point in the history
  • Loading branch information
DeniseWorthen committed Dec 7, 2021
1 parent 93c1547 commit 6d936ff
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 33 deletions.
3 changes: 3 additions & 0 deletions model/esmf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ WW3_BINDIR := $(WW3_DIR)/bin
WW3_TMPDIR := $(WW3_DIR)/tmp
WW3_EXEDIR := $(WW3_DIR)/exe
WW3_COMP ?= gnu
WW3_F90 := gfortran
SWITCHES := $(shell cat switch)

WWATCH3_ENV := $(WW3_BINDIR)/wwatch3.env
Expand Down Expand Up @@ -40,6 +41,8 @@ else ifeq ("$(WW3_COMP)",$(filter "$(WW3_COMP)","wcoss_cray" "wcoss_dell_p3" "ga
ESMF_F90COMPILEOPTS := $(ESMF_F90COMPILEOPTS) -convert big_endian
else ifeq ("$(WW3_COMP)",$(filter "$(WW3_COMP)","wcoss2"))
ESMF_F90COMPILEOPTS := $(ESMF_F90COMPILEOPTS) -convert big_endian
WW3_CC=cc
WW3_F90=ftn
else ifeq ("$(WW3_COMP)",$(filter "$(WW3_COMP)","intel" "datarmor_intel" "datarmor_intel_debug"))
ESMF_F90COMPILEOPTS := $(ESMF_F90COMPILEOPTS) -convert big_endian
# mpt
Expand Down
2 changes: 1 addition & 1 deletion model/src/w3cesmmd.F90
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ MODULE W3CESMMD
integer, public :: outfreq ! output frequency in hours
integer, public :: stdout ! output log file

integer, public :: inst_index ! number of current instance (ie. 1)
integer, public :: inst_index ! number of current instance (ie. 1)
character(len=16), public :: inst_name ! fullname of current instance (ie. "wav_0001")
character(len=16), public :: inst_suffix ! char string associated with instance
!/
Expand Down
1 change: 0 additions & 1 deletion model/src/wav_comp_nuopc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,6 @@ subroutine ModelAdvance(gcomp, rc)
integer :: tod ! current time of day (sec)
integer :: time0(2)
integer :: timen(2)
logical :: lerr
integer :: shrlogunit ! original log unit and level
character(ESMF_MAXSTR) :: msgString
character(len=*),parameter :: subname = '(wav_comp_nuopc:ModelAdvance) '
Expand Down
39 changes: 16 additions & 23 deletions model/src/wav_import_export.F90
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,6 @@ subroutine realize_fields(gcomp, mesh, flds_scalar_name, flds_scalar_num, rc)
mesh=mesh, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

call state_diagnose(exportState, 'at realize ', rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

call state_reset(ExportState, zero, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call state_reset(ImportState, zero, rc=rc)
Expand Down Expand Up @@ -291,7 +288,7 @@ subroutine import_fields( gcomp, rc )
! fill with special values as default, these should not be used in practice
! set time for input data to time0 and timen (shouldn't matter)

! note that INFLAGS(1-5) is true
! note that INFLAGS(1-5) is true for CESM, for UWM INFLAGS(2:4) is true
def_value = 0.0

! ---------------
Expand Down Expand Up @@ -1020,9 +1017,6 @@ subroutine export_fields (gcomp, rc)
sw_vstokes2(:)= zero
sw_ustokes3(:)= zero
sw_vstokes3(:)= zero
! usspf(2); usspf(1) = 1; usspf(2) = 3
! grid.inp: IUSSP=3, STK_WN = 0.04, 0.11, 0.33 (spec bins)
! nk=25
call CALC_U3STOKES(va, 2)

do jsea = 1,nseal
Expand Down Expand Up @@ -1350,8 +1344,8 @@ subroutine CalcRoughl ( wrln )
logical :: llws(nspec)
logical, save :: firstCall = .true.

integer :: lb, ub
character(len=1024) :: msgString
!integer :: lb, ub
!character(len=1024) :: msgString

!----------------------------------------------------------------------

Expand Down Expand Up @@ -1384,30 +1378,29 @@ subroutine CalcRoughl ( wrln )
wrln(jsea) = charn(jsea)*ust(isea)**2/grav
enddo jsea_loop

!if(ix .eq. 86 .and. iy .eq. 230),index= on 194 index 2958
!write(msgString,'(A18,g14.7)')'CalcRoughl mapsta ',mapsta(230,86)
call ESMF_LogWrite(trim(msgString), ESMF_LOGMSG_INFO)
!call ESMF_LogWrite(trim(msgString), ESMF_LOGMSG_INFO)
!write(msgString,'(A,10g14.7)')'CalcRoughl mapsta ',mapsta(230,83:92)
!call ESMF_LogWrite(trim(msgString), ESMF_LOGMSG_INFO)

lb = lbound(ust,1); ub = ubound(ust,1)
!lb = lbound(ust,1); ub = ubound(ust,1)
!write(msgString,'(A,2i7,10g14.7)')'CalcRoughl ust ',lb,ub, ust((ub-lb)/2:9+(ub-lb)/2)
write(msgString,'(A18,2i7,10g14.7)')'CalcRoughl ust ',lb,ub, ust(2955:2964)
call ESMF_LogWrite(trim(msgString), ESMF_LOGMSG_INFO)
!write(msgString,'(A18,2i7,10g14.7)')'CalcRoughl ust ',lb,ub, ust(2955:2964)
!call ESMF_LogWrite(trim(msgString), ESMF_LOGMSG_INFO)

lb = lbound(charn,1); ub = ubound(charn,1)
!lb = lbound(charn,1); ub = ubound(charn,1)
!write(msgString,'(A,2i7,10g14.7)')'CalcRoughl charn ',lb,ub, charn((ub-lb)/2:9+(ub-lb)/2)
write(msgString,'(A18,2i7,10g14.7)')'CalcRoughl charn ',lb,ub, charn(2955:2964)
call ESMF_LogWrite(trim(msgString), ESMF_LOGMSG_INFO)
!write(msgString,'(A18,2i7,10g14.7)')'CalcRoughl charn ',lb,ub, charn(2955:2964)
!call ESMF_LogWrite(trim(msgString), ESMF_LOGMSG_INFO)

lb = lbound(wrln,1); ub = ubound(wrln,1)
!lb = lbound(wrln,1); ub = ubound(wrln,1)
!write(msgString,'(A,2i7,10g14.7)')'CalcRoughl wrln ',lb,ub, wrln((ub-lb)/2:9+(ub-lb)/2)
write(msgString,'(A18,2i7,10g14.7)')'CalcRoughl wrln ',lb,ub, wrln(2955:2964)
call ESMF_LogWrite(trim(msgString), ESMF_LOGMSG_INFO)
!write(msgString,'(A18,2i7,10g14.7)')'CalcRoughl wrln ',lb,ub, wrln(2955:2964)
!call ESMF_LogWrite(trim(msgString), ESMF_LOGMSG_INFO)

lb = lbound(u10,1); ub = ubound(u10,1)
write(msgString,'(A18,2i7,10g14.7)')'CalcRoughl u10 ',lb,ub, u10(2955:2964)
call ESMF_LogWrite(trim(msgString), ESMF_LOGMSG_INFO)
!lb = lbound(u10,1); ub = ubound(u10,1)
!write(msgString,'(A18,2i7,10g14.7)')'CalcRoughl u10 ',lb,ub, u10(2955:2964)
!call ESMF_LogWrite(trim(msgString), ESMF_LOGMSG_INFO)

firstCall = .false.

Expand Down
14 changes: 6 additions & 8 deletions model/src/wav_shr_methods.F90
Original file line number Diff line number Diff line change
Expand Up @@ -373,11 +373,10 @@ subroutine state_diagnose(State, string, rc)
real(r8), pointer :: dataPtr1d(:)
real(r8), pointer :: dataPtr2d(:,:)
character(len=*),parameter :: subname='(state_diagnose)'
integer :: lb,ub
!integer :: lb,ub
! ----------------------------------------------


!print*, 'HK inside state_diagnose'
call ESMF_StateGet(state, itemCount=fieldCount, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return
allocate(lfieldnamelist(fieldCount))
Expand All @@ -393,18 +392,17 @@ subroutine state_diagnose(State, string, rc)
call field_getfldptr(lfield, fldptr1=dataPtr1d, fldptr2=dataPtr2d, rank=lrank, rc=rc)
if (chkerr(rc,__LINE__,u_FILE_u)) return

!print*, 'HK state_diagnose lrank ',trim(lfieldnamelist(n)), lrank

if (lrank == 0) then
! no local data
elseif (lrank == 1) then
if (size(dataPtr1d) > 0) then
!write(msgString,'(A,3g14.7,i8)') trim(string)//': '//trim(lfieldnamelist(n))//' ', &
! minval(dataPtr1d), maxval(dataPtr1d), sum(dataPtr1d), size(dataPtr1d)
lb = lbound(dataPtr1d,1); ub = ubound(dataPtr1d,1)
write(msgString,'(A,2i7,10g14.7)') trim(string)//': '//trim(lfieldnamelist(n))//' ', &
write(msgString,'(A,3g14.7,i8)') trim(string)//': '//trim(lfieldnamelist(n))//' ', &
minval(dataPtr1d), maxval(dataPtr1d), sum(dataPtr1d), size(dataPtr1d)
!lb = lbound(dataPtr1d,1); ub = ubound(dataPtr1d,1)
!write(msgString,'(A,2i7,10g14.7)') trim(string)//': '//trim(lfieldnamelist(n))//' ', &
!lb,ub,dataPtr1d((ub-lb)/2:9+(ub-lb)/2)
lb,ub,dataPtr1d(2955:2964)
!lb,ub,dataPtr1d(2955:2964)
else
write(msgString,'(A,a)') trim(string)//': '//trim(lfieldnamelist(n))," no data"
endif
Expand Down

0 comments on commit 6d936ff

Please sign in to comment.