Skip to content

Commit

Permalink
runs several hours, then
Browse files Browse the repository at this point in the history
 #7  0x0000000001b384f1 in setglobalinput (
    importstate=<error reading variable: Cannot access memory at address 0x7ffe86fde000>, fldname=..., vm=..., global_output=..., rc=0,
   .tmp.FLDNAME.len_V$7b73=0)
    at /glade/work/worthen/ufs_ww3debug/WW3/model/src/wav_import_export.F90:1483
 #8  0x0000000001b37cb6 in wav_import_export::import_fields (
  • Loading branch information
DeniseWorthen committed Dec 8, 2021
1 parent 6d936ff commit c2af315
Showing 1 changed file with 25 additions and 107 deletions.
132 changes: 25 additions & 107 deletions model/src/wav_import_export.F90
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ subroutine import_fields( gcomp, rc )
use w3gdatmd , only: w3setg
use w3wdatmd , only: w3setw
use w3idatmd , only: tfn, w3seti
use wmmdatmd , only: wmsetm
use wmmdatmd , only: wmsetm, mpi_comm_grd
use wmupdtmd , only: wmupd2
use wmmdatmd , only: mdse, mdst, nrgrd, inpmap
use w3idatmd , only: UX0, UY0, UXN, UYN, TU0, TUN
Expand All @@ -241,6 +241,7 @@ subroutine import_fields( gcomp, rc )
#ifdef CESMCOUPLED
character(len=10) :: uwnd = 'Sa_u', vwnd = 'Sa_v'
#else
integer :: mpi_comm_null = -1
integer :: imod, j, jmod
character(len=128):: fldname
character(len=10) :: uwnd = 'Sa_u10m', vwnd = 'Sa_v10m'
Expand Down Expand Up @@ -290,7 +291,10 @@ subroutine import_fields( gcomp, rc )

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

#ifndef CESMCOUPLED
call w3setg ( 1, mdse, mdst )
call w3seti ( 1, mdse, mdst )
#endif
! ---------------
! INFLAGS1(1)
! ---------------
Expand All @@ -311,10 +315,6 @@ subroutine import_fields( gcomp, rc )
if (INFLAGS1(2)) then
TC0 = time0 ! times for ocn current fields
TCN = timen
tfn(:,2) = timen

call w3setg ( 1, mdse, mdst )
call w3seti ( 1, mdse, mdst )

CX0(:,:) = def_value ! ocn u current
CXN(:,:) = def_value
Expand Down Expand Up @@ -345,19 +345,6 @@ subroutine import_fields( gcomp, rc )
end do
end do
end if
#ifndef CESMCOUPLED
j = 2
do imod = 1,nrgrd
call w3setg ( imod, mdse, mdst )
call w3setw ( imod, mdse, mdst )
call w3seti ( imod, mdse, mdst )
call wmsetm ( imod, mdse, mdst )
jmod = inpmap(imod,j)
if ( jmod.lt.0 .and. jmod.ne.-999 ) then
call wmupd2( imod, j, jmod, rc )
endif
enddo
#endif
end if

! ---------------
Expand All @@ -366,10 +353,6 @@ subroutine import_fields( gcomp, rc )
if (INFLAGS1(3)) then
TW0 = time0 ! times for atm wind/temp fields.
TWN = timen
tfn(:,3) = timen

call w3setg ( 1, mdse, mdst )
call w3seti ( 1, mdse, mdst )

WX0(:,:) = def_value ! atm u wind
WXN(:,:) = def_value
Expand Down Expand Up @@ -420,31 +403,13 @@ subroutine import_fields( gcomp, rc )
end do
deallocate(data_global2)
end if
#ifndef CESMCOUPLED
j = 3
do imod = 1,nrgrd
call w3setg ( imod, mdse, mdst )
call w3setw ( imod, mdse, mdst )
call w3seti ( imod, mdse, mdst )
call wmsetm ( imod, mdse, mdst )
jmod = inpmap(imod,j)
if ( jmod.lt.0 .and. jmod.ne.-999 ) then
call wmupd2( imod, j, jmod, rc )
endif
enddo
#endif
end if

! ---------------
! INFLAGS1(4) - ice fraction field
! ---------------
if (INFLAGS1(4)) then
TIN = timen ! time for ice field
tfn(:,4) = timen

call w3setg ( 1, mdse, mdst )
call w3seti ( 1, mdse, mdst )

