Skip to content

Commit

Permalink
Add data ocean support and add support for reading modelio:: attribut…
Browse files Browse the repository at this point in the history
…e group ... (#106)

* Update component_HYCOM.mk to support NAVY HYCOM NUOPC cap.

* Pointing machine architecture and parallelization strategy for HYCOM/NUOPC for jet/orion/wcoss

* Feature/hafs couplehycom (#2)

Merge feature/hafs_couplehycom branch back into support/HAFS branch

Preparations for external PIO (Ufuk)
*Added CPP -DPIO to wrap calls to pio library
*component_CDEPS.mk added to configure CDEPS build
*component_CDEPS_DATM.mk added to configure CDEPS_DATM build
*component_CDEPS_DOCN.mk added to configure CDEPS_DOCN build
*component_CMEPS.mk CMEPS-INSTALL moved, default INTERNAL_PIO_INIT added
*component_HYCOM.mk added extra build call to HYCOM model
*module_EARTH_GRID_COMP.F90 added FRONT_CDEPS_DATM and FRONT_CDEPS_DOCN, added pio initialization
Added diagnostics (Dan)
*module_EARTH_GRID_COMP.F90 added connector diagnostics configuration

Co-authored-by: Ufuk Turuncoglu <[email protected]>
Co-authored-by: Daniel Rosen <[email protected]>

* ad capability to handle modelio attribute in nems.configure

* add cdeps data ocean support

* fix undefined variable issue

Co-authored-by: Daniel Rosen <[email protected]>
Co-authored-by: Biju Thomas <[email protected]>
Co-authored-by: Bin.Liu <[email protected]>
Co-authored-by: Ufuk Turuncoglu <[email protected]>
  • Loading branch information
5 people authored Jul 20, 2021
1 parent 4fc6d1e commit e17870e
Showing 1 changed file with 27 additions and 2 deletions.
29 changes: 27 additions & 2 deletions src/module_EARTH_GRID_COMP.F90
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ MODULE module_EARTH_GRID_COMP
#endif
#ifdef FRONT_MOM6
use FRONT_MOM6, only: MOM6_SS => SetServices
#endif
#ifdef FRONT_CDEPS_DOCN
use FRONT_CDEPS_DOCN, only: DOCN_SS => SetServices
#endif
! - Handle build time ICE options:
#ifdef FRONT_CICE6
Expand Down Expand Up @@ -236,12 +239,12 @@ subroutine SetModelServices(driver, rc)
integer :: petListBounds(2)
integer :: componentCount
type(NUOPC_FreeFormat) :: attrFF, fdFF
logical :: found_comp
logical :: found_comp
logical :: isPresent
#ifdef CMEPS
logical :: read_restart
character(ESMF_MAXSTR) :: cvalue
character(len=5) :: inst_suffix
logical :: isPresent
#endif
rc = ESMF_SUCCESS

Expand Down Expand Up @@ -370,6 +373,14 @@ subroutine SetModelServices(driver, rc)
found_comp = .true.
end if
#endif
#ifdef FRONT_CDEPS_DOCN
if (trim(model) == "docn") then
call NUOPC_DriverAddComp(driver, trim(prefix), DOCN_SS, &
petList=petList, comp=comp, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
found_comp = .true.
end if
#endif
#ifdef FRONT_CICE6
if (trim(model) == "cice6") then
call NUOPC_DriverAddComp(driver, trim(prefix), CICE6_SS, &
Expand Down Expand Up @@ -442,6 +453,20 @@ subroutine SetModelServices(driver, rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call NUOPC_FreeFormatDestroy(attrFF, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return

call ESMF_ConfigFindNextLabel(config, &
label=trim(prefix)//"_modelio::", isPresent=isPresent, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
if (isPresent) then
attrFF = NUOPC_FreeFormatCreate(config, &
label=trim(prefix)//"_modelio::", relaxedflag=.true., rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call NUOPC_CompAttributeIngest(comp, attrFF, addFlag=.true., rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
call NUOPC_FreeFormatDestroy(attrFF, rc=rc)
if (ChkErr(rc,__LINE__,u_FILE_u)) return
endif

! clean-up
deallocate(petList)

Expand Down

0 comments on commit e17870e

Please sign in to comment.