wavewatch3.v4.18安装使用教学教程(浙江海洋大学修改于2016年度0322)_第1页
wavewatch3.v4.18安装使用教学教程(浙江海洋大学修改于2016年度0322)_第2页
wavewatch3.v4.18安装使用教学教程(浙江海洋大学修改于2016年度0322)_第3页
wavewatch3.v4.18安装使用教学教程(浙江海洋大学修改于2016年度0322)_第4页
wavewatch3.v4.18安装使用教学教程(浙江海洋大学修改于2016年度0322)_第5页
已阅读5页,还剩75页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

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

2、 load 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上传完毕后,按如下步骤进行:(注意空格)tar xvf wwatch3.v4.18 -C/public/home/shao002113/wwatch3.v4.18cd wwatch3.v4.18chmod +x install_ww3_tar./install_ww3_tar接下来进入安装了,他会问你一些问题,让你选择(y/n )的时 候基本都是y。有一个是选择安装模式,一个是 L 一个是G,安装选 择G,然后有些设置需要修改,如下:Printer for listingspri

5、nter:printerCompiler for aux. f77: ifortCompiler for aux. cc: iccScratch space /tmp:这是一个关于tmp文件夹的设置,第一次安装不 用修改Save source code files: yesSave listing files: yes之后出现的一律选择yes,会显示安装结束end。2 .添加环境变量在根目录下输入命令:vi .bashrc在文本中添加:export PATH=$PATH:/(ww3完整安装目录)/binexport PATH=$PATH:/(ww3完整安装目录)/exe保存并退出。根目录下输入

6、命令:source .bashrc (这是修改.bashrc后的必 要步骤)。验证路径是否添加成功,根目录下输入 which w3_make.若成 功修改,则会出现ww3完整目录。3 .修改 comp、link、switch进入bin文件夹,将comp.Intel和link.Intel复制成comp和 link 即:cp comp.Intel compcp link.Intel link使用vi编辑器修改comp和link。修改如下:comp中(大约96行处)修改成如下if "$mpi_mod" = 'yes'thencomp=mpiifortwhich m

7、piifort 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='mpif90'fiopt="-O3 -o $prog" elsecomp=ifort f

8、iswitch中把SHRD改为MPIDIST(注意此处空格,否则会出错)。三个文件修改完毕后给予执行权限。chmod +u comp link switch4 .运行 make_MPI直接输入命令make_MPI即可。如果没有错误显示则编译成功, 一般会出现两个错误,但不影响模式的运行计算,到此 ww3安装编 译成功。三、数据提取WW3对于输入数据文件的类型没有固定要求, 本人常用的是风 场为dat文件,地形为ASCII文件。那么输入数据的格式有着一定的 要求。对于风场来说,数据排列方式如下:1 L LQ 111 1 1 1 1i i i 1 I I I一如一11 - 4口1 1 1 1 II

9、 1 二,口 III t'|Q B1 D 11 1,12«15060L2-1.96-2.65-Z. 1.4-2,21-2,27-2,18-Z.39234-2.30口-2,05-2»19-2.29-2,35245-2.47-2.462454-Z.34 -22-2.462 50254255-2457E-1.99-2.14-2.29 -2.42-2,55-2.61-2.64-2.67G-1.BS-2,24 -2.42-2.5126电-2.69-2.73-2.7772.62 2,54 2.49 2.452.652.422.552.S4G2.532.47 2.41 2,36

10、2.532.302.322.4192.352,30 225 2,21 2.212.202,222.3。2.3S102 + 152.12 2.07 2*e4 252.052+®S2.182.2S111.971.93 1.96 146 1.391.911,932.62.1B122-0150&0L 06G00013-1.34-1.30*1.16-1.25-1.25-1.44-1.32-1.44-1-5214-1.2S-1.J3-1.15 -1.17-1.15-LM-1.24-1-3815-1.10-l.«5-l.W -0.99-1,69-1血一10-1.15-0.82-S

