1 |
C $Id: control.F,v 1.8 1997/06/12 01:00:03 cnh Exp $ |
2 |
#include "CPP_OPTIONS.h" |
3 |
#include "CPP_MACROS.h" |
4 |
C================================================================================ |
5 |
C Procedure name: CONTROL | |
6 |
C Function: Controlling routine for MIT Ocean-Atmosphere model. | |
7 |
C Comments: | |
8 |
C================================================================================ |
9 |
|
10 |
CStartofinterface |
11 |
SUBROUTINE CONTROL |
12 |
IMPLICIT NONE |
13 |
C /-------------------------------------------------------------------------\ |
14 |
C | Global variable declarations | |
15 |
C \-------------------------------------------------------------------------/ |
16 |
#include "SIZE.h" |
17 |
#include "PARAMS.h" |
18 |
CEndofinterface |
19 |
|
20 |
C /-------------------------------------------------------------------------\ |
21 |
C | Local variable declarations | |
22 |
C |=========================================================================| |
23 |
C | U, V, W - X,Y,Z Velocity ( m/s, m/s, Pa/s ). | |
24 |
C | T - Potential temperature (oC). | |
25 |
C | S - Salinity (ppt). | |
26 |
C | PH - Hydrostatic pressure perturbation (m). | |
27 |
C | PS - Surface pressure (m). | |
28 |
C \-------------------------------------------------------------------------/ |
29 |
REAL U (_I3(Nz,Nx,Ny)) |
30 |
REAL V (_I3(Nz,Nx,Ny)) |
31 |
REAL W (_I3(Nz,Nx,Ny)) |
32 |
REAL T (_I3(Nz,Nx,Ny)) |
33 |
REAL S (_I3(Nz,Nx,Ny)) |
34 |
REAL PH(_I3(Nz,Nx,Ny)) |
35 |
REAL PS(Nx, Ny ) |
36 |
|
37 |
C /-------------------------------------------------------------------------\ |
38 |
C | Initialisation | |
39 |
C |=========================================================================| |
40 |
C | S/R SET_DEFAULTS - Set model parameters to their default value(s). | |
41 |
C | S/R PRINT_HEADING - Write out run identifying information. | |
42 |
C | S/R READ_DATA - Read input parameters and basin topography. | |
43 |
C | S/R INITIALISE - Initialise state variables and finite difference | |
44 |
C | operators. | |
45 |
C | S/R PRINT_PARAMETERS - Print out summary of model options. | |
46 |
C | S/R PRINT_DATAFILE - Echo input data file. | |
47 |
C | S/R PRINT_SUMMARY - Print summary of starting state. | |
48 |
C \-------------------------------------------------------------------------/ |
49 |
CALL SET_DEFAULTS( |
50 |
O U, V, W, T, S, pH, pS ) |
51 |
CALL PRINT_HEADING |
52 |
CALL READ_DATA |
53 |
CALL INITIALISE ( |
54 |
U U, V, W, T, S, pH, pS ) |
55 |
CALL PRINT_PARAMETERS |
56 |
CALL PRINT_DATAFILE |
57 |
CALL PRINT_SUMMARY ( |
58 |
I U, V, W, T, S, pH, pS ) |
59 |
|
60 |
IF ( initialisationError ) THEN |
61 |
STOP |
62 |
& 'ABNORMAL END: GCMPACK PE-MODEL. ERROR DURING INITIALISATION PHASE' |
63 |
ENDIF |
64 |
|
65 |
C /-------------------------------------------------------------------------\ |
66 |
C | Prognostic integration | |
67 |
C |=========================================================================| |
68 |
C | S/R MODEL - Step model variables foward by iteration with a time step | |
69 |
C | delt from time t=startTime to time t>=endTime. | |
70 |
C \-------------------------------------------------------------------------/ |
71 |
CALL MODEL ( |
72 |
U U, V, W, T, S, PH, PS ) |
73 |
|
74 |
C /-------------------------------------------------------------------------\ |
75 |
C | Finish | |
76 |
C |=========================================================================| |
77 |
C | S/R PRINT_SUMMARY - Print summary of ending state. | |
78 |
C \-------------------------------------------------------------------------/ |
79 |
CALL PRINT_SUMMARY ( |
80 |
I U, V, W, T, S, pH, pS ) |
81 |
|
82 |
IF ( integrationError ) THEN |
83 |
STOP |
84 |
& 'ABNORMAL END: GCMPACK PE-MODEL. ERROR DURING INTEGRATION PHASE' |
85 |
ENDIF |
86 |
|
87 |
RETURN |
88 |
END |