TidalAnalysis
所属分类:编译器/解释器
开发工具:Others
文件大小:125KB
下载次数:8
上传日期:2007-10-22 11:11:01
上 传 者:
luoxin1995
说明: 调和分析(谐波分析),foutune语言版本。阅读此代码,需要安装fortune编译器。
(Harmonic analysis (harmonic analysis), foutune languages. Read this code, need to install fortune compiler.)
文件列表:
Tidal Analysis\hobart (1718, 2002-04-11)
Tidal Analysis\port.dat (26707, 2002-04-11)
Tidal Analysis\tda1154.f (72022, 2002-12-23)
Tidal Analysis\sample.ip (10860, 2002-04-11)
Tidal Analysis\sample.par (641, 2002-04-11)
Tidal Analysis\all_con.tar (245760, 2002-04-11)
Tidal Analysis\tcond.tar (20480, 2002-04-11)
Tidal Analysis\tconl.tar (20480, 2002-04-11)
Tidal Analysis\all_con.zip (80512, 2002-04-11)
Tidal Analysis\tcond.zip (4670, 2002-04-11)
Tidal Analysis\tconl.zip (4882, 2002-04-11)
Tidal Analysis (0, 2007-05-09)
TIDAL ANALYSIS AND PREDICTION FILES
***********************************
C ******************************************************************************
C * *
C * SOFTWARE LICENSING *
C * *
C * Copyright (C) 2002 John Robert Hunter *
C * *
C * This program is free software; you can redistribute *
C * it and/or modify it under the terms of the GNU General *
C * Public License as published by the Free Software *
C * Foundation; either Version 2 of the license, or (at *
C * your option) any later version. *
C * *
C * This program is distributed in the hope that it will *
C * be useful, but without any warranty; without even the *
C * implied warranty of merchantability or fitness for a *
C * particular purpose. See the GNU General Public License *
C * for more details. *
C * *
C * A copy of the GNU General Public License is available *
C * at http://www.gnu.org/copyleft/gpl.html or by writing *
C * to the Free Software Foundation, Inc., 59 Temple Place *
C * - Suite 330, Boston, MA 02111-1307, USA. *
C * *
C ******************************************************************************
This package consists of the following files:
(1) readme ....... This file.
(2) all_con.tar .. A tar file containing all the 116 astronomical argument
files.
(3) all_con.zip .. A zip file containing all the 116 astronomical argument
files.
(4) tcond.tar .... A tar file containing 14 files (tcona.dat - tconn.dat) of
constituent names to be used for the analyses of records
of different lengths (for original software, tpd1150.f
and tda1154.f).
(5) tcond.zip .... A zip file containing 14 files (tcona.dat - tconn.dat) of
constituent names to be used for the analyses of records
of different lengths (for original software, tpd1150.f
and tda1154.f).
(6) tconl.tar .... A tar file containing 14 files (tcona.lst - tconn.lst) of
constituent names to be used for the analyses of records
of different lengths (for upgraded software, tpd1450.f
and tda1537.f).
(7) tconl.zip .... A zip file containing 14 files (tcona.lst - tconn.lst) of
constituent names to be used for the analyses of records
of different lengths (for upgraded software, tpd1450.f
and tda1537.f).
(8) port.dat ..... A demonstration input file containing harmonic
constants for a few ports (for original software,
tpd1150.f and tda1154.f).
(9) hobart ....... sample file of harmonic constants (for Hobart) (for
upgraded software, tpd1450.f and tda1537.f).
(10) sample.par ... sample parameter file for tda1537.f.
(11) sample.ip .... sample file of input data for tda1537.f (for Hobart).
(12) tda1154.f .... Fortran source code for the tide analysis program.
(13) tpd1150.f .... Fortran source code for the tide prediction program.
(14) tda1537.f .... Fortran source code for upgraded tide analysis program.
(15) tpd1450.f .... Fortran source code for general tide prediction
subroutine and test program.
NOTE:
Due to naming inconsistencies, two files in all_con.tar and all_con.zipare
duplicated since ma2*.con is the same as mb2.con and na2*.con is the same as
nb2.con. There are hence only 114 different sets of astronomical arguments.
**********************************************************************
* NOTE, if you are transferring these files to a PC: *
* *
* The original ASCII files are in UNIX format. You may find that you *
* will have do do a "UNIX to PC" conversion on some of these files. *
* *
**********************************************************************
NOTES ON THIS PACKAGE AND CHANGES FROM 1970-2000 60-CONSTITUENT VERSION
***********************************************************************
1. The package is written in Fortran-77 with some extensions available on
Sun Sparc workstations.
2. The present package has been extended to cover 114 constituents and the
years 1970 to 2030 inclusive.
3. The astronomical arguments (in files of type *.CON) were supplied by
the Proudman Oceanographic Laboratory (POL) in 1990 for unrestricted use.
In this field, there is some inconsistency in the naming of constituents
(i.e. the same constituents may be given different names). In the present
package, there is also a requirement that constituent names be of six
characters or less. These matters are clarified in the following table:
Name used in the present package Names used by POL
SIGMA1 SIGMA1, SIG1
RHO1 RHO1, RO1
THETA1 THETA1, TH1
LAMDA2 LAMDA2, LAM2
MB2 MA2*, MB2
NB2 NA2*, NB2
3M(SK2 3M(SK)2, 3MSK2
2MN)S6 2(MN)S6, 2MN)S6
4. Additional constituent files have been added as follows:
File name Duration of input data for analysis and other factors
tconj.dat Greater than or equal to 1 year; Deep water
tconk.dat Greater than or equal to 1 year; Shallow water
tconl.dat Less than 1 year and greater than or equal to 6 months
tconm.dat Less than 6 months and greater than or equal to 1 month
tconn.dat Less than 1 month and greater than or equal to 14 days
tcon_1.dat Less than 14 days and greater than or equal to 7 days
(special version, based on tconi.dat)
tcon_2.dat Less than 14 days and greater than or equal to 7 days
(special version, based on tcone.dat)
5. A new `HW and LW' option in available in the prediction program. This
option is suitable for tides of all types, particularly those that are
not predominantly semi-diurnal. This option is selected by asking for
HW and LW values (`W'), either short or long output (`S' or `L'), and
mixed or diurnal tide (`M'). The output is similar to that used in the
Admiralty Tide Tables. As with the semi-diurnal option, the short
(`S') option omits the individual HW and LW values and only outputs the
HAT and LAT for the year.
6. The histories of both prediction and analysis programs are indicated in
the headers to the source code.
7. The analysis program (tda1154) requires the use of matrix inversion
routines. These are currently provided by aconv(), mxcopy(), mxgaus()
and solvmx(). These are not the best routines available -- if you have
access to better ones (e.g. NAG) then use them. (The requirement for
recompilation of the analysis program whenever the number of
constituents is changed no longer applies.) THIS DOES NOT APPLY to
the upgraded analysis program (tda1537), which uses singular value
decomposition -- the routines provided for this are perfectly suitable.
THE YEAR 2000
*************
Note that there is a "2000"-type problem with the programs tda.f
and tpd.f -- in the time/date routines, I divide by 4 to flag a leap
year -- LUCKILY THIS STILL WORKS FOR 2000, but NOT for the next century.
In tpd1450.f and tda1537.f, I use the Numerical Recipes Julian Day
routines which should always be O.K. (but NOTE there is an error in
the Fortran version of one of these, which I have fixed).
INSTRUCTIONS FOR USING UPGRADED TIDE PREDICTION PROGRAM TPD1450
***************************************************************
The file ".tides" (or "ARGS.DIR" in DOS) in your own directory
should contain the path to the directory which contains the files
of astronomical argument (tpd1450.f may require editing to
select the correct name for this file). This directory
contains a file of astronomical arguments for each of 114
tidal constituents, which are named .con
(e.g. m2.con for the M2 constituent).
The file "hobart" is a sample file of harmonic constants (for
Hobart). This is a set of columns of:
in any order. should be up to 6 characters,
starting in the first column of the line. If it is less than 6
characters it should be separated from the (h,g) data by one or
more spaces; if it is 6 characters then the 7th character of the
line may be a space or the first character of (h,g). The mean
value is included as a constituent and is called "Z0". This may
be place anywhere in the file and does not need a "g" value. In
the file "hobart", I have been perverse and used a "messy" format
for testing purposes. I have also placed Z0 among the other
constituents (normally Z0 would be on the first line of the file.)
This file is allowed to have comment lines (indicated by "#"). Also,
this file may have a time zone parameter within the comments (a line
starting "# TZ "). This is in hours, positive eastwards. If the TZ
argument is not provided it is assumed to be the same as tz_t.
The program tpd1450 is a test program, which contains the main tidal
prediction subroutine tide_pred. All other subroutines necessary for
tide_pred are included in tpd1450. The software is written in
Fortran 77 and uses double precision arithmetic. The use of tpd1450
and tide_pred is explained in the source code. For example, a
subroutine call of:
x=tide_pred(1996,2,23,15,25,32,10,hobart,ifail)
or a program call of:
tpd1450 1996 2 23 15 25 32 10 hobart
returns the tidal height at 32 seconds past 1525 hours on 23 February
1996 (time zone +10:00 hours), based on harmonic constants given in the
file "hobart". ifail is returned as zero for a successful execution.
The predicted tidal height should be 0.122103766630045D+01, assuming
the file "hobart" DOES NOT contain the time zone, or contains the
time zone +1000.
Astronomical argument and harmonic constant files are only read once,
as required. If multiple predictions are required for the same year
or for the same location, the calls to tide_pred should be made during
a single run of the calling program (i.e. it is very inefficient to
include tide_pred in a program that only computes a single prediction,
and then to run the program multiple times).
INSTRUCTIONS FOR USING UPGRADED TIDE PREDICTION PROGRAM TDA1537
***************************************************************
The file ".tides" (or "ARGS.DIR" in DOS) in your own directory
should contain the path to the directory which contains the files of
astronomical arguments and constituent lists (tda1537.f may require
editing to select the correct name for this file). This directory
contains a file of astronomical arguments for each of 114
tidal constituents, which are named .con
(e.g. m2.con for the M2 constituent). It also contains the files
of constituent lists named *.lst.
The file "hobart" is a sample file of harmonic constants (for
Hobart). This is a set of columns of:
in any order. should be up to 6 characters,
starting in the first column of the line. If it is less than 6
characters it should be separated from the (h,g) data by one or
more spaces; if it is 6 characters then the 7th character of the
line may be a space or the first character of (h,g). The mean
value is included as a constituent and is called "Z0". This may
be place anywhere in the file and does not need a "g" value. In
the file "hobart", I have been perverse and used a "messy" format
for testing purposes. I have also placed Z0 among the other
constituents (normally Z0 would be on the first line of the file.)
This file is allowed to have comment lines (indicated by "#"). Also,
this file may have a time zone parameter within the comments (a line
starting "# TZ "). This is in hours, positive eastwards. If the TZ
argument is not provided it is assumed to be the same as tz_t.
The files of constituent lists (*.lst) contain a list of the
constituent names of ALL constituents in the analysis (one per line),
followed by the names of pairs of constituents which are to be related.
tda1537 uses a parameter file (the name of which is read in on the
standard input) to define the following variables:
OPRESID ........... "t" for output of residuals, otherwise "f"
CONSLIST_FILE ..... name of file of constituent lists
INPUT_FILE ........ name of input file
HGOUT_FILE ........ name of output file
RESOUT_FILE ....... name of file of residuals
TEMP_FILE ......... name of file for temporary storage
#
# Header:
NHEAD ............. number of header lines to follow
(followed immediately by NHEAD header lines
which appear in output file)
TZ_T .............. time zone of time series (hours, positive
TIME_TYPE NONREP .. type of time coordinate:
"REP": time repeats every year;
"NONREP": time is continuous from year to year)
PORT_REF .......... reference port
sample.par and sample.ip are sample parameter and input files,
respectively. Under Unix, a sample analysis may be done by typing:
echo sample.par | tda1537
NOTE that this will not give exactly the same values as in the file "hobart",
as it is based on the analysis of only one month of data.
J.R. Hunter, 11/4/2002.
近期下载者:
相关文件:
收藏者: