wavewatch3.v4.18安装使用教程浙江海洋大学修改于0322

上传人:cn****1 文档编号:548014201 上传时间:2023-10-20 格式:DOC 页数:65 大小:187.50KB
返回 下载 相关 举报
wavewatch3.v4.18安装使用教程浙江海洋大学修改于0322_第1页
第1页 / 共65页
wavewatch3.v4.18安装使用教程浙江海洋大学修改于0322_第2页
第2页 / 共65页
wavewatch3.v4.18安装使用教程浙江海洋大学修改于0322_第3页
第3页 / 共65页
wavewatch3.v4.18安装使用教程浙江海洋大学修改于0322_第4页
第4页 / 共65页
wavewatch3.v4.18安装使用教程浙江海洋大学修改于0322_第5页
第5页 / 共65页
点击查看更多>>
资源描述

《wavewatch3.v4.18安装使用教程浙江海洋大学修改于0322》由会员分享,可在线阅读,更多相关《wavewatch3.v4.18安装使用教程浙江海洋大学修改于0322(65页珍藏版)》请在金锄头文库上搜索。

1、wordW海洋学院 盛叶新鉴于wavewatch3.v4.18的安装仅限于一本全英文的mannul手册,网络上没有任何有帮助的安装教程以与使用教程。因此,我于2015年10月在海洋大学学习wavewatch3.v4.18时,在中国海大的两位师兄的帮助下成功安装了模式,仅针对我们学校的某个服务器安装的一些问题和步骤进展如下总结。一、环境变量设置安装ww3之前需要加载编译器并设置环境变量,不同的服务器有不同的加载方式,一般情况下使用module list 查看当前已加载编译器,module avail 查看可加载编译器,module load name 加载name编译器。安装ww3需要加载ifo

2、rt、icc和openmpi-Intel注意:使用openmpi-Intel是因为我们的集群上安装的是这个,其他mpi有关的编译器没有使用过,所以不太清楚三个编译器。但我使用的服务器上不可使用module命令具体原因和服务器配置有关,我没有权限深究,此处不做详解,因此我们设置环境变量文件.bashrc 文件。在修改之前,使用which ifort 、which icc和which mpirun查看三个编译的安装目录。根目录下输入vi .bashrc 添加如下代码:export PATH=$PATH:/(使用查找出来的ifort和icc安装目录)/bin/(可能发生ifort和icc是同一个目录

3、,此处填写该目录)export PATH=$PATH:/(使用查找出来的mpi安装目录)/binexport LD_LIBRARY_PATH=/(使用查找出来的mpi安装目录)/lib/:$LD_LIBRARY_PATH此时环境变量如此修改完毕,记得使用source .bashrc加载设置好的环境变量,然后继续完成安装。二、ww3安装和编译上传完毕后,按如下步骤进展:注意空格tarchmod +x install_ww3_tar./install_ww3_tar接下来进入安装了,他会问你一些问题,让你选择y/n的时候根本都是y。有一个是选择安装模式,一个是L一个是G,安装选择G,然后有些设置需

4、要修改,如下:Printer for listingsprinter:printerpiler for aux. f77: ifortpiler for aux. cc: iccScratch space /tmp:这是一个关于tmp文件夹的设置,第一次安装不用修改Save source code files: yesSave listing files: yes之后出现的一律选择yes,会显示安装完毕end。在根目录下输入命令:vi .bashrc在文本中添加:export PATH=$PATH:/(ww3完整安装目录)/binexport PATH=$PATH:/(ww3完整安装目录)/e

5、xe保存并退出。根目录下输入命令:source .bashrc这是修改.bashrc后的必要步骤。验证路径是否添加成功,根目录下输入 which w3_make.假如成功修改,如此会出现ww3完整目录。3.修改p、link、switch复制成p和link即:cp pcp link.Intel link使用vi编辑器修改p和link。修改如下:p中大约96行处修改成如下if $mpi_mod = yes then p=mpiifort which mpiifort 1 /dev/null 2 /dev/null OK=$? if $OK != 0 then p=mpif90 fi else p=

6、ifort filink中大约104行修改成如下if $mpi_mod = yes then p=mpiifort which mpiifort 1 /dev/null 2 /dev/null OK=$? if $OK != 0 then p=mpif90 fi opt=-O3 -o $prog else p=ifort fiswitch中把SHRD改为MPI DIST(注意此处空格,否如此会出错)。三个文件修改完毕后给予执行权限。chmod +u p link switch直接输入命令make_MPI即可。如果没有错误显示如此编译成功,一般会出现两个错误,但不影响模式的运行计算,到此ww3安

7、装编译成功。三、数据提取WW3对于输入数据文件的类型没有固定要求,本人常用的是风场为dat文件,地形为ASCII文件。那么输入数据的格式有着一定的要求。对于风场来说,数据排列方式如下:第一行是时间,如2015年6月1日0点0时0分,如此写为:20150601 000000注意年月日和时分秒之间存在空格。接下来是两个矩阵,第一个是风场u,第二个是风场v。接下来是地形,说是地形,其实就是水深,大于等于0的设为无效值就好。当地行存为ASCII文件时,务必知道其绘出的地形图是什么形式的,在后面的修改脚本出需要用到。四、脚本修改$ - $ WAVEWATCH III Grid preprocessor

8、input file $ - $ Grid name (C*30, in quotes)$ TEST GRID (GULF OF NOWHERE) (此处是使用的网格名称)$ Frequency increment factor and first frequency (Hz) - $ number of frequencies (wavenumbers) and directions, relative offset$ of first direction in terms of the directional increment -0.5,0.5.$ In versions 1.18 an

9、d 2.22 of the model this value was by definiton 0,$ it is added to mitigate the GSE for a first order scheme. Note that$ this factor is IGNORED in the print plots in ww3_outp.$ 1.1 0.04118 25 24 0.频率间隔 初始频率 波速 波向$ Set model flags - $ - FLDRY Dry run (input/output only, no calculation).$ - FLCX, FLCY

10、 Activate X and Y ponent of propagation.$ - FLCTH, FLCK Activate direction and wavenumber shifts.$ - FLSOU Activate source terms.$ F T T T F T上方六项的开关$ Set time steps - $ - Time step information (this information is always read)$ maximum global time step, maximum CFL time step for x-y and$ k-theta, m

11、inimum source term time step (all in seconds).$ 900. 950. 900. 300.第一个数和第三个数一般是第二个数的两倍,第二个数使用程序计算,最后一个一般为30$ Start of namelist input section - $ Starting with WAVEWATCH III version 2.00, the tunable parameters$ for source terms, propagation schemes, and numerics are read using$ namelists. Any nameli

12、st found in the folowing sections up to the$ end-of-section identifier string (see below) is temporarily written$ to ww3_grid.scratch, and read from there if necessary. Namelists$ not needed for the given switch settings will be skipped$ automatically, and the order of the namelists is immaterial.$

13、As an example, namelist input to change SWELLF and ZWND in the$ Tolman and Chalikov input would be$ &SIN2 SWELLF = 0.1, ZWND = 15. /此处均属于对源函数的调整,手册有相关介绍$ Define constants in source terms - $ Stresses - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -$ TC 1996 with cap : Namelist FLX3$ CDMAX : Maximum allowed CD (cap)$ CTYPE : Cap type :$ 0: Discontinuous (default).$ 1: Hyperbolic tangent.$ Hwang 2011

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 办公文档 > 工作计划

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号