/[MITgcm]/MITgcm/pkg/ocn_compon_interf/cpl_export_import_data.F
ViewVC logotype

Contents of /MITgcm/pkg/ocn_compon_interf/cpl_export_import_data.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (show annotations) (download)
Wed Jan 6 01:04:05 2016 UTC (8 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65s, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, HEAD
Changes since 1.3: +6 -3 lines
- add argument: myIter to S/R OCN_EXPORT_FIELDS & OCN_IMPORT_FIELDS
  + in corresponding call in cpl_export_import_data.F & ocn_export_data.F
- add diagnostics for all imported fields from coupler (in both OCN & ATM);
  this is entended to replace the OCN cplFldtave.* output files (not updated
   to contain new additional exchanged fields).

1 C $Header: /u/gcmpack/MITgcm/pkg/ocn_compon_interf/cpl_export_import_data.F,v 1.3 2015/11/12 20:04:16 jmc Exp $
2 C $Name: $
3
4 #include "OCN_CPL_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: CPL_EXPORT_IMPORT_DATA
8
9 C !INTERFACE:
10 SUBROUTINE CPL_EXPORT_IMPORT_DATA(
11 I myTime, myIter, myThid )
12
13 C !DESCRIPTION: \bv
14 C *==========================================================*
15 C | SUBROUTINE CPL_EXPORT_IMPORT_DATA
16 C | o Routine for controlling
17 C | - export of coupling data to coupler layer AND
18 C | - import of coupling data from coupler layer.
19 C *==========================================================*
20 C | This version talks to the MIT Coupler. It uses the MIT
21 C | Coupler "checkpoint1" library calls.
22 C *==========================================================*
23 C \ev
24
25 C !USES
26 IMPLICIT NONE
27 C == GLobal variables ==
28 #include "SIZE.h"
29 #include "EEPARAMS.h"
30 #include "PARAMS.h"
31 #include "CPL_PARAMS.h"
32
33 C !INPUT/OUTPUT PARAMETERS:
34 C == Routine arguments ==
35 C myTime :: Current time in simulation.
36 C myIter :: Current timestep number.
37 C myThid :: Thread number for this instance of the routine.
38 _RL myTime
39 INTEGER myIter
40 INTEGER myThid
41 CEOP
42
43 #ifdef COMPONENT_MODULE
44 C !LOCAL VARIABLES:
45 C msgBuf :: Informational/error message buffer
46 CHARACTER*(MAX_LEN_MBUF) msgBuf
47
48 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
49 C Note MIT Coupler checkpoint1 does not allow asynchronous posting of
50 C data, so ordering has to be consistent with coupling layer ordering.
51 C--------------------------------------------------------------------------
52 C Synchronous coupling: Send data to coupling layer
53
54 IF ( .NOT.ocn_cplSequential ) THEN
55 IF ( debugMode ) THEN
56 _BEGIN_MASTER( myThid )
57 WRITE(msgBuf,'(A,I10)')
58 & ' Exporting oceanic surface fields at iter=', myIter
59 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
60 & SQUEEZE_RIGHT, myThid )
61 _END_MASTER( myThid )
62 ENDIF
63
64 CALL OCN_STORE_MY_DATA(
65 I myTime, myIter, myThid )
66
67 CALL OCN_EXPORT_FIELDS ( myIter, myThid )
68
69 ENDIF
70
71 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
72 C- Fetch data from coupling layer.
73
74 IF ( .TRUE. ) THEN
75 IF ( debugMode ) THEN
76 _BEGIN_MASTER( myThid )
77 WRITE(msgBuf,'(A,I10)')
78 & ' Importing atmospheric surf fluxes at iter=', myIter
79 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
80 & SQUEEZE_RIGHT, myThid )
81 _END_MASTER( myThid )
82 ENDIF
83
84 CALL OCN_IMPORT_FIELDS ( myIter, myThid )
85
86 C Fill diagnostics with updated coupling fields just received from Coupler
87 CALL CPL_DIAGNOSTICS_FILL( myTime, myIter, myThid )
88
89 ENDIF
90
91 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
92
93 #ifndef ALLOW_THSICE
94 C Sequential coupling: Send data to coupling layer
95 C call also OCN_CPL_DIAGS (to cumulate cpl time-ave) in both cases
96 C (Synchronous or Sequential coupling)
97 CALL OCN_EXPORT_DATA( myTime, myIter, myThid )
98 #endif /* ndef ALLOW_THSICE */
99
100 C If compiling pkg/thsice, do it later by calling the same S/R
101 C directly from DO_OCEANIC_PHYS, just after SEAICE_MODEL call.
102
103 #endif /* COMPONENT_MODULE */
104
105 RETURN
106 END

  ViewVC Help
Powered by ViewVC 1.1.22