/[MITgcm]/MITgcm/model/src/ini_curvilinear_grid.F
ViewVC logotype

Diff of /MITgcm/model/src/ini_curvilinear_grid.F

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

revision 1.44 by mlosch, Mon May 25 09:48:09 2009 UTC revision 1.45 by jmc, Tue May 26 16:47:16 2009 UTC
# Line 41  C     myThid -  Number of this instance Line 41  C     myThid -  Number of this instance
41        INTEGER myThid        INTEGER myThid
42    
43  C     !LOCAL VARIABLES:  C     !LOCAL VARIABLES:
44    C     == Shared Local variables ==
45          LOGICAL anglesAreSet
46          COMMON /LOCAL_INI_CURVILINEAR_GRID/ anglesAreSet
47  C     == Local variables ==  C     == Local variables ==
48        INTEGER bi,bj        INTEGER bi,bj
49        INTEGER i,j        INTEGER i,j
50        CHARACTER*(MAX_LEN_MBUF) msgBuf        CHARACTER*(MAX_LEN_MBUF) msgBuf
       LOGICAL anglesAreSet  
51  #ifdef ALLOW_MNC  #ifdef ALLOW_MNC
52        CHARACTER*(80) mncFn        CHARACTER*(80) mncFn
53  #endif  #endif
# Line 116  C-    Cell centered quantities Line 118  C-    Cell centered quantities
118        CALL MDSREADFIELD('RA.bin',readBinaryPrec,'RS',1,rA,  1,myThid)        CALL MDSREADFIELD('RA.bin',readBinaryPrec,'RS',1,rA,  1,myThid)
119        _EXCH_XY_RS(rA,myThid )        _EXCH_XY_RS(rA,myThid )
120    
121          _BEGIN_MASTER(myThid)
122          anglesAreSet = .FALSE.
123          _END_MASTER(myThid)
124    
125  C-    Corner quantities  C-    Corner quantities
126        CALL MDSREADFIELD('LONG.bin',readBinaryPrec,'RS',1,xG,  1,myThid)        CALL MDSREADFIELD('LONG.bin',readBinaryPrec,'RS',1,xG,  1,myThid)
127        CALL MDSREADFIELD('LATG.bin',readBinaryPrec,'RS',1,yG,  1,myThid)        CALL MDSREADFIELD('LATG.bin',readBinaryPrec,'RS',1,yG,  1,myThid)
# Line 198  C-    Staggered (u,v pairs) quantities Line 204  C-    Staggered (u,v pairs) quantities
204        CALL MDSREADFIELD('DXG.bin',readBinaryPrec,'RS',1,dxG,  1,myThid)        CALL MDSREADFIELD('DXG.bin',readBinaryPrec,'RS',1,dxG,  1,myThid)
205        CALL MDSREADFIELD('DYG.bin',readBinaryPrec,'RS',1,dyG,  1,myThid)        CALL MDSREADFIELD('DYG.bin',readBinaryPrec,'RS',1,dyG,  1,myThid)
206        CALL EXCH_UV_XY_RS(dyG,dxG,.FALSE.,myThid)        CALL EXCH_UV_XY_RS(dyG,dxG,.FALSE.,myThid)
       CALL EXCH_UV_AGRID_3D_RS(angleSinC,angleCosC,.TRUE., 1, myThid)  
       anglesAreSet = .FALSE.  
207    
208  c     write(10) xC  c     write(10) xC
209  c     write(10) yC  c     write(10) yC
# Line 392  C-    Tile Id number = Bi + (Bj-1)*(nSx* Line 396  C-    Tile Id number = Bi + (Bj-1)*(nSx*
396        CALL EXCH_UV_XY_RS(dxC,dyC,.FALSE.,myThid)        CALL EXCH_UV_XY_RS(dxC,dyC,.FALSE.,myThid)
397        CALL EXCH_UV_XY_RS(rAw,rAs,.FALSE.,myThid)        CALL EXCH_UV_XY_RS(rAw,rAs,.FALSE.,myThid)
398        CALL EXCH_UV_XY_RS(dyG,dxG,.FALSE.,myThid)        CALL EXCH_UV_XY_RS(dyG,dxG,.FALSE.,myThid)
       CALL EXCH_UV_AGRID_3D_RS(angleSinC,angleCosC,.TRUE., 1, myThid)  
399    
400  #endif /* OLD_GRID_IO */  #endif /* OLD_GRID_IO */
401    
# Line 400  C--   Calculate (sines and cosines of) a Line 403  C--   Calculate (sines and cosines of) a
403  C--   geographical north when they have not been read from a file  C--   geographical north when they have not been read from a file
404        IF ( .NOT.anglesAreSet ) THEN        IF ( .NOT.anglesAreSet ) THEN
405         CALL CALC_ANGLES( myThid )         CALL CALC_ANGLES( myThid )
406           _BARRIER
407           _BEGIN_MASTER(myThid)
408         anglesAreSet = .TRUE.         anglesAreSet = .TRUE.
409  C--   Exchange the newly computed fields         _END_MASTER(myThid)
        CALL EXCH_UV_AGRID_3D_RS(angleSinC,angleCosC,.TRUE., 1, myThid)  
410        ENDIF        ENDIF
411    C--   Exchange Angle (either loaded from file or computed)
412          CALL EXCH_UV_AGRID_3D_RS(angleSinC,angleCosC,.TRUE., 1, myThid)
413    
414  C--   Stop if Angle have not been loaded but are needed :  C--   Stop if Angle have not been loaded but are needed :
415        _BEGIN_MASTER(myThid)        _BEGIN_MASTER(myThid)
416        IF ( .NOT.anglesAreSet .AND. use3dCoriolis ) THEN        IF ( .NOT.anglesAreSet .AND. use3dCoriolis ) THEN

Legend:
Removed from v.1.44  
changed lines
  Added in v.1.45

  ViewVC Help
Powered by ViewVC 1.1.22