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
Showing
1 changed file
with
55 additions
and
60 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -186,36 +186,33 @@ def quadrilateral_areas(lat, lon, R=1): | |
def ap2ep(uc, vc): | ||
"""Convert complex tidal u and v to tidal ellipse. | ||
Adapted from ap2ep.m for Matlab | ||
Original copyright notice: | ||
``` | ||
Authorship Copyright: | ||
The author retains the copyright of this program, while you are welcome | ||
to use and distribute it as long as you credit the author properly and respect | ||
the program name itself. Particularly, you are expected to retain the original | ||
author's name in this original version or any of its modified version that | ||
you might make. You are also expected not to essentially change the name of | ||
the programs except for adding possible extension for your own version you | ||
might create, e.g. ap2ep_xx is acceptable. Any suggestions are welcome and | ||
enjoy my program(s)! | ||
Author Info: | ||
Zhigang Xu, Ph.D. | ||
(pronounced as Tsi Gahng Hsu) | ||
Research Scientist | ||
Coastal Circulation | ||
Bedford Institute of Oceanography | ||
1 Challenge Dr. | ||
P.O. Box 1006 Phone (902) 426-2307 (o) | ||
Dartmouth, Nova Scotia Fax (902) 426-7827 | ||
CANADA B2Y 4A2 email [email protected] | ||
Release Date: Nov. 2000, Revised on May. 2002 to adopt Foreman's northern semi | ||
major axis convention. | ||
``` | ||
Adapted from ap2ep.m for Matlab. Copyright notice:: | ||
Authorship: | ||
The author retains the copyright of this program, while you are welcome | ||
to use and distribute it as long as you credit the author properly and respect | ||
the program name itself. Particularly, you are expected to retain the original | ||
author's name in this original version or any of its modified version that | ||
you might make. You are also expected not to essentially change the name of | ||
the programs except for adding possible extension for your own version you | ||
might create, e.g. ap2ep_xx is acceptable. Any suggestions are welcome and | ||
enjoy my program(s)! | ||
Author Info: | ||
Zhigang Xu, Ph.D. | ||
(pronounced as Tsi Gahng Hsu) | ||
Research Scientist | ||
Coastal Circulation | ||
Bedford Institute of Oceanography | ||
1 Challenge Dr. | ||
P.O. Box 1006 Phone (902) 426-2307 (o) | ||
Dartmouth, Nova Scotia Fax (902) 426-7827 | ||
CANADA B2Y 4A2 email [email protected] | ||
Release Date: Nov. 2000, Revised on May. 2002 to adopt Foreman's northern semi | ||
major axis convention. | ||
Args: | ||
uc: complex tidal u velocity | ||
|
@@ -243,35 +240,34 @@ def ap2ep(uc, vc): | |
|
||
def ep2ap(SEMA, ECC, INC, PHA): | ||
"""Convert tidal ellipse to real u and v amplitude and phase. | ||
Adapted from ep2ap.m for matlab. | ||
Original copyright notice: | ||
%Authorship Copyright: | ||
% | ||
% The author of this program retains the copyright of this program, while | ||
% you are welcome to use and distribute this program as long as you credit | ||
% the author properly and respect the program name itself. Particularly, | ||
% you are expected to retain the original author's name in this original | ||
% version of the program or any of its modified version that you might make. | ||
% You are also expected not to essentially change the name of the programs | ||
% except for adding possible extension for your own version you might create, | ||
% e.g. app2ep_xx is acceptable. Any suggestions are welcome and enjoy my | ||
% program(s)! | ||
% | ||
% | ||
%Author Info: | ||
%_______________________________________________________________________ | ||
% Zhigang Xu, Ph.D. | ||
% (pronounced as Tsi Gahng Hsu) | ||
% Research Scientist | ||
% Coastal Circulation | ||
% Bedford Institute of Oceanography | ||
% 1 Challenge Dr. | ||
% P.O. Box 1006 Phone (902) 426-2307 (o) | ||
% Dartmouth, Nova Scotia Fax (902) 426-7827 | ||
% CANADA B2Y 4A2 email [email protected] | ||
%_______________________________________________________________________ | ||
% | ||
%Release Date: Nov. 2000 | ||
Adapted from ep2ap.m for Matlab. Copyright notice:: | ||
Authorship: | ||
The author of this program retains the copyright of this program, while | ||
you are welcome to use and distribute this program as long as you credit | ||
the author properly and respect the program name itself. Particularly, | ||
you are expected to retain the original author's name in this original | ||
version of the program or any of its modified version that you might make. | ||
You are also expected not to essentially change the name of the programs | ||
except for adding possible extension for your own version you might create, | ||
e.g. app2ep_xx is acceptable. Any suggestions are welcome and enjoy my | ||
program(s)! | ||
Author Info: | ||
Zhigang Xu, Ph.D. | ||
(pronounced as Tsi Gahng Hsu) | ||
Research Scientist | ||
Coastal Circulation | ||
Bedford Institute of Oceanography | ||
1 Challenge Dr. | ||
P.O. Box 1006 Phone (902) 426-2307 (o) | ||
Dartmouth, Nova Scotia Fax (902) 426-7827 | ||
CANADA B2Y 4A2 email [email protected] | ||
Release Date: Nov. 2000 | ||
Args: | ||
SEMA: semi-major axis | ||
|
@@ -281,7 +277,6 @@ def ep2ap(SEMA, ECC, INC, PHA): | |
Returns: | ||
(u amplitude, u phase [radians], v amplitude, v phase [radians]) | ||
""" | ||
Wp = (1 + ECC) / 2.0 * SEMA | ||
Wm = (1 - ECC) / 2.0 * SEMA | ||
|