ICEI(:,:) = def_value ! ice frac
if (state_fldchk(importState, 'Si_ifrac')) then
call SetGlobalInput(importState, 'Si_ifrac', vm, data_global, rc)
Expand All @@ -457,19 +422,6 @@ subroutine import_fields( gcomp, rc )
end do
end do
end if
#ifndef CESMCOUPLED
j = 4
do imod = 1,nrgrd
call w3setg ( imod, mdse, mdst )
call w3setw ( imod, mdse, mdst )
call w3seti ( imod, mdse, mdst )
call wmsetm ( imod, mdse, mdst )
jmod = inpmap(imod,j)
if ( jmod.lt.0 .and. jmod.ne.-999 ) then
call wmupd2( imod, j, jmod, rc )
endif
enddo
#endif
end if
#ifdef CESMCOUPLED
! ---------------
Expand All @@ -495,10 +447,6 @@ subroutine import_fields( gcomp, rc )
if (INFLAGS1(5)) then
TU0 = time0 ! times for atm momentum fields.
TUN = timen
tfn(:,5) = timen

call w3setg ( 1, mdse, mdst )
call w3seti ( 1, mdse, mdst )

UX0(:,:) = def_value ! atm u momentum
UXN(:,:) = def_value
Expand Down Expand Up @@ -530,31 +478,13 @@ subroutine import_fields( gcomp, rc )
UYN(ix,iy) = data_global(n)
end do
end do
#ifndef CESMCOUPLED
j = 5
do imod = 1,nrgrd
call w3setg ( imod, mdse, mdst )
call w3setw ( imod, mdse, mdst )
call w3seti ( imod, mdse, mdst )
call wmsetm ( imod, mdse, mdst )
jmod = inpmap(imod,j)
if ( jmod.lt.0 .and. jmod.ne.-999 ) then
call wmupd2( imod, j, jmod, rc )
endif
enddo
#endif
end if
#endif
! ---------------
! INFLAGS1(-7)
! ---------------
if (INFLAGS1(-7)) then
TI1 = timen ! time for ice field
tfn(:,-7) = timen

call w3setg ( 1, mdse, mdst )
call w3seti ( 1, mdse, mdst )

ICEP1(:,:) = def_value ! ice thickness
if (state_fldchk(importState, 'Si_thick')) then
call SetGlobalInput(importState, 'Si_thick', vm, data_global, rc)
Expand All @@ -567,31 +497,13 @@ subroutine import_fields( gcomp, rc )
end do
end do
end if
#ifndef CESMCOUPLED
j = -7
do imod = 1,nrgrd
call w3setg ( imod, mdse, mdst )
call w3setw ( imod, mdse, mdst )
call w3seti ( imod, mdse, mdst )
call wmsetm ( imod, mdse, mdst )
jmod = inpmap(imod,j)
if ( jmod.lt.0 .and. jmod.ne.-999 ) then
call wmupd2( imod, j, jmod, rc )
endif
enddo
#endif
end if

! ---------------
! INFLAGS1(-3)
! ---------------
if (INFLAGS1(-3)) then
TI5 = timen ! time for ice field
tfn(:,-3) = timen

call w3setg ( 1, mdse, mdst )
call w3seti ( 1, mdse, mdst )

ICEP5(:,:) = def_value ! ice floe size
if (state_fldchk(importState, 'Si_floediam')) then
call SetGlobalInput(importState, 'Si_floediam', vm, data_global, rc)
Expand All @@ -604,21 +516,27 @@ subroutine import_fields( gcomp, rc )
end do
end do
end if
end if
#ifndef CESMCOUPLED
j = -3
do imod = 1,nrgrd
call w3setg ( imod, mdse, mdst )
call w3setw ( imod, mdse, mdst )
call w3seti ( imod, mdse, mdst )
call wmsetm ( imod, mdse, mdst )
jmod = inpmap(imod,j)
if ( jmod.lt.0 .and. jmod.ne.-999 ) then
call wmupd2( imod, j, jmod, rc )
endif
enddo
do j = -7,9 !hardwired
if (inflags1(j)) then
tfn(:,j) = timen
do imod = 1,nrgrd
call w3setg ( imod, mdse, mdst )
call w3setw ( imod, mdse, mdst )
call w3seti ( imod, mdse, mdst )
call wmsetm ( imod, mdse, mdst )
#ifdef W3_MPI
if ( mpi_comm_grd .eq. mpi_comm_null ) cycle
#endif
jmod = inpmap(imod,j)
if ( jmod.lt.0 .and. jmod.ne.-999 ) then
call wmupd2( imod, j, jmod, rc )
end if
end do
end if
end do
#endif
end if

call ESMF_LogWrite(trim(subname)//": done", ESMF_LOGMSG_INFO)

end subroutine import_fields
Expand Down

0 comments on commit c2af315

Please sign in to comment.