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 8850 – NEMO

Changeset 8850


Ignore:
Timestamp:
2017-11-30T09:30:44+01:00 (6 years ago)
Author:
gm
Message:

#1911 (ENHANCE-09): PART I.3 - phasing with trunk: tracer trends output (see #1877 trunk change from 86666 to 8698)

Location:
branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/CONFIG/SHARED/field_def_nemo-opa.xml

    r8679 r8850  
    2020      <field_group id="grid_T" grid_ref="grid_T_2D" > 
    2121         <field id="e3t"          long_name="T-cell thickness"   standard_name="cell_thickness"   unit="m"   grid_ref="grid_T_3D"/> 
     22         <field id="e3t_surf"     long_name="T-cell thickness"   field_ref="e3t"  standard_name="cell_thickness"   unit="m"   grid_ref="grid_T_SFC"/> 
    2223         <field id="e3t_0"        long_name="Initial T-cell thickness"   standard_name="ref_cell_thickness"   unit="m"   grid_ref="grid_T_3D"/> 
    2324 
     
    301302         <field id="ahtu_2d"      long_name=" surface u-eddy diffusivity coefficient"   unit="m2/s or m4/s" /> 
    302303         <field id="ahtu_3d"      long_name=" 3D u-EIV coefficient"                     unit="m2/s or m4/s"      grid_ref="grid_U_3D"/> 
    303          <!-- v-eiv diffusivity coefficients (available if ln_ldfeiv=F) --> 
     304         <!-- u-eiv diffusivity coefficients (available if ln_ldfeiv=F) --> 
    304305         <field id="aeiu_2d"      long_name=" surface u-EIV coefficient"                unit="m2/s" /> 
    305306         <field id="aeiu_3d"      long_name=" 3D u-EIV coefficient"                     unit="m2/s"              grid_ref="grid_U_3D"/> 
    306307 
    307          <!-- variables available with MLE --> 
     308         <!-- variables available with MLE (ln_mle=T) --> 
    308309         <field id="psiu_mle"     long_name="MLE streamfunction along i-axis"   unit="m3/s"   grid_ref="grid_U_3D" /> 
    309310 
     
    563564    --> 
    564565 
    565     <field_group id="trendT" grid_ref="grid_T_3D"> 
    566        <!-- variables available with ln_tra_trd --> 
     566   <!-- variables available with ln_tra_trd --> 
     567   <!-- Asselin trends  calculated on odd time steps--> 
     568   <field_group id="trendT_odd"  grid_ref="grid_T_3D"> 
     569      <field id="ttrd_atf"      long_name="temperature-trend: asselin time filter"       unit="degree_C/s" /> 
     570      <field id="strd_atf"      long_name="salinity   -trend: asselin time filter"       unit="0.001/s" /> 
     571      <!-- Thickness weighted versions: --> 
     572      <field id="ttrd_atf_e3t"      unit="degC/s * m"  >  ttrd_atf * e3t </field> 
     573      <field id="strd_atf_e3t"      unit="1e-3/s * m"  >  strd_atf * e3t </field> 
     574      <!-- OMIP  layer-integrated trends --> 
     575      <field id="ttrd_atf_li"      long_name="layer integrated heat-trend: asselin time filter "       unit="W/m^2" > ttrd_atf_e3t * 1026.0 * 3991.86795711963  </field> 
     576      <field id="strd_atf_li"      long_name="layer integrated salt   -trend: asselin time filter "       unit="kg/(m^2 s)" > strd_atf_e3t * 1026.0 * 0.001 </field> 
     577    </field_group> 
     578 
     579    <!-- Other trends  calculated on even time steps--> 
     580    <field_group id="trendT_even" grid_ref="grid_T_3D"> 
    567581       <field id="ttrd_xad"      long_name="temperature-trend: i-advection"                                                                                          unit="degC/s"                        /> 
    568582       <field id="strd_xad"      long_name="salinity   -trend: i-advection"                                                                                          unit="1e-3/s"                        /> 
     
    597611       <field id="ttrd_npc"      long_name="temperature-trend: non-penetrative conv."     unit="degC/s" /> 
    598612       <field id="strd_npc"      long_name="salinity   -trend: non-penetrative conv."     unit="1e-3/s" /> 
    599        <field id="ttrd_qns"      long_name="temperature-trend: non-solar flux + runoff"   unit="degC/s" /> 
    600        <field id="strd_cdt"      long_name="salinity   -trend: C/D term       + runoff"   unit="degC/s" /> 
     613       <field id="ttrd_qns"      long_name="temperature-trend: non-solar flux + runoff"   unit="degC/s" grid_ref="grid_T_2D" /> 
     614       <field id="strd_cdt"      long_name="salinity   -trend: C/D term       + runoff"   unit="degC/s" grid_ref="grid_T_2D" /> 
    601615       <field id="ttrd_qsr"      long_name="temperature-trend: solar penetr. heating"     unit="degC/s" /> 
    602616       <field id="ttrd_bbc"      long_name="temperature-trend: geothermal heating"        unit="degC/s" /> 
    603        <field id="ttrd_atf"      long_name="temperature-trend: asselin time filter"       unit="degC/s" /> 
    604        <field id="strd_atf"      long_name="salinity   -trend: asselin time filter"       unit="1e-3/s" /> 
    605        <field id="ttrd_tot"      long_name="temperature-trend: total model trend"         unit="degC/s" /> 
    606        <field id="strd_tot"      long_name="salinity   -trend: total model trend"         unit="1e-3/s" /> 
    607617 
    608618       <!-- Thickness weighted versions: --> 
     
    615625       <field id="ttrd_ad_e3t"       unit="degC/s * m" >  ttrd_ad  * e3t </field> 
    616626       <field id="strd_ad_e3t"       unit="1e-3/s * m" >  strd_ad  * e3t </field> 
    617        <field id="ttrd_totad_e3t"    unit="degC/s * m" >  ttrd_totad * e3t </field> 
    618        <field id="strd_totad_e3t"    unit="1e-3/s * m" >  strd_totad * e3t </field> 
     627       <field id="ttrd_totad_e3t"    unit="degC/s * m" >  ttrd_totad  * e3t </field> 
     628       <field id="strd_totad_e3t"    unit="1e-3/s * m" >  strd_totad  * e3t </field> 
    619629       <field id="ttrd_ldf_e3t"      unit="degC/s * m" >  ttrd_ldf * e3t </field> 
    620630       <field id="strd_ldf_e3t"      unit="1e-3/s * m" >  strd_ldf * e3t </field> 
     
    625635 
    626636       <!-- ln_traldf_iso=T only (iso-neutral diffusion) --> 
    627        <field id="ttrd_iso_e3t"      unit="degC/s * m"  >  ttrd_iso  * e3t </field> 
    628        <field id="strd_iso_e3t"      unit="1e-3/s * m"  >  strd_iso  * e3t </field> 
     637       <field id="ttrd_iso_e3t"      unit="degC/s * m"  >  ttrd_iso * e3t </field> 
     638       <field id="strd_iso_e3t"      unit="1e-3/s * m"  >  strd_iso * e3t </field> 
    629639       <field id="ttrd_zdfp_e3t"     unit="degC/s * m"  >  ttrd_zdfp * e3t </field> 
    630640       <field id="strd_zdfp_e3t"     unit="1e-3/s * m"  >  strd_zdfp * e3t </field> 
     
    641651       <field id="ttrd_qsr_e3t"      unit="degC/s * m"  >  ttrd_qsr * e3t </field> 
    642652       <field id="ttrd_bbc_e3t"      unit="degC/s * m"  >  ttrd_bbc * e3t </field> 
    643        <field id="ttrd_atf_e3t"      unit="degC/s * m"  >  ttrd_atf * e3t </field> 
    644        <field id="strd_atf_e3t"      unit="1e-3/s * m"  >  strd_atf * e3t </field> 
     653 
     654       <!-- OMIP  layer-integrated trends --> 
     655       <field id="ttrd_totad_li"    long_name="layer integrated heat-trend : total advection"       unit="W/m^2"     > ttrd_totad_e3t * 1026.0 * 3991.86795711963 </field> 
     656       <field id="strd_totad_li"    long_name="layer integrated salt   -trend : total advection"      unit="kg/(m^2 s)"    > strd_totad_e3t * 1026.0 * 0.001  </field> 
     657       <field id="ttrd_evd_li"      long_name="layer integrated heat-trend : EVD convection"         unit="W/m^2"    > ttrd_evd_e3t * 1026.0 * 3991.86795711963 </field> 
     658       <field id="strd_evd_li"      long_name="layer integrated salt   -trend : EVD convection"      unit="kg/(m^2 s)"  > strd_evd_e3t * 1026.0 * 0.001  </field> 
     659       <field id="ttrd_iso_li"      long_name="layer integrated heat-trend : isopycnal diffusion"    unit="W/m^2" > ttrd_iso_e3t * 1026.0 * 3991.86795711963 </field> 
     660       <field id="strd_iso_li"      long_name="layer integrated salt   -trend : isopycnal diffusion"   unit="kg/(m^2 s)" > strd_iso_e3t * 1026.0 * 0.001  </field> 
     661       <field id="ttrd_zdfp_li"     long_name="layer integrated heat-trend : pure vert. diffusion"   unit="W/m^2" > ttrd_zdfp_e3t * 1026.0 * 3991.86795711963 </field> 
     662       <field id="strd_zdfp_li"     long_name="layer integrated salt   -trend : pure vert. diffusion"   unit="kg/(m^2 s)" > strd_zdfp_e3t * 1026.0 * 0.001  </field> 
     663       <field id="ttrd_qns_li"      long_name="layer integrated heat-trend : non-solar flux + runoff"   unit="W/m^2" grid_ref="grid_T_2D"> ttrd_qns_e3t * 1026.0 * 3991.86795711963 </field> 
     664       <field id="ttrd_qsr_li"      long_name="layer integrated heat-trend : solar flux"   unit="W/m^2"  grid_ref="grid_T_3D"> ttrd_qsr_e3t * 1026.0 * 3991.86795711963 </field> 
     665       <field id="ttrd_bbl_li"      long_name="layer integrated heat-trend: bottom boundary layer "     unit="W/m^2" > ttrd_bbl_e3t * 1026.0 * 3991.86795711963 </field> 
     666       <field id="strd_bbl_li"      long_name="layer integrated salt   -trend: bottom boundary layer "     unit="kg/(m^2 s)" > strd_bbl_e3t * 1026.0 * 0.001  </field> 
     667       <field id="ttrd_evd_li"      long_name="layer integrated heat -trend: evd convection "       unit="W/m^2" >ttrd_evd_e3t * 1026.0 * 3991.86795711963  </field> 
     668       <field id="strd_evd_li"      long_name="layer integrated salt -trend: evd convection "       unit="kg/(m^2 s)" > strd_evd_e3t * 1026.0 * 0.001  </field> 
     669 
     670    </field_group> 
     671 
     672    <!--  Total trends calculated every time step--> 
     673    <field_group id="trendT" grid_ref="grid_T_3D"> 
     674       <field id="ttrd_tot"      long_name="temperature-trend: total model trend"         unit="degC/s" /> 
     675       <field id="strd_tot"      long_name="salinity   -trend: total model trend"         unit="1e-3/s" /> 
     676       <!-- Thickness weighted versions: --> 
    645677       <field id="ttrd_tot_e3t"      unit="degC/s * m"  >  ttrd_tot * e3t </field> 
    646678       <field id="strd_tot_e3t"      unit="1e-3/s * m"  >  strd_tot * e3t </field> 
    647  
    648  
     679       <!-- OMIP  layer-integrated total trends --> 
     680       <field id="ttrd_tot_li"      long_name="layer integrated heat-trend: total model trend :"         unit="W/m^2" > ttrd_tot_e3t * 1026.0 * 3991.86795711963 </field> 
     681       <field id="strd_tot_li"      long_name="layer integrated salt   -trend: total model trend :"         unit="kg/(m^2 s)" > strd_tot_e3t * 1026.0 * 0.001  </field> 
     682 
     683       <!-- **** these trends have not been apportioned to all/even/odd ts yet **** --> 
    649684       <!-- variables available with ln_KE_trd --> 
    650685       <field id="ketrd_hpg"     long_name="ke-trend: hydrostatic pressure gradient"          unit="W/s^3"                        /> 
     
    743778    --> 
    744779 
     780     <field_group id="TRD" > 
     781          <field field_ref="ttrd_totad_li"   name="opottempadvect"  /> 
     782          <field field_ref="ttrd_iso_li"     name="opottemppmdiff"  /> 
     783          <field field_ref="ttrd_zdfp_li"    name="opottempdiff"  /> 
     784          <field field_ref="ttrd_evd_li"     name="opottempevd" /> 
     785          <field field_ref="strd_evd_li"     name="osaltevd" /> 
     786          <field field_ref="ttrd_qns_li"     name="opottempqns"  /> 
     787          <field field_ref="ttrd_qsr_li"     name="rsdoabsorb" operation="accumulate" /> 
     788          <field field_ref="strd_totad_li"   name="osaltadvect" /> 
     789          <field field_ref="strd_iso_li"     name="osaltpmdiff"  /> 
     790          <field field_ref="strd_zdfp_li"    name="osaltdiff" /> 
     791    </field_group> 
     792     
    745793    <field_group id="mooring" > 
    746794       <field field_ref="toce"         name="thetao"   long_name="sea_water_potential_temperature"      /> 
  • branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/IOM/iom.F90

    r8817 r8850  
    205205      ! end file definition 
    206206      dtime%second = rdt 
    207       CALL xios_set_timestep(dtime) 
     207      CALL xios_set_timestep( dtime ) 
    208208      CALL xios_close_context_definition() 
    209        
    210       CALL xios_update_calendar(0) 
     209      CALL xios_update_calendar( 0 ) 
    211210      ! 
    212211      DEALLOCATE( zt_bnds, zw_bnds ) 
     
    253252      LOGICAL         , INTENT(in   ), OPTIONAL ::   ldiof    ! Interp On the Fly, needed for AGRIF (default = .FALSE.) 
    254253      INTEGER         , INTENT(in   ), OPTIONAL ::   kdlev    ! number of vertical levels 
    255  
     254      ! 
    256255      CHARACTER(LEN=256)    ::   clname    ! the name of the file based on cdname [[+clcpu]+clcpu] 
    257256      CHARACTER(LEN=256)    ::   cltmpn    ! tempory name to store clname (in writting mode) 
     
    645644      INTEGER , DIMENSION(:)     , INTENT(in   ), OPTIONAL ::   kcount     ! number of points to be read in each axis 
    646645      LOGICAL                    , INTENT(in   ), OPTIONAL ::   lrowattr   ! logical flag telling iom_get to 
    647                                                                            ! look for and use a file attribute 
    648                                                                            ! called open_ocean_jstart to set the start 
    649                                                                            ! value for the 2nd dimension (netcdf only) 
     646      !                                                                    ! look for and use a file attribute 
     647      !                                                                    ! called open_ocean_jstart to set the start 
     648      !                                                                    ! value for the 2nd dimension (netcdf only) 
    650649      ! 
    651650      LOGICAL                        ::   llnoov      ! local definition to read overlap 
     
    780779         IF( PRESENT(kstart) .AND. .NOT. ll_depth_spec ) THEN  
    781780            istart(1:idmspc) = kstart(1:idmspc)  
    782             icnt(1:idmspc) = kcount(1:idmspc) 
     781            icnt  (1:idmspc) = kcount(1:idmspc) 
    783782         ELSE 
    784783            IF(idom == jpdom_unknown ) THEN 
     
    806805                  ENDIF 
    807806                  IF( PRESENT(pv_r3d) ) THEN 
    808                      IF( idom == jpdom_data ) THEN                                  ; icnt(3) = inlev 
    809                      ELSE IF( ll_depth_spec .AND. PRESENT(kstart) ) THEN            ; istart(3) = kstart(3); icnt(3) = kcount(3) 
    810                      ELSE                                                           ; icnt(3) = inlev 
     807                     IF( idom == jpdom_data ) THEN                        ;                              icnt(3) = inlev 
     808                     ELSEIF( ll_depth_spec .AND. PRESENT(kstart) ) THEN   ;   istart(3) = kstart(3)   ;  icnt(3) = kcount(3) 
     809                     ELSE                                                 ;                              icnt(3) = inlev 
    811810                     ENDIF 
    812811                  ENDIF 
     
    12511250 
    12521251#if defined key_iomput 
    1253  
    12541252   !!---------------------------------------------------------------------- 
    12551253   !!   'key_iomput'                                         IOM  interface 
     
    14131411      REAL(wp), DIMENSION(jpi,jpj), INTENT(in) ::   plat 
    14141412      ! 
    1415       INTEGER  :: ni,nj 
     1413      INTEGER  :: ni, nj 
    14161414      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   zmask 
    14171415      !!---------------------------------------------------------------------- 
    14181416      ! 
    1419       ni=nlei-nldi+1 ; nj=nlej-nldj+1 
     1417      ni = nlei-nldi+1 
     1418      nj = nlej-nldj+1 
    14201419      ! 
    14211420      CALL iom_set_domain_attr("grid_"//cdgrd, ni_glo=jpiglo, nj_glo=jpjglo, ibegin=nimpp+nldi-2, jbegin=njmpp+nldj-2, ni=ni, nj=nj) 
     
    14681467      END SELECT 
    14691468      ! 
    1470       ni = nlei-nldi+1 ; nj = nlej-nldj+1  ! Dimensions of subdomain interior 
     1469      ni = nlei-nldi+1   ! Dimensions of subdomain interior 
     1470      nj = nlej-nldj+1 
    14711471      ! 
    14721472      z_fld(:,:) = 1._wp 
     
    15531553      REAL(wp), DIMENSION(jpi,jpj), INTENT(in) ::   plat 
    15541554      ! 
     1555      INTEGER  :: ni, nj, ix, iy 
    15551556      REAL(wp), DIMENSION(:), ALLOCATABLE  ::   zlon 
    1556       INTEGER  :: ni,nj, ix, iy 
    1557       !!---------------------------------------------------------------------- 
    1558       ! 
    1559       ni=nlei-nldi+1 ; nj=nlej-nldj+1            ! define zonal mean domain (jpj*jpk) 
    1560       ALLOCATE( zlon(ni*nj) )       ;       zlon(:) = 0. 
     1557      !!---------------------------------------------------------------------- 
     1558      ! 
     1559      ni=nlei-nldi+1       ! define zonal mean domain (jpj*jpk) 
     1560      nj=nlej-nldj+1 
     1561      ALLOCATE( zlon(ni*nj) )       ;       zlon(:) = 0._wp 
    15611562      ! 
    15621563      CALL dom_ngb( -168.53, 65.03, ix, iy, 'T' ) !  i-line that passes through Bering Strait: Reference latitude (used in plots) 
     
    16161617      !  
    16171618      ! frequency of the call of iom_put (attribut: freq_op) 
    1618       f_op%timestep = 1        ;  f_of%timestep = 0  ; CALL iom_set_field_attr('field_definition', freq_op=f_op, freq_offset=f_of) 
    1619       f_op%timestep = nn_fsbc  ;  f_of%timestep = 0  ; CALL iom_set_field_attr('SBC'             , freq_op=f_op, freq_offset=f_of) 
    1620       f_op%timestep = nn_fsbc  ;  f_of%timestep = 0  ; CALL iom_set_field_attr('SBC_scalar'      , freq_op=f_op, freq_offset=f_of) 
    1621       f_op%timestep = nn_dttrc ;  f_of%timestep = 0  ; CALL iom_set_field_attr('ptrc_T'          , freq_op=f_op, freq_offset=f_of) 
    1622       f_op%timestep = nn_dttrc ;  f_of%timestep = 0  ; CALL iom_set_field_attr('diad_T'          , freq_op=f_op, freq_offset=f_of) 
     1619      f_op%timestep = 1        ;  f_of%timestep =  0  ; CALL iom_set_field_attr('field_definition', freq_op=f_op, freq_offset=f_of) 
     1620      f_op%timestep = 2        ;  f_of%timestep =  0  ; CALL iom_set_field_attr('trendT_even'     , freq_op=f_op, freq_offset=f_of) 
     1621      f_op%timestep = 2        ;  f_of%timestep = -1  ; CALL iom_set_field_attr('trendT_odd'      , freq_op=f_op, freq_offset=f_of) 
     1622      f_op%timestep = nn_fsbc  ;  f_of%timestep =  0  ; CALL iom_set_field_attr('SBC'             , freq_op=f_op, freq_offset=f_of) 
     1623      f_op%timestep = nn_fsbc  ;  f_of%timestep =  0  ; CALL iom_set_field_attr('SBC_scalar'      , freq_op=f_op, freq_offset=f_of) 
     1624      f_op%timestep = nn_dttrc ;  f_of%timestep =  0  ; CALL iom_set_field_attr('ptrc_T'          , freq_op=f_op, freq_offset=f_of) 
     1625      f_op%timestep = nn_dttrc ;  f_of%timestep =  0  ; CALL iom_set_field_attr('diad_T'          , freq_op=f_op, freq_offset=f_of) 
    16231626 
    16241627      ! output file names (attribut: name) 
     
    17531756      TYPE(xios_duration)   ::   output_freq  
    17541757      !!---------------------------------------------------------------------- 
    1755  
    1756       DO jn = 1,2 
    1757  
     1758      ! 
     1759      DO jn = 1, 2 
     1760         ! 
    17581761         output_freq = xios_duration(0,0,0,0,0,0) 
    17591762         IF( jn == 1 )   CALL iom_get_file_attr( cdid, name        = clname, output_freq = output_freq ) 
    17601763         IF( jn == 2 )   CALL iom_get_file_attr( cdid, name_suffix = clname ) 
    1761  
     1764         ! 
    17621765         IF ( TRIM(clname) /= '' ) THEN  
    1763  
     1766            ! 
    17641767            idx = INDEX(clname,'@expname@') + INDEX(clname,'@EXPNAME@') 
    17651768            DO WHILE ( idx /= 0 )  
     
    17671770               idx = INDEX(clname,'@expname@') + INDEX(clname,'@EXPNAME@') 
    17681771            END DO 
    1769  
     1772            ! 
    17701773            idx = INDEX(clname,'@freq@') + INDEX(clname,'@FREQ@') 
    17711774            DO WHILE ( idx /= 0 )  
     
    17981801              idx = INDEX(clname,'@freq@') + INDEX(clname,'@FREQ@') 
    17991802            END DO 
    1800  
     1803            ! 
    18011804            idx = INDEX(clname,'@startdate@') + INDEX(clname,'@STARTDATE@') 
    18021805            DO WHILE ( idx /= 0 )  
     
    18051808               idx = INDEX(clname,'@startdate@') + INDEX(clname,'@STARTDATE@') 
    18061809            END DO 
    1807  
     1810            ! 
    18081811            idx = INDEX(clname,'@startdatefull@') + INDEX(clname,'@STARTDATEFULL@') 
    18091812            DO WHILE ( idx /= 0 )  
     
    18121815               idx = INDEX(clname,'@startdatefull@') + INDEX(clname,'@STARTDATEFULL@') 
    18131816            END DO 
    1814  
     1817            ! 
    18151818            idx = INDEX(clname,'@enddate@') + INDEX(clname,'@ENDDATE@') 
    18161819            DO WHILE ( idx /= 0 )  
     
    18441847      !! ** Purpose :   send back the date corresponding to the given julian day 
    18451848      !!---------------------------------------------------------------------- 
    1846       REAL(wp), INTENT(in   )           ::   pjday         ! julian day 
    1847       LOGICAL , INTENT(in   ), OPTIONAL ::   ld24          ! true to force 24:00 instead of 00:00 
    1848       LOGICAL , INTENT(in   ), OPTIONAL ::   ldfull        ! true to get the compleate date: yyyymmdd_hh:mm:ss 
     1849      REAL(wp), INTENT(in   )           ::   pjday    ! julian day 
     1850      LOGICAL , INTENT(in   ), OPTIONAL ::   ld24     ! true to force 24:00 instead of 00:00 
     1851      LOGICAL , INTENT(in   ), OPTIONAL ::   ldfull   ! true to get the compleate date: yyyymmdd_hh:mm:ss 
    18491852      ! 
    18501853      CHARACTER(LEN=20) ::   iom_sdate 
     
    18921895 
    18931896#else 
     1897   !!---------------------------------------------------------------------- 
     1898   !!   NOT 'key_iomput'                               a few dummy routines 
     1899   !!---------------------------------------------------------------------- 
    18941900 
    18951901   SUBROUTINE iom_setkt( kt, cdname ) 
     
    19071913 
    19081914   LOGICAL FUNCTION iom_use( cdname ) 
     1915      !!---------------------------------------------------------------------- 
     1916      !!---------------------------------------------------------------------- 
    19091917      CHARACTER(LEN=*), INTENT(in) ::   cdname 
     1918      !!---------------------------------------------------------------------- 
    19101919#if defined key_iomput 
    19111920      iom_use = xios_field_is_active( cdname ) 
  • branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/TRA/tranxt.F90

    r8568 r8850  
    113113  
    114114      ! set time step size (Euler/Leapfrog) 
    115       IF( neuler == 0 .AND. kt == nit000 ) THEN   ;   r2dt =     rdt      ! at nit000             (Euler) 
     115      IF( neuler == 0 .AND. kt == nit000 ) THEN   ;   r2dt =        rdt   ! at nit000             (Euler) 
    116116      ELSEIF( kt <= nit000 + 1 )           THEN   ;   r2dt = 2._wp* rdt   ! at nit000 or nit000+1 (Leapfrog) 
    117117      ENDIF 
     
    120120      IF( l_trdtra )   THEN                     
    121121         ALLOCATE( ztrdt(jpi,jpj,jpk) , ztrds(jpi,jpj,jpk) ) 
    122          ztrdt(:,:,jk) = 0._wp 
    123          ztrds(:,:,jk) = 0._wp 
     122         ztrdt(:,:,jpk) = 0._wp 
     123         ztrds(:,:,jpk) = 0._wp 
    124124         IF( ln_traldf_iso ) THEN              ! diagnose the "pure" Kz diffusive trend  
    125125            CALL trd_tra( kt, 'TRA', jp_tem, jptra_zdfp, ztrdt ) 
     
    127127         ENDIF 
    128128         ! total trend for the non-time-filtered variables.  
    129             zfact = 1.0 / rdt 
     129         zfact = 1.0 / rdt 
     130         ! G Nurser 23 Mar 2017. Recalculate trend as Delta(e3t*T)/e3tn; e3tn cancel from tsn terms 
    130131         DO jk = 1, jpkm1 
    131             ztrdt(:,:,jk) = ( tsa(:,:,jk,jp_tem) - tsn(:,:,jk,jp_tem) ) * zfact  
    132             ztrds(:,:,jk) = ( tsa(:,:,jk,jp_sal) - tsn(:,:,jk,jp_sal) ) * zfact  
     132            ztrdt(:,:,jk) = ( tsa(:,:,jk,jp_tem)*e3t_a(:,:,jk) / e3t_n(:,:,jk) - tsn(:,:,jk,jp_tem)) * zfact 
     133            ztrds(:,:,jk) = ( tsa(:,:,jk,jp_sal)*e3t_a(:,:,jk) / e3t_n(:,:,jk) - tsn(:,:,jk,jp_sal)) * zfact 
    133134         END DO 
    134135         CALL trd_tra( kt, 'TRA', jp_tem, jptra_tot, ztrdt ) 
    135136         CALL trd_tra( kt, 'TRA', jp_sal, jptra_tot, ztrds ) 
    136          ! Store now fields before applying the Asselin filter  
    137          ! in order to calculate Asselin filter trend later. 
    138          ztrdt(:,:,:) = tsn(:,:,:,jp_tem)  
    139          ztrds(:,:,:) = tsn(:,:,:,jp_sal) 
     137         IF( ln_linssh ) THEN       ! linear sea surface height only 
     138            ! Store now fields before applying the Asselin filter  
     139            ! in order to calculate Asselin filter trend later. 
     140            ztrdt(:,:,:) = tsn(:,:,:,jp_tem)  
     141            ztrds(:,:,:) = tsn(:,:,:,jp_sal) 
     142         ENDIF 
    140143      ENDIF 
    141144 
     
    146149            END DO 
    147150         END DO 
     151         IF (l_trdtra .AND. .NOT. ln_linssh ) THEN   ! Zero Asselin filter contribution must be explicitly written out since for vvl 
     152            !                                        ! Asselin filter is output by tra_nxt_vvl that is not called on this time step 
     153            ztrdt(:,:,:) = 0._wp 
     154            ztrds(:,:,:) = 0._wp 
     155            CALL trd_tra( kt, 'TRA', jp_tem, jptra_atf, ztrdt ) 
     156            CALL trd_tra( kt, 'TRA', jp_sal, jptra_atf, ztrds ) 
     157         END IF 
    148158         ! 
    149159      ELSE                                            ! Leap-Frog + Asselin filter time stepping 
     
    161171      ENDIF      
    162172      ! 
    163       IF( l_trdtra ) THEN      ! trend of the Asselin filter (tb filtered - tb)/dt      
     173      IF( l_trdtra .AND. ln_linssh ) THEN      ! trend of the Asselin filter (tb filtered - tb)/dt      
     174         zfact = 1._wp / r2dt              
    164175         DO jk = 1, jpkm1 
    165             zfact = 1._wp / r2dt              
    166176            ztrdt(:,:,jk) = ( tsb(:,:,jk,jp_tem) - ztrdt(:,:,jk) ) * zfact 
    167177            ztrds(:,:,jk) = ( tsb(:,:,jk,jp_sal) - ztrds(:,:,jk) ) * zfact 
     
    169179         CALL trd_tra( kt, 'TRA', jp_tem, jptra_atf, ztrdt ) 
    170180         CALL trd_tra( kt, 'TRA', jp_sal, jptra_atf, ztrds ) 
    171          DEALLOCATE( ztrdt , ztrds ) 
    172181      END IF 
     182      IF( l_trdtra )   DEALLOCATE( ztrdt , ztrds ) 
    173183      ! 
    174184      !                        ! control print 
     
    258268      LOGICAL  ::   ll_traqsr, ll_rnf, ll_isf   ! local logical 
    259269      INTEGER  ::   ji, jj, jk, jn              ! dummy loop indices 
    260       REAL(wp) ::   zfact1, ztc_a , ztc_n , ztc_b , ztc_f , ztc_d    ! local scalar 
     270      REAL(wp) ::   zfact, zfact1, ztc_a , ztc_n , ztc_b , ztc_f , ztc_d    ! local scalar 
    261271      REAL(wp) ::   zfact2, ze3t_b, ze3t_n, ze3t_a, ze3t_f, ze3t_d   !   -      - 
     272      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) ::   ztrd_atf 
    262273      !!---------------------------------------------------------------------- 
    263274      ! 
     
    278289      ENDIF 
    279290      ! 
     291      IF( ( l_trdtra .AND. cdtype == 'TRA' ) .OR. ( l_trdtrc .AND. cdtype == 'TRC' ) )   THEN 
     292         ALLOCATE( ztrd_atf(jpi,jpj,jpk,kjpt) ) 
     293         ztrd_atf(:,:,:,:) = 0.0_wp 
     294      ENDIF 
     295      zfact = 1._wp / r2dt 
     296      zfact1 = atfp * p2dt 
     297      zfact2 = zfact1 * r1_rau0 
    280298      DO jn = 1, kjpt       
    281299         DO jk = 1, jpkm1 
    282             zfact1 = atfp * p2dt 
    283             zfact2 = zfact1 * r1_rau0 
    284300            DO jj = 2, jpjm1 
    285301               DO ji = fs_2, fs_jpim1 
     
    330346                  ptn(ji,jj,jk,jn) = pta(ji,jj,jk,jn)     ! ptn <-- pta 
    331347                  ! 
     348                  IF( ( l_trdtra .and. cdtype == 'TRA' ) .OR. ( l_trdtrc .and. cdtype == 'TRC' ) ) THEN 
     349                     ztrd_atf(ji,jj,jk,jn) = (ztc_f - ztc_n) * zfact/ze3t_n 
     350                  ENDIF 
     351                  ! 
    332352               END DO 
    333353            END DO 
     
    336356      END DO 
    337357      ! 
     358      IF( ( l_trdtra .AND. cdtype == 'TRA' ) .OR. ( l_trdtrc .AND. cdtype == 'TRC' ) )   THEN 
     359         IF( l_trdtra .AND. cdtype == 'TRA' ) THEN  
     360            CALL trd_tra( kt, cdtype, jp_tem, jptra_atf, ztrd_atf(:,:,:,jp_tem) ) 
     361            CALL trd_tra( kt, cdtype, jp_sal, jptra_atf, ztrd_atf(:,:,:,jp_sal) ) 
     362         ENDIF 
     363         IF( l_trdtrc .AND. cdtype == 'TRC' ) THEN 
     364            DO jn = 1, kjpt 
     365               CALL trd_tra( kt, cdtype, jn, jptra_atf, ztrd_atf(:,:,:,jn) ) 
     366            END DO 
     367         ENDIF 
     368         DEALLOCATE( ztrd_atf ) 
     369      ENDIF 
     370      ! 
    338371   END SUBROUTINE tra_nxt_vvl 
    339372 
  • branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/TRA/trazdf.F90

    r8586 r8850  
    5858      IF( ln_timing )   CALL timing_start('tra_zdf') 
    5959      ! 
    60       IF( neuler == 0 .AND. kt == nit000 ) THEN     ! at nit000 
    61          r2dt =  rdt                                     ! = rdt (restarting with Euler time stepping) 
    62       ELSEIF( kt <= nit000 + 1) THEN                ! at nit000 or nit000+1 
    63          r2dt = 2. * rdt                                 ! = 2 rdt (leapfrog) 
     60      IF( neuler == 0 .AND. kt == nit000 ) THEN   ;   r2dt =      rdt   ! at nit000, =   rdt (restarting with Euler time stepping) 
     61      ELSEIF( kt <= nit000 + 1           ) THEN   ;   r2dt = 2. * rdt   ! otherwise, = 2 rdt (leapfrog) 
    6462      ENDIF 
    6563      ! 
     
    8280      IF( l_trdtra )   THEN                      ! save the vertical diffusive trends for further diagnostics 
    8381         DO jk = 1, jpkm1 
    84             ztrdt(:,:,jk) = ( ( tsa(:,:,jk,jp_tem) - tsb(:,:,jk,jp_tem) ) / r2dt ) - ztrdt(:,:,jk) 
    85             ztrds(:,:,jk) = ( ( tsa(:,:,jk,jp_sal) - tsb(:,:,jk,jp_sal) ) / r2dt ) - ztrds(:,:,jk) 
     82            ztrdt(:,:,jk) = ( ( tsa(:,:,jk,jp_tem)*e3t_a(:,:,jk) - tsb(:,:,jk,jp_tem)*e3t_b(:,:,jk) ) & 
     83               &          / (e3t_n(:,:,jk)*r2dt) ) - ztrdt(:,:,jk) 
     84            ztrds(:,:,jk) = ( ( tsa(:,:,jk,jp_sal)*e3t_a(:,:,jk) - tsb(:,:,jk,jp_sal)*e3t_b(:,:,jk) ) & 
     85              &           / (e3t_n(:,:,jk)*r2dt) ) - ztrds(:,:,jk) 
    8686         END DO 
    8787!!gm this should be moved in trdtra.F90 and done on all trends 
  • branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/TRD/trdtra.F90

    r8215 r8850  
    3131   USE iom            ! I/O manager library 
    3232   USE lib_mpp        ! MPP library 
    33    USE wrk_nemo       ! Memory allocation 
    3433 
    3534   IMPLICIT NONE 
     
    8281      REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT(in), OPTIONAL ::   ptra    ! now tracer variable 
    8382      ! 
    84       INTEGER  ::   jk   ! loop indices 
    85       REAL(wp), POINTER, DIMENSION(:,:,:)  ::   zwt, zws, ztrdt, ztrds   ! 3D workspace 
    86       !!---------------------------------------------------------------------- 
    87       ! 
    88       CALL wrk_alloc( jpi, jpj, jpk, ztrds ) 
     83      INTEGER ::   jk   ! loop indices 
     84      REAL(wp),        DIMENSION(jpi,jpj,jpk) ::   ztrds             ! 3D workspace 
     85      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:) ::   zwt, zws, ztrdt   ! 3D workspace 
     86      !!---------------------------------------------------------------------- 
    8987      !       
    9088      IF( .NOT. ALLOCATED( trdtx ) ) THEN      ! allocate trdtra arrays 
     
    103101                                 ztrds(:,:,:) = 0._wp 
    104102                                 CALL trd_tra_mng( trdt, ztrds, ktrd, kt ) 
     103 !!gm Gurvan, verify the jptra_evd trend please ! 
     104         CASE( jptra_evd )   ;   avt_evd(:,:,:) = ptrd(:,:,:) * tmask(:,:,:) 
    105105         CASE DEFAULT                 ! other trends: masked trends 
    106106            trdt(:,:,:) = ptrd(:,:,:) * tmask(:,:,:)              ! mask & store 
     
    122122         CASE( jptra_zdfp )           ! diagnose the "PURE" Kz trend (here: just before the swap) 
    123123            !                         ! iso-neutral diffusion case otherwise jptra_zdf is "PURE" 
    124             CALL wrk_alloc( jpi, jpj, jpk, zwt, zws, ztrdt ) 
     124            ALLOCATE( zwt(jpi,jpj,jpk), zws(jpi,jpj,jpk), ztrdt(jpi,jpj,jpk) ) 
    125125            ! 
    126126            zwt(:,:, 1 ) = 0._wp   ;   zws(:,:, 1 ) = 0._wp            ! vertical diffusive fluxes 
     
    152152            CALL trd_tra_mng( ztrdt, ztrds, jptra_evd, kt )   
    153153            ! 
    154             CALL wrk_dealloc( jpi, jpj, jpk, zwt, zws, ztrdt ) 
     154            DEALLOCATE( zwt, zws, ztrdt ) 
    155155            ! 
    156156         CASE DEFAULT                 ! other trends: mask and send T & S trends to trd_tra_mng 
     
    174174         ! 
    175175      ENDIF 
    176       ! 
    177       CALL wrk_dealloc( jpi, jpj, jpk, ztrds ) 
    178176      ! 
    179177   END SUBROUTINE trd_tra 
     
    305303      INTEGER ::   ji, jj, jk   ! dummy loop indices 
    306304      INTEGER ::   ikbu, ikbv   ! local integers 
    307       REAL(wp), POINTER, DIMENSION(:,:)   ::   z2dx, z2dy   ! 2D workspace  
     305      REAL(wp), ALLOCATABLE, DIMENSION(:,:)   ::   z2dx, z2dy   ! 2D workspace  
    308306      !!---------------------------------------------------------------------- 
    309307      ! 
    310308!!gm Rq: mask the trends already masked in trd_tra, but lbc_lnk should probably be added 
    311309      ! 
     310      ! 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 
    312311      SELECT CASE( ktrd ) 
    313       CASE( jptra_xad  )   ;   CALL iom_put( "ttrd_xad" , ptrdx )        ! x- horizontal advection 
    314                                CALL iom_put( "strd_xad" , ptrdy ) 
    315       CASE( jptra_yad  )   ;   CALL iom_put( "ttrd_yad" , ptrdx )        ! y- horizontal advection 
    316                                CALL iom_put( "strd_yad" , ptrdy ) 
    317       CASE( jptra_zad  )   ;   CALL iom_put( "ttrd_zad" , ptrdx )        ! z- vertical   advection 
    318                                CALL iom_put( "strd_zad" , ptrdy ) 
    319                                IF( ln_linssh ) THEN                   ! cst volume : adv flux through z=0 surface 
    320                                   CALL wrk_alloc( jpi, jpj, z2dx, z2dy ) 
    321                                   z2dx(:,:) = wn(:,:,1) * tsn(:,:,1,jp_tem) / e3t_n(:,:,1) 
    322                                   z2dy(:,:) = wn(:,:,1) * tsn(:,:,1,jp_sal) / e3t_n(:,:,1) 
    323                                   CALL iom_put( "ttrd_sad", z2dx ) 
    324                                   CALL iom_put( "strd_sad", z2dy ) 
    325                                   CALL wrk_dealloc( jpi, jpj, z2dx, z2dy ) 
    326                                ENDIF 
    327       CASE( jptra_totad  ) ;   CALL iom_put( "ttrd_totad" , ptrdx )      ! total   advection 
    328                                CALL iom_put( "strd_totad" , ptrdy ) 
    329       CASE( jptra_ldf  )   ;   CALL iom_put( "ttrd_ldf" , ptrdx )        ! lateral diffusion 
    330                                CALL iom_put( "strd_ldf" , ptrdy ) 
    331       CASE( jptra_zdf  )   ;   CALL iom_put( "ttrd_zdf" , ptrdx )        ! vertical diffusion (including Kz contribution) 
    332                                CALL iom_put( "strd_zdf" , ptrdy ) 
    333       CASE( jptra_zdfp )   ;   CALL iom_put( "ttrd_zdfp", ptrdx )        ! PURE vertical diffusion (no isoneutral contribution) 
    334                                CALL iom_put( "strd_zdfp", ptrdy ) 
    335       CASE( jptra_evd )    ;   CALL iom_put( "ttrd_evd", ptrdx )         ! EVD trend (convection) 
    336                                CALL iom_put( "strd_evd", ptrdy ) 
    337       CASE( jptra_dmp  )   ;   CALL iom_put( "ttrd_dmp" , ptrdx )        ! internal restoring (damping) 
    338                                CALL iom_put( "strd_dmp" , ptrdy ) 
    339       CASE( jptra_bbl  )   ;   CALL iom_put( "ttrd_bbl" , ptrdx )        ! bottom boundary layer 
    340                                CALL iom_put( "strd_bbl" , ptrdy ) 
    341       CASE( jptra_npc  )   ;   CALL iom_put( "ttrd_npc" , ptrdx )        ! static instability mixing 
    342                                CALL iom_put( "strd_npc" , ptrdy ) 
    343       CASE( jptra_nsr  )   ;   CALL iom_put( "ttrd_qns" , ptrdx(:,:,1) )        ! surface forcing + runoff (ln_rnf=T) 
    344                                CALL iom_put( "strd_cdt" , ptrdy(:,:,1) )        ! output as 2D surface fields 
    345       CASE( jptra_qsr  )   ;   CALL iom_put( "ttrd_qsr" , ptrdx )        ! penetrative solar radiat. (only on temperature) 
    346       CASE( jptra_bbc  )   ;   CALL iom_put( "ttrd_bbc" , ptrdx )        ! geothermal heating   (only on temperature) 
    347       CASE( jptra_atf  )   ;   CALL iom_put( "ttrd_atf" , ptrdx )        ! asselin time Filter 
    348                                CALL iom_put( "strd_atf" , ptrdy ) 
    349       CASE( jptra_tot  )   ;   CALL iom_put( "ttrd_tot" , ptrdx )        ! model total trend 
     312      ! This total trend is done every time step 
     313      CASE( jptra_tot  )   ;   CALL iom_put( "ttrd_tot" , ptrdx )           ! model total trend 
    350314                               CALL iom_put( "strd_tot" , ptrdy ) 
    351315      END SELECT 
    352316      ! 
     317      ! These trends are done every second time step. When 1ts output is selected must go different (2ts) file from standard T-file 
     318      IF( MOD( kt, 2 ) == 0 ) THEN 
     319         SELECT CASE( ktrd ) 
     320         CASE( jptra_xad  )   ;   CALL iom_put( "ttrd_xad"  , ptrdx )         ! x- horizontal advection 
     321                                  CALL iom_put( "strd_xad"  , ptrdy ) 
     322         CASE( jptra_yad  )   ;   CALL iom_put( "ttrd_yad"  , ptrdx )         ! y- horizontal advection 
     323                                  CALL iom_put( "strd_yad"  , ptrdy ) 
     324         CASE( jptra_zad  )   ;   CALL iom_put( "ttrd_zad"  , ptrdx )         ! z- vertical   advection 
     325                                  CALL iom_put( "strd_zad"  , ptrdy ) 
     326                                  IF( ln_linssh ) THEN                   ! cst volume : adv flux through z=0 surface 
     327                                     ALLOCATE( z2dx(jpi,jpj) , z2dy(jpi,jpj) ) 
     328                                     z2dx(:,:) = wn(:,:,1) * tsn(:,:,1,jp_tem) / e3t_n(:,:,1) 
     329                                     z2dy(:,:) = wn(:,:,1) * tsn(:,:,1,jp_sal) / e3t_n(:,:,1) 
     330                                     CALL iom_put( "ttrd_sad", z2dx ) 
     331                                     CALL iom_put( "strd_sad", z2dy ) 
     332                                     DEALLOCATE( z2dx, z2dy ) 
     333                                  ENDIF 
     334         CASE( jptra_totad  ) ;   CALL iom_put( "ttrd_totad", ptrdx )         ! total   advection 
     335                                  CALL iom_put( "strd_totad", ptrdy ) 
     336         CASE( jptra_ldf  )   ;   CALL iom_put( "ttrd_ldf"  , ptrdx )         ! lateral diffusion 
     337                                  CALL iom_put( "strd_ldf"  , ptrdy ) 
     338         CASE( jptra_zdf  )   ;   CALL iom_put( "ttrd_zdf"  , ptrdx )         ! vertical diffusion (including Kz contribution) 
     339                                  CALL iom_put( "strd_zdf"  , ptrdy ) 
     340         CASE( jptra_zdfp )   ;   CALL iom_put( "ttrd_zdfp" , ptrdx )         ! PURE vertical diffusion (no isoneutral contribution) 
     341                                  CALL iom_put( "strd_zdfp" , ptrdy ) 
     342         CASE( jptra_evd )    ;   CALL iom_put( "ttrd_evd"  , ptrdx )         ! EVD trend (convection) 
     343                                  CALL iom_put( "strd_evd"  , ptrdy ) 
     344         CASE( jptra_dmp  )   ;   CALL iom_put( "ttrd_dmp"  , ptrdx )         ! internal restoring (damping) 
     345                                  CALL iom_put( "strd_dmp"  , ptrdy ) 
     346         CASE( jptra_bbl  )   ;   CALL iom_put( "ttrd_bbl"  , ptrdx )         ! bottom boundary layer 
     347                                  CALL iom_put( "strd_bbl"  , ptrdy ) 
     348         CASE( jptra_npc  )   ;   CALL iom_put( "ttrd_npc"  , ptrdx )         ! static instability mixing 
     349                                  CALL iom_put( "strd_npc"  , ptrdy ) 
     350         CASE( jptra_bbc  )   ;   CALL iom_put( "ttrd_bbc"  , ptrdx )         ! geothermal heating   (only on temperature) 
     351         CASE( jptra_nsr  )   ;   CALL iom_put( "ttrd_qns"  , ptrdx(:,:,1) )  ! surface forcing + runoff (ln_rnf=T) 
     352                                  CALL iom_put( "strd_cdt"  , ptrdy(:,:,1) )        ! output as 2D surface fields 
     353         CASE( jptra_qsr  )   ;   CALL iom_put( "ttrd_qsr"  , ptrdx )         ! penetrative solar radiat. (only on temperature) 
     354         END SELECT 
     355         ! the Asselin filter trend  is also every other time step but needs to be lagged one time step 
     356         ! Even when 1ts output is selected can go to the same (2ts) file as the trends plotted every even time step. 
     357      ELSEIF( MOD( kt, 2 ) == 1 ) THEN 
     358         SELECT CASE( ktrd ) 
     359         CASE( jptra_atf  )   ;   CALL iom_put( "ttrd_atf" , ptrdx )        ! asselin time Filter 
     360                                  CALL iom_put( "strd_atf" , ptrdy ) 
     361         END SELECT 
     362      ENDIF 
     363      ! 
    353364   END SUBROUTINE trd_tra_iom 
    354365 
  • branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/TOP_SRC/TRP/trcnxt.F90

    r7881 r8850  
    2828   USE oce_trc         ! ocean dynamics and tracers variables 
    2929   USE trc             ! ocean passive tracers variables 
    30    USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    31    USE prtctl_trc      ! Print control for debbuging 
    3230   USE trd_oce 
    3331   USE trdtra 
     
    3836   USE agrif_top_interp 
    3937# endif 
     38   ! 
     39   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
     40   USE prtctl_trc      ! Print control for debbuging 
    4041 
    4142   IMPLICIT NONE 
    4243   PRIVATE 
    4344 
    44    PUBLIC   trc_nxt          ! routine called by step.F90 
     45   PUBLIC   trc_nxt   ! routine called by step.F90 
    4546 
    4647   REAL(wp) ::   rfact1, rfact2 
     
    8283      REAL(wp) ::   zfact            ! temporary scalar 
    8384      CHARACTER (len=22) :: charout 
    84       REAL(wp), POINTER, DIMENSION(:,:,:,:) ::  ztrdt  
     85      REAL(wp), ALLOCATABLE, DIMENSION(:,:,:,:) ::   ztrdt    ! 4D workspace 
    8586      !!---------------------------------------------------------------------- 
    8687      ! 
     
    102103 
    103104      IF( l_trdtrc )  THEN             ! trends: store now fields before the Asselin filter application 
    104          CALL wrk_alloc( jpi, jpj, jpk, jptra, ztrdt ) 
     105         ALLOCATE( ztrdt(jpi,jpj,jpk,jptra) ) 
    105106         ztrdt(:,:,:,:)  = trn(:,:,:,:) 
    106107      ENDIF 
     
    137138            END DO 
    138139         END DO 
    139          CALL wrk_dealloc( jpi, jpj, jpk, jptra, ztrdt )  
     140         DEALLOCATE( ztrdt )  
    140141      END IF 
    141142      ! 
Note: See TracChangeset for help on using the changeset viewer.