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

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

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

revision 1.22 by mlosch, Fri Feb 8 13:01:25 2008 UTC revision 1.23 by jmc, Sun Jun 1 03:48:32 2008 UTC
# Line 1  Line 1 
1  C $Header$  C $Header$
2  C $Name$  C $Name$
3          
4  #include "PACKAGES_CONFIG.h"  #include "PACKAGES_CONFIG.h"
5  #include "CPP_OPTIONS.h"  #include "CPP_OPTIONS.h"
6          
7  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
8  CBOP  CBOP
9  C     !ROUTINE: WRITE_GRID  C     !ROUTINE: WRITE_GRID
10  C     !INTERFACE:  C     !INTERFACE:
11        SUBROUTINE WRITE_GRID(        SUBROUTINE WRITE_GRID(
12       I     myThid )       I                 myThid )
13    
14  C     !DESCRIPTION:  C     !DESCRIPTION:
15  C     Writes the model geometry and grid arrays to file(s) using which  C     Writes the model geometry and grid arrays to file(s) using which
# Line 43  C               thread => needs to be in Line 43  C               thread => needs to be in
43        _RS tmpfld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)        _RS tmpfld(1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy)
44        INTEGER i,j,bi,bj        INTEGER i,j,bi,bj
45        LOGICAL writegrid_mdsio        LOGICAL writegrid_mdsio
46    #ifdef ALLOW_MDSIO
47          INTEGER k
48          _RS tmpVar(Nr+1)
49    #endif
50  #ifdef ALLOW_MNC  #ifdef ALLOW_MNC
51        CHARACTER*(4) bfname        CHARACTER*(4) bfname
52  #endif  #endif
# Line 107  C     Write vertical grid arrays Line 111  C     Write vertical grid arrays
111       &                                0,0, 1, -1, myThid)       &                                0,0, 1, -1, myThid)
112          CALL MDSWRITEVEC_LOC_RS('DRF',writeBinaryPrec, Nr, drF,          CALL MDSWRITEVEC_LOC_RS('DRF',writeBinaryPrec, Nr, drF,
113       &                                0,0, 1, -1, myThid)       &                                0,0, 1, -1, myThid)
114    C--  comment out the "if": also usefull for the Ocean (to get the full Presure)
115    c       IF (buoyancyRelation .EQ. 'ATMOSPHERIC') THEN
116            DO k=1,Nr+1
117              tmpVar(k) = phiRef(2*k-1)
118            ENDDO
119            CALL MDSWRITEVEC_LOC_RS('PHrefF', writeBinaryPrec, 1+Nr,
120         &                            tmpVar, 0, 0, 1, -1, myThid)
121            DO k=1,Nr
122              tmpVar(k) = phiRef(2*k)
123            ENDDO
124            CALL MDSWRITEVEC_LOC_RS('PHrefC', writeBinaryPrec, Nr,
125         &                            tmpVar, 0, 0, 1, -1, myThid)
126    c       ENDIF
127  #endif /* ALLOW_MDSIO */  #endif /* ALLOW_MDSIO */
128    
129        ENDIF        ENDIF
# Line 118  C---+----1----+----2----+----3----+----4 Line 135  C---+----1----+----2----+----3----+----4
135    
136          _BEGIN_MASTER( myThid )          _BEGIN_MASTER( myThid )
137          bfname='grid'          bfname='grid'
138            
139  C       Write the GRID.h variables to a file  C       Write the GRID.h variables to a file
140          CALL MNC_CW_SET_UDIM(bfname, 0, myThid)          CALL MNC_CW_SET_UDIM(bfname, 0, myThid)
141          CALL MNC_CW_SET_CITER(bfname, 2, -1, -1, -1, myThid)          CALL MNC_CW_SET_CITER(bfname, 2, -1, -1, -1, myThid)

Legend:
Removed from v.1.22  
changed lines
  Added in v.1.23

  ViewVC Help
Powered by ViewVC 1.1.22