Skip to content

Commit

Permalink
(regesm) : remove halo update and fix field write
Browse files Browse the repository at this point in the history
  • Loading branch information
uturuncoglu committed Jan 30, 2019
1 parent 46abb10 commit 53f7b96
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions mod_esmf_ocn_mit.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1595,7 +1595,8 @@ subroutine OCN_Get(gcomp, rc)
!-----------------------------------------------------------------------
!
integer :: i, j, ii, jj, bi, bj, iG, jG, imax, jmax
integer :: id, iyear, iday, imonth, ihour, iunit
integer :: id, iunit
integer :: iyear, iday, imonth, ihour, iminute, isec
integer :: LBi, UBi, LBj, UBj
integer :: localPet, petCount, itemCount, localDECount
character(ESMF_MAXSTR) :: cname, ofile
Expand Down Expand Up @@ -1635,7 +1636,7 @@ subroutine OCN_Get(gcomp, rc)
line=__LINE__, file=FILENAME)) return
!
call ESMF_TimeGet(currTime, yy=iyear, mm=imonth, &
dd=iday, h=ihour, rc=rc)
dd=iday, h=ihour, m=iminute, s=isec, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, file=FILENAME)) return
end if
Expand Down Expand Up @@ -1970,7 +1971,7 @@ subroutine OCN_Get(gcomp, rc)
!
if (debugLevel == 3) then
write(ofile,80) 'ocn_import', trim(itemNameList(i)), &
iyear, imonth, iday, ihour, localPet
iyear, imonth, iday, ihour, iminute, isec
call ESMF_FieldWrite(field, trim(ofile)//'.nc', rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, file=FILENAME)) return
Expand All @@ -1991,7 +1992,9 @@ subroutine OCN_Get(gcomp, rc)
!
60 format(' PET(',I3,') - DE(',I2,') - ', A20, ' : ', 4I8)
70 format(A10,'_',A,'_',I4,'-',I2.2,'-',I2.2,'_',I2.2,'_',I2.2,'_',I1)
80 format(A10,'_',A,'_',I4,'-',I2.2,'-',I2.2,'_',I2.2,'_',I2.2)
80 format(A10,'_',A,'_', &
I4,'-',I2.2,'-',I2.2,'_',I2.2,'_',I2.2,'_',I2.2)

!
end subroutine OCN_Get
!
Expand All @@ -2017,7 +2020,8 @@ subroutine OCN_Put(gcomp, rc)
!-----------------------------------------------------------------------
!
integer :: bi, bj, iG, jG, imax, jmax
integer :: i, j, ii, jj, iunit, iyear, iday, imonth, ihour
integer :: i, j, ii, jj, iunit
integer :: iyear, iday, imonth, ihour, iminute, isec
integer :: petCount, localPet, itemCount, localDECount
character(ESMF_MAXSTR) :: cname, ofile
character(ESMF_MAXSTR), allocatable :: itemNameList(:)
Expand Down Expand Up @@ -2055,7 +2059,7 @@ subroutine OCN_Put(gcomp, rc)
line=__LINE__, file=FILENAME)) return
!
call ESMF_TimeGet(currTime, yy=iyear, mm=imonth, &
dd=iday, h=ihour, rc=rc)
dd=iday, h=ihour, m=iminute, s=isec, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, file=FILENAME)) return
end if
Expand Down Expand Up @@ -2107,10 +2111,10 @@ subroutine OCN_Put(gcomp, rc)
! Perform halo region update
!-----------------------------------------------------------------------
!
call ESMF_FieldHalo(field, routehandle=rh_halo, &
checkflag=.false., rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, file=FILENAME)) return
! call ESMF_FieldHalo(field, routehandle=rh_halo, &
! checkflag=.false., rc=rc)
! if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
! line=__LINE__, file=FILENAME)) return
!
!-----------------------------------------------------------------------
! Loop over decomposition elements (DEs)
Expand Down Expand Up @@ -2183,7 +2187,7 @@ subroutine OCN_Put(gcomp, rc)
!
if (debugLevel == 3) then
write(ofile,100) 'ocn_export', trim(itemNameList(i)), &
iyear, imonth, iday, ihour, localPet
iyear, imonth, iday, ihour, iminute, isec
call ESMF_FieldWrite(field, trim(ofile)//'.nc', rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, file=FILENAME)) return
Expand All @@ -2203,7 +2207,9 @@ subroutine OCN_Put(gcomp, rc)
!-----------------------------------------------------------------------
!
90 format(A10,'_',A,'_',I4,'-',I2.2,'-',I2.2,'_',I2.2,'_',I2.2,'_',I1)
100 format(A10,'_',A,'_',I4,'-',I2.2,'-',I2.2,'_',I2.2,'_',I2.2)
100 format(A10,'_',A,'_', &
I4,'-',I2.2,'-',I2.2,'_',I2.2,'_',I2.2,'_',I2.2)

!
end subroutine OCN_Put
!
Expand Down

0 comments on commit 53f7b96

Please sign in to comment.