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

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

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


Revision 1.2 - (show annotations) (download)
Thu Dec 24 16:48:30 2009 UTC (14 years, 5 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64q, checkpoint64p, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint64, checkpoint63, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x
Changes since 1.1: +20 -13 lines
multi-threaded: can now reach the end of initialisation before stopping

1 C $Header: /u/gcmpack/MITgcm/pkg/ocn_compon_interf/cpl_exch_configs.F,v 1.1 2003/12/15 02:49:09 jmc Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 CBOP 0
7 C !ROUTINE: CPL_EXCH_CONFIGS
8
9 C !INTERFACE:
10 SUBROUTINE CPL_EXCH_CONFIGS( myThid )
11
12 C !DESCRIPTION:
13 C *==========================================================*
14 C | SUBROUTINE CPL_EXCH_CONFIGS |
15 C | o Controlling routine for initial config exchange between|
16 C | component models and ocean component. |
17 C | - Oceanic version - |
18 C *==========================================================*
19 C | Controls the import of configuration information |
20 C | (grid/topography,etc...) from other components and the |
21 C | export of configuration information from this component. |
22 C | The routine does some basic checking on consistency |
23 C | components and summarizes the information that has been |
24 C | imported. |
25 C | The routine will need to be customised for different |
26 C | styles of coupled run. The coupler requires consistency |
27 C | between sending and receiving operations posted by |
28 C | various components. Therefore changes in one component |
29 C | model CPL_EXCH_CONFIG may require changes in other |
30 C | component models CPL_EXCH_CONFIG routines as well |
31 C | as in the CPL_MASTER_EXCH_CONFIG routine. |
32 C *==========================================================*
33
34 C !USES:
35 IMPLICIT NONE
36 C == Global variables ==
37 #include "SIZE.h"
38 #include "EEPARAMS.h"
39 #include "GRID.h"
40 #include "OCNCPL.h"
41
42 C !INPUT/OUTPUT PARAMETERS:
43 C == Routine arguments ==
44 C myThid :: Thread number for this instance of the routine
45 INTEGER myThid
46 CEOP
47
48 C == Local variables ==
49 INTEGER I,J,K,bi,bj
50 INTEGER iDiff
51 INTEGER jDiff
52 INTEGER biDiff
53 INTEGER bjDiff
54 CHARACTER*(MAX_LEN_MBUF) msgBuf
55 _RL seaSurface_ocn
56 _RL groundLevel_atm
57
58 C Post my configuration information to the coupler "layer".
59 CALL OCN_EXPORT_OCNCONFIG( myThid )
60
61 C Import other component model(s) configuration(s) from the
62 C coupler "layer".
63 C o Get atmospheric model configuration
64 CALL OCN_IMPORT_ATMCONFIG( myThid )
65
66 C Summarise fields that were imported.
67 C o Plot atmosphere orography
68 CALL PLOT_FIELD_XYRL( Hatm,
69 & 'Atmosphere orography on ocean grid',
70 & 1, myThid )
71
72 C Do consistency checks on imported fields.
73 C o Check that atmos. depth is equal to sea-level for all ocean points.
74 C Wherever there is ocean check the atmos extends to the sea-surface.
75 iDiff = 0
76 jDiff = 0
77 biDiff = 0
78 bjDiff = 0
79 seaSurface_ocn = 0. _d 0
80 groundLevel_atm = 1. _d 5
81 DO bj=myByLo(myTHid),myByHi(myThid)
82 DO bi=myBxLo(myThid),myBxHi(myThid)
83 DO J=1,sNy
84 DO I=1,sNx
85 IF ( R_low(I,J,bi,bj) .NE. seaSurface_ocn .AND.
86 & Hatm(I,J,bi,bj) .NE. groundLevel_atm ) THEN
87 iDiff = I
88 jDiff = J
89 biDiff = bi
90 bjDiff = bj
91 WRITE(msgBuf,'(A,I4,A,I4,A,I4,A,I4,A)')
92 & 'Inconsistent land/sea mask @ (i=',iDiff,
93 & ',j=',jDiff,',bi=',biDiff,',bj=',bjDiff,')'
94 CALL PRINT_ERROR( msgBuf, myThid )
95 WRITE(msgBuf,'(A,E30.15)')
96 & 'H (atmosphere) ==',Hatm(I,J,bi,bj)
97 CALL PRINT_ERROR( msgBuf, myThid )
98 WRITE(msgBuf,'(A,E30.15)')
99 & 'H (ocean) ==',R_low(I,J,bi,bj)
100 CALL PRINT_ERROR( msgBuf, myThid )
101 ENDIF
102 ENDDO
103 ENDDO
104 ENDDO
105 ENDDO
106
107 IF ( iDiff .NE. 0 ) THEN
108 C At least one point had land/sea "inconsistency" between atmos.
109 C and ocean. Stop if this happens.
110 Ccnh STOP 'ABNORMAL END: S/R OCN_EXCH_CONFIGS'
111 ENDIF
112
113 RETURN
114 END

  ViewVC Help
Powered by ViewVC 1.1.22