schism-dev / schism-esmf

Earth System Modeling Framework cap for SCHISM
5 stars 6 forks source link

Reserve stream I/O units from ESMF and move info to SCHISM #6

Closed platipodium closed 1 year ago

platipodium commented 2 years ago

In a coupled system, we need to avoid overlap of I/O units used. ESMF provides infrastructure, which we can use in the cap to tell SCHISM which units are available.

from WW3 Cap:

! 1.f Identify available unit numbers
! Each ESMF_UtilIOUnitGet is followed by an OPEN statement for that
! unit so that subsequent ESMF_UtilIOUnitGet calls do not return the
! the same unit.  After getting all the available unit numbers, close
! the units since they will be opened within WMINIT.
!
      call ESMF_UtilIOUnitGet(idsi); open(unit=idsi, status='scratch');
      call ESMF_UtilIOUnitGet(idso); open(unit=idso, status='scratch');
      call ESMF_UtilIOUnitGet(idss); open(unit=idss, status='scratch');
      call ESMF_UtilIOUnitGet(idst); open(unit=idst, status='scratch');
      call ESMF_UtilIOUnitGet(idse); open(unit=idse, status='scratch');
      close(idsi); close(idso); close(idss); close(idst); close(idse);

Then, of course that info needs to be communicate to SCHISM.

platipodium commented 1 year ago

As the I/O calls occur within SCHISM, this conflicts with the current build in two stages, first SCHISM then SCHISM-ESMF.

josephzhang8 commented 1 year ago

This seems to defeat the design of independent components? I thought we only need to worry about the conflict if components are tightly integrated (e.g. WWM, SCHISM)?

platipodium commented 1 year ago

Yep, that’s why I marked it as won’t fix.