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

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

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


Revision 1.3 - (show annotations) (download)
Thu Dec 24 16:49:08 2009 UTC (14 years, 4 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.2: +19 -12 lines
multi-threaded: can now reach the end of initialisation before stopping

1 C $Header: /u/gcmpack/MITgcm/pkg/aim_compon_interf/cpl_exch_configs.F,v 1.2 2004/05/21 20:00:48 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 atmosphere component. |
17 C | - Atmospheric 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 "PARAMS.h"
40 #include "GRID.h"
41 #include "ATMCPL.h"
42
43 C !INPUT/OUTPUT PARAMETERS:
44 C == Routine arguments ==
45 C myThid :: Thread number for this instance of the routine
46 INTEGER myThid
47 CEOP
48
49 C == Local variables ==
50 INTEGER I,J,K,bi,bj
51 INTEGER iDiff
52 INTEGER jDiff
53 INTEGER biDiff
54 INTEGER bjDiff
55 CHARACTER*(MAX_LEN_MBUF) msgBuf
56 _RL seaSurface_ocn
57 _RL groundLevel_atm
58
59 C Post my configuration information to the coupler "layer".
60 CALL ATM_EXPORT_ATMCONFIG( myThid )
61
62 C Import other component model(s) configuration(s) from the
63 C coupler "layer".
64 C o Get ocean model configuration
65 CALL ATM_IMPORT_OCNCONFIG( myThid )
66
67 C Summarise fields that were imported.
68 C o Plot ocean depths
69 CALL PLOT_FIELD_XYRL( ocMxlD,
70 & 'Ocean mixed-layer depth on atmos grid',
71 & 1, myThid )
72
73 C Do consistency checks on imported fields.
74 C o Check that atmos. depth is equal to sea-level for all ocean points.
75 C The ocean model has depth == 0 wherever there is land. For non-land
76 C point the atmosphere must extend to the sea-surface. Usually the
77 C atmospheres full depth is 10^5 Pa.
78 iDiff = 0
79 jDiff = 0
80 biDiff = 0
81 bjDiff = 0
82 seaSurface_ocn = 0. _d 0
83 c groundLevel_atm = 1. _d 5
84 groundLevel_atm = Ro_SeaLevel
85 DO bj=myByLo(myTHid),myByHi(myThid)
86 DO bi=myBxLo(myThid),myBxHi(myThid)
87 DO J=1,sNy
88 DO I=1,sNx
89 IF ( ocMxlD(I,J,bi,bj) .NE. seaSurface_ocn .AND.
90 & Ro_surf(I,J,bi,bj) .NE. groundLevel_atm ) THEN
91 iDiff = I
92 jDiff = J
93 biDiff = bi
94 bjDiff = bj
95 WRITE(msgBuf,'(A,I4,A,I4,A,I4,A,I4,A)')
96 & 'Inconsistent land/sea mask @ (i=',iDiff,
97 & ',j=',jDiff,',bi=',biDiff,',bj=',bjDiff,')'
98 CALL PRINT_ERROR( msgBuf, myThid )
99 WRITE(msgBuf,'(A,E30.15)')
100 & 'H (atmosphere) ==',Ro_surf(I,J,bi,bj)
101 CALL PRINT_ERROR( msgBuf, myThid )
102 WRITE(msgBuf,'(A,E30.15)')
103 & 'H (ocean) ==',ocMxlD(I,J,bi,bj)
104 CALL PRINT_ERROR( msgBuf, myThid )
105 ENDIF
106 ENDDO
107 ENDDO
108 ENDDO
109 ENDDO
110
111 IF ( iDiff .NE. 0 ) THEN
112 C At least one point had land/sea "inconsistency" between atmos.
113 C and ocean. Stop if this happens.
114 Ccnh STOP 'ABNORMAL END: S/R ATM_EXCH_CONFIGS'
115 ENDIF
116
117 RETURN
118 END

  ViewVC Help
Powered by ViewVC 1.1.22