Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interpolation of parent grid outputs on the boundaries of a child grid #142

Open
pierrechabert opened this issue Jul 31, 2024 · 8 comments

Comments

@pierrechabert
Copy link

Hello,

I'm trying to interpolate the outputs of a parent grid (STOFS3D) on the boundaries of a child grid, using the function OneWayNestScripts/interpolate_variables8.f90.

The following error is returned when it checks that the new netcdf file created is not corrupted (exactly at iret=nf90_enddef(ncid)):
"""Program received signal SIGBUS: Access to an undefined portion of a memory object."""

If I understand correctly, this is either due to a problem of dimension or to an incorrect definition of type of variable. I was wondering if this error occurred to someone already and how it can be fixed,

Thank you in advance for any help,

Pierre

@feiye-vims
Copy link
Member

feiye-vims commented Jul 31, 2024

Hi Pierre,

I haven't met this problem myself, but we can take a look at it if it's okay for you to share the related files.

Fei

@pierrechabert
Copy link
Author

Hi Fei,

Thank you for the quick answer! Below is a link to a .zip file that includes: the parent and child horizontal and vertical grids, along with the "interpolate_variables" .exe,.f90 and .in files. Concerning the output file to interpolate from, any out2d.nc from the second link below can make it (I tried with one in 20240730/).

Cheers,
Pierre

link zip file:
https://we.tl/t-SNC0txGCAq

link data STOFS3D:
https://noaa-nos-stofs3d-pds.s3.amazonaws.com/index.html#STOFS-3D-Atl/

@feiye-vims
Copy link
Member

feiye-vims commented Aug 1, 2024

Hi Pierre,

It seems the problem is with the outputs from the operational forecast. The script works fine on the outputs from the shadow forecast and hindcast studies. The problem may be due to some postprocessing steps in the operational forecast, which may change SCHISM's raw outputs. In contrast, the shadow forecast does not have any postprocessing, so it is free of the problem.

I will work with Zizang, who is in charge of the operation on the NOAA side, to fix this problem.

Thanks very much for pointing out the issue for us.

Fei

@josephzhang8
Copy link
Member

Thx @feiye-vims for looking into this. Maybe an easy way is for Zizang or Pierre to send you a few outputs they are using.

@feiye-vims
Copy link
Member

feiye-vims commented Aug 1, 2024

@josephzhang8 Yes, that will help, and they have already shared outputs with me. Only the outputs from the operational forecast have problems with the one-way nesting script.

I will do some debugging later when I have time. After I locate the source of the error, I'll work with Zizang on fixing it in the post-processing script.

@feiye-vims
Copy link
Member

feiye-vims commented Aug 2, 2024

Problem found: nSCHISM_vgrid_layers is missing in the post-processed out2d* from the operational forecast. Not sure if this is deliberate or not, because this only occurs in out2d* which does not depend on the variable. In any case, I see no harm in adding it back in.

Since I'm not familiar with all post-processing scripts on the operational side, I'll create a ticket in STOFS-3D github repo tomorrow and work on it with Zizang.

@pierrechabert
Copy link
Author

Hi Fei,

Thank you so much for this quick answer and information.

It is true that the dimension “nSCHISM_vgrid_layers” is missing from the “out2d*” outputs. If I understand correctly, this makes the interpolation not possible also for other variables as the out2d seems to be necessary for all of them (even with “ifile=2" in “interpolate_variables.in”).

It is nice to hear that this works well for the shadow VIMS forecast. Because the shadow grid seems to differs slightly from the stofs one (and I couldn’t find shadow staticfiles), I couldn’t try it. Anyways, I’m happy to have news if changes are made in the stofs3d outputs,

Thanks again,

Cheers,
Pierre

@feiye-vims
Copy link
Member

feiye-vims commented Aug 6, 2024

@pierrechabert

I'm working with Zizang from the operational team to fix the issue. Although it is an easy fix, it may take some time for any change to be incorporated in the operational forecast.

If you would like to try the shadow forecast, here are the static files:
https://ccrm.vims.edu/yinglong/feiye/Public/v7_static_inputs_20240521/
, and here is the aws link to the outputs:
https://noaa-nos-stofs3d-pds.s3.amazonaws.com/index.html#STOFS-3D-Atl-shadow-VIMS/
However, the shadow forecast may have missing dates due to the long queue time on Frontera recently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants