Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

  • For all files that are written by this adapter, if the file to be written already exists, then it will be overwritten.
  • This program assumes that the model always runs in time zone GMT.
  • This program writes log messages to a log file called swan_pre_adapter_log.txt in the workDir specified in the netcdf run file.
  • This program uses the information in the specified netcdf run file as input and uses this information to do the following actions:
    1. Convert input spectra time series (optional):
      1. The netcdf file specified in the property "input_spectra_file_to_convert" will be converted to a file in SWAN ascii format with the same path and name but different extension (.BND). For example the original file input/spectra.nc is converted to input/spectra.BND. If the property "input_spectra_file_to_convert" is not specified, then this step does nothing.
      2. The .BND file will be written with exactly the same follow order of the boundary locations as used in the netcdf file. FEWS will export the spectra time series using alphabetical order of the locations.BND file is important for SWAN. The pre-adapter writes the .BND file according to the locations ID's, sorted alphabetically. It is important to take this into consideration when defining the ID's of the boundary locations. Example: locations with ID's loc_1, loc_2, ..., loc_10, loc_11, etc. will be sorted in .BND as loc_1, loc_10, loc_11, ... loc_2. To have it sorted correctly, use loc_01, loc_02, ..., loc_10, loc_11, etc.
    2. Create swan input file:
      The template SWAN input file specified in the property "template_swan_input_file" will be copied to the file specified in the property "swan_input_file". In the copy the following tags will be replaced with the corresponding values:

      $TSTART$

      Start time of the model run.

      $TSTOP$

      End time of the model run.

      $HOTSTART$

      Either "INITIAL HOTSTART 'pathname of input state file' NETCDF" if the input state file is not empty (warm state start) or empty string if the input state file is an empty dummy file of 0 bytes length (cold state start) or empty string if there is no input state file at all (cold state start). If the property "input_state_file_format" is specified, the the value of the property "input_state_file_format" is used instead of "NETCDF" in the line above.

      $STATIONARY_TIMES$

      Multiple lines with time stamps for a stationary model run:
      COMPUTE STATIONARY <first time stamp for stationary model run>
      COMPUTE STATIONARY <second time stamp for stationary model run>
      ...
      COMPUTE STATIONARY <last time stamp for stationary model run>


...