Changeset 9374 for branches/NERC/dev_r5518_GO6_CO2_cmip/NEMOGCM/NEMO
- Timestamp:
- 2018-03-06T13:35:36+01:00 (6 years ago)
- Location:
- branches/NERC/dev_r5518_GO6_CO2_cmip/NEMOGCM/NEMO/TOP_SRC
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/NERC/dev_r5518_GO6_CO2_cmip/NEMOGCM/NEMO/TOP_SRC/CFC/trcini_cfc.F90
r8280 r9374 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 = 31 104 DO 105 READ(inum,*, IOSTAT=io) zyy, p_cfc(jn,1,1), p_cfc(jn,1,2), & 110 DO jn = 31, jpyear 111 READ(inum, '( F6.1, 6F7.2)', IOSTAT=io) zyy, p_cfc(jn,1,1), p_cfc(jn,1,2), & 106 112 & p_cfc(jn,1,3), p_cfc(jn,2,1), & 107 113 & p_cfc(jn,2,2), p_cfc(jn,2,3) 108 IF( io < 0 ) exit 109 jn = jn + 1 114 IF( io .NE.0 ) THEN 115 !! Error while reading CFC input file 116 CALL ctl_stop('trc_ini_cfc: & 117 & Error on the 2nd reading of cfc1112sf6.atm') 118 RETURN 119 ENDIF 110 120 END DO 111 121 -
branches/NERC/dev_r5518_GO6_CO2_cmip/NEMOGCM/NEMO/TOP_SRC/MEDUSA/air_sea.F90
r9344 r9374 67 67 # endif 68 68 USE in_out_manager, ONLY: lwp, numout 69 USE oce, ONLY: PCO2a_in_cpl70 69 USE par_kind, ONLY: wp 71 70 USE par_oce, ONLY: jpi, jpim1, jpj, jpjm1 72 USE sbc_oce, ONLY: fr_i, lk_oasis,qsr, wndm71 USE sbc_oce, ONLY: fr_i, qsr, wndm 73 72 USE sms_medusa, ONLY: jdms, jdms_input, jdms_model, & 74 73 jriver_alk, jriver_c, & … … 152 151 !! OPEN wet point IF..THEN loop 153 152 IF (tmask(ji,jj,1) == 1) then 154 IF (lk_oasis) THEN155 !!! Jpalm test on atm xCO2156 IF ( (f_xco2a(ji,jj) .GT. 10000.0 ).OR.(f_xco2a(ji,jj) .LE. 0.0 ) ) THEN157 IF(lwp) THEN158 WRITE(numout,*) ' atm xCO2 = ',f_xco2a(ji,jj), &159 ' -- ji =', mig(ji),' jj = ', mjg(jj)160 ENDIF161 CALL ctl_stop( 'MEDUSA - Air-Sea :', 'unrealistic coupled atm xCO2 ' )162 ENDIF163 ENDIF164 153 !! 165 154 !! AXY (23/06/15): as part of an effort to update the … … 264 253 !! Enormous dpco2 - even if all carb chem caract are OK. 265 254 !! and this check stops the model. 266 !! ==> let's run the model without it and see how it goes. 255 !! --Input checks are already more than enough to stop the 256 !! model if carb chem goes crazy. 257 !! we remove the mocsy output checks 267 258 !!=================== 268 259 !!IF ( (f_pco2w(ji,jj) > 1.E4 ).OR.(f_pco2w(ji,jj) < 0.0 ) .OR. & -
branches/NERC/dev_r5518_GO6_CO2_cmip/NEMOGCM/NEMO/TOP_SRC/MEDUSA/trcbio_medusa.F90
r9327 r9374 303 303 WRITE(numout,*) '** MEDUSA Atm xCO2 given by the UM **' 304 304 f_xco2a(:,:) = PCO2a_in_cpl(:,:) 305 !! Check the xCO2 from the UM is OK 306 !! piece of code moved from air-sea.F90 307 !!--- 308 DO jj = 2,jpjm1 309 DO ji = 2,jpim1 310 !! OPEN wet point IF..THEN loop 311 IF (tmask(ji,jj,1) == 1) then 312 !!! Jpalm test on atm xCO2 313 IF ( (f_xco2a(ji,jj) .GT. 10000.0 ).OR. & 314 (f_xco2a(ji,jj) .LE. 0.0 ) ) THEN 315 IF(lwp) THEN 316 WRITE(numout,*) ' atm xCO2 = ',f_xco2a(ji,jj), & 317 ' -- ji =', mig(ji),' jj = ', mjg(jj) 318 ENDIF 319 CALL ctl_stop( 'MEDUSA - Air-Sea :', & 320 'unrealistic coupled atm xCO2 ' ) 321 ENDIF 322 ENDIF 323 ENDDO 324 ENDDO 325 !!--- 305 326 ELSEIF (lk_pi_co2) THEN 306 327 !! OCMIP pre-industrial xCO2
Note: See TracChangeset
for help on using the changeset viewer.