/[MITgcm]/MITgcm/pkg/mnc/mnc_cwrapper.F
ViewVC logotype

Diff of /MITgcm/pkg/mnc/mnc_cwrapper.F

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

revision 1.28 by edhill, Thu Mar 30 02:56:14 2006 UTC revision 1.33 by jmc, Tue May 12 19:56:36 2009 UTC
# Line 21  C     Add a grid name to the MNC conveni Line 21  C     Add a grid name to the MNC conveni
21                
22  C     !USES:  C     !USES:
23        implicit none        implicit none
24  #include "mnc_common.h"  #include "MNC_COMMON.h"
25  #include "EEPARAMS.h"  #include "EEPARAMS.h"
26    
27  C     !INPUT PARAMETERS:  C     !INPUT PARAMETERS:
# Line 83  C     Delete a grid name from the MNC co Line 83  C     Delete a grid name from the MNC co
83                
84  C     !USES:  C     !USES:
85        implicit none        implicit none
86  #include "mnc_common.h"  #include "MNC_COMMON.h"
87  #include "EEPARAMS.h"  #include "EEPARAMS.h"
88    
89  C     !INPUT PARAMETERS:  C     !INPUT PARAMETERS:
# Line 125  C     tables for the convenience wrapper Line 125  C     tables for the convenience wrapper
125                
126  C     !USES:  C     !USES:
127        implicit none        implicit none
128  #include "mnc_common.h"  #include "MNC_COMMON.h"
129  #include "SIZE.h"  #include "SIZE.h"
130  #include "EEPARAMS.h"  #include "EEPARAMS.h"
131  #include "PARAMS.h"  #include "PARAMS.h"
# Line 248  C     variable type.  Calls MNC\_CW\_ADD Line 248  C     variable type.  Calls MNC\_CW\_ADD
248        
249  C     !USES:  C     !USES:
250        implicit none        implicit none
251  #include "mnc_common.h"  #include "MNC_COMMON.h"
252    
253  C     !INPUT PARAMETERS:  C     !INPUT PARAMETERS:
254        integer myThid, bi_dim, bj_dim        integer myThid, bi_dim, bj_dim
# Line 292  C     \end{center} Line 292  C     \end{center}
292        
293  C     !USES:  C     !USES:
294        implicit none        implicit none
295  #include "mnc_common.h"  #include "MNC_COMMON.h"
296  #include "EEPARAMS.h"  #include "EEPARAMS.h"
297    
298  C     !INPUT PARAMETERS:  C     !INPUT PARAMETERS:
# Line 362  C     Delete a variable type from the MN Line 362  C     Delete a variable type from the MN
362        
363  C     !USES:  C     !USES:
364        implicit none        implicit none
365  #include "mnc_common.h"  #include "MNC_COMMON.h"
366  #include "EEPARAMS.h"  #include "EEPARAMS.h"
367    
368  C     !INPUT PARAMETERS:  C     !INPUT PARAMETERS:
# Line 480  C     !DESCRIPTION: Line 480  C     !DESCRIPTION:
480    
481  C     !USES:  C     !USES:
482        implicit none        implicit none
483  #include "mnc_common.h"  #include "MNC_COMMON.h"
484  #include "EEPARAMS.h"  #include "EEPARAMS.h"
485    
486  C     !INPUT PARAMETERS:  C     !INPUT PARAMETERS:
# Line 494  C     !INPUT PARAMETERS: Line 494  C     !INPUT PARAMETERS:
494  CEOP  CEOP
495    
496  C     !LOCAL VARIABLES:  C     !LOCAL VARIABLES:
497        integer n, nvf,nvl, n1,n2, indv        integer n, nvf,nvl, n1,n2, indv, ic
498        character*(MAX_LEN_MBUF) msgbuf        character*(MAX_LEN_MBUF) msgbuf
499    
500  C     Functions  C     Functions
# Line 518  C       Text Attribute Line 518  C       Text Attribute
518          n1 = IFNBLNK(tname)          n1 = IFNBLNK(tname)
519          n2 = ILNBLNK(tname)          n2 = ILNBLNK(tname)
520          IF ((n2-n1+1) .GT. MNC_MAX_CHAR) THEN          IF ((n2-n1+1) .GT. MNC_MAX_CHAR) THEN
521            write(msgbuf,'(3a,i6,a)')            write(msgbuf,'(3a,i6,2a)')
522       &         'MNC_CW_ADD_VATTR_ANY WARNING: attribute name ''',       &         'MNC_CW_ADD_VATTR_ANY WARNING: attribute name ''',
523       &         tname(n1:n2), ''' has more than ', MNC_MAX_CHAR,       &         tname(n1:n2), ''' has more than ', MNC_MAX_CHAR,
524       &         ' characters and has been truncated to fit'       &         ' characters and has been truncated to fit--please',
525            CALL print_error(msgbuf, mythid)       &         'use a smaller name or increase MNC_MAX_CHAR'
526              CALL PRINT_MESSAGE( msgbuf, errorMessageUnit,
527         &                        SQUEEZE_RIGHT , myThid)
528  C         MNC_MAX_CHAR = n2 - n1 + 1  C         MNC_MAX_CHAR = n2 - n1 + 1
529            n2 = MNC_MAX_CHAR + n1 - 1            n2 = MNC_MAX_CHAR + n1 - 1
530          ENDIF          ENDIF
# Line 533  C       write(*,*) atype,tname(n1:n2) Line 535  C       write(*,*) atype,tname(n1:n2)
535    
536          n1 = IFNBLNK(tval)          n1 = IFNBLNK(tval)
537          n2 = ILNBLNK(tval)          n2 = ILNBLNK(tval)
538          IF ((n2-n1+1) .GT. MNC_MAX_CHAR) THEN          IF ((n2-n1+1) .GT. MNC_MAX_CATT) THEN
539            write(msgbuf,'(3a,i6,a)')            write(msgbuf,'(3a,i6,2a)')
540       &         'MNC_CW_ADD_VATTR_ANY WARNING: attribute value ''',       &         'MNC_CW_ADD_VATTR_ANY WARNING: attribute value ''',
541       &         tval(n1:n2), ''' has more than ', MNC_MAX_CHAR,       &         tval(n1:n2), ''' has more than ', MNC_MAX_CATT,
542       &         ' characters and has been truncated to fit'       &         ' characters and has been truncated to fit--please',
543            CALL print_error(msgbuf, mythid)       &         'use a smaller name or increase MNC_MAX_CATT'
544            n2 = MNC_MAX_CHAR + n1 - 1            CALL PRINT_MESSAGE( msgbuf, errorMessageUnit,
545         &                        SQUEEZE_RIGHT , myThid)
546              n2 = MNC_MAX_CATT + n1 - 1
547          ENDIF          ENDIF
548            
549          IF ((n1 .EQ. 0) .OR. (n2 .EQ. 0)) THEN          mnc_cw_vnat(1,indv) = n
550            mnc_cw_vtat(n,indv)(1:MNC_MAX_CHAR) =          DO ic = 1,MNC_MAX_CATT
551       &         mnc_blank_name(1:MNC_MAX_CHAR)                      mnc_cw_vtat(n,indv)(ic:ic) = ' '
552            mnc_cw_vnat(1,indv) = n          ENDDO
553          ELSE          IF ((n1 .NE. 0) .AND. (n2 .NE. 0)) THEN
           mnc_cw_vtat(n,indv)(1:MNC_MAX_CHAR) =  
      &         mnc_blank_name(1:MNC_MAX_CHAR)  
