Back to home page

MITgcm

 
 

    


File indexing completed on 2024-05-25 05:11:13 UTC

view on githubraw file Latest commit 00f81e67 on 2024-05-24 21:00:12 UTC
00f81e6785 Ou W*0001 #include "STIC_OPTIONS.h"
                0002 
                0003 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0004 CBOP
                0005 C !ROUTINE: STIC_READPARMS
                0006 
                0007 C !INTERFACE:
                0008       SUBROUTINE STIC_READPARMS( myThid )
                0009 
                0010 C     !DESCRIPTION:
                0011 C     Initialize STIC variables and constants.
                0012 
                0013 C     !USES:
                0014       IMPLICIT NONE
                0015 C     == Global variables ===
                0016 #include "SIZE.h"
                0017 #include "EEPARAMS.h"
                0018 #include "PARAMS.h"
                0019 #include "STIC.h"
                0020 #ifdef ALLOW_SHELFICE
                0021 # include "SHELFICE.h"
                0022 #endif
                0023 
                0024 C     !INPUT PARAMETERS:
                0025       INTEGER myThid
                0026 CEOP
                0027 
                0028 C     !LOCAL VARIABLES:
                0029 C     msgBuf     :: Informational/error message buffer
                0030 C     iUnit      :: Work variable for IO unit number
                0031       CHARACTER*(MAX_LEN_MBUF) msgBuf
                0032       INTEGER iUnit
                0033 
                0034       NAMELIST /STIC_PARM01/
                0035      &     STIClengthFile, STICdepthFile
                0036 
                0037       IF ( .NOT.useSTIC ) THEN
                0038 C-    pkg STIC is not used
                0039         _BEGIN_MASTER(myThid)
                0040 C-    Track pkg activation status:
                0041 C     print a (weak) warning if data.stic is found
                0042          CALL PACKAGES_UNUSED_MSG( 'useSTIC', ' ', ' ' )
                0043         _END_MASTER(myThid)
                0044         RETURN
                0045       ENDIF
                0046 
                0047       _BEGIN_MASTER(myThid)
                0048 
                0049 C--   Default values for STIC
                0050 C-    file names for initial conditions:
                0051 C     the default topography should be the same as for pkg/shelfice, but
                0052 C     we allow different files and issue a warning. For the following
                0053 C     line to work, S/R SHELFICE_READPARMS needs to be called first.
                0054       STICdepthFile  = SHELFICEtopoFile
                0055       STIClengthFile = ' '
                0056 
                0057       WRITE(msgBuf,'(A)') 'STIC_READPARMS: opening data.stic'
                0058       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
                0059      &                    SQUEEZE_RIGHT, myThid )
                0060       CALL OPEN_COPY_DATA_FILE(
                0061      I                     'data.stic', 'STIC_READPARMS',
                0062      O                     iUnit,
                0063      I                     myThid )
                0064 
                0065 C     Read parameters from open data file
                0066       READ(UNIT=iUnit,NML=STIC_PARM01)
                0067       WRITE(msgBuf,'(A)')
                0068      &    'STIC_READPARMS: finished reading data.stic'
                0069       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
                0070      &                    SQUEEZE_RIGHT, myThid )
                0071 C     Close the open data file
                0072 #ifdef SINGLE_DISK_IO
                0073       CLOSE(iUnit)
                0074 #else
                0075       CLOSE(iUnit,STATUS='DELETE')
                0076 #endif /* SINGLE_DISK_IO */
                0077 
                0078       _END_MASTER(myThid)
                0079 
                0080 C--   Everyone else must wait for the parameters to be loaded
                0081       _BARRIER
                0082 
                0083       RETURN
                0084       END