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 9238 for branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsbc.F90 – NEMO

Ignore:
Timestamp:
2018-01-15T17:49:43+01:00 (6 years ago)
Author:
cetlod
Message:

v3.6 stable : bugfix on PISCES, see ticket #2003

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/nemo_v3_6_STABLE/NEMOGCM/NEMO/TOP_SRC/PISCES/P4Z/p4zsbc.F90

    r7522 r9238  
    118118            CALL fld_read( kt, 1, sf_dust ) 
    119119            IF( nn_ice_tr == -1 .AND. .NOT. ln_ironice ) THEN 
    120                dust(:,:) = sf_dust(1)%fnow(:,:,1) 
     120               dust(:,:) = MAX( rtrn, sf_dust(1)%fnow(:,:,1) ) 
    121121            ELSE 
    122                dust(:,:) = sf_dust(1)%fnow(:,:,1) * ( 1.0 - fr_i(:,:) ) 
     122               dust(:,:) = MAX( rtrn, sf_dust(1)%fnow(:,:,1) ) * ( 1.0 - fr_i(:,:) )  
    123123            ENDIF 
    124124         ENDIF 
     
    158158      ! Compute N deposition at nit000 or only if there is more than 1 time record in N deposition file 
    159159      IF( ln_ndepo ) THEN 
     160         ! from kg m-2 s-1 to molC l-1 s-1 
    160161         IF( kt == nit000 .OR. ( kt /= nit000 .AND. ntimes_ndep > 1 ) ) THEN 
    161              zcoef = rno3 * 14E6 * ryyss 
     162             zcoef = 14. * rno3 
    162163             CALL fld_read( kt, 1, sf_ndepo ) 
    163              nitdep(:,:) = sf_ndepo(1)%fnow(:,:,1) / zcoef / fse3t(:,:,1)  
     164             nitdep(:,:) = MAX( rtrn, sf_ndepo(1)%fnow(:,:,1) ) / zcoef / fse3t(:,:,1)  
    164165         ENDIF 
    165166         IF( lk_vvl ) THEN 
    166            zcoef = rno3 * 14E6 * ryyss 
    167            nitdep(:,:) = sf_ndepo(1)%fnow(:,:,1) / zcoef / fse3t(:,:,1)  
     167           zcoef = 14. * rno3 
     168           nitdep(:,:) = MAX ( rtrn, sf_ndepo(1)%fnow(:,:,1) ) / zcoef / fse3t(:,:,1)  
    168169         ENDIF 
    169170      ENDIF 
     
    229230            WRITE(numout,*) ' Specify your sea ice iron concentration in nampisice instead ' 
    230231            WRITE(numout,*) ' ln_ironice is forced to .FALSE. ' 
    231             ln_ironice = .FALSE. 
    232          ENDIF 
     232         ENDIF 
     233         ln_ironice = .FALSE. 
    233234      ENDIF 
    234235 
     
    283284            ! Get total input dust ; need to compute total atmospheric supply of Si in a year 
    284285            CALL iom_open (  TRIM( sn_dust%clname ) , numdust ) 
    285             CALL iom_gettime( numdust, zsteps, kntime=ntimes_dust)  ! get number of record in file 
    286             ALLOCATE( zdust(jpi,jpj,ntimes_dust) ) 
    287             DO jm = 1, ntimes_dust 
    288                CALL iom_get( numdust, jpdom_data, TRIM( sn_dust%clvar ), zdust(:,:,jm), jm ) 
    289             END DO 
    290             CALL iom_close( numdust ) 
    291             ztimes_dust = 1._wp / FLOAT( ntimes_dust )  
    292             sumdepsi = 0.e0 
    293             DO jm = 1, ntimes_dust 
    294                sumdepsi = sumdepsi + glob_sum( zdust(:,:,jm) * e1e2t(:,:) * tmask(:,:,1) * ztimes_dust ) 
    295             ENDDO 
    296             sumdepsi = sumdepsi / ( nyear_len(1) * rday ) * 12. * 8.8 * 0.075 * mfrac / 28.1  
    297             DEALLOCATE( zdust) 
    298          ENDIF 
    299       ELSE 
    300          sumdepsi  = 0._wp 
     286            CALL iom_gettime( numdust, zsteps, kntime=ntimes_dust)  ! get number of record in file` 
     287         ENDIF 
    301288      END IF 
    302289 
     
    395382            CALL iom_open ( TRIM( sn_ndepo%clname ), numdepo ) 
    396383            CALL iom_gettime( numdepo, zsteps, kntime=ntimes_ndep) 
    397             ALLOCATE( zndepo(jpi,jpj,ntimes_ndep) ) 
    398             DO jm = 1, ntimes_ndep 
    399                CALL iom_get( numdepo, jpdom_data, TRIM( sn_ndepo%clvar ), zndepo(:,:,jm), jm ) 
    400             END DO 
    401             CALL iom_close( numdepo ) 
    402             ztimes_ndep = 1._wp / FLOAT( ntimes_ndep )  
    403             nitdepinput = 0._wp 
    404             DO jm = 1, ntimes_ndep 
    405               nitdepinput = nitdepinput + glob_sum( zndepo(:,:,jm) * e1e2t(:,:) * tmask(:,:,1) * ztimes_ndep ) 
    406             ENDDO 
    407             nitdepinput = nitdepinput / rno3 / 14E6  
    408             DEALLOCATE( zndepo) 
    409          ENDIF 
    410       ELSE 
    411          nitdepinput = 0._wp 
     384         ENDIF 
    412385      ENDIF 
    413386 
     
    496469         WRITE(numout,*) '    DIC Supply : ', rivdicinput*1E3*12./1E12,'TgC/yr' 
    497470         WRITE(numout,*)  
    498          WRITE(numout,*) '    Total input of elements from atmospheric supply' 
    499          WRITE(numout,*) '    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' 
    500          WRITE(numout,*) '    N Supply   : ', nitdepinput*rno3*1E3/1E12*14.,' TgN/yr' 
    501          WRITE(numout,*)  
    502471      ENDIF 
    503472      ! 
Note: See TracChangeset for help on using the changeset viewer.