1 |
C $Header: /u/gcmpack/MITgcm/pkg/atm2d/atm2d_finish.F,v 1.5 2012/01/13 15:53:33 jscott Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "ctrparam.h" |
5 |
#ifdef OCEAN_3D |
6 |
# include "ATM2D_OPTIONS.h" |
7 |
#endif |
8 |
C |
9 |
SUBROUTINE ATM2D_FINISH( myThid) |
10 |
C |==========================================================| |
11 |
C | Called from forward_step_atm2d the last time through the | |
12 |
C | main loop -- thus, and opportunity to shut down MPI, do | |
13 |
C | cleanup/finish routines. | |
14 |
C \==========================================================/ |
15 |
IMPLICIT NONE |
16 |
|
17 |
# ifdef ATM2D_MPI_ON |
18 |
# include "mpif.h" |
19 |
# endif |
20 |
|
21 |
C !INPUT/OUTPUT PARAMETERS: |
22 |
C == Routine arguments == |
23 |
C myIter - iteration counter for this thread |
24 |
C myTime - time counter for this thread |
25 |
C myThid - thread number for this instance of the routine. |
26 |
INTEGER myThid |
27 |
|
28 |
C === Local variables === |
29 |
|
30 |
#ifdef OCEAN_3D |
31 |
INTEGER rc |
32 |
#endif |
33 |
|
34 |
#ifdef CLM35 |
35 |
C next line is hack to call clm one more time step |
36 |
C as CLM35 writes end-of-year file at start of next year |
37 |
CALL clm4mit2d |
38 |
#endif |
39 |
|
40 |
#ifdef ATM2D_MPI_ON |
41 |
CALL MPI_BARRIER( MPI_COMM_WORLD, rc ) |
42 |
CALL MPI_FINALIZE(rc) |
43 |
#endif |
44 |
|
45 |
RETURN |
46 |
END |