11、.77-0,73 -0.79-0 . 67-0.74-6.8317'54配49-0.45 0.41-«.37-fl.33-0.2B-0,4.0-0.521E1.92L83 1_74 l.7 L”1.881,451.591.69191.721.63 1,54 1.46 1,391.321.30L371-43201.611.51 1.42 1.34 Ji.27工.如0211,561.47 1.37 1.29 1.191廊9.990,9&6.9722121.43 11 + 24 1.19。的。血,7&第一行是时间,如2015年6月1日0点0时0

12、分,则写为:20150601 000000 (注意年月日和时分秒之间存在空格)。接下来是两个矩阵,第一个是风场 u,第二个是风场V。接下来是地形,说是地形,其实就是水深,大于等于0的设为无 效值就好。当地行存为ASCII文件时,务必知道其绘出的地形图是什 么形式的,在后面的修改脚本出需要用到。四、脚本修改1.ww3_grid.inp$ WAVEWATCH III Grid preprocessor input file$ Grid name (C*30, in quotes)$'TEST GRID (GULF OF NOWHERE)'(此处是使用的网格名称)$ Frequenc

13、y 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 and 2.22 of the model this value was by definiton 0,$ it is added to mitigate the GSE for a first ord

14、er scheme. Note that$ this factor is IGNORED in the print plots in ww3_outp.$1.1 0.04118 25 24 0.(频率间隔初始频率 波速 波向)$ Set model flags$ - FLDRYDry run (input/output only, no calculation).$ - FLCX, FLCY Activate X and Y component of propagation.$ - FLCTH, FLCK Activate direction and wavenumber shifts.$ -