554            mnc_cw_vtat(n,indv)(1:(n2-n1+1)) = tval(n1:n2)            mnc_cw_vtat(n,indv)(1:(n2-n1+1)) = tval(n1:n2)
           mnc_cw_vnat(1,indv) = n  
555          ENDIF          ENDIF
556        ENDIF        ENDIF
557                    
# Line 596  C     !USES: Line 597  C     !USES:
597  #include "EEPARAMS.h"  #include "EEPARAMS.h"
598  #include "SIZE.h"  #include "SIZE.h"
599  #ifdef ALLOW_EXCH2  #ifdef ALLOW_EXCH2
600    #include "W2_EXCH2_SIZE.h"
601  #include "W2_EXCH2_TOPOLOGY.h"  #include "W2_EXCH2_TOPOLOGY.h"
 #include "W2_EXCH2_PARAMS.h"  
602  #endif  #endif
603    
604  C     !INPUT PARAMETERS:  C     !INPUT PARAMETERS:
# Line 646  C     !USES: Line 647  C     !USES:
647  #include "EEPARAMS.h"  #include "EEPARAMS.h"
648  #include "SIZE.h"  #include "SIZE.h"
649  #ifdef ALLOW_EXCH2  #ifdef ALLOW_EXCH2
650    #include "W2_EXCH2_SIZE.h"
651  #include "W2_EXCH2_TOPOLOGY.h"  #include "W2_EXCH2_TOPOLOGY.h"
 #include "W2_EXCH2_PARAMS.h"  
652  #endif  #endif
653    
654  C     !INPUT PARAMETERS:  C     !INPUT PARAMETERS:
# Line 685  C     !USES: Line 686  C     !USES:
686  #include "EEPARAMS.h"  #include "EEPARAMS.h"
687  #include "SIZE.h"  #include "SIZE.h"
688  #ifdef ALLOW_EXCH2  #ifdef ALLOW_EXCH2
689    #include "W2_EXCH2_SIZE.h"
690  #include "W2_EXCH2_TOPOLOGY.h"  #include "W2_EXCH2_TOPOLOGY.h"
 #include "W2_EXCH2_PARAMS.h"  
691  #endif  #endif
692    
693  C     !INPUT PARAMETERS:  C     !INPUT PARAMETERS:
# Line 733  C     and, if not, creating a new file. Line 734  C     and, if not, creating a new file.
734    
735  C     !USES:  C     !USES:
736        implicit none        implicit none
737  #include "netcdf.inc"  #include "MNC_COMMON.h"
 #include "mnc_common.h"  
738  #include "EEPARAMS.h"  #include "EEPARAMS.h"
739    #include "netcdf.inc"
740    
741  C     !INPUT PARAMETERS:  C     !INPUT PARAMETERS:
742        integer myThid, indf, lbi, lbj, uniq_tnum        integer myThid, indf, lbi, lbj, uniq_tnum

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.33

  ViewVC Help
Powered by ViewVC 1.1.22