edit Copy Return Up-pointing chevronRight-pointing chevronfacebooklinkedintwitter

SWAN

Nerdalize

Versions

41.10

Simulating WAves Nearshore (SWAN) is a 3rd generation numerical wave model developed at Delft University of Technology to get realistic estimates of wave parameters in coastal regions and inland waters, given wind, current and bottom conditions. It has first-, second-, and third-generation options. It is based on the wave action balance equation, with sources and sinks.

Running your SWAN workload on Nerdalize

  1. Make sure you’ve set up Nerd, our CLI.

  2. Set up your dataset.

    Download our example dataset and unzip it.

    Alternatively you can use your own dataset (containing an .SWN file).

  3. Upload your dataset.

    $ nerd dataset upload --name=swan-input path-to-data-folder
    
    Archiving (Step 1/2): 154.84 KB / 154.84 KB [=======================] 100.00% 0s
    Uploading (Step 2/2): 319.49 KB / 159.74 KB [=======================] 200.00% 0s
    Uploaded dataset: 'swan-input'
    To run a job with a dataset, use: 'nerd job run'
    
  4. Start SWAN.

    $ nerd job run \
      --name=swan-run \
      --input=swan-input:/input \
      --output=swan-output:/output \
      --memory=1 \
      --vcpu=8 \
      nerdalize/swan \
      /input/f31har01.swn
    
    Setup empty output dataset: 'swan-output'
    Submitted job: 'swan-run'
    To see whats happening, use: 'nerd job list'
    
  5. Check on the status of your job.

    $ nerd job list
    
    JOB        IMAGE                 INPUT        OUTPUT        MEMORY   VCPU   CREATED AT      PHASE       DETAILS   
    swan-run   nerdalize/swan        swan-input   swan-output   1.1      8.0    5 minutes ago   Completed             
    

    When your task’s status is Completed it’s finished and you can continue to download the output.

    If your job failed with an error then it is possible that you provided insufficient memory for the workload. Try inspecting the .PRT output and check if it ends with a memory allocation error. In that case try rerunning the workload with a higher --memory parameter.

    If you want to review the log output, run:

    $ nerd job logs swan-run
    
    +SWAN is processing output request    1
    +SWAN is processing output request    2
    +SWAN is processing output request    3
    +SWAN is processing output request    4
    ----------------------------------------------------------------------
    The run was completed after 1 minutes
    ----------------------------------------------------------------------
    
  6. Download the collection of output files.

    $ nerd dataset download swan-output ~/my-swan-output
    
    Downloading (Step 1/2): 395.26 KB / 395.26 KB [========================================================] 100.00% 0s
    Unarchiving (Step 2/2): 395.26 KB / 395.26 KB [========================================================] 100.00% 0s
    Downloaded dataset: 'swan-output'
    To delete the dataset from the cloud, use: `nerd dataset delete swan-output`
    

    With the example workload your output should now include results in the MATLAB .mat format.

You’ve run a SWAN simulation. Awesome!

You can run another simulation or use your one of our other applications.
Have any questions about using Nerdalize compute?

Get in touch