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 8979 for branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/TRD – NEMO

Ignore:
Timestamp:
2017-12-11T17:45:55+01:00 (6 years ago)
Author:
acc
Message:

Branch 2017/dev_r8126_ROBUST08_no_ghost. Merge in trunk changes up to rev 8864 in preparation for the merge. Sette tests OK except for AGRIF restartability but uncertain about the trunks status for this?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r8126_ROBUST08_no_ghost/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90

    r7646 r8979  
    104104                                 ztrds(:,:,:) = 0._wp 
    105105                                 CALL trd_tra_mng( trdt, ztrds, ktrd, kt ) 
     106         CASE( jptra_evd )   ;   avt_evd(:,:,:) = ptrd(:,:,:) * tmask(:,:,:) 
    106107         CASE DEFAULT                 ! other trends: masked trends 
    107108            trdt(:,:,:) = ptrd(:,:,:) * tmask(:,:,:)              ! mask & store 
     
    311312!!gm Rq: mask the trends already masked in trd_tra, but lbc_lnk should probably be added 
    312313      ! 
     314      ! Trends evaluated every time step that could go to the standard T file and can be output every ts into a 1ts file if 1ts output is selected 
    313315      SELECT CASE( ktrd ) 
    314       CASE( jptra_xad  )   ;   CALL iom_put( "ttrd_xad" , ptrdx )        ! x- horizontal advection 
    315                                CALL iom_put( "strd_xad" , ptrdy ) 
    316       CASE( jptra_yad  )   ;   CALL iom_put( "ttrd_yad" , ptrdx )        ! y- horizontal advection 
    317                                CALL iom_put( "strd_yad" , ptrdy ) 
    318       CASE( jptra_zad  )   ;   CALL iom_put( "ttrd_zad" , ptrdx )        ! z- vertical   advection 
    319                                CALL iom_put( "strd_zad" , ptrdy ) 
    320                                IF( ln_linssh ) THEN                   ! cst volume : adv flux through z=0 surface 
    321                                   CALL wrk_alloc( jpi, jpj, z2dx, z2dy ) 
    322                                   z2dx(:,:) = wn(:,:,1) * tsn(:,:,1,jp_tem) / e3t_n(:,:,1) 
    323                                   z2dy(:,:) = wn(:,:,1) * tsn(:,:,1,jp_sal) / e3t_n(:,:,1) 
    324                                   CALL iom_put( "ttrd_sad", z2dx ) 
    325                                   CALL iom_put( "strd_sad", z2dy ) 
    326                                   CALL wrk_dealloc( jpi, jpj, z2dx, z2dy ) 
    327                                ENDIF 
    328       CASE( jptra_totad  ) ;   CALL iom_put( "ttrd_totad" , ptrdx )      ! total   advection 
    329                                CALL iom_put( "strd_totad" , ptrdy ) 
    330       CASE( jptra_ldf  )   ;   CALL iom_put( "ttrd_ldf" , ptrdx )        ! lateral diffusion 
    331                                CALL iom_put( "strd_ldf" , ptrdy ) 
    332       CASE( jptra_zdf  )   ;   CALL iom_put( "ttrd_zdf" , ptrdx )        ! vertical diffusion (including Kz contribution) 
    333                                CALL iom_put( "strd_zdf" , ptrdy ) 
    334       CASE( jptra_zdfp )   ;   CALL iom_put( "ttrd_zdfp", ptrdx )        ! PURE vertical diffusion (no isoneutral contribution) 
    335                                CALL iom_put( "strd_zdfp", ptrdy ) 
    336       CASE( jptra_evd )    ;   CALL iom_put( "ttrd_evd", ptrdx )         ! EVD trend (convection) 
    337                                CALL iom_put( "strd_evd", ptrdy ) 
    338       CASE( jptra_dmp  )   ;   CALL iom_put( "ttrd_dmp" , ptrdx )        ! internal restoring (damping) 
    339                                CALL iom_put( "strd_dmp" , ptrdy ) 
    340       CASE( jptra_bbl  )   ;   CALL iom_put( "ttrd_bbl" , ptrdx )        ! bottom boundary layer 
    341                                CALL iom_put( "strd_bbl" , ptrdy ) 
    342       CASE( jptra_npc  )   ;   CALL iom_put( "ttrd_npc" , ptrdx )        ! static instability mixing 
    343                                CALL iom_put( "strd_npc" , ptrdy ) 
    344       CASE( jptra_nsr  )   ;   CALL iom_put( "ttrd_qns" , ptrdx(:,:,1) )        ! surface forcing + runoff (ln_rnf=T) 
    345                                CALL iom_put( "strd_cdt" , ptrdy(:,:,1) )        ! output as 2D surface fields 
    346       CASE( jptra_qsr  )   ;   CALL iom_put( "ttrd_qsr" , ptrdx )        ! penetrative solar radiat. (only on temperature) 
    347       CASE( jptra_bbc  )   ;   CALL iom_put( "ttrd_bbc" , ptrdx )        ! geothermal heating   (only on temperature) 
    348       CASE( jptra_atf  )   ;   CALL iom_put( "ttrd_atf" , ptrdx )        ! asselin time Filter 
    349                                CALL iom_put( "strd_atf" , ptrdy ) 
    350       CASE( jptra_tot  )   ;   CALL iom_put( "ttrd_tot" , ptrdx )        ! model total trend 
    351                                CALL iom_put( "strd_tot" , ptrdy ) 
     316      ! This total trend is done every time step 
     317      CASE( jptra_tot  )   ;   CALL iom_put( "ttrd_tot" , ptrdx )           ! model total trend 
     318         CALL iom_put( "strd_tot" , ptrdy ) 
    352319      END SELECT 
     320 
     321      ! These trends are done every second time step. When 1ts output is selected must go different (2ts) file from standard T-file 
     322      IF( MOD( kt, 2 ) == 0 ) THEN 
     323         SELECT CASE( ktrd ) 
     324         CASE( jptra_xad  )   ;   CALL iom_put( "ttrd_xad" , ptrdx )        ! x- horizontal advection 
     325            CALL iom_put( "strd_xad" , ptrdy ) 
     326         CASE( jptra_yad  )   ;   CALL iom_put( "ttrd_yad" , ptrdx )        ! y- horizontal advection 
     327            CALL iom_put( "strd_yad" , ptrdy ) 
     328         CASE( jptra_zad  )   ;   CALL iom_put( "ttrd_zad" , ptrdx )        ! z- vertical   advection 
     329            CALL iom_put( "strd_zad" , ptrdy ) 
     330            IF( ln_linssh ) THEN                   ! cst volume : adv flux through z=0 surface 
     331               CALL wrk_alloc( jpi, jpj, z2dx, z2dy ) 
     332               z2dx(:,:) = wn(:,:,1) * tsn(:,:,1,jp_tem) / e3t_n(:,:,1) 
     333               z2dy(:,:) = wn(:,:,1) * tsn(:,:,1,jp_sal) / e3t_n(:,:,1) 
     334               CALL iom_put( "ttrd_sad", z2dx ) 
     335               CALL iom_put( "strd_sad", z2dy ) 
     336               CALL wrk_dealloc( jpi, jpj, z2dx, z2dy ) 
     337            ENDIF 
     338         CASE( jptra_totad  ) ;   CALL iom_put( "ttrd_totad" , ptrdx )      ! total   advection 
     339            CALL iom_put( "strd_totad" , ptrdy ) 
     340         CASE( jptra_ldf  )   ;   CALL iom_put( "ttrd_ldf" , ptrdx )        ! lateral diffusion 
     341            CALL iom_put( "strd_ldf" , ptrdy ) 
     342         CASE( jptra_zdf  )   ;   CALL iom_put( "ttrd_zdf" , ptrdx )        ! vertical diffusion (including Kz contribution) 
     343            CALL iom_put( "strd_zdf" , ptrdy ) 
     344         CASE( jptra_zdfp )   ;   CALL iom_put( "ttrd_zdfp", ptrdx )        ! PURE vertical diffusion (no isoneutral contribution) 
     345            CALL iom_put( "strd_zdfp", ptrdy ) 
     346         CASE( jptra_evd )    ;   CALL iom_put( "ttrd_evd", ptrdx )         ! EVD trend (convection) 
     347            CALL iom_put( "strd_evd", ptrdy ) 
     348         CASE( jptra_dmp  )   ;   CALL iom_put( "ttrd_dmp" , ptrdx )        ! internal restoring (damping) 
     349            CALL iom_put( "strd_dmp" , ptrdy ) 
     350         CASE( jptra_bbl  )   ;   CALL iom_put( "ttrd_bbl" , ptrdx )        ! bottom boundary layer 
     351            CALL iom_put( "strd_bbl" , ptrdy ) 
     352         CASE( jptra_npc  )   ;   CALL iom_put( "ttrd_npc" , ptrdx )        ! static instability mixing 
     353            CALL iom_put( "strd_npc" , ptrdy ) 
     354         CASE( jptra_bbc  )   ;   CALL iom_put( "ttrd_bbc" , ptrdx )        ! geothermal heating   (only on temperature) 
     355         CASE( jptra_nsr  )   ;   CALL iom_put( "ttrd_qns" , ptrdx(:,:,1) ) ! surface forcing + runoff (ln_rnf=T) 
     356            CALL iom_put( "strd_cdt" , ptrdy(:,:,1) )        ! output as 2D surface fields 
     357         CASE( jptra_qsr  )   ;   CALL iom_put( "ttrd_qsr" , ptrdx )        ! penetrative solar radiat. (only on temperature) 
     358         END SELECT 
     359         ! the Asselin filter trend  is also every other time step but needs to be lagged one time step 
     360         ! Even when 1ts output is selected can go to the same (2ts) file as the trends plotted every even time step. 
     361      ELSE IF( MOD( kt, 2 ) == 1 ) THEN 
     362         SELECT CASE( ktrd ) 
     363         CASE( jptra_atf  )   ;   CALL iom_put( "ttrd_atf" , ptrdx )        ! asselin time Filter 
     364            CALL iom_put( "strd_atf" , ptrdy ) 
     365         END SELECT 
     366      END IF 
    353367      ! 
    354368   END SUBROUTINE trd_tra_iom 
Note: See TracChangeset for help on using the changeset viewer.