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 2819 for branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/TOP_SRC/PISCES/p4zflx.F90 – NEMO

Ignore:
Timestamp:
2011-08-09T10:29:53+02:00 (13 years ago)
Author:
cetlod
Message:

Improvment of branch dev_r2787_LOCEAN3_TRA_TRP

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2011/dev_r2787_LOCEAN3_TRA_TRP/NEMOGCM/NEMO/TOP_SRC/PISCES/p4zflx.F90

    r2715 r2819  
    1717   !!   p4z_flx_init  :   Read the namelist 
    1818   !!---------------------------------------------------------------------- 
    19    USE trc 
    20    USE oce_trc         ! 
    21    USE trc 
    22    USE sms_pisces 
    23    USE prtctl_trc 
    24    USE p4zche 
    25    USE iom 
     19   USE oce_trc                      !  shared variables between ocean and passive tracers  
     20   USE trc                          !  passive tracers common variables 
     21   USE sms_pisces                   !  PISCES Source Minus Sink variables 
     22   USE p4zche                       !  Chemical model 
     23   USE prtctl_trc                   !  print control for debugging 
     24   USE iom                          !  I/O manager 
    2625#if defined key_cpl_carbon_cycle 
    27    USE sbc_oce , ONLY :  atm_co2 
     26   USE sbc_oce, ONLY :  atm_co2     !  atmospheric pCO2                
    2827#endif 
    2928 
     
    137136            ! Compute the piston velocity for O2 and CO2 
    138137            zkgwan = 0.3 * zws  + 2.5 * ( 0.5246 + 0.016256 * ztc + 0.00049946  * ztc2 ) 
     138            zkgwan = zkgwan * xconv * ( 1.- fr_i(ji,jj) ) * tmask(ji,jj,1) 
    139139# if defined key_degrad 
    140             zkgwan = zkgwan * xconv * ( 1.- fr_i(ji,jj) ) * tmask(ji,jj,1) * facvol(ji,jj,1) 
    141 #else 
    142             zkgwan = zkgwan * xconv * ( 1.- fr_i(ji,jj) ) * tmask(ji,jj,1) 
     140            zkgwan = zkgwan * facvol(ji,jj,1) 
    143141#endif  
    144142            ! compute gas exchange for CO2 and O2 
     
    161159            zflu16 = trn(ji,jj,1,jpoxy) * tmask(ji,jj,1) * zkgo2(ji,jj) 
    162160            tra(ji,jj,1,jpoxy) = tra(ji,jj,1,jpoxy) + ( zfld16 - zflu16 ) / fse3t(ji,jj,1) 
    163  
    164 #if defined key_diatrc  
    165             ! Save diagnostics 
    166 #  if ! defined key_iomput 
     161#if defined key_iomput 
     162            zoflx(ji,jj) = ( zfld16 - zflu16 ) * 1000. * tmask(ji,jj,1) 
     163            zkg  (ji,jj) = zkgco2(ji,jj) * tmask(ji,jj,1) 
     164            zdpco2(ji,jj) = ( satmco2(ji,jj) - zh2co3(ji,jj) / ( chemc(ji,jj,1) + rtrn ) ) * tmask(ji,jj,1) 
     165            zdpo2 (ji,jj) = ( atcox  - trn(ji,jj,1,jpoxy)    / ( chemc(ji,jj,2) + rtrn ) ) * tmask(ji,jj,1) 
     166# else 
    167167            zfact = 1. / e1e2t(ji,jj) / rfact 
    168168            trc2d(ji,jj,jp_pcs0_2d    ) = oce_co2(ji,jj) * zfact 
    169169            trc2d(ji,jj,jp_pcs0_2d + 1) = ( zfld16 - zflu16 ) * 1000. * tmask(ji,jj,1) 
    170170            trc2d(ji,jj,jp_pcs0_2d + 2) = zkgco2(ji,jj) * tmask(ji,jj,1) 
    171             trc2d(ji,jj,jp_pcs0_2d + 3) = ( satmco2(ji,jj) - zh2co3(ji,jj) / ( chemc(ji,jj,1) + rtrn ) ) & 
    172                &                            * tmask(ji,jj,1) 
    173 #  else 
    174             zoflx(ji,jj) = ( zfld16 - zflu16 ) * 1000. * tmask(ji,jj,1) 
    175             zkg  (ji,jj) = zkgco2(ji,jj) * tmask(ji,jj,1) 
    176             zdpco2(ji,jj) = ( satmco2(ji,jj) - zh2co3(ji,jj) / ( chemc(ji,jj,1) + rtrn ) ) * tmask(ji,jj,1) 
    177             zdpo2 (ji,jj) = ( atcox  - trn(ji,jj,1,jpoxy) / ( chemc(ji,jj,2) + rtrn ) ) * tmask(ji,jj,1) 
    178 #  endif 
    179 #endif 
     171            trc2d(ji,jj,jp_pcs0_2d + 3) = ( satmco2(ji,jj) - zh2co3(ji,jj) / ( chemc(ji,jj,1) + rtrn ) ) * tmask(ji,jj,1) 
     172# endif 
    180173         END DO 
    181174      END DO 
    182175 
    183       t_oce_co2_flx = t_oce_co2_flx + glob_sum( oce_co2(:,:) )                     ! Cumulative Total Flux of Carbon 
     176      t_oce_co2_flx = t_oce_co2_flx + glob_sum( oce_co2(:,:) )            ! Cumulative Total Flux of Carbon 
    184177      IF( kt == nitend ) THEN 
    185178         t_atm_co2_flx = glob_sum( satmco2(:,:) * e1e2t(:,:) )            ! Total atmospheric pCO2 
    186179         ! 
    187          t_oce_co2_flx = (-1.) * t_oce_co2_flx  * 12. / 1.e15                      ! Conversion in PgC ; negative for out of the ocean 
    188          t_atm_co2_flx = t_atm_co2_flx  / area                                     ! global mean of atmospheric pCO2 
     180         t_oce_co2_flx = (-1.) * t_oce_co2_flx  * 12. / 1.e15             ! Conversion in PgC ; negative for out of the ocean 
     181         t_atm_co2_flx = t_atm_co2_flx  / area                            ! global mean of atmospheric pCO2 
    189182         ! 
    190183         IF( lwp) THEN 
     
    205198      ENDIF 
    206199 
    207 # if defined key_diatrc && defined key_iomput 
    208       CALL iom_put( "Cflx" , oce_co2(:,:) / e1e2t(:,:) / rfact )  
    209       CALL iom_put( "Oflx" , zoflx  ) 
    210       CALL iom_put( "Kg"   , zkg    ) 
    211       CALL iom_put( "Dpco2", zdpco2 ) 
    212       CALL iom_put( "Dpo2" , zdpo2  ) 
    213 #endif 
     200      IF( ln_diatrc ) THEN 
     201         CALL iom_put( "Cflx" , oce_co2(:,:) / e1e2t(:,:) / rfact )  
     202         CALL iom_put( "Oflx" , zoflx  ) 
     203         CALL iom_put( "Kg"   , zkg    ) 
     204         CALL iom_put( "Dpco2", zdpco2 ) 
     205         CALL iom_put( "Dpo2" , zdpo2  ) 
     206      ENDIF 
    214207      ! 
    215208      IF( wrk_not_released(2, 1,2,3,4,5,6,7) )   CALL ctl_stop('p4z_flx: failed to release workspace arrays') 
     
    231224      !!---------------------------------------------------------------------- 
    232225      ! 
    233       REWIND( numnat )                     ! read numnat 
    234       READ  ( numnat, nampisext ) 
     226      REWIND( numnatp )                     ! read numnatp 
     227      READ  ( numnatp, nampisext ) 
    235228      ! 
    236229      IF(lwp) THEN                         ! control print 
Note: See TracChangeset for help on using the changeset viewer.