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 5951 for branches/2014/dev_r4650_UKMO14.4_OBS_GENERAL_VINTERP/NEMOGCM/NEMO/OPA_SRC/TRD – NEMO

Ignore:
Timestamp:
2015-11-30T12:48:01+01:00 (9 years ago)
Author:
timgraham
Message:

Merged trunk r5936 into branch

Location:
branches/2014/dev_r4650_UKMO14.4_OBS_GENERAL_VINTERP/NEMOGCM/NEMO/OPA_SRC/TRD
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4650_UKMO14.4_OBS_GENERAL_VINTERP/NEMOGCM/NEMO/OPA_SRC/TRD/trd_oce.F90

    r5950 r5951  
    7171   INTEGER, PUBLIC, PARAMETER ::   jpdyn_bfri = 12     !: implicit bottom friction (ln_bfrimp=.TRUE.) 
    7272   INTEGER, PUBLIC, PARAMETER ::   jpdyn_ken  = 13     !: use for calculation of KE 
    73    INTEGER, PUBLIC, PARAMETER ::   jpdyn_spgflt  = 14  !: filter contribution to surface pressure gradient (spg_flt) 
    74    INTEGER, PUBLIC, PARAMETER ::   jpdyn_spgexp  = 15  !: explicit contribution to surface pressure gradient (spg_flt) 
    7573   ! 
    7674   !!---------------------------------------------------------------------- 
  • branches/2014/dev_r4650_UKMO14.4_OBS_GENERAL_VINTERP/NEMOGCM/NEMO/OPA_SRC/TRD/trddyn.F90

    r5950 r5951  
    113113      CASE( jpdyn_spg )   ;   CALL iom_put( "utrd_spg", putrd )    ! surface pressure gradient 
    114114                              CALL iom_put( "vtrd_spg", pvtrd ) 
    115       CASE( jpdyn_spgexp );   CALL iom_put( "utrd_spgexp", putrd ) ! surface pressure gradient (explicit) 
    116                               CALL iom_put( "vtrd_spgexp", pvtrd ) 
    117       CASE( jpdyn_spgflt );   CALL iom_put( "utrd_spgflt", putrd ) ! surface pressure gradient (filtered) 
    118                               CALL iom_put( "vtrd_spgflt", pvtrd ) 
    119115      CASE( jpdyn_pvo )   ;   CALL iom_put( "utrd_pvo", putrd )    ! planetary vorticity 
    120116                              CALL iom_put( "vtrd_pvo", pvtrd ) 
  • branches/2014/dev_r4650_UKMO14.4_OBS_GENERAL_VINTERP/NEMOGCM/NEMO/OPA_SRC/TRD/trdglo.F90

    r5950 r5951  
    44   !! Ocean diagnostics:  global domain averaged tracer and momentum trends 
    55   !!===================================================================== 
    6    !! History :  1.0  !  2004-08 (C. Talandier) New trends organization 
    7    !!            3.5  !  2012-02 (G. Madec)  add 3D tracer zdf trend output using iom 
     6   !! History :  1.0  !  2004-08  (C. Talandier) New trends organization 
     7   !!            3.5  !  2012-02  (G. Madec)  add 3D tracer zdf trend output using iom 
    88   !!---------------------------------------------------------------------- 
    99 
     
    1919   USE trd_oce         ! trends: ocean variables 
    2020   USE phycst          ! physical constants 
    21    USE ldftra_oce      ! ocean active tracers: lateral physics 
    22    USE ldfdyn_oce      ! ocean dynamics: lateral physics 
     21   USE ldftra          ! lateral diffusion: eddy diffusivity & EIV coeff. 
     22   USE ldfdyn          ! ocean dynamics: lateral physics 
    2323   USE zdf_oce         ! ocean vertical physics 
    2424   USE zdfbfr          ! bottom friction 
     
    2626   USE eosbn2          ! equation of state 
    2727   USE phycst          ! physical constants 
     28   ! 
    2829   USE lib_mpp         ! distibuted memory computing library 
    2930   USE in_out_manager  ! I/O manager 
  • branches/2014/dev_r4650_UKMO14.4_OBS_GENERAL_VINTERP/NEMOGCM/NEMO/OPA_SRC/TRD/trdken.F90

    r5950 r5951  
    1313   USE oce            ! ocean dynamics and tracers variables 
    1414   USE dom_oce        ! ocean space and time domain variables 
     15   USE sbc_oce        ! surface boundary condition: ocean 
    1516   USE zdf_oce        ! ocean vertical physics variables 
    1617   USE trd_oce        ! trends: ocean variables 
    1718!!gm   USE dynhpg          ! hydrostatic pressure gradient    
    1819   USE zdfbfr         ! bottom friction 
    19    USE ldftra_oce     ! ocean active tracers lateral physics 
    20    USE sbc_oce        ! surface boundary condition: ocean 
     20   USE ldftra         ! ocean active tracers lateral physics 
    2121   USE phycst         ! physical constants 
    2222   USE trdvor         ! ocean vorticity trends  
    2323   USE trdglo         ! trends:global domain averaged 
    24    USE trdmxl         ! ocean active mixed layer tracers trends  
     24   USE trdmxl         ! ocean active mixed layer tracers trends 
     25   ! 
    2526   USE in_out_manager ! I/O manager 
    2627   USE iom            ! I/O manager library 
     
    9697         nkstp = kt 
    9798         DO jk = 1, jpkm1 
    98             bu   (:,:,jk) =  e1u(:,:) * e2u(:,:) * fse3u_n(:,:,jk) 
    99             bv   (:,:,jk) =  e1v(:,:) * e2v(:,:) * fse3v_n(:,:,jk) 
     99            bu   (:,:,jk) =           e1e2u(:,:) * fse3u_n(:,:,jk) 
     100            bv   (:,:,jk) =           e1e2v(:,:) * fse3v_n(:,:,jk) 
    100101            r1_bt(:,:,jk) = 1._wp / ( e1e2t(:,:) * fse3t_n(:,:,jk) ) * tmask(:,:,jk) 
    101102         END DO 
     
    117118      ! 
    118119      SELECT CASE( ktrd ) 
    119          CASE( jpdyn_hpg )   ;   CALL iom_put( "ketrd_hpg", zke )    ! hydrostatic pressure gradient 
    120          CASE( jpdyn_spg )   ;   CALL iom_put( "ketrd_spg", zke )    ! surface pressure gradient 
    121          CASE( jpdyn_spgexp );   CALL iom_put( "ketrd_spgexp", zke ) ! surface pressure gradient (explicit) 
    122          CASE( jpdyn_spgflt );   CALL iom_put( "ketrd_spgflt", zke ) ! surface pressure gradient (filter) 
    123          CASE( jpdyn_pvo )   ;   CALL iom_put( "ketrd_pvo", zke )    ! planetary vorticity 
    124          CASE( jpdyn_rvo )   ;   CALL iom_put( "ketrd_rvo", zke )    ! relative  vorticity     (or metric term) 
    125          CASE( jpdyn_keg )   ;   CALL iom_put( "ketrd_keg", zke )    ! Kinetic Energy gradient (or had) 
    126          CASE( jpdyn_zad )   ;   CALL iom_put( "ketrd_zad", zke )    ! vertical   advection 
    127          CASE( jpdyn_ldf )   ;   CALL iom_put( "ketrd_ldf", zke )    ! lateral diffusion 
    128          CASE( jpdyn_zdf )   ;   CALL iom_put( "ketrd_zdf", zke )    ! vertical diffusion  
     120         CASE( jpdyn_hpg )   ;   CALL iom_put( "ketrd_hpg", zke )    ! hydrostatic pressure gradient 
     121         CASE( jpdyn_spg )   ;   CALL iom_put( "ketrd_spg", zke )    ! surface pressure gradient 
     122         CASE( jpdyn_pvo )   ;   CALL iom_put( "ketrd_pvo", zke )    ! planetary vorticity 
     123         CASE( jpdyn_rvo )   ;   CALL iom_put( "ketrd_rvo", zke )    ! relative  vorticity     (or metric term) 
     124         CASE( jpdyn_keg )   ;   CALL iom_put( "ketrd_keg", zke )    ! Kinetic Energy gradient (or had) 
     125         CASE( jpdyn_zad )   ;   CALL iom_put( "ketrd_zad", zke )    ! vertical   advection 
     126         CASE( jpdyn_ldf )   ;   CALL iom_put( "ketrd_ldf", zke )    ! lateral diffusion 
     127         CASE( jpdyn_zdf )   ;   CALL iom_put( "ketrd_zdf", zke )    ! vertical diffusion  
    129128                                 !                                   ! wind stress trends 
    130                                  CALL wrk_alloc( jpi, jpj, z2dx, z2dy, zke2d ) 
    131                            z2dx(:,:) = un(:,:,1) * ( utau_b(:,:) + utau(:,:) ) * e1u(:,:) * e2u(:,:) * umask(:,:,1) 
    132                            z2dy(:,:) = vn(:,:,1) * ( vtau_b(:,:) + vtau(:,:) ) * e1v(:,:) * e2v(:,:) * vmask(:,:,1) 
    133                            zke2d(1,:) = 0._wp   ;   zke2d(:,1) = 0._wp 
    134                            DO jj = 2, jpj 
    135                               DO ji = 2, jpi 
    136                                  zke2d(ji,jj) = 0.5_wp * (   z2dx(ji,jj) + z2dx(ji-1,jj)   & 
    137                                  &                         + z2dy(ji,jj) + z2dy(ji,jj-1)   ) * r1_bt(ji,jj,1) 
    138                               END DO 
    139                            END DO 
    140                                  CALL iom_put( "ketrd_tau", zke2d ) 
    141                                  CALL wrk_dealloc( jpi, jpj     , z2dx, z2dy, zke2d ) 
    142          CASE( jpdyn_bfr )   ;   CALL iom_put( "ketrd_bfr", zke )    ! bottom friction (explicit case)  
     129                                 CALL wrk_alloc( jpi, jpj, z2dx, z2dy, zke2d ) 
     130                           z2dx(:,:) = un(:,:,1) * ( utau_b(:,:) + utau(:,:) ) * e1u(:,:) * e2u(:,:) * umask(:,:,1) 
     131                           z2dy(:,:) = vn(:,:,1) * ( vtau_b(:,:) + vtau(:,:) ) * e1v(:,:) * e2v(:,:) * vmask(:,:,1) 
     132                           zke2d(1,:) = 0._wp   ;   zke2d(:,1) = 0._wp 
     133                           DO jj = 2, jpj 
     134                              DO ji = 2, jpi 
     135                                 zke2d(ji,jj) = 0.5_wp * (   z2dx(ji,jj) + z2dx(ji-1,jj)   & 
     136                                 &                         + z2dy(ji,jj) + z2dy(ji,jj-1)   ) * r1_bt(ji,jj,1) 
     137                              END DO 
     138                           END DO 
     139                                 CALL iom_put( "ketrd_tau", zke2d ) 
     140                                 CALL wrk_dealloc( jpi, jpj     , z2dx, z2dy, zke2d ) 
     141         CASE( jpdyn_bfr )   ;   CALL iom_put( "ketrd_bfr", zke )    ! bottom friction (explicit case)  
    143142!!gm TO BE DONE properly 
    144143!!gm only valid if ln_bfrimp=F otherwise the bottom stress as to be recomputed at the end of the computation.... 
     
    162161!         ENDIF 
    163162!!gm end 
    164          CASE( jpdyn_atf )   ;   CALL iom_put( "ketrd_atf", zke )    ! asselin filter trends  
     163         CASE( jpdyn_atf )   ;   CALL iom_put( "ketrd_atf", zke )    ! asselin filter trends  
    165164!! a faire !!!!  idee changer dynnxt pour avoir un appel a jpdyn_bfr avant le swap !!! 
    166165!! reflechir a une possible sauvegarde du "vrai" un,vn pour le calcul de atf.... 
     
    184183!                              CALL iom_put( "ketrd_bfri", zke2d ) 
    185184!         ENDIF 
    186          CASE( jpdyn_ken )   ;   ! kinetic energy 
    187                            ! called in dynnxt.F90 before asselin time filter 
    188                            ! with putrd=ua and pvtrd=va 
    189                            zke(:,:,:) = 0.5_wp * zke(:,:,:) 
    190                            CALL iom_put( "KE", zke ) 
    191                            ! 
    192                            CALL ken_p2k( kt , zke ) 
    193                            CALL iom_put( "ketrd_convP2K", zke )     ! conversion -rau*g*w 
     185         CASE( jpdyn_ken )   ;   ! kinetic energy 
     186                           ! called in dynnxt.F90 before asselin time filter 
     187                           ! with putrd=ua and pvtrd=va 
     188                           zke(:,:,:) = 0.5_wp * zke(:,:,:) 
     189                           CALL iom_put( "KE", zke ) 
     190                           ! 
     191                           CALL ken_p2k( kt , zke ) 
     192                           CALL iom_put( "ketrd_convP2K", zke )     ! conversion -rau*g*w 
    194193         ! 
    195194      END SELECT 
     
    263262      ENDIF 
    264263      !                           ! allocate box volume arrays 
    265       IF ( trd_ken_alloc() /= 0 )   CALL ctl_stop('trd_ken_alloc: failed to allocate arrays') 
     264      IF( trd_ken_alloc() /= 0 )   CALL ctl_stop('trd_ken_alloc: failed to allocate arrays') 
    266265      ! 
    267266!!gm      IF( .NOT. (ln_hpg_zco.OR.ln_hpg_zps) )   & 
    268267!!gm         &   CALL ctl_stop('trd_ken_init : only full and partial cells are coded for conversion rate') 
    269268      ! 
    270       IF ( .NOT.lk_vvl ) THEN     ! constant volume: bu, bv, 1/bt computed one for all 
     269      IF( .NOT.lk_vvl ) THEN      ! constant volume: bu, bv, 1/bt computed one for all 
    271270         DO jk = 1, jpkm1 
    272             bu   (:,:,jk) =  e1u(:,:) * e2u(:,:) * fse3u_n(:,:,jk) 
    273             bv   (:,:,jk) =  e1v(:,:) * e2v(:,:) * fse3v_n(:,:,jk) 
     271            bu   (:,:,jk) =           e1e2u(:,:) * fse3u_n(:,:,jk) 
     272            bv   (:,:,jk) =           e1e2v(:,:) * fse3v_n(:,:,jk) 
    274273            r1_bt(:,:,jk) = 1._wp / ( e1e2t(:,:) * fse3t_n(:,:,jk) ) 
    275274         END DO 
  • branches/2014/dev_r4650_UKMO14.4_OBS_GENERAL_VINTERP/NEMOGCM/NEMO/OPA_SRC/TRD/trdmxl.F90

    r5950 r5951  
    2222   USE trd_oce         ! trends: ocean variables 
    2323   USE trdmxl_oce      ! ocean variables trends 
    24    USE ldftra_oce      ! ocean active tracers lateral physics 
     24   USE ldftra          ! lateral diffusion: eddy diffusivity & EIV coeff. 
    2525   USE zdf_oce         ! ocean vertical physics 
    26    USE in_out_manager  ! I/O manager 
    2726   USE phycst          ! Define parameters for the routines 
    2827   USE dianam          ! build the name of file (routine) 
     
    3029   USE zdfmxl          ! mixed layer depth 
    3130   USE zdfddm          ! ocean vertical physics: double diffusion 
    32    USE ioipsl          ! NetCDF library 
    3331   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    3432   USE diadimg         ! dimg direct access file format output 
    3533   USE trdmxl_rst      ! restart for diagnosing the ML trends 
     34   ! 
     35   USE in_out_manager  ! I/O manager 
     36   USE ioipsl          ! NetCDF library 
    3637   USE prtctl          ! Print control 
    3738   USE restart         ! for lrst_oce 
     
    7374   !! * Substitutions 
    7475#  include "domzgr_substitute.h90" 
    75 #  include "ldftra_substitute.h90" 
    7676#  include "zdfddm_substitute.h90" 
    7777   !!---------------------------------------------------------------------- 
     
    165165 
    166166 
    167       SELECT CASE( ktrd ) 
    168       CASE( jptra_npc  )               ! non-penetrative convection: regrouped with zdf 
     167         SELECT CASE( ktrd ) 
     168         CASE( jptra_npc  )               ! non-penetrative convection: regrouped with zdf 
    169169!!gm : to be completed !  
    170170!        IF( .... 
    171171!!gm end 
    172       CASE( jptra_zdfp )               ! iso-neutral diffusion: "pure" vertical diffusion 
    173          !                                   ! regroup iso-neutral diffusion in one term 
     172         CASE( jptra_zdfp )               ! iso-neutral diffusion: "pure" vertical diffusion 
     173!                                   ! regroup iso-neutral diffusion in one term 
    174174         tmltrd(:,:,jpmxl_ldf) = tmltrd(:,:,jpmxl_ldf) + ( tmltrd(:,:,jpmxl_zdf) - tmltrd(:,:,jpmxl_zdfp) ) 
    175175         smltrd(:,:,jpmxl_ldf) = smltrd(:,:,jpmxl_ldf) + ( smltrd(:,:,jpmxl_zdf) - smltrd(:,:,jpmxl_zdfp) ) 
     
    801801      END IF 
    802802 
    803       IF( nn_cla == 1 )   CALL ctl_warn( '      You set n_cla = 1. Note that the Mixed-Layer diagnostics  ',   & 
    804          &                               '      are not exact along the corresponding straits.            ') 
    805  
    806803      !                                   ! allocate trdmxl arrays 
    807804      IF( trd_mxl_alloc()    /= 0 )   CALL ctl_stop( 'STOP', 'trd_mxl_init : unable to allocate trdmxl     arrays' ) 
     
    810807 
    811808 
    812  
    813       nkstp     = nit000 - 1              ! current time step indicator initialization 
     809      nkstp     = nit000 - 1              ! current time step indicator initialization 
    814810 
    815811 
     
    851847      IF( nn_ctls == 1 ) THEN 
    852848         CALL ctl_opn( inum, 'ctlsurf_idx', 'OLD', 'UNFORMATTED', 'SEQUENTIAL', -1, numout, lwp ) 
    853          READ ( inum ) nbol 
     849         READ ( inum, * ) nbol 
    854850         CLOSE( inum ) 
    855851      END IF 
  • branches/2014/dev_r4650_UKMO14.4_OBS_GENERAL_VINTERP/NEMOGCM/NEMO/OPA_SRC/TRD/trdpen.F90

    r5950 r5951  
    1717   USE trd_oce        ! trends: ocean variables 
    1818   USE eosbn2         ! equation of state and related derivatives 
    19    USE ldftra_oce     ! ocean active tracers lateral physics 
     19   USE ldftra         ! lateral diffusion: eddy diffusivity & EIV coeff. 
    2020   USE zdfddm         ! vertical physics: double diffusion 
    2121   USE phycst         ! physical constants 
     22   ! 
    2223   USE in_out_manager ! I/O manager 
    2324   USE iom            ! I/O manager library 
     
    99100                                   CALL wrk_alloc( jpi, jpj, z2d ) 
    100101                                   z2d(:,:) = wn(:,:,1) * ( & 
    101                                       &   - ( rab_n(:,:,1,jp_tem) + rab_pe(:,:,1,jp_tem) ) * tsn(:,:,1,jp_tem)    & 
    102                                       &   + ( rab_n(:,:,1,jp_sal) + rab_pe(:,:,1,jp_sal) ) * tsn(:,:,1,jp_sal)    & 
    103                                       &                  ) / fse3t(:,:,1) 
     102                                     &   - ( rab_n(:,:,1,jp_tem) + rab_pe(:,:,1,jp_tem) ) * tsn(:,:,1,jp_tem)    & 
     103                                     &   + ( rab_n(:,:,1,jp_sal) + rab_pe(:,:,1,jp_sal) ) * tsn(:,:,1,jp_sal)    & 
     104                                     & ) / fse3t(:,:,1) 
    104105                                   CALL iom_put( "petrd_sad" , z2d ) 
    105106                                   CALL wrk_dealloc( jpi, jpj, z2d ) 
  • branches/2014/dev_r4650_UKMO14.4_OBS_GENERAL_VINTERP/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90

    r5950 r5951  
    2323   USE trdpen         ! trends: Potential ENergy 
    2424   USE trdmxl         ! ocean active mixed layer tracers trends  
    25    USE ldftra_oce     ! ocean active tracers lateral physics 
     25   USE ldftra         ! ocean active tracers lateral physics 
     26   USE ldfslp 
    2627   USE zdfddm         ! vertical physics: double diffusion 
    2728   USE phycst         ! physical constants 
     29   ! 
    2830   USE in_out_manager ! I/O manager 
    2931   USE iom            ! I/O manager library 
  • branches/2014/dev_r4650_UKMO14.4_OBS_GENERAL_VINTERP/NEMOGCM/NEMO/OPA_SRC/TRD/trdvor.F90

    r5950 r5951  
    2020   USE sbc_oce         ! surface boundary condition: ocean 
    2121   USE phycst          ! Define parameters for the routines 
    22    USE ldfdyn_oce      ! ocean active tracers: lateral physics 
     22   USE ldfdyn          ! ocean active tracers: lateral physics 
    2323   USE dianam          ! build the name of file (routine) 
    2424   USE zdfmxl          ! mixed layer depth 
    25    USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
     25   ! 
    2626   USE in_out_manager  ! I/O manager 
    2727   USE ioipsl          ! NetCDF library 
     28   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    2829   USE lib_mpp         ! MPP library 
    2930   USE wrk_nemo        ! Memory allocation 
     
    5758   !! * Substitutions 
    5859#  include "domzgr_substitute.h90" 
    59 #  include "ldfdyn_substitute.h90" 
    6060#  include "vectopt_loop_substitute.h90" 
    6161   !!---------------------------------------------------------------------- 
Note: See TracChangeset for help on using the changeset viewer.