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 10813 for NEMO – NEMO

Changeset 10813 for NEMO


Ignore:
Timestamp:
2019-03-29T16:06:08+01:00 (5 years ago)
Author:
davestorkey
Message:

UKMO/dev_r10037_vorticity_trends branch: updates/bug fixes.

Location:
NEMO/branches/UKMO/dev_r10037_vorticity_trends
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/dev_r10037_vorticity_trends/cfgs/SHARED/field_def_nemo-oce.xml

    r10810 r10813  
    798798     <!-- variables available with ln_dyn_vor --> 
    799799     <field id="vort_prg_avg"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" /> 
    800      <field id="vort_keg_avg"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" /> 
    801      <field id="vort_rvo_avg"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" /> 
    802      <field id="vort_pvo_avg"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" /> 
    803      <field id="vort_ldf_avg"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" /> 
    804      <field id="vort_zad_avg"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" /> 
    805      <field id="vort_zdf_avg"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" /> 
    806      <field id="vort_spg_avg"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" /> 
    807      <field id="vort_swf_avg"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" /> 
    808      <field id="vort_bfr_avg"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" /> 
    809      <field id="vort_prg_int"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" /> 
    810      <field id="vort_keg_int"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" /> 
    811      <field id="vort_rvo_int"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" /> 
    812      <field id="vort_pvo_int"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" /> 
    813      <field id="vort_ldf_int"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" /> 
    814      <field id="vort_zad_int"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" /> 
    815      <field id="vort_zdf_int"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" /> 
    816      <field id="vort_spg_int"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" /> 
    817 <!--     <field id="vort_swf_avg"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" /> 
    818          <field id="vort_bfr_avg"       long_name="curl(vertical avg) vort trend: internal pressure gradient"          unit="m/s^2" /> --> 
     800     <field id="vort_keg_avg"       long_name="curl(vertical avg) vort trend: KE gradient         or hor. adv."    unit="m/s^2" /> 
     801     <field id="vort_rvo_avg"       long_name="curl(vertical avg) vort trend: relative  vorticity or metric term"  unit="m/s^2" /> 
     802     <field id="vort_pvo_avg"       long_name="curl(vertical avg) vort trend: planetary vorticity"                 unit="m/s^2" /> 
     803     <field id="vort_ldf_avg"       long_name="curl(vertical avg) vort trend: lateral   diffusion"                 unit="m/s^2" /> 
     804     <field id="vort_zad_avg"       long_name="curl(vertical avg) vort trend: vertical  advection"                 unit="m/s^2" /> 
     805     <field id="vort_zdf_avg"       long_name="curl(vertical avg) vort trend: vertical  diffusion"                 unit="m/s^2" /> 
     806     <field id="vort_spg_avg"       long_name="curl(vertical avg) vort trend: surface pressure gradient"          unit="m/s^2" /> 
     807     <field id="vort_swf_avg"       long_name="curl(vertical avg) vort trend: wind stress"                         unit="m/s^2" /> 
     808     <field id="vort_bfr_avg"       long_name="curl(vertical avg) vort trend: bottom friction (explicit)"          unit="m/s^2" /> 
     809     <field id="vort_prg_int"       long_name="curl(vertical int) vort trend: internal pressure gradient"          unit="m/s^2" /> 
     810     <field id="vort_keg_int"       long_name="curl(vertical int) vort trend: KE gradient         or hor. adv."    unit="m/s^2" /> 
     811     <field id="vort_rvo_int"       long_name="curl(vertical int) vort trend: relative  vorticity or metric term"  unit="m/s^2" /> 
     812     <field id="vort_pvo_int"       long_name="curl(vertical int) vort trend: planetary vorticity"                 unit="m/s^2" /> 
     813     <field id="vort_ldf_int"       long_name="curl(vertical int) vort trend: lateral   diffusion"                 unit="m/s^2" /> 
     814     <field id="vort_zad_int"       long_name="curl(vertical int) vort trend: vertical  advection"                 unit="m/s^2" /> 
     815     <field id="vort_zdf_int"       long_name="curl(vertical int) vort trend: vertical  diffusion"                 unit="m/s^2" /> 
     816     <field id="vort_spg_int"       long_name="curl(vertical int) vort trend: surface pressure gradient"          unit="m/s^2" /> 
     817     <field id="vort_swf_int"       long_name="curl(vertical int) vort trend: wind stress"                         unit="m/s^2" /> 
     818     <field id="vort_bfr_int"       long_name="curl(vertical int) vort trend: bottom friction (explicit)"          unit="m/s^2" />  
    819819   </field_group> 
    820820 
  • NEMO/branches/UKMO/dev_r10037_vorticity_trends/src/OCE/TRD/trdvor.F90

    r10810 r10813  
    4343   INTEGER, SAVE, ALLOCATABLE, DIMENSION(:) ::   ndexvor1   ! needed for IOIPSL output 
    4444   INTEGER ::   ndebug     ! (0/1) set it to 1 in case of problem to have more print 
    45  
     45   INTEGER, SAVE :: n_hf_lastcalc  ! last timestep for which r1_hf_n was calculated.  
     46 
     47   REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:)   ::   r1_hf_n      ! reciprocal of water column height at F-points 
    4648   REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:)   ::   vor_avr      ! average 
    4749   REAL(wp), SAVE, ALLOCATABLE, DIMENSION(:,:)   ::   vor_avrb     ! before vorticity (kt-1) 
     
    7173         &      vor_avrbn (jpi,jpj) , rotot   (jpi,jpj) , vor_avrtot(jpi,jpj) ,   & 
    7274         &      vor_avrres(jpi,jpj) , vortrd  (jpi,jpj,jpltot_vor,jpltype_vor) ,   & 
    73          &      ndexvor1  (jpi*jpj)                                ,   STAT= trd_vor_alloc ) 
     75         &      ndexvor1  (jpi*jpj) , r1_hf_n (jpi,jpj)                        ,   STAT= trd_vor_alloc ) 
    7476         ! 
    7577      IF( lk_mpp             )   CALL mpp_sum ( trd_vor_alloc ) 
     
    8991      INTEGER                   , INTENT(in   ) ::   kt             ! time step 
    9092      ! 
    91       INTEGER ::   ji, jj   ! dummy loop indices 
     93      INTEGER ::   ji, jj, jk   ! dummy loop indices 
    9294      REAL(wp), DIMENSION(jpi,jpj) ::   ztswu, ztswv    ! 2D workspace  
    9395      !!---------------------------------------------------------------------- 
     96 
     97      IF( n_hf_lastcalc .lt. kt ) THEN 
     98         ! calculate reciprocal water column depth at F points if not already done this timestep. 
     99         r1_hf_n(:,:) = 0.0 
     100         DO jk = 1,jpk 
     101           r1_hf_n(:,:) = r1_hf_n(:,:) + e3f_n(:,:,jk) * fmask(:,:,jk) 
     102         END DO 
     103         r1_hf_n(:,:) = fmask(:,:,1) / ( r1_hf_n(:,:) + 1._wp - fmask(:,:,1) ) 
     104         n_hf_lastcalc = kt 
     105      ENDIF 
    94106 
    95107      SELECT CASE( ktrd )  
     
    186198      END SELECT 
    187199 
     200      ! Curl(vertical integral)/H diagnostics: 
     201      ! Curl: 
     202      DO ji = 1, jpim1 
     203         DO jj = 1, jpjm1 
     204            vortrd(ji,jj,ktrd,jptype_vor_int) = (    zvdpvor(ji+1,jj) - zvdpvor(ji,jj)     & 
     205               &                                 - ( zudpvor(ji,jj+1) - zudpvor(ji,jj) ) ) / ( e1f(ji,jj) * e2f(ji,jj) ) 
     206         END DO 
     207      END DO 
     208      ! Average of the Curl and Surface mask: 
     209      vortrd(:,:,ktrd,jptype_vor_int) = vortrd(:,:,ktrd,jptype_vor_int) * r1_hf_n(:,:) * fmask(:,:,1) 
     210 
    188211      ! Average except for Beta.V 
    189212      zudpvor(:,:) = zudpvor(:,:) * r1_hu_n(:,:) 
     
    266289      END DO 
    267290      ! Average of the Curl and Surface mask: 
    268       vortrd(:,:,ktrd,jptype_vor_int) = vortrd(:,:,ktrd,jptype_vor_int) * r1_hu_n(:,:) * fmask(:,:,1) 
     291      vortrd(:,:,ktrd,jptype_vor_int) = vortrd(:,:,ktrd,jptype_vor_int) * r1_hf_n(:,:) * fmask(:,:,1) 
    269292      ! 
    270293      ! Curl(vertical mean) diagnostics: 
     
    424447         IF( iom_use("vort_zdf_int") ) CALL iom_put("vort_zdf_int",vortrd(:,:,jpvor_zdf,jptype_vor_int)) 
    425448         IF( iom_use("vort_spg_int") ) CALL iom_put("vort_spg_int",vortrd(:,:,jpvor_spg,jptype_vor_int)) 
    426 !!$         IF( iom_use("vort_swf_int") ) CALL iom_put("vort_swf_int",vortrd(:,:,jpvor_prg,jptype_vor_int)) 
    427 !!$         IF( iom_use("vort_bfr_int") ) CALL iom_put("vort_bfr_int",vortrd(:,:,jpvor_prg,jptype_vor_int)) 
     449         IF( iom_use("vort_swf_int") ) CALL iom_put("vort_swf_int",vortrd(:,:,jpvor_prg,jptype_vor_int)) 
     450         IF( iom_use("vort_bfr_int") ) CALL iom_put("vort_bfr_int",vortrd(:,:,jpvor_prg,jptype_vor_int)) 
    428451         ! 
    429452      ENDIF 
     
    465488      IF( trd_vor_alloc() /= 0 )   CALL ctl_stop( 'STOP', 'trd_vor_init : unable to allocate trdvor arrays' ) 
    466489 
     490      n_hf_lastcalc = 0 
    467491      vortrd(:,:,:,:) = 0.0 
    468492 
Note: See TracChangeset for help on using the changeset viewer.