# Changeset 10989

Ignore:
Timestamp:
2019-05-16T17:45:46+02:00 (2 years ago)
Message:

2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps : Convert NST routines in preparation for getting AGRIF back up and running. AGRIF conv stage now works but requires some renaming of recently changes DIU modules (included in this commit). AGRIF compile and link stage not yet working (agrif routines need to be passed the time-level indices) but non-AGRIF SETTE tests are all OK

Location:
NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src
Files:
11 edited
3 moved

Unmodified
Removed

• ## NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/NST/agrif_top_sponge.F90

 r10068 DO jj=j1,j2 DO ji=i1,i2 tabres(ji,jj,jk,jn) = trb(ji,jj,jk,jn) tabres(ji,jj,jk,jn) = tr(ji,jj,jk,jn,Kbb) END DO END DO DO jj=j1,j2 DO ji=i1,i2 tabres(ji,jj,jk,jpts+1) = tmask(ji,jj,jk) * e3t_n(ji,jj,jk) tabres(ji,jj,jk,jpts+1) = tmask(ji,jj,jk) * e3t(ji,jj,jk,Kmm) END DO END DO IF (tmask(ji,jj,jk) == 0) EXIT N_out = N_out + 1 h_out(jk) = e3t_n(ji,jj,jk) !Child grid scale factors. Could multiply by e1e2t here instead of division above h_out(jk) = e3t(ji,jj,jk,Kmm) !Child grid scale factors. Could multiply by e1e2t here instead of division above ENDDO IF (N_in > 0) THEN DO jk=1,jpkm1 # if defined key_vertical trbdiff(ji,jj,jk,1:jptra) = trb(ji,jj,jk,1:jptra) - tabres_child(ji,jj,jk,1:jptra) trbdiff(ji,jj,jk,1:jptra) = tr(ji,jj,jk,1:jptra,Kbb) - tabres_child(ji,jj,jk,1:jptra) # else trbdiff(ji,jj,jk,1:jptra) = trb(ji,jj,jk,1:jptra) - tabres(ji,jj,jk,1:jptra) trbdiff(ji,jj,jk,1:jptra) = tr(ji,jj,jk,1:jptra,Kbb) - tabres(ji,jj,jk,1:jptra) # endif ENDDO DO jj = j1,j2-1 DO ji = i1,i2-1 zabe1 = fsaht_spu(ji,jj) * e2_e1u(ji,jj) * e3u_n(ji,jj,jk) * umask(ji,jj,jk) zabe2 = fsaht_spv(ji,jj) * e1_e2v(ji,jj) * e3v_n(ji,jj,jk) * vmask(ji,jj,jk) zabe1 = fsaht_spu(ji,jj) * e2_e1u(ji,jj) * e3u(ji,jj,jk,Kmm) * umask(ji,jj,jk) zabe2 = fsaht_spv(ji,jj) * e1_e2v(ji,jj) * e3v(ji,jj,jk,Kmm) * 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) ) DO ji = i1+1,i2-1 IF( .NOT. tabspongedone_trn(ji,jj) ) THEN tra(ji,jj,jk,jn) = tra(ji,jj,jk,jn) + (  ztu(ji,jj) - ztu(ji-1,jj  )     & tr(ji,jj,jk,jn,Krhs) = tr(ji,jj,jk,jn,Krhs) + (  ztu(ji,jj) - ztu(ji-1,jj  )     & &                                   + ztv(ji,jj) - ztv(ji  ,jj-1)  )  & &                                * r1_e1e2t(ji,jj) / e3t_n(ji,jj,jk) &                                * r1_e1e2t(ji,jj) / e3t(ji,jj,jk,Kmm) ENDIF END DO
• ## NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/NST/agrif_top_update.F90

 r10068 DO jj=j1,j2 DO ji=i1,i2 tabres(ji,jj,jk,jn) = (trn(ji,jj,jk,jn) * e3t_n(ji,jj,jk) ) & tabres(ji,jj,jk,jn) = (tr(ji,jj,jk,jn,Kmm) * e3t(ji,jj,jk,Kmm) ) & * tmask(ji,jj,jk) + (tmask(ji,jj,jk)-1)*999._wp END DO DO jj=j1,j2 DO ji=i1,i2 tabres(ji,jj,jk,n2) = tmask(ji,jj,jk) * e3t_n(ji,jj,jk) & tabres(ji,jj,jk,n2) = tmask(ji,jj,jk) * e3t(ji,jj,jk,Kmm) & + (tmask(ji,jj,jk)-1)*999._wp END DO IF (tmask(ji,jj,jk) < -900) EXIT ! TODO: Will not work with ISF N_out = N_out + 1 h_out(N_out) = e3t_n(ji,jj,jk) !Parent grid scale factors. Could multiply by e1e2t here instead of division above h_out(N_out) = e3t(ji,jj,jk,Kmm) !Parent grid scale factors. Could multiply by e1e2t here instead of division above ENDDO IF (N_in > 0) THEN !Remove this? DO ji=i1,i2 IF( tabres_child(ji,jj,jk,jn) .NE. 0. ) THEN trb(ji,jj,jk,jn) = tsb(ji,jj,jk,jn) & tr(ji,jj,jk,jn,Kbb) = ts(ji,jj,jk,jn,Kbb) & & + atfp * ( tabres_child(ji,jj,jk,jn) & &          - trn(ji,jj,jk,jn) ) * tmask(ji,jj,jk) &          - tr(ji,jj,jk,jn,Kmm) ) * tmask(ji,jj,jk) ENDIF ENDDO DO ji=i1,i2 IF( tabres_child(ji,jj,jk,jn) .NE. 0. ) THEN trn(ji,jj,jk,jn) = tabres_child(ji,jj,jk,jn) * tmask(ji,jj,jk) tr(ji,jj,jk,jn,Kmm) = tabres_child(ji,jj,jk,jn) * tmask(ji,jj,jk) END IF END DO DO ji=i1,i2 !> jc tmp tabres(ji,jj,jk,jn) = trn(ji,jj,jk,jn)  * e3t_n(ji,jj,jk) / e3t_0(ji,jj,jk) !                     tabres(ji,jj,jk,jn) = trn(ji,jj,jk,jn)  * e3t_n(ji,jj,jk) tabres(ji,jj,jk,jn) = tr(ji,jj,jk,jn,Kmm)  * e3t(ji,jj,jk,Kmm) / e3t_0(ji,jj,jk) !                     tabres(ji,jj,jk,jn) = tr(ji,jj,jk,jn,Kmm)  * e3t(ji,jj,jk,Kmm) !< jc tmp END DO DO ji=i1,i2 IF( tabres(ji,jj,jk,jn) .NE. 0. ) THEN ztb  = trb(ji,jj,jk,jn) * e3t_b(ji,jj,jk) ! fse3t_b prior update should be used ztb  = tr(ji,jj,jk,jn,Kbb) * e3t(ji,jj,jk,Kbb) ! fse3t_b prior update should be used ztnu = tabres(ji,jj,jk,jn) ztno = trn(ji,jj,jk,jn) * e3t_a(ji,jj,jk) trb(ji,jj,jk,jn) = ( ztb + atfp * ( ztnu - ztno) )  & &        * tmask(ji,jj,jk) / e3t_b(ji,jj,jk) ztno = tr(ji,jj,jk,jn,Kmm) * e3t(ji,jj,jk,Krhs) tr(ji,jj,jk,jn,Kbb) = ( ztb + atfp * ( ztnu - ztno) )  & &        * tmask(ji,jj,jk) / e3t(ji,jj,jk,Kbb) ENDIF ENDDO DO ji=i1,i2 IF( tabres(ji,jj,jk,jn) .NE. 0. ) THEN trn(ji,jj,jk,jn) = tabres(ji,jj,jk,jn) / e3t_n(ji,jj,jk) tr(ji,jj,jk,jn,Kmm) = tabres(ji,jj,jk,jn) / e3t(ji,jj,jk,Kmm) END IF END DO ! IF  ((neuler==0).AND.(Agrif_Nb_Step()==0) ) THEN trb(i1:i2,j1:j2,k1:k2,n1:n2)  = trn(i1:i2,j1:j2,k1:k2,n1:n2) tr(i1:i2,j1:j2,k1:k2,n1:n2,Kbb)  = tr(i1:i2,j1:j2,k1:k2,n1:n2,Kmm) ENDIF !
• ## NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/NST/agrif_user.F90

 r10425 tabspongedone_tsn = .FALSE. CALL Agrif_Bc_variable(tsn_sponge_id,calledweight=1.,procname=interptsn_sponge) ! reset tsa to zero tsa(:,:,:,:) = 0. ! reset ts(:,:,:,:,Krhs) to zero ts(:,:,:,:,Krhs) = 0. Agrif_UseSpecialValue = ln_spc_dyn CALL Agrif_Bc_variable(sshn_id,calledweight=1., procname=interpsshn ) hbdy_w(:,:) = 0.e0 ; hbdy_e(:,:) = 0.e0 ; hbdy_n(:,:) = 0.e0 ; hbdy_s(:,:) = 0.e0 ssha(:,:) = 0.e0 ssh(:,:,Krhs) = 0.e0 IF ( ln_dynspg_ts ) THEN Agrif_UseSpecialValue = .FALSE. ! reset velocities to zero ua(:,:,:) = 0. va(:,:,:) = 0. uu(:,:,:,Krhs) = 0. vv(:,:,:,Krhs) = 0. ! 3. Some controls tabspongedone_trn = .FALSE. CALL Agrif_Bc_variable(trn_sponge_id,calledweight=1.,procname=interptrn_sponge) ! reset tsa to zero tra(:,:,:,:) = 0. ! reset ts(:,:,:,:,Krhs) to zero tr(:,:,:,:,Krhs) = 0.
• ## NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DIA/diawri.F90

 r10965 USE lib_mpp         ! MPP library USE timing          ! preformance summary USE diurnal_bulk    ! diurnal warm layer USE cool_skin       ! Cool skin USE diu_bulk        ! diurnal warm layer USE diu_coolskin    ! Cool skin IMPLICIT NONE
• ## NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DIU/diu_bulk.F90

 r10985 MODULE diurnal_bulk MODULE diu_bulk !!====================================================================== !!                    ***  MODULE  diurnal_bulk  *** !!                    ***  MODULE  diu_bulk  *** !!     Takaya model of diurnal warming (Takaya, 2010) !!===================================================================== END FUNCTION t_imp END MODULE diurnal_bulk END MODULE diu_bulk
• ## NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DIU/diu_coolskin.F90

 r10985 MODULE cool_skin MODULE diu_coolskin !!====================================================================== !!                    ***  MODULE  cool_skin  *** !!                    ***  MODULE  diu_coolskin  *** !!     Cool skin thickness and delta T correction using Artele et al. (2002) !!     [see also Tu and Tsuang (2005)] REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:) :: x_csdsst    ! Cool skin delta SST REAL(wp), PUBLIC, ALLOCATABLE, DIMENSION(:,:) :: x_csthick   ! Cool skin thickness PUBLIC diurnal_sst_coolskin_step, diurnal_sst_coolskin_init !!---------------------------------------------------------------------- ! IF( .NOT. ln_blk )   CALL ctl_stop("cool_skin.f90: diurnal flux processing only implemented for bulk forcing") IF( .NOT. ln_blk )   CALL ctl_stop("diu_coolskin.f90: diurnal flux processing only implemented for bulk forcing") ! DO jj = 1,jpj !!====================================================================== END MODULE cool_skin END MODULE diu_coolskin
• ## NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/DIU/diu_layers.F90

 r10985 !! History :  3.7  ! 2015-11  (J. While)  Original code USE diurnal_bulk    ! diurnal SST bulk routines  (diurnal_sst_takaya routine) USE cool_skin      ! diurnal cool skin correction (diurnal_sst_coolskin routine) USE diu_bulk     ! diurnal SST bulk routines  (diurnal_sst_takaya routine) USE diu_coolskin ! diurnal cool skin correction (diurnal_sst_coolskin routine) USE oce USE iom USE sbc_oce USE sbcmod           ! surface boundary condition       (sbc     routine) USE sbcmod       ! surface boundary condition       (sbc     routine) IMPLICIT NONE
• ## NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/IOM/iom.F90

 r10523 #endif USE lib_fortran USE diurnal_bulk, ONLY : ln_diurnal_only, ln_diurnal USE diu_bulk, ONLY : ln_diurnal_only, ln_diurnal IMPLICIT NONE
• ## NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/IOM/restart.F90

 r10922 USE in_out_manager  ! I/O manager USE iom             ! I/O module USE diurnal_bulk USE diu_bulk USE lib_mpp         ! distribued memory computing library
• ## NEMO/branches/2019/dev_r10721_KERNEL-02_Storkey_Coward_IMMERSE_first_steps/src/OCE/SBC/sbcmod.F90

 r10946 USE timing         ! Timing USE wet_dry USE diurnal_bulk, ONLY:   ln_diurnal_only   ! diurnal SST diagnostic USE diu_bulk, ONLY:   ln_diurnal_only   ! diurnal SST diagnostic IMPLICIT NONE
Note: See TracChangeset for help on using the changeset viewer.