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 10780 – NEMO

Changeset 10780


Ignore:
Timestamp:
2019-03-20T18:53:44+01:00 (5 years ago)
Author:
aumont
Message:

bug fixes corresponding to tickets #2262

Location:
NEMO/releases/release-4.0/src/TOP
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • NEMO/releases/release-4.0/src/TOP/PISCES/P4Z/p4zsbc.F90

    r10522 r10780  
    2727   LOGICAL , PUBLIC ::   ln_ironsed   !: boolean for Fe input from sediments 
    2828   LOGICAL , PUBLIC ::   ln_hydrofe   !: boolean for Fe input from hydrothermal vents 
    29    LOGICAL , PUBLIC ::   ln_ironice   !: boolean for Fe input from sea ice 
    3029   REAL(wp), PUBLIC ::   sedfeinput   !: Coastal release of Iron 
    3130   REAL(wp), PUBLIC ::   dustsolub    !: Solubility of the dust 
     
    109108         IF( kt == nit000 .OR. ( kt /= nit000 .AND. ntimes_dust > 1 ) ) THEN 
    110109            CALL fld_read( kt, 1, sf_dust ) 
    111             IF( nn_ice_tr == -1 .AND. .NOT.ln_ironice ) THEN   ;   dust(:,:) = MAX( rtrn, sf_dust(1)%fnow(:,:,1) ) 
    112             ELSE                                               ;   dust(:,:) = MAX( rtrn, sf_dust(1)%fnow(:,:,1) * ( 1.-fr_i(:,:) ) ) 
    113             ENDIF 
     110            dust(:,:) = MAX( rtrn, sf_dust(1)%fnow(:,:,1) ) * ( 1.0 - fr_i(ji,jj) ) 
    114111         ENDIF 
    115112      ENDIF 
     
    265262      END IF 
    266263 
    267       IF( nn_ice_tr >= 0 .AND. ln_ironice ) THEN 
    268          IF(lwp) THEN 
    269             WRITE(numout,*) '   ==>>>   ln_ironice incompatible with nn_ice_tr = ', nn_ice_tr 
    270             WRITE(numout,*) '           Specify your sea ice iron concentration in nampisice instead ' 
    271             WRITE(numout,*) '           ln_ironice is forced to .FALSE. ' 
    272          ENDIF 
    273          ln_ironice = .FALSE. 
    274       ENDIF 
    275  
    276264      IF( ln_dust .OR. ln_river .OR. ln_ndepo ) THEN   ;   ll_sbc = .TRUE. 
    277265      ELSE                                             ;   ll_sbc = .FALSE. 
  • NEMO/releases/release-4.0/src/TOP/PISCES/P4Z/p4zsed.F90

    r10425 r10780  
    5353      INTEGER  ::  ji, jj, jk, ikt 
    5454      REAL(wp) ::  zrivalk, zrivsil, zrivno3 
    55       REAL(wp) ::  zwflux, zfminus, zfplus 
    56       REAL(wp) ::  zlim, zfact, zfactcal 
     55      REAL(wp) ::  zwflux, zlim, zfact, zfactcal 
    5756      REAL(wp) ::  zo2, zno3, zflx, zpdenit, z1pdenit, zolimit 
    5857      REAL(wp) ::  zsiloss, zcaloss, zws3, zws4, zwsc, zdep 
     
    104103               zdep    = rfact2 / e3t_n(ji,jj,1) 
    105104               zwflux  = fmmflx(ji,jj) / 1000._wp 
    106                zfminus = MIN( 0._wp, -zwflux ) * trb(ji,jj,1,jpfer) * zdep 
    107                zfplus  = MAX( 0._wp, -zwflux ) * icefeinput * zdep 
    108                zironice(ji,jj) =  zfplus + zfminus 
     105               zironice(ji,jj) =  MAX( -0.99 * trb(ji,jj,1,jpfer), -zwflux * icefeinput * zdep ) 
    109106            END DO 
    110107         END DO 
  • NEMO/releases/release-4.0/src/TOP/PISCES/sms_pisces.F90

    r10425 r10780  
    6767   !!* Mass conservation 
    6868   LOGICAL  ::  ln_check_mass      !: Flag to check mass conservation 
     69   LOGICAL , PUBLIC ::   ln_ironice   !: boolean for Fe input from sea ice 
    6970 
    7071   !!*  Biological fluxes for light : variables shared by pisces & lobster 
  • NEMO/releases/release-4.0/src/TOP/PISCES/trcice_pisces.F90

    r10213 r10780  
    266266      zpisc(jpgon,4) =  1.05e-8_wp 
    267267      zpisc(jpgop,4) =  1.05e-8_wp 
    268   
     268! 
     269!     ln_ironice and tracers in seaice are redundant. Thus, if tracers in ice 
     270!     is activated, ln_ironice should be set to false 
     271!     ------------------------------------------------------------------------ 
     272      IF( nn_ice_tr >= 0 .AND. ln_ironice ) THEN 
     273         IF(lwp) THEN 
     274            WRITE(numout,*) '   ==>>>   ln_ironice incompatible with nn_ice_tr = ', nn_ice_tr 
     275            WRITE(numout,*) '           Specify your sea ice iron concentration in nampisice instead ' 
     276            WRITE(numout,*) '           ln_ironice is forced to .FALSE. ' 
     277         ENDIF 
     278         ln_ironice = .FALSE. 
     279      ENDIF 
     280!  
    269281      DO jn = jp_pcs0, jp_pcs1 
    270282         IF( cn_trc_o(jn) == 'GL ' ) trc_o(:,:,jn) = zpisc(jn,1)  ! Global case 
     
    310322            trc_i(:,:,jn) = trc_ice_prescr(jn) 
    311323         ENDIF 
    312         
    313324         !-- Baltic 
    314325         IF( cn_cfg == "orca" .OR. cn_cfg == "ORCA" ) THEN      
     
    318329                     trc_i(:,:,jn) = zratio(jn,2) * trc_o(:,:,jn)  
    319330               END WHERE 
    320             ELSE                                 ! prescribed tracer concentration in ice 
    321                WHERE( 14._wp <= glamt(:,:) .AND. glamt(:,:) <= 32._wp .AND.    & 
    322                    54._wp <= gphit(:,:) .AND. gphit(:,:) <= 66._wp ) 
    323                      trc_i(:,:,jn) = trc_ice_prescr(jn) 
    324                END WHERE 
    325             ENDIF ! trc_ice_ratio 
     331            ENDIF 
    326332         ENDIF 
    327333      ! 
  • NEMO/releases/release-4.0/src/TOP/TRP/trcsbc.F90

    r10425 r10780  
    6161      ! 
    6262      INTEGER  ::   ji, jj, jn                      ! dummy loop indices 
    63       REAL(wp) ::   zse3t, zrtrn, zratio, zfact     ! local scalars 
    64       REAL(wp) ::   zftra, zcd, zdtra, ztfx, ztra   !   -      - 
     63      REAL(wp) ::   zse3t, zrtrn, zfact     ! local scalars 
     64      REAL(wp) ::   zftra, zdtra, ztfx, ztra   !   -      - 
    6565      CHARACTER (len=22) :: charout 
    6666      REAL(wp), DIMENSION(jpi,jpj)   ::   zsfx 
     
    113113 
    114114      ! 0. initialization 
    115       IF( nn_ice_tr == -1 ) THEN    ! No tracers in sea ice (null concentration in sea ice) 
     115      SELECT CASE ( nn_ice_tr ) 
     116 
     117      CASE ( -1 ) ! No tracers in sea ice (null concentration in sea ice) 
    116118         ! 
    117119         DO jn = 1, jptra 
     
    123125         END DO 
    124126         ! 
    125        ELSE 
     127      CASE ( 0 )  ! Same concentration in sea ice and in the ocean 
     128         ! 
     129         DO jn = 1, jptra 
     130            DO jj = 2, jpj 
     131               DO ji = fs_2, fs_jpim1   ! vector opt. 
     132                  sbc_trc(ji,jj,jn) = ( zsfx(ji,jj) + fmmflx(ji,jj) ) * r1_rau0 * trn(ji,jj,1,jn) 
     133               END DO 
     134            END DO 
     135         END DO 
     136         ! 
     137      CASE ( 1 )  ! Specific treatment of sea ice fluxes with an imposed concentration in sea ice  
    126138         ! 
    127139         DO jn = 1, jptra 
     
    131143                  ! tracer flux at the ice/ocean interface (tracer/m2/s) 
    132144                  zftra = - trc_i(ji,jj,jn) * fmmflx(ji,jj) ! uptake of tracer in the sea ice 
    133                   zcd   =   trc_o(ji,jj,jn) * fmmflx(ji,jj) ! concentration dilution due to freezing-melting, 
    134145                  !                                         ! only used in the levitating sea ice case 
    135146                  ! tracer flux only       : add concentration dilution term in net tracer flux, no F-M in volume flux 
    136147                  ! tracer and mass fluxes : no concentration dilution term in net tracer flux, F-M term in volume flux 
    137                   ztfx  = zftra                             ! net tracer flux 
     148                  ztfx  = zftra                        ! net tracer flux 
    138149                  ! 
    139                   zdtra = r1_rau0 * ( ztfx + zsfx(ji,jj) * trn(ji,jj,1,jn) )  
     150                  zdtra = r1_rau0 * ( ztfx + ( zsfx(ji,jj) + fmmflx(ji,jj) ) * trn(ji,jj,1,jn) )  
    140151                  IF ( zdtra < 0. ) THEN 
    141                      zratio = -zdtra * zse3t * r2dttrc / ( trn(ji,jj,1,jn) + zrtrn ) 
    142                      zdtra = MIN(1.0, zratio) * zdtra ! avoid negative concentrations to arise 
     152                     zdtra  = MAX(zdtra, -trn(ji,jj,1,jn) * e3t_n(ji,jj,1) / r2dttrc )   ! avoid negative concentrations to arise 
    143153                  ENDIF 
    144154                  sbc_trc(ji,jj,jn) =  zdtra  
     
    146156            END DO 
    147157         END DO 
    148       ENDIF 
     158      END SELECT 
    149159      ! 
    150160      CALL lbc_lnk( 'trcsbc', sbc_trc(:,:,:), 'T', 1. ) 
  • NEMO/releases/release-4.0/src/TOP/TRP/trcsink.F90

    r10376 r10780  
    8181            END DO 
    8282         END DO 
    83          iiter(ji,jj) = MIN( iiter(ji,jj), nitermax ) 
     83         iiter(:,:) = MIN( iiter(:,:), nitermax ) 
    8484      ENDIF 
    8585 
Note: See TracChangeset for help on using the changeset viewer.