This proceedure follows closely the steps outlined in Sect. 5.4. The changes
to the model that will require a recompilation are listed first.
1. In the file MAIN/AN_ID.h add the case name with the statement
#define IKW_TEST_CASE
and comment out all other case name with an initial C.
2. The main.F program is altered to put in a wind stress. In the SUBROUTINE FS in the code after the comment
C UPDATE FROM FLTW METHOD
C ADD CONTRIBUTIONS FROM U2, V2, T2, S2 LATER
C AFTER THEY ARE FULLY UPDATED
the code is inserted
#ifdef IKW_TEST_CASE do j=2,j1 do i=2,i1 if(days.le.1.)then tauy(i,j)=-min(0.1,0.1*days*24./18.) cwpo tauy(i,j)=-min(3.,3.*days*24./18.) elseif(days*24.le.29)then tauy(i,j)=-0.1+0.1*(days*24.-24.)/5. cwpo tauy(i,j)=-3.+3.*(days*24.-24.)/5. else tauy(i,j)=0. endif tauy(i,j)=tauy(i,j)*in(i,j,1) taux(i,j)=0. enddo enddo c write out the wind forcing at one point if(days.lt.1.3) then write(6,7794) days,tauy(50,50) 7794 format(10x,'days = ',f10.4,' tauy(50,50) = ',f10.4) endif #endif /* IKW_TEST_CASE */
The east-west wind stress is zero TAUX(I,J) = 0, and the north-south wind stress TAUY(I,J) is spatially constant. It varies with time but is negative indicating a wind blowing from the north to the south. This linearly increases the wind from zero to a maximum of 0.1 dynes cm-2 over 18 hours (the inertial period for this latitude), keeps it constant until time 1 day, then linearly decreases it to zero over the next 5 hours, and keeps it at zero for the remainder of the simulation.
3. Select the options in the file MAIN/Output.h to produce the desired plots.
4. The MAIN/Define.h file is modified for the compiler preprocessor options appropriate for modeling internal Kelvin waves. They will be included under and #ifdef option with the test case name
#elif defined IKW_TEST_CASE
#define LIMITER1
C#define QUAD_BOT_STR
C#define PS_BIHARM2
C#define GRADP_ORDER_4
C#define HMix_SMAG
C#define VMix_RICH
C#define UV_ORDER_4
C#define TS_ORDER_4
#define TS_DIFF
#define UV_DIFF
#define WIND
#define SLIP
#define TS_ADV
#define UV_ADV
C#define OUTPUT_DD
C#define OUTPUT_ML
C#define LINEAR_T
C#define IMPLICIT_VERT
C#define TS_BIHARM2
C#define UV_BIHARM2
C#define PARTIAL_CELLS
C#define DIAG
Certainly, different combinations of compiler preprocessor options can be chosen, but the above will suffice for this simple example.
5. No additions to file MAIN/SUBS/Local_Arrays.h are necessary.
6. In the file MAIN/SUBS/initfs.F add the code
#ifdef IKW_TEST_CASE do K = 1, K0 tnom(k)=T1(i0/2,j0/2,k) enddo #endif /* IKW_TEST_CASE */
7. The program main.F is compiled with the MAIN/Makefile by typing the command ``make", or by the command
make >& Makefile.out
to produce the executable file MAIN/main.
Next we make the changes to the model that do not require compilation, as described in section 5.4.2.
1. We chose a TAG name for this model simulation. For lack of anything better we choose the name RUN1 for the ``first run". We recall that the TAG_ROOT name of the preparation initialization was FLAT13. These two names are typed on the first and second lines of a file you create called MAIN/main.in
RUN1
FLAT13
with no blank spaces that could be interpreted as characters.
2. We create a file MAIN/Runtime_parm.tag file for this case, and so it MUST be named Runtime_parm.RUN1 because we chose this suffix as the TAG name. The easiest way to create this file is to copy one of the Runtime_parm files that came with the CANDIE model, and modify the values in it for this case. The values we use are shown below:
DSCRIB 'Internal Kelvin wave test case in a circular basin' DAODT khm khh kvm0 kvh0 FLTW RZFAC 350 1.E4 1.E4 0.1 0.0015 0.1 0.0 KTRM LRSTRT MXIT ISAV MXSAV 6 0 5250 50000 50000 MVI //Generate Movie 0.5 M6 //Output control 10 ICONV ISWEEP 1 1 CD Q_BKGRND Z0 BBL_FAC 2.5e-3 0. 1. 10. C ---------------------------- C EXPLANATION OF PARAMETERS C ---------------------------- C DSCRIB=63-character case descriptor C radius=earth radius C DAODT=number of time steps per day C (8640 steps per year with DAODT=24) C G=gravity C khm,khh are horizontal heat and momentum C diffusivities (cm-cm/sec) C FLTW=time filter coefficient on time C filtered leapfrog method C LRSTRT=flag to initialize from restart file; C if LRSTRT=0, initial vel C is zero (but not necessarily boundary values) C MXIT=last time step number of current run C (last time step of previous C run is saved on restart file) C LWIND flag for wind forcing C LMOVI=flag to save data for animation of the results C MVI=DAYS BETWEEN MOVIE FRAMES C M6=DAYS BETWEEN XI PLOTS C CD is a standard drag coefficient for bottom stress C Bottom stress = RB * (U,V) C RB =CD*Q C Q=sqrt(Q_BKGRND**2 + u**2 +v**2) if quadratic bottom stress C Q=Q_BKGRND if linear bottom stress
Most of the values are self-explanatory but we might discuss how the value of the number of time steps per day DAODT is calculated. An estimate of the internal wave speed is given by the calculation in cgs units
The time it takes a wave to travel between two grid points is
If we choose to take about 75% of this time step or 237 s, then we calculate
3. The executable file MAIN/main is run with the command
main < main.in >& main.out &or
(timex main < main.in > main.out) >& main.err &
If the program is run interactively, as for debugging, the program prompts you for the TAG and TAG_ROOT names to be type in.