Back to home page

MITgcm

 
 

    


File indexing completed on 2021-11-06 05:18:34 UTC

view on githubraw file Latest commit 016b84c4 on 2021-11-02 20:24:44 UTC
893df04db0 Mart*0001 #include "OPPS_OPTIONS.h"
                0002 
                0003 CBOP
                0004 C !ROUTINE: OPPS_READPARMS
                0005 
                0006 C !INTERFACE: ==========================================================
                0007       SUBROUTINE OPPS_READPARMS( myThid )
                0008 
                0009 C !DESCRIPTION:
                0010 C     Initialize OPPS parameters, read in data.opps
                0011 
                0012 C !USES: ===============================================================
                0013       IMPLICIT NONE
                0014 #include "SIZE.h"
                0015 #include "EEPARAMS.h"
                0016 #include "OPPS.h"
                0017 #include "PARAMS.h"
                0018 
                0019 C !INPUT PARAMETERS: ===================================================
                0020 C  myThid               :: thread number
                0021       INTEGER myThid
                0022 
                0023 C !OUTPUT PARAMETERS: ==================================================
                0024 C  none
                0025 
                0026 #ifdef ALLOW_OPPS
                0027 
                0028 C !LOCAL VARIABLES: ====================================================
98bf704dd5 Jean*0029 C  iUnit                :: unit number for I/O
                0030 C  msgBuf               :: message buffer
893df04db0 Mart*0031       INTEGER iUnit
                0032       CHARACTER*(MAX_LEN_MBUF) msgBuf
                0033 CEOP
                0034 
                0035       NAMELIST /OPPS_PARM01/
                0036      &     MAX_ABE_ITERATIONS,
                0037      &     OPPSdebugLevel,
98bf704dd5 Jean*0038      &     PlumeRadius,
893df04db0 Mart*0039      &     STABILITY_THRESHOLD,
                0040      &     FRACTIONAL_AREA,
98bf704dd5 Jean*0041      &     MAX_FRACTIONAL_AREA,
                0042      &     VERTICAL_VELOCITY,
893df04db0 Mart*0043      &     ENTRAINMENT_RATE,
016b84c482 Mart*0044      &     useGCMwVel
                0045 C     &     , OPPSwriteState, OPPSdumpFreq
893df04db0 Mart*0046 
ae4c29e0db Jean*0047 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0048 
                0049       IF ( .NOT.useOPPS ) THEN
                0050 C-    pkg OPPS is not used
                0051         _BEGIN_MASTER(myThid)
                0052 C-    Track pkg activation status:
                0053          OPPSisON = .FALSE.
                0054 C     print a (weak) warning if data.opps is found
                0055          CALL PACKAGES_UNUSED_MSG( 'useOPPS', ' ', ' ' )
                0056         _END_MASTER(myThid)
                0057         RETURN
                0058       ENDIF
                0059 
893df04db0 Mart*0060 C This routine has been called by the main model so we set our
                0061 C internal flag to indicate we are in business
ae4c29e0db Jean*0062       OPPSisON = .TRUE.
893df04db0 Mart*0063 
                0064 C Set defaults values for parameters in OPPS.h
                0065       MAX_ABE_ITERATIONS   =  1
                0066       OPPSdebugLevel       =  0
98bf704dd5 Jean*0067       PlumeRadius          = 100.   _d 0
                0068       STABILITY_THRESHOLD  =  -1.   _d -4
                0069       FRACTIONAL_AREA      =    .1  _d 0
                0070       MAX_FRACTIONAL_AREA  =    .8  _d 0
                0071       VERTICAL_VELOCITY    =    .03 _d 0
                0072       ENTRAINMENT_RATE     =   -.05 _d 0
893df04db0 Mart*0073       useGCMwVel           = .FALSE.
016b84c482 Mart*0074 C     OPPSdumpFreq         = dumpFreq
                0075 C     OPPSwriteState       = .FALSE.
893df04db0 Mart*0076 
                0077 C Open and read the data.opps file
                0078       _BEGIN_MASTER(myThid)
                0079       WRITE(msgBuf,'(A)') ' OPPS_READPARMS: opening data.opps'
                0080       CALL PRINT_MESSAGE(msgBuf, standardMessageUnit,
                0081      &                   SQUEEZE_RIGHT , 1)
                0082       CALL OPEN_COPY_DATA_FILE(
                0083      I                   'data.opps', 'OPPS_READPARMS',
                0084      O                   iUnit,
                0085      I                   myThid )
                0086       READ(UNIT=iUnit,NML=OPPS_PARM01)
                0087       WRITE(msgBuf,'(A)')
                0088      &  ' OPPS_READPARMS: finished reading data.opps'
                0089       CALL PRINT_MESSAGE(msgBuf, standardMessageUnit,
                0090      &                   SQUEEZE_RIGHT , 1)
                0091 
                0092 C Close the open data file
7a77863887 Mart*0093 #ifdef SINGLE_DISK_IO
893df04db0 Mart*0094       CLOSE(iUnit)
7a77863887 Mart*0095 #else
                0096       CLOSE(iUnit,STATUS='DELETE')
                0097 #endif /* SINGLE_DISK_IO */
893df04db0 Mart*0098       _END_MASTER(myThid)
                0099 
                0100 C Everyone else must wait for the parameters to be loaded
                0101       _BARRIER
                0102 
98bf704dd5 Jean*0103 C Now set-up any remaining parameters that result from the input parameters
893df04db0 Mart*0104       e2    =   2.*ENTRAINMENT_RATE
                0105 #endif /* ALLOW_OPPS */
                0106 
                0107       RETURN
                0108       END