703 |
I var, |
I var, |
704 |
I myThid ) |
I myThid ) |
705 |
|
|
706 |
|
C !DESCRIPTION: |
707 |
|
C A simple wrapper for the old version of this routine. The new |
708 |
|
C version includes the isvar argument which, for backwards |
709 |
|
C compatibility, is set to false here. |
710 |
|
|
711 |
|
C !USES: |
712 |
|
implicit none |
713 |
|
|
714 |
|
C !INPUT PARAMETERS: |
715 |
|
integer myThid, bi,bj |
716 |
|
character*(*) stype, fbname, vtype |
717 |
|
__V var(*) |
718 |
|
CEOP |
719 |
|
|
720 |
|
C !LOCAL VARIABLES: |
721 |
|
LOGICAL isvar |
722 |
|
|
723 |
|
isvar = .FALSE. |
724 |
|
|
725 |
|
CALL MNC_CW_RX_R_TF(stype,fbname,bi,bj,vtype,var,isvar,myThid) |
726 |
|
|
727 |
|
RETURN |
728 |
|
END |
729 |
|
|
730 |
|
|
731 |
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
732 |
|
CBOP 0 |
733 |
|
C !ROUTINE: MNC_CW_RX_R |
734 |
|
|
735 |
|
C !INTERFACE: |
736 |
|
SUBROUTINE MNC_CW_RX_R_TF( |
737 |
|
I stype, |
738 |
|
I fbname, bi,bj, |
739 |
|
I vtype, |
740 |
|
I var, |
741 |
|
B isvar, |
742 |
|
I myThid ) |
743 |
|
|
744 |
C !DESCRIPTION: |
C !DESCRIPTION: |
745 |
C This subroutine reads one variable from a file or a file group, |
C This subroutine reads one variable from a file or a file group, |
746 |
C depending upon the tile indicies. |
C depending upon the tile indicies. If isvar is true and the |
747 |
|
C variable does not exist, then isvar is set to false and the |
748 |
|
C program continues normally. This allows one to gracefully handle |
749 |
|
C the case of reading variables that might or might not exist. |
750 |
|
|
751 |
C !USES: |
C !USES: |
752 |
implicit none |
implicit none |
762 |
integer myThid, bi,bj |
integer myThid, bi,bj |
763 |
character*(*) stype, fbname, vtype |
character*(*) stype, fbname, vtype |
764 |
__V var(*) |
__V var(*) |
765 |
|
LOGICAL isvar |
766 |
CEOP |
CEOP |
767 |
|
|
768 |
C !LOCAL VARIABLES: |
C !LOCAL VARIABLES: |
890 |
& 'MNC_CW_RX_R: cannot get id for variable ''', |
& 'MNC_CW_RX_R: cannot get id for variable ''', |
891 |
& vtype(nvf:nvl), '''in file ''', fname(1:nfname), '''' |
& vtype(nvf:nvl), '''in file ''', fname(1:nfname), '''' |
892 |
err = NF_INQ_VARID(fid, vtype, idv) |
err = NF_INQ_VARID(fid, vtype, idv) |
893 |
|
IF ( isvar .AND. ( err .NE. NF_NOERR ) ) THEN |
894 |
|
isvar = .FALSE. |
895 |
|
RETURN |
896 |
|
ENDIF |
897 |
|
isvar = .TRUE. |
898 |
CALL MNC_HANDLE_ERR(err, msgbuf, myThid) |
CALL MNC_HANDLE_ERR(err, msgbuf, myThid) |
899 |
f_or_t = 0 |
f_or_t = 0 |
900 |
|
|
971 |
& vtype(nvf:nvl), ''' in file ''', path_fname(1:ntot), |
& vtype(nvf:nvl), ''' in file ''', path_fname(1:ntot), |
972 |
& '''' |
& '''' |
973 |
err = NF_INQ_VARID(fid, vtype, idv) |
err = NF_INQ_VARID(fid, vtype, idv) |
974 |
|
IF ( isvar .AND. ( err .NE. NF_NOERR ) ) THEN |
975 |
|
isvar = .FALSE. |
976 |
|
RETURN |
977 |
|
ENDIF |
978 |
|
isvar = .TRUE. |
979 |
CALL MNC_HANDLE_ERR(err, msgbuf, myThid) |
CALL MNC_HANDLE_ERR(err, msgbuf, myThid) |
980 |
|
|
981 |
k = ILNBLNK(path_fname) |
k = ILNBLNK(path_fname) |