Back to home page

MITgcm

 
 

    


File indexing completed on 2018-03-02 18:38:20 UTC

view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
81fc45ec7e Davi*0001 #include "GCHEM_OPTIONS.h"
                0002 
                0003 CBOP
2fb4ee83b7 Jean*0004 C     !ROUTINE: CFC_READPARMS
                0005 C     !INTERFACE:
81fc45ec7e Davi*0006       SUBROUTINE CFC_READPARMS( myThid )
                0007 
                0008 C     !DESCRIPTION: \bv
                0009 C     *==========================================================*
                0010 C     | S/R CFC_READPARMS
                0011 C     | o Initialise and read cfc package parameters
                0012 C     *==========================================================*
                0013 C     \ev
                0014 
                0015 C     !USES:
                0016       IMPLICIT NONE
                0017 
                0018 C     === Global variables ===
                0019 #include "SIZE.h"
                0020 #include "EEPARAMS.h"
                0021 #include "PARAMS.h"
                0022 #include "CFC.h"
2fb4ee83b7 Jean*0023 #ifdef ALLOW_PTRACERS
                0024 # include "PTRACERS_SIZE.h"
                0025 # include "PTRACERS_PARAMS.h"
                0026 #endif
81fc45ec7e Davi*0027 
                0028 C     !INPUT/OUTPUT PARAMETERS:
                0029 C     === Routine arguments ===
                0030 C     myThid    :: My Thread Id. number
                0031       INTEGER myThid
                0032 CEOP
                0033 
                0034 #ifdef ALLOW_CFC
                0035 
                0036 C     === Local variables ===
                0037 C     msgBuf    :: Informational/error message buffer
                0038 C     iUnit     :: Work variable for IO unit number
                0039       CHARACTER*(MAX_LEN_MBUF) msgBuf
                0040       INTEGER iUnit
                0041 
                0042 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0043 
                0044       NAMELIST /CFC_FORCING/
2fb4ee83b7 Jean*0045      &          atmCFC_inpFile, atmCFC_recSepTime, atmCFC_timeOffset,
                0046      &          atmCFC_yNorthBnd, atmCFC_ySouthBnd,
9a5cf9751b Jean*0047      &          CFC_windFile, CFC_atmospFile, CFC_iceFile,
                0048      &          CFC_forcingPeriod, CFC_forcingCycle
81fc45ec7e Davi*0049 
                0050 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0051 
                0052       _BEGIN_MASTER(myThid)
                0053 
2fb4ee83b7 Jean*0054        atmCFC_inpFile    = 'cfc1112.atm'
                0055        atmCFC_recSepTime = 360. _d 0 * 86400. _d 0
                0056        atmCFC_timeOffset = UNSET_RL
                0057        atmCFC_yNorthBnd  =  10. _d 0
                0058        atmCFC_ySouthBnd  = -10. _d 0
9a5cf9751b Jean*0059        CFC_windFile  = ' '
                0060        CFC_atmospFile= ' '
                0061        CFC_iceFile   = ' '
81fc45ec7e Davi*0062 c default periodic forcing to same as for physics
9a5cf9751b Jean*0063        CFC_forcingPeriod = externForcingPeriod
                0064        CFC_forcingCycle  = externForcingCycle
81fc45ec7e Davi*0065 
                0066       WRITE(msgBuf,'(A)') ' CFC_READPARMS: opening data.cfc'
                0067       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
                0068      I                    SQUEEZE_RIGHT, myThid )
                0069 
                0070       CALL OPEN_COPY_DATA_FILE( 'data.cfc', 'CFC_READPARMS',
                0071      O                          iUnit, myThid )
                0072 
                0073 C--   Read parameters from open data file:
                0074 
                0075 C-    forcing filenames and parameters
                0076       READ(UNIT=iUnit,NML=CFC_FORCING)
                0077 
                0078       WRITE(msgBuf,'(A)')
                0079      &   ' CFC_READPARMS: finished reading data.cfc'
                0080       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
                0081      I                    SQUEEZE_RIGHT, myThid )
                0082 
                0083 C--   Close the open data file
7a77863887 Mart*0084 #ifdef SINGLE_DISK_IO
81fc45ec7e Davi*0085       CLOSE(iUnit)
7a77863887 Mart*0086 #else
                0087       CLOSE(iUnit,STATUS='DELETE')
                0088 #endif /* SINGLE_DISK_IO */
81fc45ec7e Davi*0089 
2fb4ee83b7 Jean*0090       IF ( atmCFC_timeOffset .EQ. UNSET_RL ) THEN
                0091 C-    Assume that cfcTime=0 corresponds to the beginning of the 1rst record
                0092 C     time-period. This is consistent with 1rst record value = time-averaged
                0093 C     atmos-CFC over time period: cfcTime= 0 to cfcTime= 1 x atmCFC_recSepTime
                0094 C-    To reproduce previous time interpolation (formerly in cfc12_forcing.F),
                0095 C     set default timeOffset according to PTRACERS_Iter0 :
                0096         atmCFC_timeOffset = atmCFC_recSepTime
                0097      &                     - deltaTClock*PTRACERS_Iter0
                0098       ENDIF
                0099 
                0100       CFC_monFreq = 0. _d 0
                0101       IF ( debugLevel.GE.debLevB ) CFC_monFreq = PTRACERS_monitorFreq
                0102 
81fc45ec7e Davi*0103       _END_MASTER(myThid)
                0104 
                0105 C--   Everyone else must wait for the parameters to be loaded
                0106       _BARRIER
                0107 
                0108 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0109 
                0110 #endif /* ALLOW_CFC */
                0111 
                0112       RETURN
                0113       END