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

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

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

revision 1.2 by jmc, Fri May 21 20:00:48 2004 UTC revision 1.3 by jmc, Thu Dec 24 16:49:08 2009 UTC
# Line 3  C $Name$ Line 3  C $Name$
3    
4  #include "CPP_OPTIONS.h"  #include "CPP_OPTIONS.h"
5    
6  CStartOfInterface  CBOP 0
7    C !ROUTINE: CPL_EXCH_CONFIGS
8    
9    C !INTERFACE:
10        SUBROUTINE CPL_EXCH_CONFIGS( myThid )        SUBROUTINE CPL_EXCH_CONFIGS( myThid )
11    
12    C !DESCRIPTION:
13  C     *==========================================================*  C     *==========================================================*
14  C     | SUBROUTINE CPL_EXCH_CONFIGS                              |  C     | SUBROUTINE CPL_EXCH_CONFIGS                              |
15  C     | o Controlling routine for initial config exchange between|  C     | o Controlling routine for initial config exchange between|
# Line 25  C     | model CPL_EXCH_CONFIG may requir Line 30  C     | model CPL_EXCH_CONFIG may requir
30  C     | component models CPL_EXCH_CONFIG routines as well        |  C     | component models CPL_EXCH_CONFIG routines as well        |
31  C     | as in the CPL_MASTER_EXCH_CONFIG routine.                |  C     | as in the CPL_MASTER_EXCH_CONFIG routine.                |
32  C     *==========================================================*  C     *==========================================================*
       IMPLICIT NONE  
33    
34    C !USES:
35          IMPLICIT NONE
36  C     == Global variables ==  C     == Global variables ==
37  #include "SIZE.h"  #include "SIZE.h"
38  #include "EEPARAMS.h"  #include "EEPARAMS.h"
# Line 34  C     == Global variables == Line 40  C     == Global variables ==
40  #include "GRID.h"  #include "GRID.h"
41  #include "ATMCPL.h"  #include "ATMCPL.h"
42    
43    C !INPUT/OUTPUT PARAMETERS:
44  C     == Routine arguments ==  C     == Routine arguments ==
45  C     myThid - Thread number for this instance of the routine  C     myThid :: Thread number for this instance of the routine
46        INTEGER myThid        INTEGER myThid
47  CEndOfInterface  CEOP
48    
49  C     == Local variables ==  C     == Local variables ==
50        INTEGER I,J,K,bi,bj        INTEGER I,J,K,bi,bj
# Line 52  C     == Local variables == Line 59  C     == Local variables ==
59  C     Post my configuration information to the coupler "layer".  C     Post my configuration information to the coupler "layer".
60        CALL ATM_EXPORT_ATMCONFIG( myThid )        CALL ATM_EXPORT_ATMCONFIG( myThid )
61    
62  C     Import other component model(s) configuration(s) from the  C     Import other component model(s) configuration(s) from the
63  C     coupler "layer".  C     coupler "layer".
64  C     o Get ocean model configuration  C     o Get ocean model configuration
65        CALL ATM_IMPORT_OCNCONFIG( myThid )        CALL ATM_IMPORT_OCNCONFIG( myThid )
66    
67  C     Summarise fields that were imported.  C     Summarise fields that were imported.
68  C     o Plot ocean depths  C     o Plot ocean depths
69        CALL PLOT_FIELD_XYRL( ocMxlD,        CALL PLOT_FIELD_XYRL( ocMxlD,
70       &                      'Ocean mixed-layer depth on atmos grid',       &                      'Ocean mixed-layer depth on atmos grid',
71       &                      1, myThid )       &                      1, myThid )
72    
73  C     Do consistency checks on imported fields.  C     Do consistency checks on imported fields.
74  C     o Check that atmos. depth is equal to sea-level for all ocean points.  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  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  C       point the atmosphere must extend to the sea-surface. Usually the
77  C       atmospheres full depth is 10^5 Pa.  C       atmospheres full depth is 10^5 Pa.
78        iDiff  = 0        iDiff  = 0
79        jDiff  = 0        jDiff  = 0
# Line 79  c     groundLevel_atm   = 1. _d 5 Line 86  c     groundLevel_atm   = 1. _d 5
86         DO bi=myBxLo(myThid),myBxHi(myThid)         DO bi=myBxLo(myThid),myBxHi(myThid)
87          DO J=1,sNy          DO J=1,sNy
88           DO I=1,sNx           DO I=1,sNx
89            IF ( ocMxlD(I,J,bi,bj)  .NE. seaSurface_ocn  .AND.            IF (  ocMxlD(I,J,bi,bj) .NE. seaSurface_ocn  .AND.
90       &         Ro_surf(I,J,bi,bj) .NE. groundLevel_atm ) THEN       &         Ro_surf(I,J,bi,bj) .NE. groundLevel_atm ) THEN
91             iDiff  = I             iDiff  = I
92             jDiff  = J             jDiff  = J
# Line 88  c     groundLevel_atm   = 1. _d 5 Line 95  c     groundLevel_atm   = 1. _d 5
95             WRITE(msgBuf,'(A,I4,A,I4,A,I4,A,I4,A)')             WRITE(msgBuf,'(A,I4,A,I4,A,I4,A,I4,A)')
96       &     'Inconsistent land/sea mask @ (i=',iDiff,       &     'Inconsistent land/sea mask @ (i=',iDiff,
97       &     ',j=',jDiff,',bi=',biDiff,',bj=',bjDiff,')'       &     ',j=',jDiff,',bi=',biDiff,',bj=',bjDiff,')'
98             CALL PRINT_ERROR( msgBuf, 1 )             CALL PRINT_ERROR( msgBuf, myThid )
99             WRITE(msgBuf,'(A,E30.15)')             WRITE(msgBuf,'(A,E30.15)')
100       &     'H (atmosphere) ==',Ro_surf(I,J,bi,bj)       &     'H (atmosphere) ==',Ro_surf(I,J,bi,bj)
101             CALL PRINT_ERROR( msgBuf, 1 )             CALL PRINT_ERROR( msgBuf, myThid )
102             WRITE(msgBuf,'(A,E30.15)')             WRITE(msgBuf,'(A,E30.15)')
103       &     'H (ocean)      ==',ocMxlD(I,J,bi,bj)       &     'H (ocean)      ==',ocMxlD(I,J,bi,bj)
104             CALL PRINT_ERROR( msgBuf, 1 )             CALL PRINT_ERROR( msgBuf, myThid )
105            ENDIF            ENDIF
106           ENDDO           ENDDO
107          ENDDO          ENDDO

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.22