Delft3d-FLOW Quick Start Manual
Transcript of Delft3d-FLOW Quick Start Manual
Delft3d-FLOWQuickStartManual
MichaelKliphuis
8dec2017
1.IntroductionDelft3D-FLOWisamulti-dimensional(2Dor3D)hydrodynamic(andtransport)simulationprogramwhichcalculatesnon-steadyflowandtransportphenomenathatresultfromtidalandmeteorologicalforcingonarectilinearoracurvilinear,boundaryfittedgrid.ChaptertwodescribeshowtostartaparallelDelft3d-FLOWrunonaclusterlikeCartesiusandchapterthreehowtoplottheresultsofarunwithanapplicationcalledQUICKPLOT.
2.RunDelft3d-FLOWThischapterdescribeshowtoquicklysetupandstartaDelft3d-FLOWrun.Asanexamplewetakealowresolution(approximately200m)runthatsimulatestheLakeGardainItalyonthe‘dijkbio’loginonCartesius.
2.1 LogintoCartesiusssh–[email protected]:******youknowit,IbetternotmentionitbecausethisdocumentwillbeonmywebsiteAlltheneededfilestostartarunareonCartesius*onthe‘dijkbio’logininthedirectory:/projects/0/samoc/henk/delft3d/garda/F2004/200m/scripts/run_template Ifyouwanttostartanewruntotestparameters,e.g.let’scallitpm_run1thentype: cd /projects/0/samoc/henk/delft3d/garda/F2004/200m/scripts cp –r run_template pm_run1 cd pm_run1 theninrun.shchangetheline cd /projects/0/samoc/henk/delft3d/garda/F2004/200m/scripts/run_template
*IfyouwanttorunitonanotherloginonCartesiusoronanothermachinepleasecontactMichaelKliphuis([email protected])
into cd /projects/0/samoc/henk/delft3d/garda/F2004/200m/scripts/pm_run1 Ifneededchangeanyoftheparametersinthefileg2004.mdfcheckthemeaningoftheparametersviathemanualhttps://oss.deltares.nl/documents/183920/185723/Delft3D-FLOW_User_Manual.pdfAfterthatyouarereadytostarttherun.
2.2 Startrun(inthebatchqueue)
1. cd /projects/0/samoc/henk/delft3d/garda/F2004/200m/scripts/pm_run1
2. OpentheMDFfileg2004.mdf
• Determinethereferencestartdateoftherun. e.g.setitto: Itdate = #2004-01-01#
• Settherestartfilefromwhichyouwanttorestartfrom.Wedidaspinuprunof5modelyearsandwewanttostartfromrestartfile
trim-Y2008_21jun-31dec_F2004.datcontainingallmodeldaysfrom21jun2008- 31dec2008.
Restid = #trim-Y2008_21jun-31dec_F2004#
• Setthestarttime'Tstart'ofyourrun.Sincethevalueof'Tunit'is#M#whichmeansminutes,setitto:
Tstart = 2630880
InthisexamplewewanttostartonthelastdayofrestartfileRestid=trim-Y2008_21jun-31dec_F2004.Thenameisabitmisleadingbutthisisactually1jan2009=day1827withrespecttoItdate=1jan2004(366*2+3*365=1827).SothestartminuteTstart=1827*60*24=2630880
• Setthestoptime'Tstop'ofyourrun.Sincethevalueof'Tunit'is#M#whichmeansminutes,setitto:
Tstop = 3156480
Tstopisthelastdayofyear2009=(1827+365)*60*24=3156480.Notethatyear2004and2008areleapyears
• Setthefrequencyofwriting3Doutputliketemperatureandvelocitiestoasocalled
mapfile(inthiscasetrim-g2004.dat) e.g.setitto:
Flmap = 0 1440 3156480
whichmeansstartwritingatminute0andstopatminute3156480withatime intervalofevery1440minutes.Inotherwordswritetothetrimfileeverymodel day.
• Setthefrequencyofwriting2Doutputliketemperatureandvelocitiesincertainobservationpoints(setinfileobspoints_unitn_62x222.obsintable1above) toasocalledhistoryfile(inthiscasetrih-g2004.dat)
e.g.setitto: Flhis = 0 60 3156480 whichmeansstartwritingatminute0andstopatminute3156480withatime intervalofevery60minutes.Inotherwordswritetothetrimfileeverymodel hour.
• Setthefrequencyofwritingarestartfile(inthiscaseforinstancetri-rst.g2004.20090131.000000)
e.g.setitto: Flrst = 43200 whichmeanswriteevery43200minutes(30modeldays).
Infacttheserestartfilesarenotused,weusethetrim*datfiles(alsopossible).Perhapswecanjustleavethisemptythen???
ThesewerethemainkeywordsettingsbuttherearemanymorekeywordsyoucansetintheMDFfile.ForacompletelistgotosectionA.1.2onpage417oftheusermanualathttps://oss.deltares.nl/documents/183920/185723/Delft3D-FLOW_User_Manual.pdf
3. Openthefilerun.sh
• Setthenumberofcoresyouwanttorunon,e.g.setitto32:
#SBATCH -n 32
• Setthenameofthejob,e.g.setitto200m_garda:
#SBATCH-J200m_garda
• Reservetimeforrunningthisjobinthebatch,e.g.reserve30hours. #SBATCH-t30:00:00 Makesurethisislongenoughforthejobtofinish.Ifitfinishessoonerthenthis isnoproblem.Thehigheryousetthisvaluethelongeritcantakeforajobtoget pickedup.
4. Startthejobbysubmittingittothebatchqueuebytyping: sbatch run.sh
5. Checkthestatusofthejobbytyping: mysqueue(thisisanaliasforsqueue-udijkbio
-utodenotetheloginyouworkonisdijkbio) youthenseeforinstance:
JOBIDPARTITIONNAMEUSERTIME_LIMITSTART_TIMESTTIMENODESNODELIST(REASON)3163469broadwell200m_gdijkbio4-00:00:0020170522T14:28:34R10:501tcn921 whichmeansthatthejobhasjobid3163469,itisrunningonabroadwellnode andhasname200m_g.Itisreservedtorunfor96wallclockhours(4wallclockdays),it startedon22May2017at14:28:34,ithasstatus(ST)running(R)anditisalready runningfor10m50son1nodenamelynodetcn921. Ifyouwanttostoptherunthentype: scancel 3163469
6. Checkhowfartherunisbyopeningthefileslurm-3163469.out.Iusuallytype:
tail -f slurm-3163469.out
7. FinallyANDTHISISVERYIMPORTANT!Whentherunisfinishedrenametheoutputfiles:
trih-g2004.dat trih-g2004.def trim-g2004.dat trim-g2004.def
Ifyoudonotdothisthenstartingtherunagainorrestartingitfromanotherrestartfilewilloverwritethesefilesandyoulostalldata.Iusuallyrunfor1modelyeare.g.year2009andwhentherunisdoneItype:
mv trih-g2004.dat trih-Y2009_F2004.dat mv trih-g2004.def trih-Y2009_F2004.def mv trim-g2004.def trim-Y2009_F2004.def mv trim-g2004.dat trim-Y2009_F2004.dat cp g2004.mdf g2004.mdf_y2009
Afterthatyoucanrestarttheruntosimulateyear2010bysettinging2004.mdf
Tstart = 3156480 Tstop = 3682080 Restid = #trim-Y2009_F2004# Thenextsectiondescribesallthefilesintherundirectorythatareneededfortherun
2.3 Moreinfoontheneededfiles Thetablebelowshowsallthefiles(andinformationaboutthem)indirectoryrun_template(andpm_run1)Thesefilesareneededinordertorunthis/aDelft3d-FLOWrun:g2004.mdf
thesocalled“MasterDefinitionFlow”file(MDF-file)whichcontainsallinformationtoexecuteaflowsimulation.Itisthemaininputfileinwhichausersetsthetimestep,thestartandstoptime,usedparametrizationsetc.butalsothenameofthegridfile(.grd),bathymetryfile(.dep),theforcingfilescontainingtheatmosphericwindforcing(.amuand.amv)andallotherfilesinthistable.Hereitiscalledg2004.mdfbecauseitstartsarunthatisforcedwithayear2004atmosphericforcing
Gardagrid_unitn.grd
gridfile
Gardagrid_unitn.enc
gridenclosurefile
benaco_05052017.dep
bathymetryfile
drypoints_unitn.dry
indicesofdrypointsfile
obspoints_unitn_62x222.obs
observationpointsfile
2004-2010_interp.amc
aircloudinessforcingfile7yearsallcontainingforcingofyear2004
2004-2010_interp.amp
atmosphericpressureforcingfile7yearsallcontainingforcingofyear2004
2004-2010_interp.amr
relativeairhumidityforcingfile7yearsallcontainingforcingofyear2004
2004-2010_interp.amt
airtemperatureforcingfile7yearsallcontainingforcingofyear2004
2004-2010_interp.amu
windspeedinEastdirectionforcingfile7yearsallcontainingforcingofyear2004
2004-2010_interp.amv
windspeedinNorthdirectionforcingfile7yearsallcontainingforcingofyear2004
2004-2010_interp.ams
Solarradiationforcingfile7yearsallcontainingforcingofyear2004
2004_interp.grd
forcinggridfile(setinthe7forcingfilesabove)
config_d_hydro.xml
configfileexpectedasargumentforDelft3d-FLOWexecutabled_hydro.exe.ItcontainsthenameoftheMDFfile(inthiscaseg2004.mdf)
run.sh
scripttostarttheruninthebatchonCartesius
Makingthegrid(.grd)andenclosure(.enc)filesisdonewiththeDelft3dapplicationRGFGRID.Thebathymetry(.dep)fileismadewithDelft3dapplicationQUICKIN.Thewaytodothisisnotinthescopeofthisdocument.Thefollowingmanualsshowhow:https://content.oss.deltares.nl/delft3d/manuals/RGFGRID_User_Manual.pdfhttps://content.oss.deltares.nl/delft3d/manuals/QUICKIN_User_Manual.pdf
3.PlottheresultswithQUICKPLOTRunningDelft3d-FLOWwillgenerate3Dmapand2Dhistoryfileslike.TheeasiestwaytochecktheseoutputfilesiswithQUICKPLOTwhichisaMatlabprogram.Youdothisasfollows:
1. cd /projects/0/samoc/henk/delft3d/garda/F2004/200m/matlab
2. type: matlab3. IntheMatlabcommandwindowtype: d3d_qp Don’tworryaboutalltheWARNINGSyouwillget!Youwillsoonseethefollowingwindow:
5. ThenselectaninputfilebyclickingonFilefollowedbyOpenFileandselectforinstancethemapoutputfileonedirectoryupinscripts/pm_run1calledtrim-g2004.dat asshowninthefigurebelow:
6. Standardtheselectedvariableis'morphologicalgrid'. Selectoneofthemanyothervariablesforinstance'temperatureflux'
7. Thisvariableisvalidforall100depthvalues.Ifyouonlywanttoseethetemperaturefluxinthehighestlevel(100)thendeselectthe'all'boxandsetvalue100asshowninthefigurebelow:
8. Thenplotthe'temperatureflux'byclickingthebutton'QuickView'righbelow.Youthengetanewwindowshowingtheplot.
Youcanlooptoothertimeframesbyclickingonthe<or>oftheslidepointedtobytheredarrowsinthefigureabove.FormoreinformationabouttheuseofQUICKPLOTcheckitsmanualat:https://oss.deltares.nl/documents/183920/185723/Delft3D-QUICKPLOT_User_Manual.pdf