Back to home page

MITgcm

 
 

    


File indexing completed on 2021-11-10 06:15:37 UTC

view on githubraw file Latest commit deacece5 on 2021-11-09 17:35:09 UTC
510778fc01 Mart*0001 #include "EXF_OPTIONS.h"
                0002 
deacece587 Oliv*0003 CBOP
                0004 C !ROUTINE: exf_GetYearlyFieldName
510778fc01 Mart*0005 
deacece587 Oliv*0006 C !INTERFACE:
                0007       SUBROUTINE exf_GetYearlyFieldName(
                0008      I     useYearlyFields, twoDigitYear, genperiod, year, genfile,
                0009      O     genfileout,
                0010      I     myTime, myIter, myThid )
                0011 
                0012 C     !DESCRIPTION:
                0013 C     ==================================================================
                0014 C     o Determine actual name of forcing file including year extension
                0015 C
                0016 C     started: Martin Losch  24-Jan-2008
                0017 C     ==================================================================
                0018 
                0019 C     !USES:
                0020       IMPLICIT NONE
                0021 C     == Global variables ===
                0022 
                0023 C     !INPUT PARAMETERS:
                0024       LOGICAL useYearlyFields
                0025       LOGICAL twoDigitYear
510778fc01 Mart*0026       _RL     genperiod
deacece587 Oliv*0027       INTEGER year
                0028       CHARACTER*(128) genfile
                0029       _RL     myTime
                0030       INTEGER myIter
                0031       INTEGER myThid
510778fc01 Mart*0032 
deacece587 Oliv*0033 C     !OUTPUT PARAMETERS:
                0034       CHARACTER*(128) genfileout
510778fc01 Mart*0035 
deacece587 Oliv*0036 #ifdef ALLOW_EXF
                0037 C     !FUNCTIONS:
                0038       INTEGER  ILNBLNK
                0039       EXTERNAL ILNBLNK
                0040 
                0041 C     !LOCAL VARIABLES:
                0042       INTEGER yearLoc
                0043       INTEGER il
                0044 CEOP
                0045 
                0046       IF ( useYearlyFields .AND. genperiod.NE.-12 ) THEN
                0047 C     Complete filename with YR or _YEAR extension
                0048        il = ILNBLNK( genfile )
                0049        IF ( twoDigitYear) THEN
510778fc01 Mart*0050         yearLoc = year-1900
deacece587 Oliv*0051         IF ( year.GE.2000 ) yearLoc = year - 2000
                0052         WRITE(genfileout(1:128),'(A,I2.2)') genfile(1:il), yearLoc
                0053        ELSE
                0054         WRITE(genfileout(1:128),'(2A,I4.4)') genfile(1:il), '_', year
                0055        ENDIF
                0056       ELSE
510778fc01 Mart*0057        genfileout = genfile
deacece587 Oliv*0058       ENDIF
                0059 
                0060 #endif /* ALLOW_EXF */
                0061       RETURN
                0062       END