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 3880 for trunk/NEMOGCM/NEMO – NEMO

Changeset 3880 for trunk/NEMOGCM/NEMO


Ignore:
Timestamp:
2013-04-22T11:01:39+02:00 (11 years ago)
Author:
cetlod
Message:

v3_5_alpha: bugfix on temporal interpolation of atmospheric pcO2, see ticket #1082

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zflx.F90

    r3481 r3880  
    109109         ! then the first atmospheric CO2 record read is at years(1) 
    110110         zyr_dec = REAL( nyear + nn_offset, wp ) + REAL( nday_year, wp ) / REAL( nyear_len(1), wp ) 
    111          jm = 2 
    112          DO WHILE( jm <= nmaxrec .AND. years(jm-1) < zyr_dec .AND. years(jm) >= zyr_dec ) ;  jm = jm + 1 ;  END DO 
     111         jm = 1 
     112         DO WHILE( jm <= nmaxrec .AND. years(jm) < zyr_dec ) ;  jm = jm + 1 ;  END DO 
    113113         iind = jm  ;   iindm1 = jm - 1 
    114114         zdco2dt = ( atcco2h(iind) - atcco2h(iindm1) ) / ( years(iind) - years(iindm1) + rtrn ) 
     
    196196      END DO 
    197197 
    198       t_oce_co2_flx = t_oce_co2_flx + glob_sum( oce_co2(:,:) )            ! Cumulative Total Flux of Carbon 
    199       t_atm_co2_flx = glob_sum( satmco2(:,:) * patm(:,:) * e1e2t(:,:) )   ! Total atmospheric pCO2 
     198      t_oce_co2_flx = t_oce_co2_flx + glob_sum( oce_co2(:,:) )      ! Cumulative Total Flux of Carbon 
     199      t_atm_co2_flx = glob_sum( satmco2(:,:) * e1e2t(:,:) )         ! Total atmospheric pCO2 
    200200 
    201201      IF(ln_ctl)   THEN  ! print mean trends (used for debugging) 
Note: See TracChangeset for help on using the changeset viewer.