C $Header: /home/ubuntu/mnt/e9_copy/MITgcm/pkg/mnc/mnc_init.F,v 1.18 2004/12/08 15:50:46 edhill Exp $ C $Name: $ #include "MNC_OPTIONS.h" C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| CBOP 0 C !ROUTINE: MNC_INIT C !INTERFACE: SUBROUTINE MNC_INIT( myThid ) C !DESCRIPTION: C Initialize (zero) the look-up tables. This routine should C \textbf{always} be run before any other MNC subroutines to ensure C that the lookup tables start in a well-defined state. C !USES: #include "mnc_common.h" C !INPUT PARAMETERS: integer myThid CEOP C !LOCAL VARIABLES: integer i,j, g, v character blank*(MNC_MAX_CHAR) C Write blanks or zeros to all the internal names and ID tables DO i = 1,MNC_MAX_CHAR blank(i:i) = ' ' ENDDO mnc_blank_name(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) DO i = 1,MNC_MAX_ID mnc_d_size(i) = 0 mnc_d_ids(i) = 0 mnc_f_names(i)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) mnc_g_names(i)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) mnc_v_names(i)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) mnc_d_names(i)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) DO j = 1,MNC_MAX_INFO mnc_f_info(i,j) = 0 mnc_fv_ids(i,j) = 0 mnc_fd_ind(i,j) = 0 mnc_f_alld(i,j) = 0 ENDDO ENDDO C Blank the CW tables DO g = 1,MNC_MAX_ID mnc_cw_gname(g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) mnc_cw_vname(g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) mnc_cw_vgind(g) = 0 mnc_cw_ndim(g) = 0 mnc_cw_fgnm(g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) mnc_cw_fgud(g) = 0 mnc_cw_fgis(g) = 0 DO i = 1,MNC_CW_MAX_I mnc_cw_dn(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) mnc_cw_vtnm(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) mnc_cw_vinm(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) mnc_cw_vdnm(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) mnc_cw_vtat(i,g)(1:MNC_MAX_CHAR) = blank(1:MNC_MAX_CHAR) mnc_cw_dims(i,g) = 0 mnc_cw_is(i,g) = 0 mnc_cw_ie(i,g) = 0 mnc_cw_viat(i,g) = 0 mnc_cw_vdat(i,g) = 0.0D0 ENDDO DO i = 1,3 mnc_cw_vnat(i,g) = 0 ENDDO DO i = 1,2 mnc_cw_vbij(i,g) = 0 ENDDO ENDDO RETURN END C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|