# Changeset 13373

Ignore:
Timestamp:
2020-08-03T11:46:38+02:00 (3 months ago)
Message:

TOP-05_Ethe_Agrif : 1st step of changes to successfully compile, see ticket #2508

Location:
NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src
Files:
30 edited

Unmodified
Removed
• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/NST/agrif_top_sponge.F90

 r12489 ! INTEGER  ::   ji, jj, jk, jn   ! dummy loop indices REAL(wp) ::   zabe1, zabe2, ztrelax REAL(wp), DIMENSION(i1:i2,j1:j2)               ::   ztu, ztv REAL(wp), DIMENSION(i1:i2,j1:j2,k1:k2,1:jptra) ::   trbdiff INTEGER  ::   iku, ikv REAL(wp) ::   ztra, zabe1, zabe2, zbtr REAL(wp), DIMENSION(i1:i2,j1:j2,jpk)  ::   ztu, ztv REAL(wp), DIMENSION(i1:i2,j1:j2,k1:k2,n1:n2) ::   trbdiff ! vertical interpolation: REAL(wp), DIMENSION(i1:i2,j1:j2,jpk,1:jptra) ::tabres_child REAL(wp), DIMENSION(i1:i2,j1:j2,jpk,n1:n2) ::tabres_child REAL(wp), DIMENSION(k1:k2,1:jptra) :: tabin REAL(wp), DIMENSION(k1:k2) :: h_in REAL(wp), DIMENSION(1:jpk) :: h_out INTEGER :: N_in, N_out REAL(wp) :: h_diff !!---------------------------------------------------------------------- ! DO jj=j1,j2 DO ji=i1,i2 tabres(ji,jj,jk,jpts+1) = tmask(ji,jj,jk) * e3t(ji,jj,jk,Kbb_a) tabres(ji,jj,jk,jpts+1) = tmask(ji,jj,jk) * e3t(ji,jj,jk,Kbb_a) END DO END DO DO jk=1,jpkm1 # if defined key_vertical trbdiff(ji,jj,jk,1:jptra) = tr(ji,jj,jk,1:jptra,Kbb_a) - tabres_child(ji,jj,jk,1:jptra) trbdiff(ji,jj,jk,1:jptra) = ( tr(ji,jj,jk,1:jptra,Kbb_a) - tabres_child(ji,jj,jk,1:jptra) ) * tmask(ji,jj,jk) # else trbdiff(ji,jj,jk,1:jptra) = tr(ji,jj,jk,1:jptra,Kbb_a) - tabres(ji,jj,jk,1:jptra) trbdiff(ji,jj,jk,1:jptra) = ( tr(ji,jj,jk,1:jptra,Kbb_a) - tabres(ji,jj,jk,1:jptra)) * tmask(ji,jj,jk) # endif ENDDO ENDDO !* set relaxation time scale IF( l_1st_euler .AND. lk_agrif_fstep ) THEN   ;   ztrelax =   rn_trelax_tra  / (        rn_Dt ) ELSE                                          ;   ztrelax =   rn_trelax_tra  / (2._wp * rn_Dt ) ENDIF DO jn = 1, jptra DO jk = 1, jpkm1 DO jj = j1,j2-1 ztu(i1:i2,j1:j2,jk) = 0._wp DO jj = j1,j2 DO ji = i1,i2-1 zabe1 = rn_sponge_tra * fspu(ji,jj) * e2_e1u(ji,jj) * e3u(ji,jj,jk,Kmm_a) * umask(ji,jj,jk) zabe2 = rn_sponge_tra * fspv(ji,jj) * e1_e2v(ji,jj) * e3v(ji,jj,jk,Kmm_a) * vmask(ji,jj,jk) ztu(ji,jj) = zabe1 * ( trbdiff(ji+1,jj  ,jk,jn) - trbdiff(ji,jj,jk,jn) ) ztv(ji,jj) = zabe2 * ( trbdiff(ji  ,jj+1,jk,jn) - trbdiff(ji,jj,jk,jn) ) zabe1 = rn_sponge_tra * r1_Dt * fspu(ji,jj) * umask(ji,jj,jk) * e2_e1u(ji,jj) * e3u(ji,jj,jk,Kmm_a) ztu(ji,jj,jk) = zabe1 * ( trbdiff(ji+1,jj,jk,jn) - trbdiff(ji,jj,jk,jn) ) END DO END DO ztv(i1:i2,j1:j2,jk) = 0._wp DO ji = i1,i2 DO jj = j1,j2-1 zabe2 = rn_sponge_tra * r1_Dt * fspv(ji,jj) * vmask(ji,jj,jk) * e1_e2v(ji,jj) * e3v(ji,jj,jk,Kmm_a) ztv(ji,jj,jk) = zabe2 * ( trbdiff(ji,jj+1,jk,jn) - trbdiff(ji,jj,jk,jn) ) END DO END DO ! IF( ln_zps ) THEN      ! set gradient at partial step level DO jj = j1,j2 DO ji = i1,i2 ! last level iku = mbku(ji,jj) ikv = mbkv(ji,jj) IF( iku == jk )   ztu(ji,jj,jk) = 0._wp IF( ikv == jk )   ztv(ji,jj,jk) = 0._wp END DO END DO ENDIF END DO ! DO jk = 1, jpkm1 DO jj = j1+1,j2-1 DO ji = i1+1,i2-1 IF( .NOT. tabspongedone_trn(ji,jj) ) THEN tr(ji,jj,jk,jn,Krhs_a) = tr(ji,jj,jk,jn,Krhs_a) + (  ztu(ji,jj) - ztu(ji-1,jj  )     & &                                   + ztv(ji,jj) - ztv(ji  ,jj-1)  )  & &                                * r1_e1e2t(ji,jj) / e3t(ji,jj,jk,Kmm_a)  & &                                - ztrelax * fspt(ji,jj) * trbdiff(ji,jj,jk,jn) IF( .NOT. tabspongedone_trn(ji,jj) ) THEN zbtr = r1_e1e2t(ji,jj) / e3t(ji,jj,jk,Kmm_a) ! horizontal diffusive trends ztra = zbtr * (  ztu(ji,jj,jk) - ztu(ji-1,jj,jk) + ztv(ji,jj,jk) - ztv(ji,jj-1,jk)  ) & &  - rn_trelax_tra * r1_Dt * fspt(ji,jj) * trbdiff(ji,jj,jk,jn) ! add it to the general tracer trends tr(ji,jj,jk,jn,Krhs_a) = tr(ji,jj,jk,jn,Krhs_a) + ztra ENDIF END DO END DO END DO ! END DO !
• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/NST/agrif_user.F90

 r13295 CALL Agrif_Bc_variable(trn_sponge_id,calledweight=1.,procname=interptrn_sponge) ! reset tsa to zero tra(:,:,:,:) = 0._wp tr(:,:,:,:,Krhs_a) = 0._wp ! 3. Some controls # else ! LAURENT: STRANGE why (3,3) here ? CALL agrif_declare_variable((/2,2,0,0/),(/3,3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jptra/),trn_id) CALL agrif_declare_variable((/2,2,0,0/),(/3,3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jptra/),trn_sponge_id) CALL agrif_declare_variable((/2,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jptra/),trn_id) CALL agrif_declare_variable((/2,2,0,0/),(/ind2,ind3,0,0/),(/'x','y','N','N'/),(/1,1,1,1/),(/jpi,jpj,jpk,jptra/),trn_sponge_id) # endif
• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/OCE/IOM/iom_def.F90

 r13286 INTEGER, PARAMETER, PUBLIC ::   jp_i1    = 204      !: write INTEGER(1) INTEGER, PARAMETER, PUBLIC ::   jpmax_files  = 100  !: maximum number of simultaneously opened file INTEGER, PARAMETER, PUBLIC ::   jpmax_files  = 200  !: maximum number of simultaneously opened file INTEGER, PARAMETER, PUBLIC ::   jpmax_vars   = 1200 !: maximum number of variables in one file INTEGER, PARAMETER, PUBLIC ::   jpmax_dims   =  4   !: maximum number of dimensions for one variable

• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/TOP/PISCES/P4Z/p4zint.F90

 r12377 REAL(wp) ::   xksilim = 16.5e-6_wp   ! Half-saturation constant for the Si half-saturation constant computation #  include "do_loop_substitute.h90" !!---------------------------------------------------------------------- !! NEMO/TOP 4.0 , NEMO Consortium (2018) ! Computation of the silicon dependant half saturation  constant for silica uptake ! --------------------------------------------------- DO ji = 1, jpi DO jj = 1, jpj zvar = tr(ji,jj,1,jpsil,Kbb) * tr(ji,jj,1,jpsil,Kbb) xksimax(ji,jj) = MAX( xksimax(ji,jj), ( 1.+ 7.* zvar / ( xksilim * xksilim + zvar ) ) * 1e-6 ) END DO END DO DO_2D( 1, 1, 1, 1 ) zvar = tr(ji,jj,1,jpsil,Kbb) * tr(ji,jj,1,jpsil,Kbb) xksimax(ji,jj) = MAX( xksimax(ji,jj), ( 1.+ 7.* zvar / ( xksilim * xksilim + zvar ) ) * 1e-6 ) END_2D ! IF( nday_year == nyear_len(1) ) THEN
• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/TOP/PISCES/P4Z/p4zopt.F90

 r13333 REAL(wp) ::   xsi0r       ! 1. /rn_si0 INTEGER  ::   nksr1        ! levels below which the light cannot penetrate ( depth larger than 391 m) TYPE(FLD), ALLOCATABLE, DIMENSION(:) ::   sf_par      ! structure of input par INTEGER , PARAMETER :: nbtimes = 366  !: maximum number of times record in a file INTEGER  :: ntimes_par                ! number of time steps in a file REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   par_varsw      ! PAR fraction of shortwave REAL(wp), ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   ekb, ekg, ekr  ! wavelength (Red-Green-Blue) pe3(:,:,1) = zqsr(:,:) ! DO jk = 2, nksr + 1 DO jj = 1, jpj DO ji = 1, jpi pe0(ji,jj,jk) = pe0(ji,jj,jk-1) * EXP( -e3t(ji,jj,jk-1,Kmm) * xsi0r ) pe1(ji,jj,jk) = pe1(ji,jj,jk-1) * EXP( -ekb  (ji,jj,jk-1 )        ) pe2(ji,jj,jk) = pe2(ji,jj,jk-1) * EXP( -ekg  (ji,jj,jk-1 )        ) pe3(ji,jj,jk) = pe3(ji,jj,jk-1) * EXP( -ekr  (ji,jj,jk-1 )        ) END DO ! END DO ! END DO DO_3D( 1, 1, 1, 1, 2, nksr1 ) pe0(ji,jj,jk) = pe0(ji,jj,jk-1) * EXP( -e3t(ji,jj,jk-1,Kmm) * xsi0r ) pe1(ji,jj,jk) = pe1(ji,jj,jk-1) * EXP( -ekb  (ji,jj,jk-1 )        ) pe2(ji,jj,jk) = pe2(ji,jj,jk-1) * EXP( -ekg  (ji,jj,jk-1 )        ) pe3(ji,jj,jk) = pe3(ji,jj,jk-1) * EXP( -ekr  (ji,jj,jk-1 )        ) END_3D ! ELSE   ! T- level ! Compute par_varsw at nit000 or only if there is more than 1 time record in par coefficient file IF( ln_varpar ) THEN IF( kt == nit000 .OR. ( kt /= nit000 .AND. ntimes_par > 1 ) ) THEN CALL fld_read( kt, 1, sf_par ) par_varsw(:,:) = ( sf_par(1)%fnow(:,:,1) ) / 3.0 ENDIF CALL fld_read( kt, 1, sf_par ) par_varsw(:,:) = ( sf_par(1)%fnow(:,:,1) ) / 3.0 ENDIF ! xparsw = parlux / 3.0 xsi0r  = 1.e0 / rn_si0 nksr1  = nksr + 1 ! ! Variable PAR at the surface of the ocean ALLOCATE( sf_par(1)%fnow(jpi,jpj,1)   ) IF( sn_par%ln_tint )      ALLOCATE( sf_par(1)%fdta(jpi,jpj,1,2) ) CALL iom_open (  TRIM( sn_par%clname ) , numpar ) ntimes_par = iom_getszuld( numpar )   ! get number of record in file ENDIF !
• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/TOP/PISCES/P4Z/p4zsms.F90

 r13295 USE oce_trc         ! shared variables between ocean and passive tracers USE trc             ! passive tracers common variables USE trcdta          ! USE sms_pisces      ! PISCES Source Minus Sink variables USE p4zbio          ! Biological model
• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/TOP/PISCES/SED/oce_sed.F90

 r13237 !!---------------------------------------------------------------------- USE par_sed USE par_trc , ONLY : rtrn  => rtrn USE par_pisces USE timing USE par_trc USE dom_oce , ONLY :   glamt     =>   glamt          !: longitude of t-point (degre)
• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/TOP/PISCES/SED/par_sed.F90

 r10222 jp_sal   =>   jp_sal     !: indice of salintity INTEGER, PARAMETER :: jpdta = 17 INTEGER, PUBLIC, PARAMETER :: jpdta = 17 ! Vertical sediment geometry INTEGER, PUBLIC   ::      & jpksed   = 11 ,        & jpksedm1 = 10 INTEGER, PUBLIC  :: jpksed  = 11 INTEGER, PUBLIC  :: jpksedm1 ! sediment tracer species INTEGER, PARAMETER ::    & INTEGER, PUBLIC, PARAMETER ::    & jpsol =  8,           &  !: number of solid component jpwat = 10,           &   !: number of pore water component ! pore water components INTEGER, PARAMETER :: & INTEGER, PUBLIC, PARAMETER :: & jwsil  = 1,        & !: silic acid jwoxy  = 2,        & !: oxygen ! solid components INTEGER, PARAMETER ::  & INTEGER, PUBLIC, PARAMETER ::  & jsopal  = 1,        & !: opal sediment jsclay  = 2,        & !: clay jsfes   = 8           !: FeS INTEGER, PARAMETER ::  & INTEGER, PUBLIC, PARAMETER ::  & jptrased   = jpsol + jpwat , & jpdia3dsed = 2             , &
• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/TOP/PISCES/SED/sed.F90

 r10425 !!        !  06-12  (C. Ethe)  Orignal !!---------------------------------------------------------------------- USE par_sed USE oce_sed USE in_out_manager REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE ::  solcp      !: solid sediment data at given time-step REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE ::  solcp0     !: solid sediment data at initial time REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE ::  trc_dta REAL(wp), PUBLIC, DIMENSION(:,:,:), ALLOCATABLE ::  diff
• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/TOP/PISCES/SED/sedarr.F90

 r10222 !!---------------------------------------------------------------------- !! * Modules used USE par_oce USE par_sed USE dom_oce USE sed USE in_out_manager, ONLY : ln_timing USE timing IMPLICIT NONE
• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/TOP/PISCES/SED/sedchem.F90

 r13295 !!====================================================================== !!   modules used USE par_sed USE sed     ! sediment global variable USE sedarr
• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/TOP/PISCES/SED/sedini.F90

 r13295 !!---------------------------------------------------------------------- !! * Modules used USE par_trc        ! need jptra, number of passive tracers USE par_sed USE sed     ! sediment global variable USE sed_oce
• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/TOP/PISCES/SED/sedwri.F90

 r12489 !!         Sediment diagnostics :  write sediment output files !!====================================================================== USE par_sed USE sed USE sedarr
• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/TOP/PISCES/SED/trcdmp_sed.F90

 r13295 ! jl = n_trc_index(jn) CALL trc_dta( kt, Kmm, sf_trcdta(jl), rf_trfac(jl), ztrcdta )   ! read tracer data at nit000 CALL trc_dta( kt, jl, ztrcdta )   ! read tracer data at nit000 ! DO_2D( 1, 1, 1, 1 ) WRITE(charout, FMT="('dmp ')") CALL prt_ctl_info( charout, cdcomp = 'top' ) CALL prt_ctl( tab4d_1=tr(:,:,:,:,Krhs), mask1=tmask, clinfo=ctrcnm, clinfo3='trd' ) CALL prt_ctl( tab4d_1=tr(:,:,:,:,Krhs), mask1=tmask, clinfo=ctrcnm,clinfo3='trd' ) ENDIF !
• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/TOP/PISCES/trcini_pisces.F90

 r12377 ! INTEGER, INTENT(in)  ::  Kmm      ! time level indices REAL(wp), SAVE ::   sco2   =  2.312e-3_wp REAL(wp), SAVE ::   alka0  =  2.426e-3_wp REAL(wp), SAVE ::   oxyg0  =  177.6e-6_wp REAL(wp), SAVE ::   po4    =  2.165e-6_wp REAL(wp), SAVE ::   bioma0 =  1.000e-8_wp REAL(wp), SAVE ::   silic1 =  91.51e-6_wp REAL(wp), SAVE ::   no3    =  30.9e-6_wp * 7.625_wp ! INTEGER  ::  ji, jj, jk, jn, ierr REAL(wp) ::  zcaralk, zbicarb, zco3 REAL(wp) ::  ztmas, ztmas1 REAL(wp) ::  sco2, alka0, oxyg0, po4, bioma0, silic1, no3 CHARACTER(len = 20)  ::  cltra !!---------------------------------------------------------------------- ENDIF ENDIF ! sco2   =  2.312e-3_wp alka0  =  2.426e-3_wp oxyg0  =  177.6e-6_wp po4    =  2.165e-6_wp bioma0 =  1.000e-8_wp silic1 =  91.51e-6_wp no3    =  30.9e-6_wp * 7.625_wp ! ! Allocate PISCES arrays

 r13286 !!   trc_adv_ini   : control the different options of advection scheme !!---------------------------------------------------------------------- USE par_trc        ! need jptra, number of passive tracers USE oce_trc        ! ocean dynamics and active tracers USE trc            ! ocean passive tracers variables
• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/TOP/TRP/trcatf.F90

 r13295 !!   trc_atf     : time stepping on passive tracers !!---------------------------------------------------------------------- USE par_trc        ! need jptra, number of passive tracers USE oce_trc         ! ocean dynamics and tracers variables USE trc             ! ocean passive tracers variables
• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/TOP/TRP/trcbbl.F90

 r13286 !!    trc_bbl      : update the tracer trends due to the bottom boundary layer (advective and/or diffusive) !!---------------------------------------------------------------------- USE par_trc        ! need jptra, number of passive tracers USE oce_trc        ! ocean dynamics and passive tracers variables USE trc            ! ocean passive tracers variables
• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/TOP/TRP/trcdmp.F90

 r13295 !!   trc_dmp_init : initialization, namlist read, parameters control !!---------------------------------------------------------------------- USE par_trc        ! need jptra, number of passive tracers USE oce_trc         ! ocean dynamics and tracers variables USE trc             ! ocean passive tracers variables ! jl = n_trc_index(jn) CALL trc_dta( kt, Kmm, sf_trcdta(jl), rf_trfac(jl), ztrcdta )   ! read tracer data at nit000 CALL trc_dta( kt, jl, ztrcdta )   ! read tracer data at nit000 ! SELECT CASE ( nn_zdmp_tr ) IF( ln_trc_ini(jn) ) THEN      ! update passive tracers arrays with input data read from file jl = n_trc_index(jn) CALL trc_dta( kt, Kmm, sf_trcdta(jl), rf_trfac(jl), ztrcdta )   ! read tracer data at nit000 CALL trc_dta( kt, jl, ztrcdta )   ! read tracer data at nit000 DO jc = 1, npncts DO jk = 1, jpkm1
• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/TOP/TRP/trcldf.F90

 r13295 !!   trc_ldf_ini   : initialization, namelist read, and parameters control !!---------------------------------------------------------------------- USE par_trc        ! need jptra, number of passive tracers USE trc            ! ocean passive tracers variables USE oce_trc        ! ocean dynamics and active tracers
• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/TOP/TRP/trcsbc.F90

 r13295 !!   trc_sbc      : update the tracer trend at ocean surface !!---------------------------------------------------------------------- USE par_trc        ! need jptra, number of passive tracers USE oce_trc         ! ocean dynamics and active tracers variables USE trc             ! ocean  passive tracers variables
• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/TOP/TRP/trctrp.F90

 r12377 !!   trc_trp        : passive tracer transport !!---------------------------------------------------------------------- USE par_trc         ! need jptra, number of passive tracers USE oce_trc         ! ocean dynamics and active tracers variables USE trc             ! ocean passive tracers variables USE bdy_oce   , ONLY: ln_bdy USE trcbdy          ! BDY open boundaries USE in_out_manager #if defined key_agrif IF( .NOT. lk_c1d ) THEN ! !                                                         ! Partial top/bottom cell: GRADh( trb ) IF( ln_zps ) THEN IF( ln_isfcav ) THEN ; CALL zps_hde_isf( kt, Kmm, jptra, tr(:,:,:,:,Kbb), pgtu=gtru, pgtv=gtrv, pgtui=gtrui, pgtvi=gtrvi )  ! both top & bottom ELSE                 ; CALL zps_hde    ( kt, Kmm, jptra, tr(:,:,:,:,Kbb), gtru, gtrv )                                      !  only bottom ENDIF ENDIF ! CALL trc_sbc    ( kt,      Kmm, tr, Krhs )      ! surface boundary condition IF( ln_trcbc .AND. lltrcbc .AND. kt /= nit000 )  & IF( ln_trcdmp )        CALL trc_dmp    ( kt, Kbb, Kmm, tr, Krhs )      ! internal damping trends IF( ln_bdy )           CALL trc_bdy_dmp( kt, Kbb,      Krhs )      ! BDY damping trends CALL trc_adv    ( kt, Kbb, Kmm, tr, Krhs )      ! horizontal & vertical advection !                                                         ! Partial top/bottom cell: GRADh( trb ) IF( ln_zps ) THEN IF( ln_isfcav ) THEN ; CALL zps_hde_isf( kt, Kmm, jptra, tr(:,:,:,:,Kbb), pgtu=gtru, pgtv=gtrv, pgtui=gtrui, pgtvi=gtrvi )  ! both top & bottom ELSE                 ; CALL zps_hde    ( kt, Kmm, jptra, tr(:,:,:,:,Kbb), gtru, gtrv )                                      !  only bottom ENDIF ENDIF ! CALL trc_ldf    ( kt, Kbb, Kmm,       tr, Krhs )  ! lateral mixing #if defined key_agrif IF(.NOT. Agrif_Root()) CALL Agrif_Sponge_trc       ! tracers sponge #endif CALL trc_adv    ( kt, Kbb, Kmm, tr, Krhs )      ! horizontal & vertical advection CALL trc_ldf    ( kt, Kbb, Kmm,       tr, Krhs )  ! lateral mixing CALL trc_zdf    ( kt, Kbb, Kmm, Krhs, tr, Kaa  )  ! vert. mixing & after tracer   ==> after CALL trc_atf    ( kt, Kbb, Kmm, Kaa , tr )        ! time filtering of "now" tracer fields
• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/TOP/TRP/trczdf.F90

 r13286 !!   trc_zdf      : update the tracer trend with the vertical diffusion !!---------------------------------------------------------------------- USE par_trc        ! need jptra, number of passive tracers USE trc           ! ocean passive tracers variables USE oce_trc       ! ocean dynamics and active tracers USE trd_oce       ! trends: ocean variables USE trazdf        ! tracer: vertical diffusion !!gm do we really need this ? USE trcldf        ! passive tracers: lateral diffusion !!gm USE trdtra        ! trends manager: tracers USE prtctl        ! Print control
• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/TOP/trcdta.F90

 r13295 PUBLIC   trc_dta_ini     ! called in trcini.F90 INTEGER  , SAVE, PUBLIC                             :: nb_trcdta   ! number of tracers to be initialised with data INTEGER  , SAVE, PUBLIC, ALLOCATABLE, DIMENSION(:)  :: n_trc_index ! indice of tracer which is initialised with data INTEGER  , SAVE, PUBLIC                             :: ntra        ! MAX( 1, nb_trcdta ) to avoid compilation error with bounds checking REAL(wp) , SAVE, PUBLIC, ALLOCATABLE, DIMENSION(:)  :: rf_trfac    ! multiplicative factor for tracer values !\$AGRIF_DO_NOT_TREAT TYPE(FLD), SAVE, PUBLIC, ALLOCATABLE, DIMENSION(:)  :: sf_trcdta   ! structure of input SST (file informations, fields read) !\$AGRIF_END_DO_NOT_TREAT INTEGER  , PUBLIC                             :: nb_trcdta   ! number of tracers to be initialised with data INTEGER  , PUBLIC, ALLOCATABLE, DIMENSION(:)  :: n_trc_index ! indice of tracer which is initialised with data INTEGER  , PUBLIC                             :: ntra        ! MAX( 1, nb_trcdta ) to avoid compilation error with bounds checking REAL(wp) ,         ALLOCATABLE, DIMENSION(:)  :: rf_trfac    ! multiplicative factor for tracer values TYPE(FLD),         ALLOCATABLE, DIMENSION(:)  :: sf_trcdta   ! structure of input SST (file informations, fields read) !! Substitutions SUBROUTINE trc_dta( kt, Kmm, sf_trcdta, ptrcfac, ptrcdta) SUBROUTINE trc_dta( kt, kjl, ptrcdta) !!---------------------------------------------------------------------- !!                   ***  ROUTINE trc_dta  *** !!---------------------------------------------------------------------- INTEGER                          , INTENT(in   )   ::   kt         ! ocean time-step INTEGER                          , INTENT(in   )   ::   Kmm        ! time level index TYPE(FLD), DIMENSION(1)          , INTENT(inout)   ::   sf_trcdta  ! array of information on the field to read REAL(wp)                         , INTENT(in   )   ::   ptrcfac    ! multiplication factor INTEGER                          , INTENT(in   )   ::   kjl        ! tracer index REAL(wp),  DIMENSION(jpi,jpj,jpk), INTENT(inout  ) ::   ptrcdta    ! 3D data array ! ! read data at kt time step CALL fld_read( kt, 1, sf_trcdta ) ptrcdta(:,:,:) = sf_trcdta(1)%fnow(:,:,:) * tmask(:,:,:) ptrcdta(:,:,:) = sf_trcdta(kjl)%fnow(:,:,:) * tmask(:,:,:) ! IF( ln_sco ) THEN                !== s- or mixed s-zps-coordinate  ==! DO_2D( 1, 1, 1, 1 ) DO jk = 1, jpk                        ! determines the intepolated T-S profiles at each (i,j) points zl = gdept(ji,jj,jk,Kmm) zl = gdept_0(ji,jj,jk) IF(     zl < gdept_1d(1  ) ) THEN         ! above the first level of data ztp(jk) = ptrcdta(ji,jj,1) ELSE                                !==   z- or zps- coordinate   ==! ! zps-coordinate (partial steps) interpolation at the last ocean level !            IF( ln_zps ) THEN !               DO jj = 1, jpj !                  DO ji = 1, jpi !                     ik = mbkt(ji,jj) !                     IF( ik > 1 ) THEN !                        zl = ( gdept_1d(ik) - gdept_0(ji,jj,ik) ) / ( gdept_1d(ik) - gdept_1d(ik-1) ) !                        ptrcdta(ji,jj,ik) = (1.-zl) * ptrcdta(ji,jj,ik) + zl * ptrcdta(ji,jj,ik-1) !                     ENDIF !                     ik = mikt(ji,jj) !                     IF( ik > 1 ) THEN !                        zl = ( gdept_0(ji,jj,ik) - gdept_1d(ik) ) / ( gdept_1d(ik+1) - gdept_1d(ik) ) !                        ptrcdta(ji,jj,ik) = (1.-zl) * ptrcdta(ji,jj,ik) + zl * ptrcdta(ji,jj,ik+1) !                     ENDIF !                  END DO !              END DO !            ENDIF IF( ln_zps ) THEN DO_2D( 1, 1, 1, 1 ) ik = mbkt(ji,jj) IF( ik > 1 ) THEN zl = ( gdept_1d(ik) - gdept_0(ji,jj,ik) ) / ( gdept_1d(ik) - gdept_1d(ik-1) ) ptrcdta(ji,jj,ik) = (1.-zl) * ptrcdta(ji,jj,ik) + zl * ptrcdta(ji,jj,ik-1) ENDIF ik = mikt(ji,jj) IF( ik > 1 ) THEN zl = ( gdept_0(ji,jj,ik) - gdept_1d(ik) ) / ( gdept_1d(ik+1) - gdept_1d(ik) ) ptrcdta(ji,jj,ik) = (1.-zl) * ptrcdta(ji,jj,ik) + zl * ptrcdta(ji,jj,ik+1) ENDIF END_2D ENDIF ! ENDIF ! ! Scale by multiplicative factor ptrcdta(:,:,:) = ptrcdta(:,:,:) * ptrcfac ptrcdta(:,:,:) = ptrcdta(:,:,:) * rf_trfac(kjl) ! ENDIF !!---------------------------------------------------------------------- CONTAINS SUBROUTINE trc_dta( kt, sf_trcdta, ptrcfac, ptrcdta)        ! Empty routine SUBROUTINE trc_dta( kt, kjl, ptrcdta)        ! Empty routine WRITE(*,*) 'trc_dta: You should not have seen this print! error?', kt END SUBROUTINE trc_dta
• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/TOP/trcice.F90

 r12377 !!   trc_ice       :  Call the appropriate sea ice tracer subroutine !!---------------------------------------------------------------------- USE par_trc         ! need jptra, number of passive tracers USE oce_trc        ! shared variables between ocean and passive tracers USE trc            ! passive tracers common variables
• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/TOP/trcini.F90

 r13286 !!   top_alloc :   allocate the TOP arrays !!---------------------------------------------------------------------- USE par_trc         ! need jptra, number of passive tracers USE oce_trc         ! shared variables between ocean and passive tracers USE trc             ! passive tracers common variables CHARACTER (len=25) :: charout REAL(wp), DIMENSION(jpi,jpj,jpk,jptra) :: zzmsk CHARACTER (len=25), DIMENSION(jptra) :: clseb !!---------------------------------------------------------------------- ! CALL prt_ctl_info( charout, cdcomp = 'top' ) CALL prt_ctl( tab4d_1=tr(:,:,:,:,Kmm), mask1=tmask, clinfo=ctrcnm ) DO jn = 1, jptra zzmsk(:,:,:,jn) = tmask(:,:,:) WRITE(clseb(jn),'(a,i2.2)') 'seb ', jn END DO CALL prt_ctl( tab4d_1=zzmsk, mask1=tmask, clinfo=clseb ) ENDIF 9000  FORMAT('      tracer nb : ',i2,'      name :',a10,'      initial content :',e18.10) ! ELSE                             ! Initialisation of tracer from a file that may also be used for damping !!gm BUG ?   if damping and restart, what's happening ? IF( ln_trcdta .AND. nb_trcdta > 0 ) THEN ! update passive tracers arrays with input data read from file IF( ln_trc_ini(jn) ) THEN jl = n_trc_index(jn) CALL trc_dta( nit000, Kmm, sf_trcdta(jl), rf_trfac(jl), tr(:,:,:,jn,Kmm) ) ! ! deallocate data structure if data are not used for damping IF( .NOT.ln_trcdmp .AND. .NOT.ln_trcdmp_clo ) THEN IF(lwp) WRITE(numout,*) 'trc_ini_state: deallocate data arrays as they are only used to initialize the run' DEALLOCATE( sf_trcdta(jl)%fnow ) IF( sf_trcdta(jl)%ln_tint )  DEALLOCATE( sf_trcdta(jl)%fdta ) ! ENDIF CALL trc_dta( nit000, jl, tr(:,:,:,jn,Kmm) ) ENDIF END DO
• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/TOP/trcnam.F90

 r12489 !!   trc_nam    :  Read and print options for the passive tracer run (namelist) !!---------------------------------------------------------------------- USE par_trc        ! need jptra, number of passive tracers USE oce_trc     ! shared variables between ocean and passive tracers USE trc         ! passive tracers common variables
• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/TOP/trcrst.F90

 r13286 !!   trc_rst_wri    : write restart file !!---------------------------------------------------------------------- USE par_trc        ! need jptra, number of passive tracers USE oce_trc USE trc
• ## NEMO/branches/2020/dev_r13333_TOP-05_Ethe_Agrif/src/TOP/trcstp.F90

 r13286 !!   trc_stp       : passive tracer system time-stepping !!---------------------------------------------------------------------- USE par_trc        ! need jptra, number of passive tracers USE oce_trc        ! ocean dynamics and active tracers variables USE sbc_oce
Note: See TracChangeset for help on using the changeset viewer.