Back to home page

MITgcm

 
 

    


File indexing completed on 2019-01-25 06:10:04 UTC

view on githubraw file Latest commit 88391fb6 on 2019-01-24 19:38:27 UTC
b2ea1d2979 Jean*0001 #include "ATM_PHYS_OPTIONS.h"
                0002 
                0003 C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
                0004 CBOP 0
                0005 C !ROUTINE: ATM_PHYS_READPARMS
                0006 
                0007 C !INTERFACE:
                0008       SUBROUTINE ATM_PHYS_READPARMS( myThid )
                0009 
                0010 C     !DESCRIPTION:
                0011 C     Initialize AtmPhys parameters and constants.
                0012 
                0013 C     !USES:
                0014       IMPLICIT NONE
                0015 #include "SIZE.h"
                0016 #include "EEPARAMS.h"
                0017 #include "PARAMS.h"
                0018 #include "ATM_PHYS_PARAMS.h"
                0019 
                0020 C     !INPUT PARAMETERS:
                0021       INTEGER myThid
                0022 CEOP
                0023 
                0024 #ifdef ALLOW_ATM_PHYS
                0025 
                0026 C     !LOCAL VARIABLES:
                0027 C     msgBuf     :: Informational/error message buffer
                0028 C     iUnit      :: Work variable for IO unit number
                0029       CHARACTER*(MAX_LEN_MBUF) msgBuf
                0030       INTEGER iUnit
0d5d00bd7f Jean*0031       INTEGER k
b2ea1d2979 Jean*0032 
                0033       NAMELIST /ATM_PHYS_PARM01/
                0034      &       atmPhys_addTendT, atmPhys_addTendS,
                0035      &       atmPhys_addTendU, atmPhys_addTendV,
0d5d00bd7f Jean*0036      &       atmPhys_tauDampUV, atmPhys_dampUVfac,
b2ea1d2979 Jean*0037      &       atmPhys_stepSST,
88391fb671 jm-c 0038      &       atmPhys_sstFile, atmPhys_qFlxFile, atmPhys_mxldFile,
                0039      &       atmPhys_albedoFile, atmPhys_ozoneFile
b2ea1d2979 Jean*0040 
                0041       _BEGIN_MASTER(myThid)
                0042 
ae4c29e0db Jean*0043       IF ( .NOT.useAtm_Phys ) THEN
                0044 C-    pkg ATM_PHYS is not used
                0045         _BEGIN_MASTER(myThid)
                0046 C-    Track pkg activation status:
                0047 C     print a (weak) warning if data.atm_phys is found
                0048          CALL PACKAGES_UNUSED_MSG( 'useAtm_Phys', ' ', ' ' )
                0049         _END_MASTER(myThid)
                0050         RETURN
                0051       ENDIF
                0052 
b2ea1d2979 Jean*0053 C--   Default values for ATM_PHYS
                0054       atmPhys_addTendT  = .TRUE.
                0055       atmPhys_addTendS  = .TRUE.
                0056       atmPhys_addTendU  = .TRUE.
                0057       atmPhys_addTendV  = .TRUE.
0d5d00bd7f Jean*0058       atmPhys_tauDampUV = 0. _d 0
                0059       DO k=1,Nr
                0060         atmPhys_dampUVfac(k) = 1. _d 0
                0061       ENDDO
b2ea1d2979 Jean*0062 C-    additional parameters:
                0063       atmPhys_stepSST   = .FALSE.
c9694dc201 Jean*0064       atmPhys_sstFile   = ' '
                0065       atmPhys_qFlxFile  = ' '
                0066       atmPhys_mxldFile  = ' '
                0067       atmPhys_albedoFile= ' '
88391fb671 jm-c 0068       atmPhys_ozoneFile = ' '
b2ea1d2979 Jean*0069 
                0070       WRITE(msgBuf,'(A)') 'ATM_PHYS_READPARMS: opening data.atm_phys'
                0071       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
                0072      &                    SQUEEZE_RIGHT, myThid )
                0073       CALL OPEN_COPY_DATA_FILE(
                0074      I                     'data.atm_phys', 'ATM_PHYS_READPARMS',
                0075      O                     iUnit,
                0076      I                     myThid )
                0077 
                0078 C     Read parameters from open data file
                0079       READ(UNIT=iUnit,NML=ATM_PHYS_PARM01)
                0080       WRITE(msgBuf,'(A)')
                0081      &    'ATM_PHYS_READPARMS: finished reading data.atm_phys'
                0082       CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
                0083      &                    SQUEEZE_RIGHT, myThid )
                0084 C     Close the open data file
7a77863887 Mart*0085 #ifdef SINGLE_DISK_IO
b2ea1d2979 Jean*0086       CLOSE(iUnit)
7a77863887 Mart*0087 #else
                0088       CLOSE(iUnit,STATUS='DELETE')
                0089 #endif /* SINGLE_DISK_IO */
b2ea1d2979 Jean*0090 
0d5d00bd7f Jean*0091       IF ( atmPhys_tauDampUV.LE.zeroRL ) THEN
                0092        DO k=1,Nr
                0093         atmPhys_dampUVfac(k) = 0. _d 0
                0094        ENDDO
                0095       ELSE
                0096        DO k=1,Nr
                0097         atmPhys_dampUVfac(k) = atmPhys_dampUVfac(k)/atmPhys_tauDampUV
                0098        ENDDO
                0099       ENDIF
                0100 
b2ea1d2979 Jean*0101 C     Make sure that we locally honor the global MNC on/off flag
                0102 c     myPa_MNC = myPa_MNC .AND. useMNC
                0103 #ifndef ALLOW_MNC
                0104 C     Fix to avoid running without getting any output:
                0105 c     myPa_MNC = .FALSE.
                0106 #endif
                0107 c     myPa_MDSIO = (.NOT. myPa_MNC) .OR. outputTypesInclusive
                0108 
                0109       _END_MASTER(myThid)
                0110 
                0111 C--   Everyone else must wait for the parameters to be loaded
                0112       _BARRIER
                0113 
                0114 #endif /* ALLOW_ATM_PHYS */
                0115 
                0116       RETURN
                0117       END