-
Notifications
You must be signed in to change notification settings - Fork 30
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
Assumes SCRIP format grid files are in degrees #27
Comments
Hi Jon,
I just pushed a fix and tested it on an MPAS mesh in SCRIP format I had sitting around. Could you try it out and let me know if it works for you?
~ Paul
… On Dec 22, 2016, at 12:04 PM, Jon Wolfe ***@***.***> wrote:
We have had failures using tempest when our input grids are in SCRIP format but have coordinate units in radians instead of degrees. It looks like degrees are assumed in GridElements.cpp:
line 824: double dLon = dCornerLon[i][j] / 180.0 * M_PI;
line 825: double dLat = dCornerLat[i][j] / 180.0 * M_PI;
For our grids, tempest fails later during the grid validation step, with the following error: Validate mesh A Error detected (orientation): Face 354, Edge 0, Orientation 5.27839e-06 (x,y,z): n0: 9.93977e-01 1.09429e-01 -5.87795e-03 n1: 9.99983e-01 6.21380e-05 -5.89998e-03 n2: 9.99983e-01 1.10999e-04 -5.85172e-03 (lambda, phi): n0: 1.09650e-01 -5.87798e-03 n1: 6.21391e-05 -5.90001e-03 n2: 1.11001e-04 -5.85176e-03 X-Product: 5.27655e-06 2.89801e-07 -3.23976e-07
If I remove the hard-wired conversion, tempest successfully creates our regrid files.
If possible, could you add a check of the netcdf attributes for units, and convert only when in degrees? Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub <#27>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AFFX5B7_eC1vK-HPWqVLlb2CpbeI113hks5rKtfEgaJpZM4LUVIl>.
|
Hey Paul -- thanks so much, and I'll happily test it. It may be first thing in January -- we're shut down next week. But a very much appreciate the fast turnaround. Jon |
Thanks Paul - I tested your new code this morning and it worked just great. The map it created was within round-off (e-17) of the map I had made with my hard-wired version before the break -- so I think we can close this. Thanks for the quick response! |
We have had failures using tempest when our input grids are in SCRIP format but have coordinate units in radians instead of degrees. It looks like degrees are assumed in GridElements.cpp:
line 824: double dLon = dCornerLon[i][j] / 180.0 * M_PI;
line 825: double dLat = dCornerLat[i][j] / 180.0 * M_PI;
For our grids, tempest fails later during the grid validation step, with the following error:
Validate mesh A Error detected (orientation): Face 354, Edge 0, Orientation 5.27839e-06 (x,y,z): n0: 9.93977e-01 1.09429e-01 -5.87795e-03 n1: 9.99983e-01 6.21380e-05 -5.89998e-03 n2: 9.99983e-01 1.10999e-04 -5.85172e-03 (lambda, phi): n0: 1.09650e-01 -5.87798e-03 n1: 6.21391e-05 -5.90001e-03 n2: 1.11001e-04 -5.85176e-03 X-Product: 5.27655e-06 2.89801e-07 -3.23976e-07
If I remove the hard-wired conversion, tempest successfully creates our regrid files.
If possible, could you add a check of the netcdf attributes for units, and convert only when in degrees? Thanks
The text was updated successfully, but these errors were encountered: