NOAA-EMC / WW3

WAVEWATCH III
Other
258 stars 519 forks source link

Fix periodicity for Cartesian unstr meshes #719

Open aliabdolali opened 2 years ago

aliabdolali commented 2 years ago

Describe the bug The FIX_PERIODCITY is activated and changes the order of nodes for cartesian and not global unstructured meshes.

To Reproduce Use a unstr cartesian grid with \deltax>180 and the ww3_grid reports "dramatic inconsistency in the grid"

Expected behavior Protections for Cartesian meshes should be added for FIX_PERIODCITY.

ccoulet commented 2 years ago

In my opinion, in FIX_PERIODCITY, the part after PT affectation should only be activated if a global mesh is selected... A tentative correction i've tested successfully: add at the beginning of the subroutine USE W3GDATMD, ONLY: ICLOSE, ICLOSE_NONE and after the line PT(3,2) ... IF ( ICLOSE /= ICLOSE_NONE ) THEN with ENDIF just before the RETURN line

JessicaMeixner-NOAA commented 2 years ago

@aliabdolali have you tested if @ccoulet solution works?