Changeset 9298 for branches/NERC/dev_r5518_GO6_CO2_cmip/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcini_medusa.F90
- Timestamp:
- 2018-02-01T12:58:33+01:00 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/NERC/dev_r5518_GO6_CO2_cmip/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcini_medusa.F90
r9285 r9298 497 497 !! ** Method : - Read the xco2 file 498 498 !!---------------------------------------------------------------------- 499 INTEGER :: jn, j l, jm, io, ierr, inum499 INTEGER :: jn, jm, io, ierr, inum 500 500 INTEGER :: iskip = 4 ! number of 1st descriptor lines 501 REAL(wp) :: zyy501 REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:) :: zyy !: xCO2 record years 502 502 CHARACTER (len=10) :: clname = 'xco2.atm' !! atm CO2 record file 503 503 !!---------------------------------------------------------------------- … … 525 525 ! ! Allocate CO2 hist arrays 526 526 ierr = 0 527 ALLOCATE( hist_pco2(co2_rec), STAT=ierr )527 ALLOCATE( hist_pco2(co2_rec),zyy(co2_rec), STAT=ierr ) 528 528 IF( ierr > 0 ) THEN 529 529 CALL ctl_stop( 'trc_ini_medusa_co2atm: unable to allocate array' ) ; RETURN … … 540 540 jn = 1 541 541 DO 542 READ(inum,*, IOSTAT=io) zyy , hist_pco2(jn)542 READ(inum,*, IOSTAT=io) zyy(jn), hist_pco2(jn) 543 543 IF( io < 0 ) exit 544 IF(jn==1) co2_yinit = int(zyy)544 IF(jn==1) co2_yinit = zyy(jn) 545 545 jn = jn + 1 546 546 END DO 547 co2_yend = co2_yinit + co2_rec - 1547 co2_yend = co2_yinit + real(co2_rec) - 1. 548 548 549 549 IF(lwp) THEN ! Control print … … 553 553 WRITE(numout,*) ' Year xCO2 atm ' 554 554 DO jn = 1, co2_rec 555 jl = jn + co2_yinit - 1 556 WRITE(numout, '( 1I4, 6F9.2)') jl, hist_pco2(jn) 555 WRITE(numout, '( 5F7.1, 6F9.2)') zyy(jn), hist_pco2(jn) 557 556 END DO 558 557 ENDIF
Note: See TracChangeset
for help on using the changeset viewer.