Skip to content

Commit 972af3d

Browse files
committed
Merge branch 'master' of https://github.com/uturuncoglu/RegESM
2 parents 2fa29ed + 32a0c51 commit 972af3d

File tree

2 files changed

+3
-15
lines changed

2 files changed

+3
-15
lines changed

mod_esmf_cop.F90

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ subroutine COP_SetInitializeP1(gcomp, &
301301
rc = ESMF_SUCCESS
302302
!
303303
!-----------------------------------------------------------------------
304-
! Set import fields
304+
! Set import fields (one-way interaction, there is no export fields)
305305
!-----------------------------------------------------------------------
306306
!
307307
do i = 1, ubound(models(Icopro)%importField, dim=1)
@@ -313,20 +313,6 @@ subroutine COP_SetInitializeP1(gcomp, &
313313
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
314314
line=__LINE__, file=FILENAME)) return
315315
end do
316-
!
317-
!-----------------------------------------------------------------------
318-
! Set export fields
319-
!-----------------------------------------------------------------------
320-
!
321-
do i = 1, ubound(models(Icopro)%exportField, dim=1)
322-
call NUOPC_Advertise(exportState, &
323-
StandardName=trim(models(Icopro)%exportField(i)%long_name),&
324-
name=trim(models(Icopro)%exportField(i)%short_name), &
325-
TransferOfferGeomObject="cannot provide", &
326-
rc=rc)
327-
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
328-
line=__LINE__, file=FILENAME)) return
329-
end do
330316
!
331317
end subroutine COP_SetInitializeP1
332318
!

util/mod_config.F90

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,6 +1031,7 @@ subroutine set_field_dir(vm, rc)
10311031
if (.not. models(i)%modActive) cycle
10321032
!
10331033
do j = 1, nf
1034+
if (.not. allocated(models(i)%exportField)) cycle
10341035
lname = trim(models(i)%exportField(j)%long_name)
10351036
sname = trim(models(i)%exportField(j)%short_name)
10361037
units = trim(models(i)%exportField(j)%units)
@@ -1052,6 +1053,7 @@ subroutine set_field_dir(vm, rc)
10521053
!
10531054
nf = size(models(i)%importField)
10541055
do j = 1, nf
1056+
if (.not. allocated(models(i)%importField)) cycle
10551057
lname = trim(models(i)%importField(j)%long_name)
10561058
sname = trim(models(i)%importField(j)%short_name)
10571059
units = trim(models(i)%importField(j)%units)

0 commit comments

Comments
 (0)