Skip to content

Commit

Permalink
Merge branch 'rljacob/mbcpl/add-tests' into maint-3.0 (PR #6712)
Browse files Browse the repository at this point in the history
Add a moab coupler developer test suite.
An ERS test each for fully coupled and data model cases.

Also fix a few bugs found by the testing.

[BFB]
  • Loading branch information
rljacob authored Nov 6, 2024
2 parents c8d45d6 + bd78709 commit b17bb0f
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 18 deletions.
13 changes: 13 additions & 0 deletions cime_config/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,19 @@
)
},

"e3sm_moab_dev" : {
"time" : "01:00:00",
"tests" : (
"ERS_Vmoab_Ld3.ne4pg2_oQU480.WCYCL1850NS",
"ERS_Vmoab_Ld3.ne4pg2_oQU480.F1850",
"ERS_Vmoab_Ld3.ne4pg2_ne4pg2.I1850CNPRDCTCBCTOP",
"ERS_Vmoab_Ld3.T62_oQU240wLI.GMPAS-IAF",
"ERS_Vmoab_Ld3.T62_oQU120.CMPASO-NYF",
"ERS_Vmoab_Ld3.r05_r05.RMOSGPCC",
)
},



"e3sm_gpuacc" : {
"tests" : (
Expand Down
17 changes: 2 additions & 15 deletions components/data_comps/dice/src/ice_comp_mct.F90
Original file line number Diff line number Diff line change
Expand Up @@ -79,16 +79,6 @@ subroutine ice_init_mct( EClock, cdata, x2i, i2x, NLFilename )
logical :: scmMode = .false. ! single column mode
real(R8) :: scmLat = shr_const_SPVAL ! single column lat
real(R8) :: scmLon = shr_const_SPVAL ! single column lon
#ifdef HAVE_MOAB
character(CL) :: filePath ! generic file path
character(CL) :: fileName ! generic file name
character(CS) :: timeName ! domain file: time variable name
character(CS) :: lonName ! domain file: lon variable name
character(CS) :: latName ! domain file: lat variable name
character(CS) :: hgtName ! domain file: hgt variable name
character(CS) :: maskName ! domain file: mask variable name
character(CS) :: areaName ! domain file: area variable name
#endif
character(*), parameter :: subName = "(ice_init_mct) "
!-------------------------------------------------------------------------------

Expand Down Expand Up @@ -171,12 +161,9 @@ subroutine ice_init_mct( EClock, cdata, x2i, i2x, NLFilename )

#ifdef HAVE_MOAB
if (my_task == master_task) then
call shr_stream_getDomainInfo(SDICE%stream(1), filePath,fileName,timeName,lonName, &
latName,hgtName,maskName,areaName)
call shr_stream_getFile(filePath,fileName)
! send path of ice domain to MOAB coupler.
call seq_infodata_PutData( infodata, ice_domain=fileName)
write(logunit,*), ' filename: ', filename
write(logunit,*), ' file used for ice domain ', SDICE%domainFile
call seq_infodata_PutData( infodata, ice_domain=SDICE%domainFile)
endif
#endif
!----------------------------------------------------------------------------
Expand Down
20 changes: 17 additions & 3 deletions driver-moab/main/prep_ocn_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1043,6 +1043,7 @@ subroutine prep_ocn_accum_avg_moab()
use iMOAB, only : iMOAB_SetDoubleTagStorage, iMOAB_WriteMesh
! Local Variables
integer :: ent_type, ierr
integer noflds, lsize ! used for restart case only?
character(CXX) :: tagname
character(*), parameter :: subname = '(prep_ocn_accum_avg_moab)'
#ifdef MOABDEBUG
Expand All @@ -1056,7 +1057,18 @@ subroutine prep_ocn_accum_avg_moab()
x2oacc_om = 1./x2oacc_om_cnt * x2oacc_om
end if

if (.not. allocated(x2o_om)) then
! we could come here in the restart case; not sure why only for
! the case ERS_Vmoab_T62_oQU120.CMPASO-NYF
lsize = size(x2oacc_om, 1)
noflds = size(x2oacc_om, 2)
allocate (x2o_om(lsize, noflds))
arrSize_x2o_om = noflds * lsize

endif

! ***NOTE***THE FOLLOWING ACTUALLY MODIFIES x2o_om

x2o_om = x2oacc_om
!call mct_avect_copy(x2oacc_ox(eoi), x2o_ox)
! modify the tags
Expand Down Expand Up @@ -1339,9 +1351,11 @@ subroutine prep_ocn_mrg_moab(infodata, xao_ox)
!nwflds = mct_aVect_nRattr(w2x_o)
nxflds = mct_aVect_nRattr(xao_o)

!ngflds = mct_aVect_nRattr(g2x_o)
allocate(x2o_om (lsize, noflds))
arrSize_x2o_om = lsize * noflds ! this willbe used to set/get x2o_om tags
if (.not. allocated(x2o_om)) then
!ngflds = mct_aVect_nRattr(g2x_o)
allocate(x2o_om (lsize, noflds))
arrSize_x2o_om = lsize * noflds ! this willbe used to set/get x2o_om tags
endif
allocate(a2x_om (lsize, naflds))
allocate(i2x_om (lsize, niflds))
allocate(r2x_om (lsize, nrflds))
Expand Down

0 comments on commit b17bb0f

Please sign in to comment.