- Timestamp:
- 2018-11-13T18:21:16+01:00 (6 years ago)
- Location:
- branches/UKMO/dev_r5518_GO6_package_FOAMv14/NEMOGCM/NEMO/TOP_SRC/CFC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_GO6_package_FOAMv14/NEMOGCM/NEMO/TOP_SRC/CFC/trcini_cfc.F90
r8280 r10302 44 44 !! ** Method : - Read the namcfc namelist and check the parameter values 45 45 !!---------------------------------------------------------------------- 46 INTEGER :: ji, jj, jn, jl, jm, js, io, i err46 INTEGER :: ji, jj, jn, jl, jm, js, io, iostatus, ierr 47 47 INTEGER :: iskip = 7 ! number of 1st descriptor lines 48 48 REAL(wp) :: zyy, zyd … … 57 57 58 58 CALL ctl_opn( inum, clname, 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 59 REWIND(inum)60 59 61 60 ! compute the number of year in the file 62 61 ! file starts in 1931 do jn represent the year in the century 62 iostatus = 0 63 63 jn = 31 64 DO 65 READ(inum,'(1x)', END=100)64 DO WHILE ( iostatus == 0 ) 65 READ(inum,'(1x)', IOSTAT=iostatus, END=100) 66 66 jn = jn + 1 67 END DO 67 ENDDO 68 IF( iostatus .NE. 0 ) THEN 69 !! Error while reading CFC input file 70 CALL ctl_stop('trc_ini_cfc: & 71 & Error on the 1st reading of cfc1112sf6.atm') 72 RETURN 73 ENDIF 68 74 100 jpyear = jn - 1 - iskip 69 75 IF ( lwp) WRITE(numout,*) ' ', jpyear ,' years read' … … 72 78 ALLOCATE( p_cfc(jpyear,jphem,3), STAT=ierr ) 73 79 IF( ierr > 0 ) THEN 74 CALL ctl_stop( 'trc_ini_cfc: unable to allocate p_cfc array' ) ; RETURN 80 CALL ctl_stop( 'trc_ini_cfc: unable to allocate p_cfc array' ) 81 RETURN 75 82 ENDIF 76 83 IF( trc_sms_cfc_alloc() /= 0 ) CALL ctl_stop( 'STOP', 'trc_ini_cfc: unable to allocate CFC arrays' ) … … 101 108 ! file starts in 1931 do jn represent the year in the century.jhh 102 109 ! Read file till the end 103 jn = 31104 DO110 DO jn = 31, jpyear 111 !!READ(inum, '(F6.1,6F7.2)', IOSTAT=io) zyy, p_cfc(jn,1,1), p_cfc(jn,1,2), & 105 112 READ(inum,*, IOSTAT=io) zyy, p_cfc(jn,1,1), p_cfc(jn,1,2), & 106 113 & p_cfc(jn,1,3), p_cfc(jn,2,1), & 107 114 & p_cfc(jn,2,2), p_cfc(jn,2,3) 108 IF( io < 0 ) exit 109 jn = jn + 1 115 IF( io .NE.0 ) THEN 116 !! Error while reading CFC input file 117 CALL ctl_stop('trc_ini_cfc: & 118 & Error on the 2nd reading of cfc1112sf6.atm') 119 RETURN 120 ENDIF 110 121 END DO 111 122 -
branches/UKMO/dev_r5518_GO6_package_FOAMv14/NEMOGCM/NEMO/TOP_SRC/CFC/trcsms_cfc.F90
r8442 r10302 24 24 USE trdtrc 25 25 USE iom ! I/O library 26 USE wrk_nemo 26 27 27 28 IMPLICIT NONE … … 54 55 REAL(wp) :: xconv3 = 1.0e+3 ! conversion from mol/l/atm to mol/m3/atm 55 56 REAL(wp) :: xconv4 = 1.0e-12 ! conversion from mol/m3/atm to mol/m3/pptv 57 58 !! trend temporary array: 59 REAL(wp), POINTER, DIMENSION(:,:,:) :: ztrcfc 56 60 57 61 !! * Substitutions … … 265 269 ! 266 270 IF( l_trdtrc ) THEN 271 CALL wrk_alloc( jpi, jpj, jpk, ztrcfc ) 267 272 DO jn = jp_cfc0, jp_cfc1 268 CALL trd_trc( tra(:,:,:,jn), jn, jptra_sms, kt ) ! save trends 273 ztrcfc(:,:,:) = tra(:,:,:,jn) 274 CALL trd_trc( ztrcfc, jn, jptra_sms, kt ) ! save trends 269 275 END DO 276 CALL wrk_dealloc( jpi, jpj, jpk, ztrcfc ) 270 277 END IF 271 278 !
Note: See TracChangeset
for help on using the changeset viewer.