1249 changed files with 921465 additions and 2591 deletions
@ -0,0 +1,55 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?> |
||||
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage"> |
||||
<storageModule moduleId="org.eclipse.cdt.core.settings"> |
||||
<cconfiguration id="0.663531094"> |
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="0.663531094" moduleId="org.eclipse.cdt.core.settings" name="Default"> |
||||
<externalSettings/> |
||||
<extensions> |
||||
<extension id="org.eclipse.cdt.core.VCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> |
||||
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> |
||||
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/> |
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> |
||||
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> |
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/> |
||||
</extensions> |
||||
</storageModule> |
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0"> |
||||
<configuration buildProperties="" description="" id="0.663531094" name="Default" parent="org.eclipse.cdt.build.core.prefbase.cfg"> |
||||
<folderInfo id="0.663531094." name="/" resourcePath=""> |
||||
<toolChain id="org.eclipse.cdt.build.core.prefbase.toolchain.627234980" name="No ToolChain" resourceTypeBasedDiscovery="false" superClass="org.eclipse.cdt.build.core.prefbase.toolchain"> |
||||
<targetPlatform id="org.eclipse.cdt.build.core.prefbase.toolchain.627234980.483377643" name=""/> |
||||
<builder id="org.eclipse.cdt.build.core.settings.default.builder.1126303616" keepEnvironmentInBuildfile="false" managedBuildOn="false" name="Gnu Make Builder" superClass="org.eclipse.cdt.build.core.settings.default.builder"/> |
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.libs.1562318382" name="holder for library settings" superClass="org.eclipse.cdt.build.core.settings.holder.libs"/> |
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.1750063418" name="Assembly" superClass="org.eclipse.cdt.build.core.settings.holder"> |
||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1625417188" languageId="org.eclipse.cdt.core.assembly" languageName="Assembly" sourceContentType="org.eclipse.cdt.core.asmSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/> |
||||
</tool> |
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.268168892" name="UPC" superClass="org.eclipse.cdt.build.core.settings.holder"> |
||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.1828629769" languageId="org.eclipse.cdt.core.parser.upc.upc" languageName="UPC" sourceContentType="org.eclipse.cdt.core.parser.upc.upcSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/> |
||||
</tool> |
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.2089930129" name="GNU C++" superClass="org.eclipse.cdt.build.core.settings.holder"> |
||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.239167416" languageId="org.eclipse.cdt.core.g++" languageName="GNU C++" sourceContentType="org.eclipse.cdt.core.cxxSource,org.eclipse.cdt.core.cxxHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/> |
||||
</tool> |
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.1423489629" name="GNU C" superClass="org.eclipse.cdt.build.core.settings.holder"> |
||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.682977559" languageId="org.eclipse.cdt.core.gcc" languageName="GNU C" sourceContentType="org.eclipse.cdt.core.cSource,org.eclipse.cdt.core.cHeader" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/> |
||||
</tool> |
||||
<tool id="org.eclipse.cdt.build.core.settings.holder.1836585514" name="Fortran" superClass="org.eclipse.cdt.build.core.settings.holder"> |
||||
<inputType id="org.eclipse.cdt.build.core.settings.holder.inType.973938769" languageId="org.eclipse.photran.cdtinterface.org.eclipse.photran.cdtinterface.fortran" languageName="Fortran" sourceContentType="org.eclipse.photran.core.fortranSource" superClass="org.eclipse.cdt.build.core.settings.holder.inType"/> |
||||
</tool> |
||||
</toolChain> |
||||
</folderInfo> |
||||
</configuration> |
||||
</storageModule> |
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/> |
||||
</cconfiguration> |
||||
</storageModule> |
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0"> |
||||
<project id="mom_5.1.null.1389346998" name="mom_5.1"/> |
||||
</storageModule> |
||||
<storageModule moduleId="scannerConfiguration"> |
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> |
||||
<scannerConfigBuildInfo instanceId="0.663531094"> |
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/> |
||||
</scannerConfigBuildInfo> |
||||
</storageModule> |
||||
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/> |
||||
</cproject> |
@ -0,0 +1,5 @@
|
||||
*~ |
||||
exec/ |
||||
work/ |
||||
bin/mppnccombine.gfortran |
||||
.sh_history* |
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<projectDescription> |
||||
<name>mom_5.1</name> |
||||
<comment></comment> |
||||
<projects> |
||||
</projects> |
||||
<buildSpec> |
||||
<buildCommand> |
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name> |
||||
<triggers>clean,full,incremental,</triggers> |
||||
<arguments> |
||||
</arguments> |
||||
</buildCommand> |
||||
<buildCommand> |
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name> |
||||
<triggers>full,incremental,</triggers> |
||||
<arguments> |
||||
</arguments> |
||||
</buildCommand> |
||||
</buildSpec> |
||||
<natures> |
||||
<nature>org.eclipse.cdt.core.cnature</nature> |
||||
<nature>org.eclipse.cdt.core.ccnature</nature> |
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature> |
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature> |
||||
</natures> |
||||
</projectDescription> |
@ -0,0 +1,339 @@
|
||||
GNU GENERAL PUBLIC LICENSE |
||||
Version 2, June 1991 |
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc., |
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
||||
Everyone is permitted to copy and distribute verbatim copies |
||||
of this license document, but changing it is not allowed. |
||||
|
||||
Preamble |
||||
|
||||
The licenses for most software are designed to take away your |
||||
freedom to share and change it. By contrast, the GNU General Public |
||||
License is intended to guarantee your freedom to share and change free |
||||
software--to make sure the software is free for all its users. This |
||||
General Public License applies to most of the Free Software |
||||
Foundation's software and to any other program whose authors commit to |
||||
using it. (Some other Free Software Foundation software is covered by |
||||
the GNU Lesser General Public License instead.) You can apply it to |
||||
your programs, too. |
||||
|
||||
When we speak of free software, we are referring to freedom, not |
||||
price. Our General Public Licenses are designed to make sure that you |
||||
have the freedom to distribute copies of free software (and charge for |
||||
this service if you wish), that you receive source code or can get it |
||||
if you want it, that you can change the software or use pieces of it |
||||
in new free programs; and that you know you can do these things. |
||||
|
||||
To protect your rights, we need to make restrictions that forbid |
||||
anyone to deny you these rights or to ask you to surrender the rights. |
||||
These restrictions translate to certain responsibilities for you if you |
||||
distribute copies of the software, or if you modify it. |
||||
|
||||
For example, if you distribute copies of such a program, whether |
||||
gratis or for a fee, you must give the recipients all the rights that |
||||
you have. You must make sure that they, too, receive or can get the |
||||
source code. And you must show them these terms so they know their |
||||
rights. |
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and |
||||
(2) offer you this license which gives you legal permission to copy, |
||||
distribute and/or modify the software. |
||||
|
||||
Also, for each author's protection and ours, we want to make certain |
||||
that everyone understands that there is no warranty for this free |
||||
software. If the software is modified by someone else and passed on, we |
||||
want its recipients to know that what they have is not the original, so |
||||
that any problems introduced by others will not reflect on the original |
||||
authors' reputations. |
||||
|
||||
Finally, any free program is threatened constantly by software |
||||
patents. We wish to avoid the danger that redistributors of a free |
||||
program will individually obtain patent licenses, in effect making the |
||||
program proprietary. To prevent this, we have made it clear that any |
||||
patent must be licensed for everyone's free use or not licensed at all. |
||||
|
||||
The precise terms and conditions for copying, distribution and |
||||
modification follow. |
||||
|
||||
GNU GENERAL PUBLIC LICENSE |
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION |
||||
|
||||
0. This License applies to any program or other work which contains |
||||
a notice placed by the copyright holder saying it may be distributed |
||||
under the terms of this General Public License. The "Program", below, |
||||
refers to any such program or work, and a "work based on the Program" |
||||
means either the Program or any derivative work under copyright law: |
||||
that is to say, a work containing the Program or a portion of it, |
||||
either verbatim or with modifications and/or translated into another |
||||
language. (Hereinafter, translation is included without limitation in |
||||
the term "modification".) Each licensee is addressed as "you". |
||||
|
||||
Activities other than copying, distribution and modification are not |
||||
covered by this License; they are outside its scope. The act of |
||||
running the Program is not restricted, and the output from the Program |
||||
is covered only if its contents constitute a work based on the |
||||
Program (independent of having been made by running the Program). |
||||
Whether that is true depends on what the Program does. |
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's |
||||
source code as you receive it, in any medium, provided that you |
||||
conspicuously and appropriately publish on each copy an appropriate |
||||
copyright notice and disclaimer of warranty; keep intact all the |
||||
notices that refer to this License and to the absence of any warranty; |
||||
and give any other recipients of the Program a copy of this License |
||||
along with the Program. |
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and |
||||
you may at your option offer warranty protection in exchange for a fee. |
||||
|
||||
2. You may modify your copy or copies of the Program or any portion |
||||
of it, thus forming a work based on the Program, and copy and |
||||
distribute such modifications or work under the terms of Section 1 |
||||
above, provided that you also meet all of these conditions: |
||||
|
||||
a) You must cause the modified files to carry prominent notices |
||||
stating that you changed the files and the date of any change. |
||||
|
||||
b) You must cause any work that you distribute or publish, that in |
||||
whole or in part contains or is derived from the Program or any |
||||
part thereof, to be licensed as a whole at no charge to all third |
||||
parties under the terms of this License. |
||||
|
||||
c) If the modified program normally reads commands interactively |
||||
when run, you must cause it, when started running for such |
||||
interactive use in the most ordinary way, to print or display an |
||||
announcement including an appropriate copyright notice and a |
||||
notice that there is no warranty (or else, saying that you provide |
||||
a warranty) and that users may redistribute the program under |
||||
these conditions, and telling the user how to view a copy of this |
||||
License. (Exception: if the Program itself is interactive but |
||||
does not normally print such an announcement, your work based on |
||||
the Program is not required to print an announcement.) |
||||
|
||||
These requirements apply to the modified work as a whole. If |
||||
identifiable sections of that work are not derived from the Program, |
||||
and can be reasonably considered independent and separate works in |
||||
themselves, then this License, and its terms, do not apply to those |
||||
sections when you distribute them as separate works. But when you |
||||
distribute the same sections as part of a whole which is a work based |
||||
on the Program, the distribution of the whole must be on the terms of |
||||
this License, whose permissions for other licensees extend to the |
||||
entire whole, and thus to each and every part regardless of who wrote it. |
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest |
||||
your rights to work written entirely by you; rather, the intent is to |
||||
exercise the right to control the distribution of derivative or |
||||
collective works based on the Program. |
||||
|
||||
In addition, mere aggregation of another work not based on the Program |
||||
with the Program (or with a work based on the Program) on a volume of |
||||
a storage or distribution medium does not bring the other work under |
||||
the scope of this License. |
||||
|
||||
3. You may copy and distribute the Program (or a work based on it, |
||||
under Section 2) in object code or executable form under the terms of |
||||
Sections 1 and 2 above provided that you also do one of the following: |
||||
|
||||
a) Accompany it with the complete corresponding machine-readable |
||||
source code, which must be distributed under the terms of Sections |
||||
1 and 2 above on a medium customarily used for software interchange; or, |
||||
|
||||
b) Accompany it with a written offer, valid for at least three |
||||
years, to give any third party, for a charge no more than your |
||||
cost of physically performing source distribution, a complete |
||||
machine-readable copy of the corresponding source code, to be |
||||
distributed under the terms of Sections 1 and 2 above on a medium |
||||
customarily used for software interchange; or, |
||||
|
||||
c) Accompany it with the information you received as to the offer |
||||
to distribute corresponding source code. (This alternative is |
||||
allowed only for noncommercial distribution and only if you |
||||
received the program in object code or executable form with such |
||||
an offer, in accord with Subsection b above.) |
||||
|
||||
The source code for a work means the preferred form of the work for |
||||
making modifications to it. For an executable work, complete source |
||||
code means all the source code for all modules it contains, plus any |
||||
associated interface definition files, plus the scripts used to |
||||
control compilation and installation of the executable. However, as a |
||||
special exception, the source code distributed need not include |
||||
anything that is normally distributed (in either source or binary |
||||
form) with the major components (compiler, kernel, and so on) of the |
||||
operating system on which the executable runs, unless that component |
||||
itself accompanies the executable. |
||||
|
||||
If distribution of executable or object code is made by offering |
||||
access to copy from a designated place, then offering equivalent |
||||
access to copy the source code from the same place counts as |
||||
distribution of the source code, even though third parties are not |
||||
compelled to copy the source along with the object code. |
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program |
||||
except as expressly provided under this License. Any attempt |
||||
otherwise to copy, modify, sublicense or distribute the Program is |
||||
void, and will automatically terminate your rights under this License. |
||||
However, parties who have received copies, or rights, from you under |
||||
this License will not have their licenses terminated so long as such |
||||
parties remain in full compliance. |
||||
|
||||
5. You are not required to accept this License, since you have not |
||||
signed it. However, nothing else grants you permission to modify or |
||||
distribute the Program or its derivative works. These actions are |
||||
prohibited by law if you do not accept this License. Therefore, by |
||||
modifying or distributing the Program (or any work based on the |
||||
Program), you indicate your acceptance of this License to do so, and |
||||
all its terms and conditions for copying, distributing or modifying |
||||
the Program or works based on it. |
||||
|
||||
6. Each time you redistribute the Program (or any work based on the |
||||
Program), the recipient automatically receives a license from the |
||||
original licensor to copy, distribute or modify the Program subject to |
||||
these terms and conditions. You may not impose any further |
||||
restrictions on the recipients' exercise of the rights granted herein. |
||||
You are not responsible for enforcing compliance by third parties to |
||||
this License. |
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent |
||||
infringement or for any other reason (not limited to patent issues), |
||||
conditions are imposed on you (whether by court order, agreement or |
||||
otherwise) that contradict the conditions of this License, they do not |
||||
excuse you from the conditions of this License. If you cannot |
||||
distribute so as to satisfy simultaneously your obligations under this |
||||
License and any other pertinent obligations, then as a consequence you |
||||
may not distribute the Program at all. For example, if a patent |
||||
license would not permit royalty-free redistribution of the Program by |
||||
all those who receive copies directly or indirectly through you, then |
||||
the only way you could satisfy both it and this License would be to |
||||
refrain entirely from distribution of the Program. |
||||
|
||||
If any portion of this section is held invalid or unenforceable under |
||||
any particular circumstance, the balance of the section is intended to |
||||
apply and the section as a whole is intended to apply in other |
||||
circumstances. |
||||
|
||||
It is not the purpose of this section to induce you to infringe any |
||||
patents or other property right claims or to contest validity of any |
||||
such claims; this section has the sole purpose of protecting the |
||||
integrity of the free software distribution system, which is |
||||
implemented by public license practices. Many people have made |
||||
generous contributions to the wide range of software distributed |
||||
through that system in reliance on consistent application of that |
||||
system; it is up to the author/donor to decide if he or she is willing |
||||
to distribute software through any other system and a licensee cannot |
||||
impose that choice. |
||||
|
||||
This section is intended to make thoroughly clear what is believed to |
||||
be a consequence of the rest of this License. |
||||
|
||||
8. If the distribution and/or use of the Program is restricted in |
||||
certain countries either by patents or by copyrighted interfaces, the |
||||
original copyright holder who places the Program under this License |
||||
may add an explicit geographical distribution limitation excluding |
||||
those countries, so that distribution is permitted only in or among |
||||
countries not thus excluded. In such case, this License incorporates |
||||
the limitation as if written in the body of this License. |
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions |
||||
of the General Public License from time to time. Such new versions will |
||||
be similar in spirit to the present version, but may differ in detail to |
||||
address new problems or concerns. |
||||
|
||||
Each version is given a distinguishing version number. If the Program |
||||
specifies a version number of this License which applies to it and "any |
||||
later version", you have the option of following the terms and conditions |
||||
either of that version or of any later version published by the Free |
||||
Software Foundation. If the Program does not specify a version number of |
||||
this License, you may choose any version ever published by the Free Software |
||||
Foundation. |
||||
|
||||
10. If you wish to incorporate parts of the Program into other free |
||||
programs whose distribution conditions are different, write to the author |
||||
to ask for permission. For software which is copyrighted by the Free |
||||
Software Foundation, write to the Free Software Foundation; we sometimes |
||||
make exceptions for this. Our decision will be guided by the two goals |
||||
of preserving the free status of all derivatives of our free software and |
||||
of promoting the sharing and reuse of software generally. |
||||
|
||||
NO WARRANTY |
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY |
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN |
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES |
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED |
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF |
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS |
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE |
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, |
||||
REPAIR OR CORRECTION. |
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING |
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR |
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, |
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING |
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED |
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY |
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER |
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE |
||||
POSSIBILITY OF SUCH DAMAGES. |
||||
|
||||
END OF TERMS AND CONDITIONS |
||||
|
||||
How to Apply These Terms to Your New Programs |
||||
|
||||
If you develop a new program, and you want it to be of the greatest |
||||
possible use to the public, the best way to achieve this is to make it |
||||
free software which everyone can redistribute and change under these terms. |
||||
|
||||
To do so, attach the following notices to the program. It is safest |
||||
to attach them to the start of each source file to most effectively |
||||
convey the exclusion of warranty; and each file should have at least |
||||
the "copyright" line and a pointer to where the full notice is found. |
||||
|
||||
<one line to give the program's name and a brief idea of what it does.> |
||||
Copyright (C) <year> <name of author> |
||||
|
||||
This program is free software; you can redistribute it and/or modify |
||||
it under the terms of the GNU General Public License as published by |
||||
the Free Software Foundation; either version 2 of the License, or |
||||
(at your option) any later version. |
||||
|
||||
This program is distributed in the hope that it will be useful, |
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
GNU General Public License for more details. |
||||
|
||||
You should have received a copy of the GNU General Public License along |
||||
with this program; if not, write to the Free Software Foundation, Inc., |
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
||||
|
||||
Also add information on how to contact you by electronic and paper mail. |
||||
|
||||
If the program is interactive, make it output a short notice like this |
||||
when it starts in an interactive mode: |
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author |
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. |
||||
This is free software, and you are welcome to redistribute it |
||||
under certain conditions; type `show c' for details. |
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate |
||||
parts of the General Public License. Of course, the commands you use may |
||||
be called something other than `show w' and `show c'; they could even be |
||||
mouse-clicks or menu items--whatever suits your program. |
||||
|
||||
You should also get your employer (if you work as a programmer) or your |
||||
school, if any, to sign a "copyright disclaimer" for the program, if |
||||
necessary. Here is a sample; alter the names: |
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program |
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker. |
||||
|
||||
<signature of Ty Coon>, 1 April 1989 |
||||
Ty Coon, President of Vice |
||||
|
||||
This General Public License does not permit incorporating your program into |
||||
proprietary programs. If your program is a subroutine library, you may |
||||
consider it more useful to permit linking proprietary applications with the |
||||
library. If this is what you want to do, use the GNU Lesser General |
||||
Public License instead of this License. |
@ -0,0 +1,71 @@
|
||||
|
||||
Where to start |
||||
~~~~~~~~~~~~~~ |
||||
A good place to start is the "doc" directory, where you |
||||
will find "user" guides for the MOM. |
||||
|
||||
How to run the MOM tests |
||||
~~~~~~~~~~~~~~~~~~~~~~~~~ |
||||
MOM tests provided in exp directory divide in two types, |
||||
both using the GFDL shared infrastructure (FMS) : |
||||
|
||||
1. Solo models : Run stand alone MOM Ocean model. |
||||
2. Coupled models: Run MOM coupled with GFDL ice model |
||||
(besides null versions of atmosphere and land models). |
||||
|
||||
To run Solo models: |
||||
a. cd to exp and run mom4p1_solo_compile.csh first. |
||||
b. Modify the 'name' variable in the script |
||||
mom4p1_solo_run.csh to be the name of the test you |
||||
want to run. A list of available tests is included in the script. |
||||
c. Get the required input data for the test from GFDL ftp site. |
||||
You can get the info by running the script mom4p1_solo_run.csh |
||||
and following the instructions. |
||||
d. Run mom4p1_solo_run.csh |
||||
e. The results go into subdir name/workdir |
||||
|
||||
To run Coupled models: |
||||
Do the same steps above to mom4p1_coupled_compile.csh and mom4p1_coupled_run.csh |
||||
|
||||
To run EBM models: |
||||
Do the same steps above to mom4p1_ebm_compile.csh and mom4p1_ebm_run.csh |
||||
|
||||
|
||||
|
||||
Warning: The Solo and Coupled run scripts have been tested only on 10 and 24, ia64 |
||||
processors respectively. |
||||
Warning: Some of these tests require a large disk space to save the input data. |
||||
Choose a partition with enough space (1-2 G) to untar the code and data bundels. |
||||
Warning: If you want to use the same root directory for all three experiments we suggest to |
||||
compile in the order of increasing complexity: solo -> coupled -> ebm . |
||||
You may have to remove some of the existing .o and .mod files |
||||
if you want to compile ebm experiment after the coupled experiment. |
||||
E.g., you probably have to: cd ../exec; rm mpp*.o mpp*.mod fms_io*.o fms_io*.mod |
||||
|
||||
Note: IBM platform users might want to add the following line to the top of the run scripts |
||||
setenv LDR_CNTRL MAXDATA=0xD0000000@DSA |
||||
|
||||
|
||||
Note: The compile scripts provide the basic capability to use static memory allocation |
||||
which might be faster on some platforms. In that case you need to adjust the values |
||||
of domain bounds properly according to the number of processors and layout. |
||||
|
||||
|
||||
Summary of directory contents |
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
||||
bin/ |
||||
-- mkmf script for creating Makefiles |
||||
-- template files for the mkmf script |
||||
-- assorted other scripts |
||||
|
||||
exp/ |
||||
-- all MOM experiments (test cases) |
||||
|
||||
src/ |
||||
-- source code for all models |
||||
|
||||
src/postprocessing/ |
||||
-- source code for postprocessing programs |
||||
|
||||
src/preprocessing/ |
||||
-- source code for preprocessing programs |
@ -0,0 +1,9 @@
|
||||
# The Modular Ocean Model |
||||
|
||||
MOM is a numerical ocean model based on the hydrostatic primitive equations. Development of the model is managed through the Model Development Lab at |
||||
|
||||
[http://www.mom-ocean.org](http://www.mom-ocean.org) |
||||
|
||||
Contributions from users and developers are always welcomed. Any questions should be directed to the [mailing list](https://groups.google.com/forum/#!forum/mom-users). |
||||
|
||||
To get started with MOM please consult the [quickstart guide](http://www.mom-ocean.org/web/docs/project/quickstart). More information can be found in the [online documentation](http://www.mom-ocean.org/web/docs) |
@ -0,0 +1,43 @@
|
||||
""" |
||||
Add a file to the git annex. |
||||
|
||||
Usage: |
||||
|
||||
python annex.py <filename> |
||||
|
||||
<filename> gets added to the local git annex and also uploaded to the cloud based annex on Amazon S3. |
||||
""" |
||||
|
||||
import os |
||||
import sys |
||||
|
||||
|
||||
def main(): |
||||
filename = sys.argv[-1] |
||||
project = "mom" |
||||
|
||||
## Add a file to the local annex |
||||
cmd = "git annex add %s --backend=WORM" % filename |
||||
print cmd |
||||
os.system(cmd) |
||||
print |
||||
## Upload the file to the cloud annex |
||||
cmd = "git annex copy %s --to cloud" % filename |
||||
print cmd |
||||
os.system(cmd) |
||||
print |
||||
target = os.path.realpath(filename).split(os.path.sep)[-1] |
||||
|
||||
## Make the file public |
||||
cmd = "s3cmd setacl --acl-public s3://breakawaylabs-%s-data/%s" % (project, target) |
||||
print cmd |
||||
os.system(cmd) |
||||
print |
||||
## Add the file to the web annex |
||||
cmd = "git annex addurl http://s3.amazonaws.com/breakawaylabs-%s-data/%s --file=%s" % (project, target, filename) |
||||
print cmd |
||||
os.system(cmd) |
||||
print |
||||
|
||||
if __name__ == '__main__': |
||||
main() |
Binary file not shown.
@ -0,0 +1,46 @@
|
||||
|
||||
import os |
||||
import numpy |
||||
#import netCDF4 |
||||
import sys |
||||
sys.path.append('/net2/nnz/opt/python/netCDF4-0.9.9/build/lib.linux-i686-2.4/') |
||||
import netCDF4 |
||||
|
||||
class ncFile(object): |
||||
def __init__(self,path): |
||||
self.path = path |
||||
|
||||
self.open() |
||||
for dimname, dim in self.dims.iteritems(): |
||||
if dim.isunlimited(): |
||||
self.len = len(dim) |
||||
|
||||
def close(self): |
||||
self.root.close() |
||||
del self.root, self.dims, self.vars, self.gatts |
||||
|
||||
def delete(self): |
||||
self.close() |
||||
os.remove(self.path) |
||||
|
||||
def open(self): |
||||
self.root = netCDF4.Dataset(self.path,'r') |
||||
self.dims = self.root.dimensions |
||||
self.vars = self.root.variables |
||||
self.gatts = self.root.ncattrs() |
||||
|
||||
class newFile(object): |
||||
def __init__(self,path,seed): |
||||
self.path = path |
||||
self.root = netCDF4.Dataset(self.path, 'w', format='NETCDF3_CLASSIC') |
||||
self.vars = self.root.variables |
||||
self.dims = self.root.dimensions |
||||
|
||||
for att in seed.root.ncattrs(): |
||||
self.root.setncattr(att,seed.root.getncattr(att)) |
||||
|
||||
def close(self): |
||||
self.root.close() |
||||
del self.root, self.vars, self.dims |
||||
|
||||
|
Binary file not shown.
@ -0,0 +1,598 @@
|
||||
#! /usr/bin/perl |
||||
|
||||
# $Author: Niki.Zadeh $ |
||||
# $Revision: 1.1.2.1 $ |
||||
# $Date: 2013/12/18 17:47:53 $ |
||||
|
||||
# Perl script to parse the diag_table. Count the number of files to |
||||
# be used, and the max number of fields per file used. |
||||
|
||||
use strict; |
||||
use Switch; |
||||
use List::Util qw/max/; |
||||
use XML::LibXML; |
||||
use Pod::Usage; |
||||
use Getopt::Long; |
||||
|
||||
my $help = 0; |
||||
my $verbose = 0; |
||||
my $xmlFile = ''; |
||||
GetOptions ("help|h" => \$help, |
||||
"verbose|v" => \$verbose, |
||||
"xml|x=s" => \$xmlFile) or pod2usage(2); |
||||
pod2usage(1) if $help; |
||||
|
||||
# Variable to hold the location of the diag_table file. |
||||
my $diag_table_file = ''; |
||||
|
||||
# diag_table_chk can be called one of two ways. Either, the |
||||
# diag_table file is given on the command line, or we will extract the |
||||
# information from an XML file and experiment. |
||||
if ( ! $xmlFile ) { # If no XML file specified. |
||||
if ( $#ARGV < 0 ) { |
||||
pod2usage( { -message => "$0: diag_table file must be given as an argument.", |
||||
-verbose => 0, |
||||
} ); |
||||
} else { |
||||
$diag_table_file = $ARGV[0] |
||||
} |
||||
} else { # We are using an XML file. |
||||
# Set up the XML Parser. |
||||
if ( $#ARGV < 0 ) { |
||||
pod2usage( { -message => "$0: experiment must be given as an argument.", |
||||
-verbose => 0, |
||||
} ); |
||||
} else { |
||||
# Make sure the $xmlFile exists and is readable |
||||
die "File $xmlFile does not exist.\n" unless ( -e $xmlFile ); |
||||
die "File $xmlFile exists, but is unreadable.\n" unless ( -r $xmlFile ); |
||||
die "$xmlFile is not a file.\n" unless ( -f $xmlFile ); |
||||
our $parser = XML::LibXML -> new(); |
||||
our $root = $parser -> parse_file($xmlFile) -> getDocumentElement; |
||||
our $inputExperiment = $ARGV[0]; |
||||
die "$0: Experiment $inputExperiment does not exist in file $xmlFile.\n" unless ( experimentExistsInXML($inputExperiment) ); |
||||
$diag_table_file = getDiagTableFromXML($inputExperiment); |
||||
} |
||||
} |
||||
|
||||
# Check if the diag table file exists, is not a directory and is readable. |
||||
die "$0: File $diag_table_file does not exist.\n" unless ( -e $diag_table_file ); |
||||
die "$0: File $diag_table_file exists, but is unreadable.\n" unless ( -r $diag_table_file ); |
||||
die "$0: $diag_table_file is not a file.\n" unless ( -f $diag_table_file ); |
||||
|
||||
# Announce what file we are going to read. |
||||
print "Reading file $diag_table_file\n\n"; |
||||
|
||||
# Open the file handler for the filename. |
||||
open(DIAG_TABLE, "<", $diag_table_file); |
||||
|
||||
# Arrays to hold files and fields. |
||||
my @files = ( { |
||||
file_name => '', |
||||
output_frequency => 0, |
||||
output_frequency_units => 0, |
||||
output_format => 0, |
||||
time_units => 0, |
||||
long_name => '', |
||||
new_file_frequency => 0, |
||||
new_file_frequency_units => 0, |
||||
start_time_string => '', |
||||
file_duration => 0, |
||||
file_duration_units => 0, |
||||
} ); |
||||
|
||||
my @fields = ( { |
||||
file_name => '', |
||||
module_name => '', |
||||
field_name => '', |
||||
output_name => '', |
||||
time_sampling => '', |
||||
time_method => '', |
||||
spatial_ops => '', |
||||
packing => 0, |
||||
} ); |
||||
|
||||
# Other variables to hold useful information. |
||||
my %fields_per_file; |
||||
my @warnings = ( { line_number => 0, |
||||
message => '', |
||||
} ); |
||||
my $tableName; |
||||
my @globalDate; |
||||
# Parse the data from the diag table file, and put it in the |
||||
# appropiate array. |
||||
while ( <DIAG_TABLE> ) { |
||||
my $line = sanitizeString($_); |
||||
next if ( $line =~ /^#/ or $line =~ /^$/ ); |
||||
my @line_data = split(/,/,$line,11); |
||||
|
||||
my $num_warnings = 0; |
||||
|
||||
if ( $#line_data == 0 ) { # No Commas in string |
||||
# Find the descriptor and base date. Neither should have a comma. |
||||
my @date = split(/\s+/, sanitizeString($line_data[0])); |
||||
if ( $#date >= 1 ) { # We have a date. |
||||
my $message = verifyDate(@date); |
||||
if ( $message ) { |
||||
push @warnings, ( { |
||||
line_number => $., |
||||
message => "Invalid global date. $message", |
||||
} ); |
||||
} else { |
||||
@globalDate = @date; |
||||
} |
||||
} else { # We have the the descriptor / table name or the date may be set by the script |
||||
if ( $line_data[0] =~ /^\$.*[dD]ate$/ ) { |
||||
@globalDate[0] = $line_data[0]; |
||||
} else { |
||||
$tableName = sanitizeString($line_data[0]); |
||||
} |
||||
} |
||||
} elsif ( $#line_data > 1 ) { |
||||
if ( $tableName =~ /^$/ or $globalDate[0] =~ /^$/ ) { |
||||
push @warnings, ( { |
||||
line_number => $., |
||||
message => 'The table descriptor and the base date must be set before any files or fields.', |
||||
} ); |
||||
$tableName = 'NOT SET' if ( $tableName =~ /^$/ ); |
||||
$globalDate[0] = 'NOT SET' if ( $globalDate[0] =~ /^$/ ) ; |
||||
} |
||||
if ( lc($line_data[5]) =~ /time/ ) { # This is a file. |
||||
# Check output_frequency :: Must be >= -1 |
||||
if ( $line_data[1] < -1 ) { |
||||
$num_warnings++; |
||||
push @warnings, ( { |
||||
line_number => $., |
||||
message => 'Invalid output frequency. Must be >= -1.', |
||||
} ); |
||||
} |
||||
# check output_frequency units :: return from find_unit_ivalue() > 0 |
||||
if ( find_unit_ivalue($line_data[2]) < 0 ) { |
||||
$num_warnings++; |
||||
$line_data[2] =~ s/"//g; |
||||
push @warnings, ( { |
||||
line_number => $., |
||||
message => "Invalid output frequency unit. ($line_data[2]).", |
||||
} ); |
||||
} |
||||
# check output_format :: Must be in the range 1 <= output_format <= 2 |
||||
if ( $line_data[3] < 1 or $line_data[3] > 2 ) { |
||||
$num_warnings++; |
||||
push @ warnings, ( { |
||||
line_number => $., |
||||
message => "Output_format out of range. Must be in the range [1,2].", |
||||
} ); |
||||
} |
||||
# check time_units :: return from find_unit_ivalue() > 0 |
||||
if ( find_unit_ivalue($line_data[4]) < 0 ) { |
||||
$num_warnings++; |
||||
$line_data[4] =~ s/"//g; |
||||
push @warnings, ( { |
||||
line_number => $., |
||||
message => "Invalid time unit. ($line_data[4]).", |
||||
} ); |
||||
} |
||||
# The following are optional. (There may be a slight problem if the line ends with a ','.) |
||||
if ( $#line_data > 6 ) { |
||||
# Check new_file_frequency :: Must be > 0 |
||||
if ( $line_data[6] < 0 ) { |
||||
$num_warnings++; |
||||
push @warnings, ( { |
||||
line_number => $., |
||||
message => "Invalid new file frequency. Must be > 0.", |
||||
} ); |
||||
} |
||||
# Check new_file_frequency_units :: return from find_unit_ivalue() > 0 |
||||
if ( find_unit_ivalue($line_data[7]) < 0 ) { |
||||
$num_warnings++; |
||||
$line_data[7] =~ s/"//g; |
||||
push @warnings, ( { |
||||
line_number => $., |
||||
message => "Invalid new file frequency unit. ($line_data[7]).", |
||||
} ); |
||||
} |
||||
# More optional inputs |
||||
if ( $#line_data >= 8 ) { |
||||
$num_warnings++; |
||||
# remove quotes, beginning and ending space. |
||||
$line_data[8] =~ s/"//g; |
||||
$line_data[8] =~ s/^\s+//; |
||||
$line_data[8] =~ s/\s+$//; |
||||
my @start_time = split(/\s+/,$line_data[8]); |
||||
# Check start_time_string :: Must be valid date string |
||||
my $message = verifyDate(@start_time); |
||||
if ( $message ) { |
||||
push @warnings, ( { |
||||
line_number => $., |
||||
message => "Invalid start time format. $message", |
||||
} ); |
||||
} |
||||
# The last two optional inputs |
||||
if ( $#line_data > 8 ) { |
||||
# Check file_duration :: Must be > 0 |
||||
if ( $line_data[9] < 0 ) { |
||||
$num_warnings++; |
||||
push @warnings, ( { |
||||
line_number => $., |
||||
message => "Invalid file duration. Must be > 0.", |
||||
} ); |
||||
} |
||||
# Check file_duration_units :: return from find_unit_ivalue() > 0 |
||||
if ( find_unit_ivalue($line_data[10]) < 0 ) { |
||||
$num_warnings++; |
||||
$line_data[10] =~ s/"//g; |
||||
push @ warnings, ( { |
||||
line_number => $., |
||||
message => "Invalid file duration unit. ($line_data[10]).", |
||||
} ); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
if ( $num_warnings == 0 ) { |
||||
push @files, ( { |
||||
file_name => sanitizeString($line_data[0]), |
||||
output_frequency => sanitizeString($line_data[1]), |
||||
output_frequency_units => sanitizeString($line_data[2]), |
||||
output_format => sanitizeString($line_data[3]), |
||||
time_units => sanitizeString($line_data[4]), |
||||
long_name => sanitizeString($line_data[5]), |
||||
new_file_frequency => sanitizeString($line_data[6]), |
||||
new_file_frequency_units => sanitizeString($line_data[7]), |
||||
start_time_string => sanitizeString($line_data[8]), |
||||
file_duration => sanitizeString($line_data[9]), |
||||
file_duration_units => sanitizeString($line_data[10]), |
||||
} ); |
||||
$fields_per_file{$files[$#files]{file_name}} = 0; |
||||
# print "File found (",$files[$#files]{file_name},"), line ",$.,".\n"; |
||||
} |
||||
} else { # This is a field. |
||||
# Make sure there are enough fields on the description line :: must be = 8. |
||||
if ( $#line_data != 7 ) { |
||||
$num_warnings++; |
||||
my $message; |
||||
# Are there too many? |
||||
if ( $#line_data > 7 ) { |
||||
$message = "Too many fields on field description line."; |
||||
} else { # Nope, too few. |
||||
$message = "Not enough fields on field description line."; |
||||
} |
||||
push @warnings, ( { |
||||
line_number => $., |
||||
message => $message, |
||||
} ); |
||||
} |
||||
|
||||
# Verify that file_name exists in the files array |
||||
$line_data[3] =~ s/"//g; |
||||
$line_data[3] =~ s/^\s+//; |
||||
$line_data[3] =~ s/\s+$//; |
||||
my $notfound = 1; |
||||
for (my $i=0; $i <= $#files; $i++) { |
||||
if ( $files[$i]{file_name} =~ $line_data[3] ) { |
||||
$notfound = 0; |
||||
last; |
||||
} |
||||
} |
||||
if ( $notfound ) { |
||||
$num_warnings++; |
||||
push @warnings, ( { |
||||
line_number => $., |
||||
message => "File ($line_data[3]) not defined. It must be defined before any fields.", |
||||
} ); |
||||
} |
||||
# Verify time_method / time_avg is valid |
||||
if ( invalid_timeSample(sanitizeString($line_data[5])) ) { |
||||
$ num_warnings++; |
||||
push @warnings, ( { |
||||
line_number => $., |
||||
message => "Time sampling method must be one of (.true., mean, average, avg, .false., none, point, maximum, max, minimum, min, diurnal[#]).", |
||||
} ); |
||||
} |
||||
# Verify packing is valid :: must be in range [1,8] |
||||
if ( $line_data[7] < 1 or $line_data[7] > 8 ) { |
||||
$num_warnings++; |
||||
push @warnings, ( { |
||||
line_number => $., |
||||
message => "Packing is out of the valid range. Must be in the range [1,8]." |
||||
} ); |
||||
} |
||||
if ( $num_warnings == 0 ) { |
||||
push @fields, ( { |
||||
file_name => sanitizeString($line_data[3]), |
||||
module_name => sanitizeString($line_data[0]), |
||||
field_name => sanitizeString($line_data[1]), |
||||
output_name => sanitizeString($line_data[2]), |
||||
time_sampling => sanitizeString($line_data[4]), |
||||
time_method => sanitizeString($line_data[5]), |
||||
spatial_ops => sanitizeString($line_data[6]), |
||||
packing => sanitizeString($line_data[7]), |
||||
} ); |
||||
$fields_per_file{$fields[$#fields]{file_name}}++; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
|
||||
if ( $verbose ) { |
||||
my $files2output; |
||||
my $fields2output; |
||||
open(FILES, '>', \$files2output); |
||||
open(FIELDS, '>', \$fields2output); |
||||
|
||||
my $file_name; |
||||
my $output_frequency; |
||||
my $output_frequency_units; |
||||
my $output_format; |
||||
my $time_units; |
||||
my $module_name; |
||||
my $field_name; |
||||
my $output_name; |
||||
my $time_sampling; |
||||
my $time_method; |
||||
my $spatial_ops; |
||||
my $packing; |
||||
|
||||
format FILES_TOP = |
||||
Files |
||||
Output Axis |
||||
File Name Frequency FMT Units |
||||
------------------------------------------------------------ |
||||
. |
||||
|
||||
format FILES = |
||||
@<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @>>> @<<<<<<< @||| @<<<< |
||||
$file_name, $output_frequency, $output_frequency_units, $output_format, $time_units |
||||
. |
||||
|
||||
for ( my $file=1; $file <= $#files; $file++ ) { |
||||
$file_name = $files[$file]{file_name}; |
||||
$output_frequency = $files[$file]{output_frequency}; |
||||
$output_frequency_units = $files[$file]{output_frequency_units}; |
||||
$output_format = $files[$file]{output_format}; |
||||
$time_units = $files[$file]{time_units}; |
||||
write FILES; |
||||
} |
||||
|
||||
format FIELDS_TOP = |
||||
|
||||
Fields |
||||
Output Sample Spatial |
||||
Field Name Module File Name Name Samples Method Ops Packing |
||||
------------------------------------------------------------------------------------------------------------- |
||||
. |
||||
|
||||
format FIELDS = |
||||
@<<<<<<<<<<<<<<< @<<<<<<<<<< @<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< @<<<<<<<<<<<<<<< @<<<<< @<<<<<< @<<< @< |
||||
$field_name, $module_name, $file_name, $output_name, $time_sampling, $time_method, $spatial_ops, $packing |
||||
. |
||||
|
||||
for ( my $field=1; $field <=$#fields; $field++ ) { |
||||
$module_name = $fields[$field]{module_name}; |
||||
$field_name = $fields[$field]{field_name}; |
||||
$output_name = $fields[$field]{output_name}; |
||||
$file_name = $fields[$field]{file_name}; |
||||
$time_sampling = $fields[$field]{time_sampling}; |
||||
$time_method = $fields[$field]{time_method}; |
||||
$spatial_ops = $fields[$field]{spatial_ops}; |
||||
$packing = $fields[$field]{packing}; |
||||
write FIELDS; |
||||
} |
||||
# Output the files and fields |
||||
close(FILES); |
||||
close(FIELDS); |
||||
print $files2output; |
||||
print $fields2output; |
||||
print "\n"; |
||||
} |
||||
|
||||
print "Table Descriptor:\t",$tableName,"\n"; |
||||
print "Base Date:\t\t",join(' ',@globalDate),"\n"; |
||||
print "Number of files:\t",$#files,"\n"; |
||||
print "Max fields per file:\t",max(values(%fields_per_file)),"\n"; |
||||
print "Number of warnings:\t",$#warnings,"\n"; |
||||
|
||||
if ( $#warnings ) { |
||||
for ( my $warning=1; $warning <= $#warnings; $warning++ ) { |
||||
print STDERR "WARNING($warnings[$warning]{line_number}): $warnings[$warning]{message}\n"; |
||||
} |
||||
} |
||||
|
||||
# Verify that the given unit is understood. |
||||
# A return value of -1 indicated an unknown unit. |
||||
sub invalid_timeSample { |
||||
my $timeSample = $_[0]; |
||||
|
||||
switch ($timeSample) { |
||||
case (/^\.true\.$/i) { return 0; } |
||||
case (/^\.false\.$/i) { return 0; } |
||||
case (/^mean|average|avg$/) { return 0; } |
||||
case (/^none|point$/) { return 0; } |
||||
case (/^maximum|max$/) { return 0; } |
||||
case (/^minimum|min$/) { return 0; } |
||||
case (/^diurnal\d+$/) { return 0; } |
||||
else { return 1 }; |
||||
} |
||||
} |
||||
|
||||
# Verify that the given unit is understood. |
||||
# A return value of -1 indicated an unknown unit. |
||||
sub find_unit_ivalue { |
||||
my $unit_string = $_[0]; |
||||
|
||||
switch ($unit_string) { |
||||
case (/seconds/) { return 1; } |
||||
case (/minutes/) { return 2; } |
||||
case (/hours/) { return 3; } |
||||
case (/days/) { return 4; } |
||||
case (/months/) { return 5; } |
||||
case (/years/) { return 6; } |
||||
else { return -1 } |
||||
} |
||||
} |
||||
|
||||
sub experimentExistsInXML { |
||||
my $experiment = shift(@_); |
||||
my $experimentNode = $::root -> findnodes("experiment[\@label='$experiment' or \@name='$experiment']") -> get_node(1); |
||||
|
||||
return $experimentNode; |
||||
} |
||||
|
||||
sub getDiagTableFromXML { |
||||
my $experiment = shift(@_); |
||||
my $diagTableNode = $::root -> findnodes("experiment[\@label='$experiment' or \@name='$experiment']/input/diagTable") -> get_node(1); |
||||
|
||||
# If the diagTable node is empty, then recursivly check the parent experiment until it is found. |
||||
if ( $diagTableNode ) { |
||||
return $diagTableNode -> findvalue("\@file"); |
||||
} else { |
||||
my $parent = $::root -> findvalue("experiment[\@label='$experiment' or \@name='$experiment]/\@inherit"); |
||||
if ( $parent) { |
||||
&getDiagTable($parent); |
||||
} else { |
||||
die "$0: Cannot find diagTable tag in the XML file $::xmlFile.\n" |
||||
} |
||||
} |
||||
} |
||||
|
||||
sub verifyDate { |
||||
# The date must already be in an array. We will check the size here. |
||||
# The format should be (year, month, day, hour, min, sec) |
||||
my @date = @_; |
||||
my $leapYear = 0; |
||||
|
||||
my @months = ( { month => 'January', |
||||
days => 31 }, |
||||
{ month => 'February', |
||||
days => 28 }, |
||||
{ month => 'March', |
||||
days => 31 }, |
||||
{ month => 'April', |
||||
days => 30 }, |
||||
{ month => 'May', |
||||
days => 31 }, |
||||
{ month => 'June', |
||||
days => 30 }, |
||||
{ month => 'July', |
||||
days => 31 }, |
||||
{ month => 'August', |
||||
days => 31 }, |
||||
{ month => 'September', |
||||
days => 30 }, |
||||
{ month => 'October', |
||||
days => 31 }, |
||||
{ month => 'November', |
||||
days => 30 }, |
||||
{ month => 'December', |
||||
days => 31 } ); |
||||
|
||||
if ( scalar(@date) != 6 ) { |
||||
# Wrong number of elements in date. Are we too big? |
||||
return 'Too many elements in date string.' if ( scalar(@date) > 6 ) ; |
||||
return 'Too few elements in date string.' if ( scalar(@date) < 6 ); |
||||
} |
||||
|
||||
return 'Year must be > 0.' if ( $date[0] < 0 ); |
||||
|
||||
# Correct number of days in February if this is a leap year. |
||||
$months[1]{days} = $months[1]{days} + 1 if ( isLeapYear($date[0]) ); |
||||
|
||||
return 'Month must be in the range [1,12].' if ( $date[1] < 1 or $date[1] > 12 ) ; |
||||
|
||||
return "Days must be in the range [1,$months[$date[1]-1]{days}] for $months[$date[1]-1]{month} in year $date[0]." if ( $date[2] < 1 or $date[2] > $months[$date[1]-1]{days} ); |
||||
|
||||
return 'Hours must be in the range [0,24].' if ( $date[3] < 0 or $date[3] > 24 ); |
||||
|
||||
return 'Minutes must be in the range [0,60].' if ( $date[4] < 0 or $date[4] > 60 ); |
||||
|
||||
return 'Seconds must be in the range [0,60].' if ( $date[5] < 0 or $date[5] > 60 ); |
||||
|
||||
return ''; |
||||
} |
||||
|
||||
sub isLeapYear { |
||||
my $year = shift(@_); |
||||
|
||||
if ( ($year % 4 == 0) and ($year % 100 != 0) or ($year % 400 == 0) ) { |
||||
return 1; |
||||
} else { |
||||
return 0; |
||||
} |
||||
} |
||||
|
||||
sub sanitizeString { |
||||
# Remove the quote marks and any additional space before and after |
||||
# the string. |
||||
my $string = shift(@_); |
||||
|
||||
$string =~ s/"//g; |
||||
$string =~ s/^\s+//; |
||||
$string =~ s/\s+$//; |
||||
|
||||
return $string; |
||||
} |
||||
|
||||
__END__ |
||||
|
||||
=head1 NAME |
||||
|
||||
diag_table_chk - Parse a diag_table, and report the number of files, max fields, and parse errors |
||||
|
||||
=head1 SYNOPSIS |
||||
|
||||
diag_table_chk [-h|--help] |
||||
|
||||
diag_table_chk [-v|--verbose] I<diag_table> |
||||
|
||||
diag_table_chk [-v|--verbose] -x I<xml_file> I<experiment> |
||||
|
||||
=head1 DESCRIPTION |
||||
|
||||
B<diag_table_chk> will parse a diag_table and report on the number of |
||||
files in the diag_table, the max fields used per file, and will give |
||||
warnings on any parse errors found in the format of 'WARNING(<line_number>)'. |
||||
|
||||
=head1 OPTIONS |
||||
|
||||
=over 8 |
||||
|
||||
=item B<-h>, B<--help> |
||||
|
||||
Display usage information |
||||
|
||||
=item B<-v>, B<--verbose> |
||||
|
||||
Display the files and fields that were found. |
||||
|
||||
=item B<-x>, B<--xml> <xml_file> <experiment> |
||||
|
||||
Read the diagnostic table file from I<<experiment>> from the I<<xml_file>>. |
||||
|
||||
=item <diag_table> |
||||
|
||||
The file name of the diagnostic table to check |
||||
|
||||
=back |
||||
|
||||
=head1 EXAMPLE |
||||
|
||||
> diag_table_chk -x SM2.1U-LM3V.xml SM2.1U_Control-1990_lm3v_pot_A1 |
||||
|
||||
Table Descriptor: NOT SET |
||||
Base Date: 0101 01 01 0 0 0 |
||||
Number of files: 14 |
||||
Max fields per file: 93 |
||||
Number of warnings: 2 |
||||
WARNING(3): The table descriptor and the base date must be set before any files or fields. |
||||
WARNING(206): Time sampling method must be one of (.true., mean, average, avg, .false., none, point, maximum, max, minimum, min, diurnal[#]). |
||||
|
||||
=head1 AUTHOR |
||||
|
||||
Seth Underwood <sunderwood@hpti.com> |
||||
|
||||
=head1 BUGS |
||||
|
||||
No known bugs at this time. |
||||
Report any bug to the author. |
||||
|
||||
=cut |
@ -0,0 +1,17 @@
|
||||
source $MODULESHOME/init/csh |
||||
module use -a /home/fms/local/modulefiles |
||||
module purge |
||||
module load ifort.11.0.074 |
||||
module load icc.11.0.074 |
||||
module load idb.10.1.35 |
||||
module load hdf5-1.8.3 |
||||
module load netcdf-4.0.1 |
||||
setenv OMP_NUM_THREADS 1 |
||||
# |
||||
setenv NC_BLKSZ 64K |
||||
setenv FMS_ARCHIVE /archive/fms |
||||
setenv PATH ${PATH}:. |
||||
setenv netcdf3_inc_dir "/usr/local/netcdf-3.6.2/include" |
||||
setenv netcdf3_lib_dir "/usr/local/netcdf-3.6.2/lib" |
||||
setenv mpirunCommand "mpirun -np" |
||||
|
@ -0,0 +1,14 @@
|
||||
source $MODULESHOME/init/csh |
||||
module purge |
||||
module rm netcdf hdf5 |
||||
module load mpich2/1.2.1p1 |
||||
module use -a /home/fms/local/modulefiles |
||||
module load hdf5/1.8.5-patch1-gnu-4 |
||||
module load netcdf/4.1.1-gnu-4 |
||||
# |
||||
setenv PATH ${PATH}:. |
||||
setenv mpirunCommand "/net2/nnz/opt/mpich2-1.3_ifort11_x64/bin/mpirun -np" |
||||
setenv FMS_ARCHIVE /archive/fms |
||||
setenv PATH ${PATH}:. |
||||
|
||||
|
@ -0,0 +1,16 @@
|
||||
source $MODULESHOME/init/csh |
||||
module use -a /home/fms/local/modulefiles |
||||
module purge |
||||
module rm netcdf hdf5 |
||||
module load ifort/11.1.073 |
||||
module load icc/11.1.073 |
||||
module load hdf5/1.8.6 |
||||
module load netcdf/4.1.2 |
||||
module load mpich2/1.2.1p1 |
||||
# |
||||
setenv PATH ${PATH}:. |
||||
setenv mpirunCommand "/net2/nnz/opt/mpich2-1.3_ifort11_x64/bin/mpirun -np" |
||||
setenv FMS_ARCHIVE /archive/fms |
||||
setenv PATH ${PATH}:. |
||||
|
||||
|
@ -0,0 +1,16 @@
|
||||
source /opt/modules/default/init/tcsh |
||||
module purge |
||||
module load ifort.11.0.074 |
||||
module load icc.11.0.074 |
||||
module load idb.11.0.034 |
||||
module load scsl-1.5.1.0 |
||||
module load mpt-1.18 |
||||
module load hdf5-1.8.1 |
||||
module load netcdf-4.0.1 |
||||
setenv NC_BLKSZ 64K |
||||
setenv FMS_ARCHIVE /archive/fms |
||||
setenv PATH ${PATH}:. |
||||
setenv netcdf3_inc_dir "/usr/local/netcdf-3.6.2/include" |
||||
setenv netcdf3_lib_dir "/usr/local/netcdf-3.6.2/lib" |
||||
setenv mpirunCommand "mpirun -np" |
||||
|
@ -0,0 +1,3 @@
|
||||
export OMP_NUM_THREADS=1 |
||||
export BG_APPTHREADDEPTH=1 |
||||
|
@ -0,0 +1,8 @@
|
||||
source /etc/profile.d/nf_csh_modules |
||||
module purge |
||||
module load intel-fc |
||||
module load intel-cc |
||||
module load hdf5 |
||||
module load netcdf |
||||
module load openmpi |
||||
setenv mpirunCommand "mpirun -np" |
@ -0,0 +1,21 @@
|
||||
#This file should set all the necessary system environment variables |
||||
#and/or load all the necessary modules for the code to compile and run on the specific platform. |
||||
#Users need to find these for their systems. |
||||
# |
||||
source $MODULESHOME/init/csh |
||||
module rm PrgEnv-pgi PrgEnv-pathscale netcdf |
||||
module load PrgEnv-intel/3.1.29 |
||||
module load hdf5/1.8.4.1 |
||||
module load netcdf/4.0.1.3 |
||||
module load nco |
||||
module list |
||||
setenv MPICH_MAX_SHORT_MSG_SIZE 8000 |
||||
setenv NC_BLKSZ 1M |
||||
setenv F_UFMTENDIAN big |
||||
setenv OMP_NUM_THREADS 1 |
||||
# |
||||
setenv FMS_ARCHIVE /lustre/fs/archive/fms |
||||
setenv mpirunCommand "aprun -n" |
||||
setenv PATH ${PATH}:. |
||||
setenv netcdf3_inc_dir "/opt/cray/netcdf/3.6.2/netcdf-gnu/include" |
||||
setenv netcdf3_lib_dir "/opt/cray/netcdf/3.6.2/netcdf-gnu/lib" |
@ -0,0 +1,15 @@
|
||||
source $MODULESHOME/init/csh |
||||
module use -a /ncrc/home2/fms/local/modulefiles |
||||
module unload PrgEnv-pgi PrgEnv-pathscale PrgEnv-intel PrgEnv-gnu PrgEnv-cray |
||||
module unload netcdf fre fre-commands |
||||
module load PrgEnv-gnu |
||||
module load hdf5/1.8.8 |
||||
module load netcdf/4.2.0 |
||||
module list |
||||
setenv MPICH_MAX_SHORT_MSG_SIZE 8000 |
||||
setenv KMP_STACKSIZE 512m |
||||
setenv NC_BLKSZ 1M |
||||
|
||||
setenv mpirunCommand "aprun -n" |
||||
setenv PATH ${PATH}:. |
||||
|
@ -0,0 +1,21 @@
|
||||
#This file should set all the necessary system environment variables |
||||
#and/or load all the necessary modules for the code to compile and run on the specific platform. |
||||
#Users need to find these for their systems. |
||||
# |
||||
source $MODULESHOME/init/csh |
||||
module rm PrgEnv-pgi PrgEnv-pathscale netcdf |
||||
module load PrgEnv-intel |
||||
module swap intel intel/12.0.5.220 |
||||
module load hdf5/1.8.7 |
||||
module load netcdf/4.1.3 |
||||
module list |
||||
setenv MPICH_MAX_SHORT_MSG_SIZE 8000 |
||||
setenv NC_BLKSZ 1M |
||||
setenv F_UFMTENDIAN big |
||||
# setenv OMP_NUM_THREADS 1 |
||||
# |
||||
# setenv FMS_ARCHIVE /lustre/fs/archive/fms |
||||
setenv mpirunCommand "aprun -n" |
||||
setenv PATH ${PATH}:. |
||||
# setenv netcdf3_inc_dir "/opt/cray/netcdf/3.6.2/netcdf-gnu/include" |
||||
# setenv netcdf3_lib_dir "/opt/cray/netcdf/3.6.2/netcdf-gnu/lib" |
@ -0,0 +1,2 @@
|
||||
setenv mpirunCommand "mpirun -np" |
||||
|
@ -0,0 +1,17 @@
|
||||
source $MODULESHOME/init/csh |
||||
module use -a /home/fms/local/modulefiles |
||||
module purge |
||||
module load ifort.11.0.074 |
||||
module load icc.11.0.074 |
||||
module load idb.10.1.35 |
||||
module load hdf5-1.8.3 |
||||
module load netcdf-4.0.1 |
||||
setenv OMP_NUM_THREADS 1 |
||||
# |
||||
setenv NC_BLKSZ 64K |
||||
setenv FMS_ARCHIVE /archive/fms |
||||
setenv PATH ${PATH}:. |
||||
setenv netcdf3_inc_dir "/usr/local/netcdf-3.6.2/include" |
||||
setenv netcdf3_lib_dir "/usr/local/netcdf-3.6.2/lib" |
||||
setenv mpirunCommand "mpirun -np" |
||||
|
@ -0,0 +1,73 @@
|
||||
#!/usr/bin/perl |
||||
#Contact: arl, pjk |
||||
#Usage: list_files_with_tag tagname |
||||
# Returns list of files under CVS control, relative to current |
||||
# directory, which can be updated or checked out with the tag tagname. |
||||
#Modified to also list files not currently checked out (arl, 4/2002) |
||||
#Version: $Id: list_files_with_tag,v 1.1.2.1 2013/12/18 17:47:54 Niki.Zadeh Exp $ |
||||
|
||||
#test that a tagname was given as an argument |
||||
if( "$#ARGV" ne "0" ) { |
||||
print "\nUsage: list_files_with_tag tagname\n\n"; |
||||
print " Returns list of files under CVS control, relative to current\n"; |
||||
print " directory, which can be updated or checked out with the tag tagname.\n\n"; |
||||
exit; |
||||
} |
||||
$tag = @ARGV[0]; |
||||
|
||||
#use cvs status on files in the current directory to determine which |
||||
#have the given tag. This includes those files which have been deleted |
||||
#on the branch tag. Then parse the output into %files. |
||||
|
||||
@cvsstatus = `cvs status -v 2>&1`; |
||||
$i = 0; |
||||
while($i <= $#cvsstatus) { |
||||
if( $cvsstatus[$i] =~ /cvs status: Examining (\S+)/ ) { |
||||
$thisdir = $1; |
||||
} |
||||
elsif( $cvsstatus[$i] =~ /^File: \w/ ) { |
||||
@thisline = split ' ',$cvsstatus[$i]; |
||||
$currentfile = $thisline[1]; |
||||
} |
||||
elsif( $cvsstatus[$i] =~ /Existing Tags/ ) { |
||||
#skip a line |
||||
$i++; |
||||
#Each tag line is of the form tag (branch/revision...) |
||||
while ($cvsstatus[$i] =~ s/\(.+\)//g) { |
||||
#remove blanks |
||||
$cvsstatus[$i] =~ s/\s+//g; |
||||
#create hash of files (unique list). Don't print "./" in front of files. |
||||
if ($tag =~ /^$cvsstatus[$i]$/) { |
||||
if( "$thisdir" eq "." ) { |
||||
$files{"$currentfile"} = 1; |
||||
} |
||||
else { |
||||
$files{"$thisdir/$currentfile"} = 1; |
||||
} |
||||
} |
||||
$i++; |
||||
} |
||||
} |
||||
$i++; |
||||
} |
||||
|
||||
#Add list of files that would be checked out with this tag. |
||||
#This will include new files not currently checked out. |
||||
|
||||
@cvsupdate = `cvs update -p -d -r $tag 2>&1`; |
||||
$i = 0; |
||||
while($i <= $#cvsupdate ) { |
||||
if( $cvsupdate[$i] =~ /Checking out/ ) { |
||||
@line = split(' ', $cvsupdate[$i]); |
||||
$files{"$line[2]"} = 1; |
||||
} |
||||
$i++; |
||||
} |
||||
|
||||
@unique_files = sort(keys(%files)); |
||||
|
||||
if( @unique_files ) { |
||||
foreach $file (@unique_files) { |
||||
print "$file\n"; |
||||
} |
||||
} |
@ -0,0 +1,98 @@
|
||||
#!/bin/csh -ef |
||||
# $Id: list_paths,v 1.1.2.1 2013/12/18 17:47:54 Niki.Zadeh Exp $ |
||||
#----------------------------------------------------------------------- |
||||
# list_paths: CVS administrative script |
||||
# |
||||
# AUTHOR: V. Balaji (vb@gfdl.gov) |
||||
# SGI/GFDL Princeton University |
||||
# |
||||
# This program is free software; you can redistribute it and/or modify |
||||
# it under the terms of the GNU General Public License as published by |
||||
# the Free Software Foundation; either version 2 of the License, or |
||||
# (at your option) any later version. |
||||
# |
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
# |
||||
# For the full text of the GNU General Public License, |
||||
# write to: Free Software Foundation, Inc., |
||||
# 675 Mass Ave, Cambridge, MA 02139, USA. |
||||
#----------------------------------------------------------------------- |
||||
# script to be run from the CVSROOT/modules file to create path lists |
||||
# $1 contains the name of the archive being checked out |
||||
# this script creates two files: |
||||
# path_names contains all the source files ( *.{c,C,f,F,fh,f90,F90,h,H,inc} ) |
||||
# path_names.html contains all the doc files ( *.{html,ps,txt}, README, readme ) |
||||
# NOTE: if these files exist, they are appended to. |
||||
# This is necessary, since for aliases that checkout multiple |
||||
# directories you need to keep the results from earlier checkouts. |
||||
# This could yield unexpected results if you use the same working |
||||
# directory for different experiments using different modules. You |
||||
# must remove these files if beginning a fresh experiment. |
||||
|
||||
set argv = (`getopt o: $*`) |
||||
set out = "$cwd/path_names" |
||||
#--------------------------------------------------- |
||||
while ("$argv[1]" != "--") |
||||
switch ($argv[1]) |
||||
case -o: |
||||
set out = $argv[2]; shift argv; breaksw |
||||
endsw |
||||
shift argv |
||||
end |
||||
shift argv |
||||
#--------------------------------------------------- |
||||
|
||||
unset noclobber |
||||
if( $?DEBUG )echo Running $0 in $cwd, args $* |
||||
|
||||
set src = "$out.src.tmp" |
||||
set doc = "$out.doc.tmp" |
||||
set outdoc = "$out.html" |
||||
|
||||
touch $out # create the file if it doesn't exist |
||||
cp $out $src |
||||
find $* -type f \ |
||||
\( -name \*.c \ |
||||
-o -name \*.C \ |
||||
-o -name \*.f \ |
||||
-o -name \*.fh \ |
||||
-o -name \*.F \ |
||||
-o -name \*.f90 \ |
||||
-o -name \*.F90 \ |
||||
-o -name \*.h \ |
||||
-o -name \*.H \ |
||||
-o -name \*.inc \ |
||||
\) -print >> $src |
||||
|
||||
sed 's:.*/\(.*\):\0 \1:' $src | nl | sort --key 3 -u | sort -n | awk '{print $2}' > $out |
||||
echo "A list of the files you checked out is in the file $out ..." |
||||
|
||||
touch $doc # create the file if it doesn't exist |
||||
find $* -type f \ |
||||
\( -name \*.html \ |
||||
-o -name \*.ps \ |
||||
-o -name \*.txt \ |
||||
-o -name \*.pdf \ |
||||
-o -name \*.jpg \ |
||||
-o -name readme \ |
||||
-o -name read_me \ |
||||
-o -name README \ |
||||
\) -print > $src |
||||
if ( -z $src ) then |
||||
rm -f $doc $src |
||||
exit |
||||
endif |
||||
# $src has non-zero size (i.e some doc exists) |
||||
cat $src >> $doc |
||||
|
||||