15、 FLSOUActivate 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, minimum source term time step (all in seconds).$900. 950. 900. 300.(第一个数和第三个数一般是第二个数的两倍,第二个数使用程序计算,最后一个

16、一般为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 namelist found in the folowing sections up to the$ end-of-section identifier string (see below) is temporarily

17、 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.$ As an example, namelist input to change SWELLF and ZWND in the$ Tolman and Chalikov input would be$ &

18、;SIN2 SWELLF = 0.1, ZWND = 15. /(此处均属于对源函数的调整,手册有相关介绍)$ Define constants in source terms$ Stresses$ TC 1996 with cap:Namelist FLX3CDMAX : Maximum allowed CD (cap)$CTYPE : Cap type :$0: Discontinuous (default).$1: Hyperbolic tangent.$ Hwang 2011:Namelist FLX4$CDFAC : re-scaling of drag$ Linear input$

19、 Cavaleri and M-R : Namelist SLN1CLIN : 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 of wind (m).$SWELLF : swell factor in (n.nn).

20、$STABSH, STABOF, CNEG, CPOS, FNEG :$c0, ST0, c1, c2 and f1 in .(n.nn)$through (2.65) for definitionof$effective wind speed (!/STAB2).$ WAM4 and variants:Namelist SIN3$Charnock coefficientZWND : Height of wind (m).ALPHA0 : minimum value ofZ0MAX : maximum value of air-sideroughness z0$BETAMAX : maximu

21、m value ofwind-wave coupling$SINTHP : power of cosine in windinput$ZALP : wave age shift to accountfor gustiness$TAUWSHELTER : sheltering of short wavesto reduce u_starSWELLFPAR : choice of swell attenuationformulation(1: TC 1996, 3: ACC 2008)SWELLF : swell attenuation factor$ Extra parameters for S

22、WELLFPAR=3 onlySWELLF2, SWELLF3 : swell attenuation factorsSWELLF4 : Threshold Reynolds numberfor ACC2008$below threshold$mean flow$ BYDRZ input$SWELLF5 : Relative viscous decayZ0RAT : roughness for oscil. flow /:Namelist SIN6SINA0 : factor for negative inputSINU10 : wind speed scaling option$ Nonli

23、near interactions$ Discrete I.A.: Namelist SNL1$LAMBDA : Lambda in source term.$NLPROP : C in sourc term. NOTE :default$value depends on othersource$terms selected.$KDCONV : Factor before kd in Eq.(n.nn).$KDMIN, SNLCS1, SNLCS2, SNLCS3 :$Minimum kd, and constantsc1-3$in depth scaling function.$ Exact

24、 interactions:Namelist SNL2$IQTYPE : Type of depth treatment$1 : Deep water$2 : Deep water / WAMscaling$3 : Shallow water$TAILNL : Parametric tail power.$NDEPTH : Number of depths in forwhich$integration space isestablished.$Used for IQTYPE = 3 only$Namelist ANL2$DEPTHS : Array with depths forNDEPTH

25、 = 3$Gen. Multiple DIA:Namelist SNL3$NQDEF:Number of quadruplets.$MSC:Scaling constant 'm'.$NSC:Scaling constant 'N'.$KDFD:Deep water relative filterdepth,$KDFS:Shallow water relative filterdepth,$Namelist ANL3$QPARMS : 5 x NQDEF paramatersdescribing the$quadruplets, repeatingLAMBDA,

26、 MU, DT12.$Cdeep and Cshal. Seeexamples below.$ Traditional DIA setup (default):$ &SNL3 NQDEF =1, MSC =$ &ANL3 QPARMS = 0.250, 0.000,$ GMD3 from 2010 report (G13d in$ &SNL3 NQDEF =3, MSC =$ &ANL3 QPARMS = 0.126, 0.000,$0.237, 0.000,$0.319, 0.000,$0.00, NSC = -3.50 /-1.0, 0.1000E+08,

27、0.0000E+00 /later paper):0.00, NSC = -3.50 /-1.0, 0.4790E+08, 0.0000E+00 ,-1.0, 0.2200E+08, 0.0000E+00 ,-1.0, 0.1110E+08, 0.0000E+00 /$ G35d from 2010 report:$ &SNL3 NQDEF =5, MSC =$ &ANL3 QPARMS = 0.066, 0.018,$0.127,0.069,$0.228,0.065,$0.295,0.196,$0.369,0.226,$ Nonlinear filter based on D

28、IA0.00, NSC = -3.50 /21.4, 0.170E+09, 0.000E+0019.6, 0.127E+09, 0.000E+00 ,2.0, 0.443E+08, 0.000E+00 ,40.5, 0.210E+08, 0.000E+00 ,11.5, 0.118E+08, 0.000E+00 /Namelist SNLS$A34: Relative offset in quadrupletFHFC : Proportionality constants.DMN : Maximum relative change.FC1-3: Constants in frequency f

29、ilter.$ WAM-3$ Dissipation :Namelist SDS1CDIS, APM : As in source term.$SDSA0, SDSA1, SDSA2, SDSB0, SDSB1,$ Tolman and Chalikov : Namelist SDS2$PHIMIN :$Constants a0, a1, a2, b0, bland$PHImin.$ WAM4 and variants : Namelist SDS3$SDSC1: WAM4 Cds coeffient$MNMEANP , WNMEANPTAIL : power ofwavenumber$for

30、 mean definitions in Sdsand tail$SDSDELTA1, SDSDELTA2 : relativeweights$of k and kA2 parts of WAM4dissipation$SDSLF, SDSHF : coefficient foractivation of$WAM4 dissipation for unsaturated(SDSLF) and$saturated (SDSHF) parts of thespectrum$SDSC2 : Saturation dissipation coefficient$Sds is zero$ separat

31、ion of$ non-saturated$ dissipation$ SdsSAT$integration of B$ BYDRZ$normalization spectra$T1 and T2SDSC4 : Value of B0=B/Br for wichSDSBR : Threshold Br for saturation SDSP : power of (B/Br-B0) in Sds SDSBR2 : Threshold Br2 for theWAM4 dissipation in saturated andSDSC5 : coefficient for turbulenceSDS

32、C6 : Weight for the istropic part ofSDSDTH: Angular half-width for:Namelist SDS6 SDSET : Select thresholdSDSA1, SDSA2, SDSP1, SDSP2 : Coefficients for dissipation terms$:Namelist SWL6SWLB1 : Coefficient for swelldissipation$ Bottom friction$ JONSWAP: Namelist SBT1$GAMMA : As it says.$ Surf breaking

33、$ Battjes and Janssen : Namelist SDB1$=1)$=0.73)$only (default)$BJALFA : Dissipation constant (defaultBJGAM : Breaking threshold (defaultBJFLAG : TRUE - Use Hmax/d ratioFALSE - Use Hmax/d inMiche formulation$ Triad nonlinear interactions$ Lumped Triad Interaction (LTA) : Namelist STR1 (To beimplemen

34、ted)$PTRIAD1 : Proportionality coefficient(default 0.05)$PTRIAD2 : Multiple of Tm01 up towhich interaction$is computed (2.5)$PTRIAD3 : Ursell upper limit forcomputing$interactions (not used,default 10.)$PTRIAD4 : Shape parameter forbiphase$computation (0.2)$PTRIAD5 : Ursell number treshold forcomput

35、ing$interactions (0.01)$ Shoreline reflections$ ref. parameters: Namelist REF1$REFCOAST : Reflection coefficient atshoreline$REFFREQ : Activation offreq-dependent ref.$REFMAP : Scale factor for bottomslope map$REFRMAX : maximum ref. coeffient(default 0.8)$REFFREQPOW: power of frequency$REFICEBERG: R

36、eflection coefficient foricebergs$REFSUBGRID: Reflection coefficient forislands$REFCOSP_STRAIGHT: power of cosineused for$straight shoreline$ Bound 2nd order spectrum and free IG$ IG1 parameters:Namelist IG1IGMETHOD : 1: Hasselmann, 2:Krasitskii-JanssenIGADDOUTP : activation of boundwave correctioni

37、n ww3_outp / ww3_ounpIGSOURCE : 1: uses bound waves, 2:empirical$IGSTERMS : > 0 : no source term inIG band$IGMAXFREQ : maximum frequency ofIG band$IGEMPIRICAL: constant in empiricalfree IG source$IGSWELLMAX: activates free IG sourcesfor all freq.$ Propagation schemes$ SMC grid propagation : Namel

38、ist PSMC$CFLTM : Maximum CFL number forpropagation.$DTIME : Swell age (s) for diffusionterm.$LATMIN : Maximum latitude (deg) forGCT.$RFMAXD : Maximum refraction turning(deg).$ &PSMC DTIME = 39600.0, LATMIN=85.0, RFMAXD = 36.0$ Propagation schemes$ First order: Namelist PRO1$CFLTM : Maximum CFL n

39、umber forrefraction.$ UQ/UNO with diffusion : Namelist PRO2$CFLTM : Maximum CFL number forrefraction.$DTIME : Swell age (s) in gardensprinkler$correction. If 0., all diffusion$switched off. If smallnon-zero$(DEFAULT !) only wavegrowth$diffusion.$LATMIN : Maximum latitude used incalc. of$strength of

40、diffusion for prop.$ UQ/UNO with averaging : Namelist PRO3$CFLTM : Maximum CFL number forrefraction.$WDTHCG : Tuning factor propag.direction.$WDTHTH : Tuning factor normaldirection.$ Note that UQ and UNO schemes have no tunable parameters.$ All tuneable parameters are associated with the refraction$

41、 limitation and the GSE alleviation.$ Unstructured grids$ UNST parameters: Namelist UNST$UGOBCAUTO : Automatic detection ofOBC points$UGOBCDEPTH: Threshold ( < 0) depthfor OBC points$EXPFSN : Activation of N scheme$EXPFSPSI : Activation of PSI scheme$EXPFSFCT : Activation of FCT scheme$scheme$ SM

42、C grid propagation$propagation.$term.$GCT.$(deg).$ &PSMC DTIME = 39600.0,$ Miscellaneous$ Misc. parameters$for$IMPFSNIMP : Activation of N implicit:Namelist PSMCCFLTM : Maximum CFL number forDTIME : Swell age (s) for diffusionLATMIN : Maximum latitude (deg) forRFMAXD : Maximum refraction turning

43、LATMIN=85.0, RFMAXD = 36.0/$:Namelist MISCCICE0 : Ice concentration cut-off.CICEN : Ice concentration cut-off.PMOVE : Power p in GSE aleviationmoving grids in Eq. (D.4).XSEED : Xseed in seeding alg.(!/SEED).$of$boun-$ points.$part.$part.$FLAGTR : Indicating presence and typesubgrid information :0 :

44、No subgrid information.1 : Transparancies at celldaries between grid2 : Transp. at cell centers.3 : Like 1 with cont. ice.4 : Like 2 with cont. ice.XP, XR, XFILTXp, Xr and Xf for the dynamic integration scheme.IHMAX : Number of discrete levels inHSPMIN : Minimum Hs in partitioning.WSM : Wind speed m

45、ultiplier inWSC : Cut of wind sea fraction for identifying wind sea in part.$FLC : Flag for combining wind seasin$partitioning.$NOSW : Number of partitionedswell fields$in field output.$FMICHE : Constant in Miche limiter.$P2SF :$ In the 'Out of the box' test setup we run with sub-grid obstac

46、les$ and with continuous ice treatment.$&MISC CICE0 = 0.25, CICEN = 0.75, FLAGTR = 4 /(4 改为 0)&FLX3 CDMAX = 3.5E-3 , CTYPE = 0 /$ &SDB1 BJGAM = 1.26, BJFLAG = .FALSE. /$ Mandatory string to identify end of namelist input section.$END OF NAMELISTS$ Define grid$ Five records containing :$

47、1 Type of grid, coordinate system and type of closure: GSTRG, FLAGLL,$ CSTRG. Grid closure can only be applied in spherical coordinates.$ GSTRG : String indicating type of grid :$'RECT' : rectilinear$'CURV' : curvilinear$ FLAGLL : Flag to indicate coordinate system :$T : Spherical (l

48、on/lat in degrees)$F : Cartesian (meters)$ CSTRG : String indicating the type of grid index space closure :$'NONE': No closure is applied$'SMPL': Simple grid closure : Grid is periodic inthe$: i-index and wraps at i=NX+1. In otherwords,$: (NX+1,J) => (1,J). A grid with simpleclosu

49、re:may be rectilinear or curvilinear.'TRPL' : Tripole grid closure : Grid is periodic in the$: i-index and wraps at i=NX+1 and hasclosure at$: j=NY+1. In other words, (NX+1,J<=NY)=>(1,J)$: and (I,NY+1)=>(MOD(NX-I+1,NX)+1,NY). Tripole$: grid closure requires that NX be even. Agrid$:

50、with tripole closure must be curvilinear.$ 2 NX, NY. As the outer grid lines are always defined as land$ points, the minimum size is 3x3.$ Branch here based on grid type$ IF ( RECTILINEAR GRID ) THEN$ 3 Grid increments SX, SY (degr.or m) and scaling (division) factor.$ If CSTRG='SMPL', then

51、SX is set to 360/NX.$ 4 Coordinates of (1,1) (degr.) and scaling (division) factor.$ ELSE IF ( CURVILINEAR GRID ) THEN$ 3 Unit number of file with x-coordinate.$ Scale factor and add offset: x <= scale_fac * x_read + add_offset.$ IDLA, IDFM, format for formatted read, FROM and filename.$ IDLA : L

52、ayout indicator :1 : Read line-by-line bottom to top.2 : Like 1, single read statement.3 : Read line-by-line top to bottom.4 : Like 3, single read statement.$ IDFM : format indicator :1 : Free format.2 : Fixed format with above format descriptor.3 : Unformatted.$ FROM : file type parameter'UNIT&

53、#39; : open file by unit number only.$'NAME' : open file by name and assign to unit.$ If the above unit number equals 10, then the x-coord is read from this$ file. The x-coord must follow the above record.No comment lines are$ allowed within the x-coord input.$ 4 Unit number of file with y-c

54、oordinate.$ Scale factor and add offset: y <= scale_fac * y_read + add_offset.$ IDLA, IDFM, format for formatted read, FROM and filename.$ IDLA : Layout indicator :1: Read line-by-line bottom to top.2: Like 1, single read statement.$3: Read line-by-line top to bottom.4 : Like 3, single read statement.$ IDFM : format indicator :$1:Free format.$2:Fixed format with aboveformat

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论