15. Adding tides

Using the method described by Flather (1976), CROCO is able to propagate the different tidal constituents from its lateral boundaries.

To do so, you will need to add the tidal components to the forcing file, and define the following cpp keys TIDES, SSH_TIDES and UV_TIDES and recompile the model using jobcomp. To work correctly, the model should use the characteristic method open boundary radiation scheme (cpp key OBC_M2CHARACT defined).

Warning

To get a clean signal you need to provide harmonic components from both tide elevation and tide velocity. In case you don’t have velocity harmonics (not defined UV_TIDES) a set of reduced equation is available to compute velocity from SSH (OBC_REDUCED_PHYSICS)

15.1. Pre-processing (Matlab)

  1. Edit crocotools_param.m section 5
    %%%%%%%%%%%%%%%%%%%%%
    %
    % 5-Parameters for tidal forcing
    %
    %%%%%%%%%%%%%%%%%%%%%
    %
    % TPXO file name (TPXO7)
    %
    tidename=[CROCOTOOLS_dir,'TPXO7/TPXO7.nc'];
    %
    % Number of tides component to process
    %
    Ntides=10;
    %
    % Chose order from the rank in the TPXO file :
    % "M2 S2 N2 K2 K1 O1 P1 Q1 Mf Mm"
    % " 1 2 3 4 5 6 7 8 9 10"
    %
    tidalrank=[1 2 3 4 5 6 7 8 9 10];
    %
    % Compare with tidegauge observations
    %
    lon0=18.37;
    lat0=-33.91; % Cape Town location
    Z0=1; % Mean depth of the tidegauge in Cape Town
    
  2. Launch pre-processing of tides in Matlab:
    start
    make_tides
    
  3. Check your croco_frc.nc file

15.2. Compiling

  1. Edit cppdefs.h for defining tides:
    /* Open Boundary Conditions */
    # define TIDES
    
    /* Open Boundary Conditions */
    # ifdef TIDES
    #  define SSH_TIDES
    #  define UV_TIDES
    #  define POT_TIDES
    #  undef  TIDES_MAS
    #  ifndef UV_TIDES
    #   define OBC_REDUCED_PHYSICS
    #  endif
    #  define TIDERAMP
    # endif
    # define OBC_M2CHARACT
    # undef  OBC_M2ORLANSKI
    # define OBC_M3ORLANSKI
    # define OBC_TORLANSKI
    # undef  OBC_M2SPECIFIED
    # undef  OBC_M3SPECIFIED
    # undef  OBC_TSPECIFIED
    
  2. Check/Edit param.h:
    #if defined SSH_TIDES || defined UV_TIDES
          integer Ntides             ! Number of tides
                                     ! ====== == =====
    # if defined IGW || defined S2DV
          parameter (Ntides=1)
    # else
          parameter (Ntides=10)
    # endif
    #endif
    

    Warning

    The number of tide components must be coherent with the one defined in crocotools_param.m

  3. Re-compile the model:
    ./jobcomp > jobcomp_tide.log
    

15.3. Running

Run the model:

qsub job_croco_mpi.pbs