Ir ao conteúdo
  • Cadastre-se

Noele Franchi

Membro Júnior
  • Posts

    1
  • Cadastrado em

  • Última visita

posts postados por Noele Franchi

  1. Olá Pessoal.. eu estou tentando compilar dois códigos no gfortran e nao estou conseguindo! 

    Alguém pode me ajudar? 

    Está aparecendo esse erro.. 

     

    $ gfortran try_read_co2atm.f

    Undefined symbols for architecture x86_64:

      "_read_co2atm_", referenced from:

          _MAIN__ in cce13Kjl.o

    ld: symbol(s) not found for architecture x86_64

    collect2: error: ld returned 1 exit status

     

          PROGRAM try_read_co2atm
    C     ------------------------------------------------------------------
    C     Test PROGRAM to READ historical atmospheric CO2 (uatm)
    C 
    
          IMPLICIT NONE 
    
          INTEGER maxrec, nmxr
          PARAMETER (maxrec=1200, nmxr=700)
    
          REAL yrco2rec(maxrec), atmco2rec(maxrec)
          INTEGER luco2, irec
          INTEGER nco2rec
          INTEGER is, ireadf
          INTEGER nsipl, nstab
    
          REAL futco2(nmxr,8)
          REAL dummy
    
          CALL read_co2atm('test', nco2rec, yrco2rec, atmco2rec)
    
          DO irec=1,nco2rec
            WRITE(*,'(2f8.2)') yrco2rec(irec),atmco2rec(irec)
          END DO
    
          STOP 
          END
          SUBROUTINE read_co2atm(futr_scen, nco2rec, yrco2rec, atmco2rec)
    
    C     ------------------------------------------------------------------
    C     Reads temporal history of atmospheric CO2 (uatm)
    C     ------------------------------------------------------------------
    C     ==================================================================
    C     Argument list -
    C     ===============
    C     Note: Variable TYPE is given in square brackets (below)
    C     (r-REAL, i-INTEGER, l-LOGICAL, c-CHARACTER; s-scaler, a-array).
    C     ===============
    C     INPUT:
    C     -------
    C     [cs]  futr_scen  = In OCMIP-3 - not used! (kept ONLY for consistency)
    C                        ----------
    C                        ----------
    C                        In OCMIP-2:- but this version of routine modified
    C                                     for OCMIP-2 USE version 1.2
    C                        -----------
    C                        IPCC future scenario: either S350, S450, S550,
    C                        S650, S750, DS450, or DS550 from Enting et al.
    C                        (1994), or CIS9 signifying c-IS92A for
    c                        IPCC (2000) run.  From 1765.0-2003.0, it 
    C                        doesn't matter which scenario you use, i.e., 
    C                        atmospheric CO2 will be the same (from a
    C                        spline fit to Siple Ice core and Mauna Loa
    C                        data.  Subsequently, atmospheric CO2 is 
    C                        different, according to the choice given above.
    C
    C     OUTPUT: 
    C     -------
    C     [is]  nco2rec    =  Number of records (years) for atmospheric CO2
    C                         from historical (splco2.dat) plus
    C                         future (stab.dat) records
    C     [ra]  yrco2rec   =  sequential list of times (in decimal years)
    C                         for WHEN atmospheric CO2 data is available
    C     [ra]  atmco2rec  =  corresponding sequential list of atmospheric 
    C                         co2 (ppm).
    C                         - OCMIP-2 record from Enting et al. (1994)
    C                         - OCMIP-3/NOCES record same UNTIL 1990.5,
    C                           THEN it is a 12-month running mean from the
    C                           GlobalView DATA for MLO         .
    C     ==================================================================
    C     
    C     Reference
    C     ---------
    C     Enting, I.G., T. M. L. Wigley, M. Heimann, 1994. Future emissions 
    C     and concentrations of carbon dioxide: key ocean / atmosphere / 
    C     land analyses, CSIRO Aust. Div. Atmos. Res., Tech. Pap. No. 31, 
    C     118 pp.
    C     ------------------------------------------------------------------
    C 
    
    C     James Orr, LSCE/CEA-CNRS, Saclay, France, 17 April 1999
    
          IMPLICIT NONE 
    
          INTEGER maxrec, nmxr
          PARAMETER (maxrec=1200, nmxr=700)
    
          REAL yrco2rec(maxrec), atmco2rec(maxrec)
          INTEGER luco2, irec
          INTEGER nco2rec
          INTEGER is, ireadf
          INTEGER nsipl, nstab
    
          REAL futco2(nmxr,8)
          REAL dummy
    
          CHARACTER*4 futr_scen
    
    C     OPEN FILE
    C     ---------
          luco2=50
          OPEN(luco2+1, FILE='splmlo_co2_noces.dat', FORM='formatted', 
         &     STATUS='old')
    C     --------------------------
    C     Get atmospheric CO2 data
    C     --------------------------
          WRITE(*,*)'  '
          WRITE(*,*)'--------------------------------------------------'
          WRITE(*,*)'Atm. CO2 from fit to Siple-Mauna Loa record'
          WRITE(*,*)'--------------------------------------------------'
    
    C     ----------------------------------
    C     READ historical co2 concentrations
    C     ----------------------------------
    C     READ(luco2+1,200)
    C 200  FORMAT(////)
    
          DO irec=1,maxrec
    C           Read from splco2.dat (historical emissions)
            READ(luco2+1,*,ERR=222,END=222)
         &      yrco2rec(irec),atmco2rec(irec)
            nco2rec = irec
          END DO
    
     222  CONTINUE
    
           WRITE(*,*) 'Atm. CO2:  No. of entries for 1-box atmosphere =',
         &            nco2rec
    
          CLOSE(luco2+1)
    
          RETURN
          END

     

Sobre o Clube do Hardware

No ar desde 1996, o Clube do Hardware é uma das maiores, mais antigas e mais respeitadas comunidades sobre tecnologia do Brasil. Leia mais

Direitos autorais

Não permitimos a cópia ou reprodução do conteúdo do nosso site, fórum, newsletters e redes sociais, mesmo citando-se a fonte. Leia mais

×
×
  • Criar novo...

Ebook grátis: Aprenda a ler resistores e capacitores!

EBOOK GRÁTIS!

CLIQUE AQUI E BAIXE AGORA MESMO!