Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
navidcy committed Jan 23, 2025
1 parent 361b2d6 commit 838374b
Showing 1 changed file with 55 additions and 60 deletions.
115 changes: 55 additions & 60 deletions regional_mom6/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 838374b

Please sign in to comment.