wavewatch3.v4.18安装使用教程.docx
《wavewatch3.v4.18安装使用教程.docx》由会员分享,可在线阅读,更多相关《wavewatch3.v4.18安装使用教程.docx(39页珍藏版)》请在文库网上搜索。
1、Wavewatch3.v4.18 在服务器上安装使用教程鉴于wavewatch3.v4.18 的安装仅限于一本全英文的mannul 手册, 网络上没有任何有帮助的安装教程以及使用教程。因此,我于2015 年 10 月在浙江海洋大学学习 wavewatch3.v4.18 时,在中国海大的两位师兄的帮助下成功安装了模式,仅针对我们学校的某个服务器安装的一些问题和步骤进行下列总结。一、环境变量设置安装 ww3 之前需要加载编译器并设置环境变量,不同的服务器有不同的加载方式,一般情况下使用 module list 查看当前已加载编译器,module avail 查看可加载编译器,module load
2、 name 加载name 编译器。安装 ww3 需要加载 ifort、icc 和openmpi-Intel(注意:使用openmpi-Intel 是因为我们的集群上安装的是这个,其他 mpi 有关的编译器没有使用过,所以不太清楚)三个编译器。但我使用的服务器上不可使用 module 命令(具体原因和服务器配置有关,我没有权限深究,此处不做详解),因此我们设置环境变量文件.bashrc 文件。在修改之前,使用 which ifort 、which icc 和 which mpirun 查看三个编译的安装目录。根目录下输入vi.bashrc 添加如下代码:export PATH=$PATH:/使(
3、 用查找出来的 ifort 和 icc 安装目录)/bin/(可能发生 ifort和 icc 是同一个目录,此处填写该目录)export PATH=$PATH:/使( 用查找出来的 mpi 安装目录)/binexport LD_LIBRARY_PATH=/(使用查找出来的 mpi 安装目录)/lib/:$LD_LIBRARY_PATH此时环境变量则修改完毕,记得使用 source .bashrc 加载设置好的环境变量,然后继续完成安装。二、ww3 安装和编译1. 安装个人建议直接上传 ww3 的压缩文件,这样可以节约时间,也可先在 windows 下解压后在上传,最好是建立一个新的文件夹,这样
4、不会发生文件找不到的情况。我提供的是 4.18 版本,文件夹示例:/public/home/shao002113/wwatch3.v4.18上传完毕后,按如下步骤进行:(注意空格)tarxvfwwatch3.v4.18-C/public/home/shao002113/wwatch3.v4.18 cdwwatch3.v4.18chmod+xinstall_ww3_tar./install_ww3_tar接下来进入安装了,他会问你一些问题,让你选择(y/n)的时候基本都是y。有一个是选择安装模式,一个是L 一个是G,安装选择G,然后有些设置需要修改,如下:Printer for listings
5、printer:printer Compiler for aux. f77: ifort Compiler for aux. cc: iccScratch space /tmp:这是一个关于 tmp 文件夹的设置,第一次安装不用修改Save source code files: yes Save listing files: yes之后出现的一律选择yes,会显示安装结束 end。2. 添加环境变量在根目录下输入命令:vi.bashrc在文本中添加:export PATH=$PATH:/(ww3完整安装目录)/bin export PATH=$PATH:/(ww3完整安装目录)/exe保存并退
6、出。根目录下输入命令:source .bashrc(这是修改.bashrc 后的必要步骤)。验证路径是否添加成功,根目录下输入 which w3_make.若成功修改,则会出现 ww3 完整目录。3. 修改 comp、link、switch进入bin 文件夹,将 comp.Intel 和 link.Intel 复制成 comp 和 link即:cpcomp.Intelcomp cplink.Intellink使用vi 编辑器修改 comp 和 link。修改如下: comp 中(大约 96 行处)修改成如下if $mpi_mod = yes thencomp=mpiifortwhich mpi
7、ifort 1 /dev/null 2 /dev/null OK=$?if $OK != 0 thencomp=mpif90fielsecomp=ifortfilink 中(大约 104 行)修改成如下if $mpi_mod = yes thencomp=mpiifortwhich mpiifort 1 /dev/null 2 /dev/null OK=$?if $OK != 0 thencomp=mpif90fiopt=-O3 -o $prog elsecomp=ifortfiswitch 中把 SHRD 改为 MPIDIST(注意此处空格,否则会出错)。三个文件修改完毕后给予执行权限。ch
8、mod+ucomplinkswitch4. 运行 make_MPI直接输入命令 make_MPI 即可。如果没有错误显示则编译成功, 一般会出现两个错误,但不影响模式的运行计算,到此 ww3 安装编译成功。三、数据提取WW3 对于输入数据文件的类型没有固定要求,本人常用的是风场为dat 文件,地形为ASCII 文件。那么输入数据的格式有着一定的要求。对于风场来说,数据排列方式如下:第一行是时间,如 2015 年 6 月 1 日 0 点 0 时 0 分,则写为:20150601 000000(注意年月日和时分秒之间存在空格)。接下来是两个矩阵,第一个是风场u,第二个是风场v。接下来是地形,说是地
9、形,其实就是水深,大于等于0 的设为无效值就好。当地行存为 ASCII 文件时,务必知道其绘出的地形图是什么形式的,在后面的修改脚本出需要用到。四、脚本修改1.ww3_grid.inp$ $ WAVEWATCH III Grid preprocessor input file$ $ Grid name (C*30, in quotes)$TEST GRID (GULF OF NOWHERE)(此处是使用的网格名称)$ Frequency increment factor and first frequency (Hz)$ number of frequencies (wavenumbers)
10、and directions, relative offset$ of first direction in terms of the directional increment -0.5,0.5.$ In versions 1.18 and 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.10
11、.0411825240.(频率间隔初始频率波速波向)$ Set model flags $- FLDRYDry run (input/output only, no calculation).$- FLCX, FLCYActivate X and Y component of propagation.$- FLCTH, FLCKActivate direction and wavenumber shifts.$- FLSOUActivate source terms.$(上方六项的开关)F T T T F T$ Set time steps $ - Time step information
12、(this information is always read)$maximum global time step, maximum CFL time step for x-y and$k-theta, minimum 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
13、parameters$for source terms, propagation schemes, and numerics are read using$namelists. Any namelist 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
14、 switch settings will be skipped$automatically, and the order of the namelists is immaterial.$As an example, namelist input to change SWELLF and ZWND in theTolman and Chalikov input would be&SIN2 SWELLF = 0.1, ZWND = 15. /(此处均属于对源函数的调整,手册有相关介绍)$ Define constants in source terms$ Stresses - - - - - -
15、 - - - - - - - - - - - - - - - - - - - - - - - -$TC 1996 with cap: Namelist FLX3$CDMAX: Maximum allowed CD (cap)$CTYPE: Cap type :$0: Discontinuous (default).$1: Hyperbolic tangent.$Hwang 2011: Namelist FLX4$CDFAC: re-scaling of drag$ Linear input - - - - - - - - - - - - - - - - - - - - - - - - - -
16、- -$Cavaleri and M-R: Namelist SLN1$CLIN: Proportionality constant.$RFPM: Factor for fPM in filter.$RFHF: Factor for fh in filter.$ Exponential input- - - - - - - - - - - - - - - - - - - - - - - - -$WAM-3: Namelist SIN1$CINP: Proportionality constant.$Tolman and Chalikov : Namelist SIN2$ZWND: Height
17、 of wind (m).$SWELLF : swell factor in (n.nn).$STABSH, STABOF, CNEG, CPOS, FNEG :$c0, ST0, c1, c2 and f1 in . (n.nn)$through (2.65) for definition of$effective wind speed (!/STAB2).$WAM4 and variants: Namelist SIN3$ZWND: Height of wind (m).$ALPHA0: minimum value of Charnock coefficient$Z0MAX: maximu
18、m value of air-side roughness z0$BETAMAX : maximum value of wind-wave coupling$SINTHP: power of cosine in wind input$ZALP: wave age shift to account forgustiness$TAUWSHELTER : sheltering of short waves to reduce u_star$SWELLFPAR : choice of swell attenuation formulation$(1: TC 1996, 3: ACC 2008)$SWE
19、LLF : swell attenuation factor$Extra parameters for SWELLFPAR=3 only$SWELLF2, SWELLF3 : swell attenuation factors$SWELLF4 : Threshold Reynolds number for ACC2008$SWELLF5 : Relative viscous decay below threshold$Z0RAT : roughness for oscil. flow / meanflow$BYDRZ input: Namelist SIN6SINA0: factor for
20、negative input SINU10: wind speed scaling option$ Nonlinear interactions - - - - - - - - - - - - - - - - - - - - - - -$Discrete I.A.: Namelist SNL1$LAMBDA : Lambda in source term.$NLPROP : C in sourc term. NOTE : default$value depends on other source$terms selected.$KDCONV : Factor before kd in Eq.
21、(n.nn).$KDMIN, SNLCS1, SNLCS2, SNLCS3 :Minimum kd, and constants c1-3$in depth scaling function.$Exact interactions: Namelist SNL2$IQTYPE : Type of depth treatment$1 : Deep water$2 : Deep water / WAM scaling$3 : Shallow water$TAILNL : Parametric tail power.$NDEPTH : Number of depths in for which$int
22、egration space is established.$Used for IQTYPE = 3 only$Namelist ANL2$DEPTHS : Array with depths for NDEPTH =3$Gen. Multiple DIA: Namelist SNL3$NQDEF: Number of quadruplets.$MSC: Scaling constant m.$NSC: Scaling constant N.$KDFD: Deep water relative filter depth,$KDFS: Shallow water relative filter
- 1.请仔细阅读文档,确保文档完整性,对于不预览、不比对内容而直接下载带来的问题本站不予受理。
- 2.下载的文档,不会出现我们的网址水印。
- 3、该文档所得收入(下载+内容+预览)归上传者、原创作者;如果您是本文档原作者,请点此认领!既往收益都归您。
下载文档到电脑,查找使用更方便
500 文币 0人已下载
下载 | 加入VIP,免费下载 |
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- wavewatch3 v4 18 安装 使用 教程