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 |
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) |
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 |
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 |
|
|
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 |