forked from COSIMA/regional-mom6
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1237528
commit 7720132
Showing
3 changed files
with
845 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# MOM6 Angle Calculation Steps | ||
|
||
1. Calculate pi/4rads / 180 degress = Gives a 1/4 conversion of degrees to radians. I.E. multiplying an angle in degrees by this gives the conversion to radians at 1/4 the value. | ||
2. Figure out the longitudunal extent of our domain, or periodic range of longitudes. For global cases it is len_lon = 360, for our regional cases it is given by the hgrid. | ||
3. At each point on our hgrid, we find the point to the left, bottom left diag, bottom, and itself. We adjust each of these longitudes to be in the range of len_lon around the point itself. (module_around_point) | ||
4. We then find the lon_scale, which is the "trigonometric scaling factor converting changes in longitude to equivalent distances in latitudes". Whatever that actually means is we add the latitude of all four of these points from part 3 and basically average it and convert to radians. We then take the cosine of it. | ||
5. Then we calculate the angle. This is a simple arctan2 so y/x. | ||
1. The "y" component is the addition of the difference between the diagonals in longitude of lonB multiplied by the lon_scale, which is our conversion to latitude. | ||
2. The "x" component is the same addition of differences in latitude. | ||
3. Thus, given the same units, we can call arctan to get the angle in degrees | ||
6. Challenge: Because this takes the left & bottom points, we can't calculate the angle at the left and bottom edges. Therefore, we can always calculate it the other way by using the right and top points. |
755 changes: 755 additions & 0 deletions
755
regional_mom6/testing_to_be_deleted/angle_calc_mom6.ipynb
Large diffs are not rendered by default.
Oops, something went wrong.