Closed Liu-Jincan closed 2 years ago
Hello @Liu-Jincan, I'll try to answer all these questions.
@sbrus89 any ideas what may be wrong? I recall you used global meshes created with OceanMesh at one point to force WW3 models.
Oh and in regard to the Mediterranean disappearing please keep in mind you can change the parameter dj_cutoff
in the msh.clean
routine which is automatically called during generation. See the docstring for setting that value.
I also started with the Example 7 script. One that I used successfully can be found here: https://github.com/sbrus89/ww3_utils/blob/master/grid/WW3_global_constant.m
I don't think I knew about the writeww3
method at that time, so I used a separate script to convert from the fort.14 format to the ww3 grid format. It looks like writeww3
should do the exact same thing.
@krober10nd, is correct that there were -180/180 modifications necessary in the WW3 code. However, the mesh file doesn't require any modification. So be sure to use a recent version of WW3. The global unstructured changes were merged in this PR: https://github.com/NOAA-EMC/WW3/pull/335 in March 2021.
@krober10nd,
Oh and in regard to the Mediterranean disappearing please keep in mind you can change the parameter
dj_cutoff
in themsh.clean
routine which is automatically called during generation. See the docstring for setting that value.
The default value of dj_cutoff
is 0.25, when set to 0.4, the Mediterranean Sea is successfully displayed.
@krober10nd,
- The elements are indeed modified to straddle the meridian. Following Steven's paper are you additionally using the modified version of the WW3 code he posted? Additional changes were necessary in the source code of WW3.
At first, I was using WW3 version 6.07, and when preprocessing the mesh, I would get the STOP WRONG TRIANGLE
error. Then I tried to use the modified version of WW3 provided by Steven, but I ended up with this error too (probably because there were some settings I didn't notice). Finally I tried to use the WW3 version downloaded on May 6, 2022, which successfully preprocesses the mesh, as @sbrus89 mentioned above.
First of all, thank you so much for developing this tool, it is very useful!
Is your feature request related to a problem? Please describe.
I want to create a globalized unstructured grid for WAVEWATCH3 to run, and the code to generate the grid is as follows (using the Example_7 program as a template):
visualization of the
m
,When I run
write(m,'Global','ww3')
, it shows an error in the functionwriteww3
, this is because the variableopedat
may be empty, so I modified part of the code ofwriteww3
, (is this a bug?)I use the obtained mesh as input grid for WAVEWATCH3, the final output Netcdf file of WAVEWATCH3 shows the mesh is problematic,
This may be due to the fact that the generated grid surrounds the whole Earth.
Steven R. Brus
(https://gmd.copernicus.org/articles/14/2917/2021/) also points out the need to modify elements that straddle the −180–+180∘ boundary.Describe the solution you'd like Is it possible to remove the grid elements around -180 (or 180)?
Describe alternatives you've considered
stereo
toRobinson
. Due to the following code inmeshgen.m
, you need to seth0
to very small for global meshes (stereo
does not need to seth0
to very small to get global meshes).Additional context This is the first time I submit an issue on github, there may be problems with the format of the question, and I'm looking forward to getting a reply, thanks~~