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 11949 for NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/PISCES/P4Z/p4zsbc.F90 – NEMO

Ignore:
Timestamp:
2019-11-22T15:29:17+01:00 (4 years ago)
Author:
acc
Message:

Merge in changes from 2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps. This just creates a fresh copy of this branch to use as the merge base. See ticket #2341

Location:
NEMO/branches/2019/dev_r11943_MERGE_2019/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src

    • Property svn:mergeinfo deleted
  • NEMO/branches/2019/dev_r11943_MERGE_2019/src/TOP/PISCES/P4Z/p4zsbc.F90

    r11536 r11949  
    8585CONTAINS 
    8686 
    87    SUBROUTINE p4z_sbc( kt ) 
     87   SUBROUTINE p4z_sbc( kt, Kmm ) 
    8888      !!---------------------------------------------------------------------- 
    8989      !!                  ***  routine p4z_sbc  *** 
     
    9797      !!---------------------------------------------------------------------- 
    9898      INTEGER, INTENT(in) ::   kt   ! ocean time step 
     99      INTEGER, INTENT(in) ::   Kmm  ! time level indices 
    99100      ! 
    100101      INTEGER  ::   ji, jj  
     
    174175             zcoef = 14. * rno3 
    175176             CALL fld_read( kt, 1, sf_ndepo ) 
    176              nitdep(:,:) = MAX( rtrn, sf_ndepo(1)%fnow(:,:,1) / zcoef / e3t_n(:,:,1) ) 
     177             nitdep(:,:) = MAX( rtrn, sf_ndepo(1)%fnow(:,:,1) / zcoef / e3t(:,:,1,Kmm) ) 
    177178         ENDIF 
    178179         IF( .NOT.ln_linssh ) THEN 
    179180            zcoef = 14. * rno3 
    180             nitdep(:,:) = MAX( rtrn, sf_ndepo(1)%fnow(:,:,1) / zcoef / e3t_n(:,:,1) ) 
     181            nitdep(:,:) = MAX( rtrn, sf_ndepo(1)%fnow(:,:,1) / zcoef / e3t(:,:,1,Kmm) ) 
    181182         ENDIF 
    182183      ENDIF 
     
    187188 
    188189 
    189    SUBROUTINE p4z_sbc_init 
     190   SUBROUTINE p4z_sbc_init( Kmm ) 
    190191      !!---------------------------------------------------------------------- 
    191192      !!                  ***  routine p4z_sbc_init  *** 
     
    199200      !! 
    200201      !!---------------------------------------------------------------------- 
     202      INTEGER, INTENT(in) ::   Kmm  ! time level indices 
    201203      INTEGER  :: ji, jj, jk, jm, ifpr 
    202204      INTEGER  :: ii0, ii1, ij0, ij1 
     
    274276      IF( l_offline ) THEN 
    275277        nk_rnf(:,:) = 1 
    276         h_rnf (:,:) = gdept_n(:,:,1) 
     278        h_rnf (:,:) = gdept(:,:,1,Kmm) 
    277279      ENDIF 
    278280 
     
    287289         ! 
    288290         ALLOCATE( sf_dust(1), STAT=ierr )           !* allocate and fill sf_sst (forcing structure) with sn_sst 
    289          IF( ierr > 0 )   CALL ctl_stop( 'STOP', 'p4z_sed_init: unable to allocate sf_dust structure' ) 
    290          ! 
    291          CALL fld_fill( sf_dust, (/ sn_dust /), cn_dir, 'p4z_sed_init', 'Atmospheric dust deposition', 'nampissed' ) 
     291         IF( ierr > 0 )   CALL ctl_stop( 'STOP', 'p4z_sbc_init: unable to allocate sf_dust structure' ) 
     292         ! 
     293         CALL fld_fill( sf_dust, (/ sn_dust /), cn_dir, 'p4z_sbc_init', 'Atmospheric dust deposition', 'nampissed' ) 
    292294                                   ALLOCATE( sf_dust(1)%fnow(jpi,jpj,1)   ) 
    293295         IF( sn_dust%ln_tint )     ALLOCATE( sf_dust(1)%fdta(jpi,jpj,1,2) ) 
     
    311313         ! 
    312314         ALLOCATE( sf_solub(1), STAT=ierr )           !* allocate and fill sf_sst (forcing structure) with sn_sst 
    313          IF( ierr > 0 )   CALL ctl_stop( 'STOP', 'p4z_sed_init: unable to allocate sf_solub structure' ) 
    314          ! 
    315          CALL fld_fill( sf_solub, (/ sn_solub /), cn_dir, 'p4z_sed_init', 'Solubility of atm. iron ', 'nampissed' ) 
     315         IF( ierr > 0 )   CALL ctl_stop( 'STOP', 'p4z_sbc_init: unable to allocate sf_solub structure' ) 
     316         ! 
     317         CALL fld_fill( sf_solub, (/ sn_solub /), cn_dir, 'p4z_sbc_init', 'Solubility of atm. iron ', 'nampissed' ) 
    316318                                   ALLOCATE( sf_solub(1)%fnow(jpi,jpj,1)   ) 
    317319         IF( sn_solub%ln_tint )    ALLOCATE( sf_solub(1)%fdta(jpi,jpj,1,2) ) 
     
    336338         rivinput(:) = 0._wp 
    337339 
    338          IF( ierr1 > 0 )   CALL ctl_stop( 'STOP', 'p4z_sed_init: unable to allocate sf_irver structure' ) 
    339          ! 
    340          CALL fld_fill( sf_river, slf_river, cn_dir, 'p4z_sed_init', 'Input from river ', 'nampissed' ) 
     340         IF( ierr1 > 0 )   CALL ctl_stop( 'STOP', 'p4z_sbc_init: unable to allocate sf_irver structure' ) 
     341         ! 
     342         CALL fld_fill( sf_river, slf_river, cn_dir, 'p4z_sbc_init', 'Input from river ', 'nampissed' ) 
    341343         DO ifpr = 1, jpriv 
    342344                                          ALLOCATE( sf_river(ifpr)%fnow(jpi,jpj,1  ) ) 
     
    385387         ! 
    386388         ALLOCATE( sf_ndepo(1), STAT=ierr3 )           !* allocate and fill sf_sst (forcing structure) with sn_sst 
    387          IF( ierr3 > 0 )   CALL ctl_stop( 'STOP', 'p4z_sed_init: unable to allocate sf_ndepo structure' ) 
    388          ! 
    389          CALL fld_fill( sf_ndepo, (/ sn_ndepo /), cn_dir, 'p4z_sed_init', 'Nutrient atmospheric depositon ', 'nampissed' ) 
     389         IF( ierr3 > 0 )   CALL ctl_stop( 'STOP', 'p4z_sbc_init: unable to allocate sf_ndepo structure' ) 
     390         ! 
     391         CALL fld_fill( sf_ndepo, (/ sn_ndepo /), cn_dir, 'p4z_sbc_init', 'Nutrient atmospheric depositon ', 'nampissed' ) 
    390392                                   ALLOCATE( sf_ndepo(1)%fnow(jpi,jpj,1)   ) 
    391393         IF( sn_ndepo%ln_tint )    ALLOCATE( sf_ndepo(1)%fdta(jpi,jpj,1,2) ) 
     
    441443            DO jj = 1, jpj 
    442444               DO ji = 1, jpi 
    443                   zexpide   = MIN( 8.,( gdept_n(ji,jj,jk) / 500. )**(-1.5) ) 
     445                  zexpide   = MIN( 8.,( gdept(ji,jj,jk,Kmm) / 500. )**(-1.5) ) 
    444446                  zdenitide = -0.9543 + 0.7662 * LOG( zexpide ) - 0.235 * LOG( zexpide )**2 
    445447                  zcmask(ji,jj,jk) = zcmask(ji,jj,jk) * MIN( 1., EXP( zdenitide ) / 0.5 ) 
     
    475477      ENDIF 
    476478      !  
    477       IF( ll_sbc ) CALL p4z_sbc( nit000 )  
     479      IF( ll_sbc ) CALL p4z_sbc( nit000, Kmm )  
    478480      ! 
    479481      IF(lwp) THEN  
Note: See TracChangeset for help on using the changeset viewer.