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

Contents of /MITgcm/pkg/aim_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)
Fri May 21 20:00:48 2004 UTC (19 years, 11 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint57t_post, checkpoint58l_post, checkpoint53f_post, checkpoint54a_pre, checkpoint55c_post, checkpoint57b_post, checkpoint57o_post, checkpoint58e_post, checkpoint57v_post, checkpoint53d_post, checkpoint58u_post, checkpoint57f_post, checkpoint57s_post, checkpoint53c_post, checkpoint57k_post, checkpoint55d_pre, checkpoint57d_post, checkpoint57g_post, checkpoint60, checkpoint61, checkpoint62, checkpoint57c_pre, checkpoint58r_post, checkpoint55j_post, checkpoint56b_post, checkpoint57i_post, checkpoint57y_post, checkpoint58g_post, checkpoint57x_post, checkpoint54a_post, checkpoint57m_post, checkpoint55h_post, checkpoint58n_post, checkpoint58x_post, checkpoint57g_pre, checkpoint54b_post, checkpoint58t_post, checkpoint58h_post, checkpoint57e_post, checkpoint58w_post, checkpoint54d_post, checkpoint56c_post, checkpoint54e_post, checkpoint58j_post, checkpoint55b_post, checkpoint57h_post, checkpoint57y_pre, checkpoint55, checkpoint57f_pre, checkpoint57a_post, checkpoint54, checkpoint58q_post, checkpoint54f_post, checkpoint59q, checkpoint59p, checkpoint55g_post, checkpoint59r, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint55f_post, checkpoint59c, checkpoint59b, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint57r_post, checkpoint59, checkpoint58, checkpoint57a_pre, checkpoint55i_post, checkpoint57, checkpoint56, eckpoint57e_pre, checkpoint57h_done, checkpoint58f_post, checkpoint53g_post, checkpoint57n_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint58a_post, checkpoint58i_post, checkpoint57q_post, checkpoint58o_post, checkpoint57z_post, checkpoint57c_post, checkpoint58y_post, checkpoint55e_post, checkpoint58k_post, checkpoint58v_post, checkpoint55a_post, checkpoint53d_pre, checkpoint54c_post, checkpoint58s_post, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint58p_post, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint57j_post, checkpoint61z, checkpoint61x, checkpoint61y, checkpoint58b_post, checkpoint57h_pre, checkpoint58m_post, checkpoint57l_post, checkpoint56a_post, checkpoint55d_post
Changes since 1.1: +9 -7 lines
new version of atmosphere-coupler interface for AIM+thSIce and ocean models

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

  ViewVC Help
Powered by ViewVC 1.1.22