New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 9374 for branches/NERC/dev_r5518_GO6_CO2_cmip/NEMOGCM/NEMO – NEMO

Ignore:
Timestamp:
2018-03-06T13:35:36+01:00 (6 years ago)
Author:
jpalmier
Message:

JPALM -- 06-03-2018 -- corrections after review suggestions ; see GMED 380 - comment 22

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  
    4444      !! ** Method  : - Read the namcfc namelist and check the parameter values 
    4545      !!---------------------------------------------------------------------- 
    46       INTEGER  ::  ji, jj, jn, jl, jm, js, io, ierr 
     46      INTEGER  ::  ji, jj, jn, jl, jm, js, io, iostatus, ierr 
    4747      INTEGER  ::  iskip = 7   ! number of 1st descriptor lines 
    4848      REAL(wp) ::  zyy, zyd 
     
    5757       
    5858      CALL ctl_opn( inum, clname, 'OLD', 'FORMATTED', 'SEQUENTIAL', -1, numout, .FALSE. ) 
    59       REWIND(inum) 
    6059       
    6160      ! compute the number of year in the file 
    6261      ! file starts in 1931 do jn represent the year in the century 
     62      iostatus = 0 
    6363      jn = 31  
    64       DO  
    65         READ(inum,'(1x)',END=100)  
     64      DO WHILE ( iostatus == 0 ) 
     65        READ(inum,'(1x)', IOSTAT=iostatus, END=100) 
    6666        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 
    6874 100  jpyear = jn - 1 - iskip 
    6975      IF ( lwp) WRITE(numout,*) '    ', jpyear ,' years read' 
     
    7278      ALLOCATE( p_cfc(jpyear,jphem,3), STAT=ierr ) 
    7379      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 
    7582      ENDIF 
    7683      IF( trc_sms_cfc_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'trc_ini_cfc: unable to allocate CFC arrays' ) 
     
    101108      ! file starts in 1931 do jn represent the year in the century.jhh 
    102109      ! 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), & 
    106112             & p_cfc(jn,1,3), p_cfc(jn,2,1),  & 
    107113             & 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 
    110120      END DO 
    111121 
  • branches/NERC/dev_r5518_GO6_CO2_cmip/NEMOGCM/NEMO/TOP_SRC/MEDUSA/air_sea.F90

    r9344 r9374  
    6767# endif 
    6868      USE in_out_manager,    ONLY: lwp, numout 
    69       USE oce,               ONLY: PCO2a_in_cpl 
    7069      USE par_kind,          ONLY: wp 
    7170      USE par_oce,           ONLY: jpi, jpim1, jpj, jpjm1 
    72       USE sbc_oce,           ONLY: fr_i, lk_oasis, qsr, wndm 
     71      USE sbc_oce,           ONLY: fr_i, qsr, wndm 
    7372      USE sms_medusa,        ONLY: jdms, jdms_input, jdms_model,          & 
    7473                                   jriver_alk, jriver_c,                  & 
     
    152151            !! OPEN wet point IF..THEN loop 
    153152            IF (tmask(ji,jj,1) == 1) then 
    154                IF (lk_oasis) THEN 
    155                   !!! Jpalm test on atm xCO2 
    156                   IF ( (f_xco2a(ji,jj) .GT. 10000.0 ).OR.(f_xco2a(ji,jj) .LE. 0.0 ) ) THEN 
    157                     IF(lwp) THEN  
    158                        WRITE(numout,*) ' atm xCO2 = ',f_xco2a(ji,jj),          & 
    159                                        ' -- ji =', mig(ji),' jj = ', mjg(jj) 
    160                     ENDIF 
    161                     CALL ctl_stop( 'MEDUSA - Air-Sea :', 'unrealistic coupled atm xCO2 ' ) 
    162                  ENDIF  
    163                ENDIF 
    164153               !! 
    165154               !! AXY (23/06/15): as part of an effort to update the  
     
    264253               !!       Enormous dpco2 - even if all carb chem caract are OK. 
    265254               !!       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 
    267258               !!=================== 
    268259               !!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  
    303303             WRITE(numout,*) '** MEDUSA Atm xCO2 given by the UM **' 
    304304         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         !!---  
    305326      ELSEIF (lk_pi_co2) THEN 
    306327         !! OCMIP pre-industrial xCO2 
Note: See TracChangeset for help on using the changeset viewer.