Skip to content

Possible bug in SCHISM-WWM coupling for hotstart file #216

@zduvims

Description

@zduvims

Hi SCHISM group,

I may found a bug in SCHISM-WWM coupling when trying to output hotstart records for the WWM model. The tag version I used is v5.13.0.

My model runs normally if I choose to not save hotstart for WWM, but it crashes due to "start + count of out bound" if I turn on LHOTF in wwminput.nml. The model can still run for 1 time step, but it crashes at the first "starting WWM".

After some debug, I found the reason. My SCHISM mesh has quads, but as you know, WWM only supports triangle elements. The issue is that the total element in SCHISM and WWM grids are different.

To solve it, in wwm_hotfile.F90, go to the subroutine "SUBROUTINE OUTPUT_HOTFILE_NETCDF", change ne_global to ne_total:

#ifdef MPI_PARALL_GRID
      IF (MULTIPLEOUT_HOT.eq.0) THEN
        np_write=np_global
-       ne_write=ne_global
+       ne_write=ne_total   ! changed by Zhiyun Du
      ELSE
        np_write=MNP
        ne_write=MNE
      ENDIF
#else
      np_write=np_global
-     ne_write=ne_global
+     ne_write=ne_total   ! changed by Zhiyun Du
#endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions