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

Changeset 359


Ignore:
Timestamp:
2005-12-21T11:46:45+01:00 (18 years ago)
Author:
opalod
Message:

nemo_v1_update_033 : RB + CT : Add new surface pressure gradient algorithms

Location:
trunk/NEMO
Files:
39 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/C1D_SRC/diawri1d.F90

    r355 r359  
    8787      !!   8.5  !  02-09  (G. Madec)  F90: Free form and module 
    8888      !!   9.0  !  04-10  (C. Ethe)   1D Configuration 
     89      !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization 
    8990      !!---------------------------------------------------------------------- 
    9091      !! * Modules used 
     
    193194            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    194195 
    195 #if defined key_dynspg_fsc && defined key_ice_lim 
     196#if ! defined key_dynspg_rl && defined key_ice_lim 
    196197         ! sowaflup = sowaflep + sorunoff + sowafldp + a term associated to 
    197198         !    internal damping to Levitus that can be diagnosed from others 
     
    364365      CALL histwrite( nid_T, "sosstsst", it, tn(:,:,1)     , ndim_hT, ndex_hT )   ! sea surface temperature 
    365366      CALL histwrite( nid_T, "sosaline", it, sn(:,:,1)     , ndim_hT, ndex_hT )   ! sea surface salinity 
    366 #if defined key_dynspg_fsc && defined key_ice_lim 
     367#if ! defined key_dynspg_rl && defined key_ice_lim 
    367368      CALL histwrite( nid_T, "iowaflup", it, fsalt(:,:)    , ndim_hT, ndex_hT )   ! ice=>ocean water flux 
    368369      CALL histwrite( nid_T, "sowaflep", it, fmass(:,:)    , ndim_hT, ndex_hT )   ! atmos=>ocean water flux 
  • trunk/NEMO/C1D_SRC/icestp1d.F90

    r321 r359  
    227227      !!        !  01-03  (D. Ludicone, E. Durand, G. Madec) free surf. 
    228228      !!   2.0  !  02-09  (G. Madec, C. Ethe)  F90: Free form and module 
     229      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization 
    229230      !!---------------------------------------------------------------------- 
    230231      !! * arguments 
     
    246247         emps   (:,:) = 0.e0 
    247248         erp    (:,:) = 0.e0 
    248 #if defined key_dynspg_fsc  
     249#if ! defined key_dynspg_rl  
    249250         dmp    (:,:) = 0.e0 
    250251#endif 
     
    262263      qsr (:,:) = fsolar(:,:)                     ! solar flux 
    263264       
    264 #if defined key_dynspg_fsc      
     265#if ! defined key_dynspg_rl      
    265266      ! total concentration/dilution effect (use on SSS) 
    266267      emps(:,:) = fmass(:,:) + fsalt(:,:) + runoff(:,:) + erp(:,:) + empold 
     
    313314      !! History : 
    314315      !!   9.0  !  04-01  (G. Madec, C. Ethe)  Original code 
     316      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization 
    315317      !!---------------------------------------------------------------------- 
    316318      !! * Local declarations 
    317319      INTEGER ::   ji, jj                   ! dummy loop indices 
    318320      REAL(wp) ::   zerp, ztrp, zsrp 
    319 #if defined key_dynspg_fsc 
     321#if ! defined key_dynspg_rl 
    320322      REAL(wp) ::   zwei 
    321323      REAL(wp) ::   zerpplus(jpi,jpj), zerpminus(jpi,jpj) 
     
    342344      zsrp  = ztrp * ro0cpr * rauw   ! (Kg/m2/s2)  
    343345 
    344 #if defined key_dynspg_fsc  
     346#if ! defined key_dynspg_rl  
    345347      ! Free-surface 
    346348          
  • trunk/NEMO/LIM_SRC/limflx.F90

    r258 r359  
    7272      REAL(wp) ::   & 
    7373         zinda  ,              &  ! switch for testing the values of ice concentration 
    74          z1mthcm,              &  ! 1 - thcm 
     74         z1mthcm                  ! 1 - thcm 
    7575!!         zfcm1  ,              &  ! solar  heat fluxes 
    7676!!         zfcm2  ,              &  !  non solar heat fluxes 
    7777#if defined key_lim_fdd    
     78      REAL(wp) ::   & 
    7879         zfons,                &  ! salt exchanges at the ice/ocean interface 
    7980         zpme                     ! freshwater exchanges at the ice/ocean interface 
    8081#else 
     82      REAL(wp) ::   & 
    8183         zprs  , zfons,        &  ! salt exchanges at the ice/ocean interface 
    8284         zpmess                   ! freshwater exchanges at the ice/ocean interface 
  • trunk/NEMO/OPA_SRC/DIA/diafwb.F90

    r247 r359  
    44   !! Ocean diagnostics: freshwater budget 
    55   !!====================================================================== 
    6 #if ( defined key_orca_r2 || defined  key_orca_r4 ) && defined key_dynspg_fsc && ! defined key_coupled 
    7    !!---------------------------------------------------------------------- 
    8    !!   "key_dynspg_fsc" and "key_orca_r2 or 4" 
     6#if ( defined key_orca_r2 || defined  key_orca_r4 ) && ! defined key_dynspg_rl && ! defined key_coupled 
     7   !!---------------------------------------------------------------------- 
     8   !!   NOT "key_dynspg_rl" and "key_orca_r2 or 4" 
    99   !!---------------------------------------------------------------------- 
    1010   !!   dia_fwb     : freshwater budget for global ocean configurations 
     
    6161      !!   8.2  !  01-02  (E. Durand)  Original code 
    6262      !!   8.5  !  02-06  (G. Madec)  F90: Free form and module 
     63      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization 
    6364      !!---------------------------------------------------------------------- 
    6465      !! * Arguments 
  • trunk/NEMO/OPA_SRC/DIA/diaspr.F90

    r247 r359  
    9696      !!        !  98-02  (M. Guyon)  FETI method 
    9797      !!   8.5  !  02-06  (G. Madec)  F90: Free form and module 
     98      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization 
    9899      !!---------------------------------------------------------------------- 
    99100      !! * Arguments 
     
    140141 
    141142         ! control 
    142 # if defined key_dynspg_fsc 
     143# if ! defined key_dynspg_rl 
    143144      IF(lwp) WRITE(numout,cform_err) 
    144145      IF(lwp) WRITE(numout,*) '          surface pressure already explicitly computed !!' 
  • trunk/NEMO/OPA_SRC/DIA/diawri.F90

    r352 r359  
    9898      !!        !  99-02  (E. Guilyardi)  name of netCDF files + variables 
    9999      !!   8.5  !  02-09  (G. Madec)  F90: Free form and module 
     100      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization 
    100101      !!---------------------------------------------------------------------- 
    101102      !! * Modules used 
     
    237238         CALL histdef( nid_T, "sosaline", "Sea Surface Salinity"               , "PSU"    ,   &  ! sss 
    238239            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    239 #if defined key_dynspg_fsc 
     240#if defined key_dynspg_rl 
     241         CALL histdef( nid_T, "sobarstf","Barotropic StreamFunction"           , "m3/s2"  ,   &  ! bsf 
     242            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
     243#else 
    240244         CALL histdef( nid_T, "sossheig", "Sea Surface Height"                 , "m"      ,   &  ! ssh 
    241245            &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    242 #else 
    243          CALL histdef( nid_T, "sobarstf","Barotropic StreamFunction"           , "m3/s2"  ,   &  ! bsf 
    244             &          jpi, jpj, nh_T, 1  , 1, 1  , -99 , 32, clop, zsto, zout ) 
    245 #endif 
    246 #if defined key_dynspg_fsc && defined key_ice_lim 
     246#endif 
     247#if ! defined key_dynspg_rl && defined key_ice_lim 
    247248         ! sowaflup = sowaflep + sorunoff + sowafldp + a term associated to 
    248249         !    internal damping to Levitus that can be diagnosed from others 
     
    325326         CALL histdef( nid_U, "sozotaux", "Wind Stress along i-axis"           , "N/m2"   ,   &  ! taux 
    326327            &          jpi, jpj, nh_U, 1  , 1, 1  , - 99, 32, clop, zsto, zout ) 
    327 #if ! defined key_dynspg_fsc 
     328#if defined key_dynspg_rl 
    328329         CALL histdef( nid_U, "sozospgx", "Zonal Surface Pressure Gradient"    , "N/kg"   ,   &  ! spgu 
    329330            &          jpi, jpj, nh_U, 1  , 1, 1  , - 99, 32, clop, zsto, zout ) 
     
    342343         CALL histdef( nid_V, "sometauy", "Wind Stress along j-axis"           , "N/m2"   ,   &  ! tauy 
    343344            &          jpi, jpj, nh_V, 1  , 1, 1  , - 99, 32, clop, zsto, zout ) 
    344 #if ! defined key_dynspg_fsc 
     345#if defined key_dynspg_rl 
    345346         CALL histdef( nid_V, "somespgy", "Meridional Surface Pressure Grad."  , "N/kg"   ,   &  ! spgv 
    346347            &          jpi, jpj, nh_V, 1  , 1, 1  , - 99, 32, clop, zsto, zout ) 
     
    407408      CALL histwrite( nid_T, "sosstsst", it, tn(:,:,1)     , ndim_hT, ndex_hT )   ! sea surface temperature 
    408409      CALL histwrite( nid_T, "sosaline", it, sn(:,:,1)     , ndim_hT, ndex_hT )   ! sea surface salinity 
    409 #if defined key_dynspg_fsc 
     410#if defined key_dynspg_rl 
     411      CALL histwrite( nid_T, "sobarstf", it, bsfn          , ndim_hT, ndex_hT )   ! barotropic streamfunction 
     412#else 
    410413      CALL histwrite( nid_T, "sossheig", it, sshn          , ndim_hT, ndex_hT )   ! sea surface height 
    411 #else 
    412       CALL histwrite( nid_T, "sobarstf", it, bsfn          , ndim_hT, ndex_hT )   ! barotropic streamfunction 
    413 #endif 
    414 #if defined key_dynspg_fsc && defined key_ice_lim 
     414#endif 
     415#if ! defined key_dynspg_rl && defined key_ice_lim 
    415416      CALL histwrite( nid_T, "iowaflup", it, fsalt(:,:)    , ndim_hT, ndex_hT )   ! ice=>ocean water flux 
    416417      CALL histwrite( nid_T, "sowaflep", it, fmass(:,:)    , ndim_hT, ndex_hT )   ! atmos=>ocean water flux 
     
    460461#endif 
    461462      CALL histwrite( nid_U, "sozotaux", it, taux          , ndim_hU, ndex_hU )   ! i-wind stress 
    462 #if ! defined key_dynspg_fsc 
     463#if defined key_dynspg_rl 
    463464      CALL lbc_lnk( spgu, 'U', -1. ) 
    464465      CALL histwrite( nid_U, "sozospgx", it, spgu          , ndim_hU, ndex_hU )   ! i-surf. press. grad. 
     
    471472#endif 
    472473      CALL histwrite( nid_V, "sometauy", it, tauy          , ndim_hV, ndex_hV )   ! j-wind stress 
    473 #if ! defined key_dynspg_fsc 
     474#if defined key_dynspg_rl 
    474475      CALL lbc_lnk( spgv, 'V', -1. ) 
    475476      CALL histwrite( nid_V, "somespgy", it, spgv          , ndim_hV, ndex_hV )   ! j-surf. pressure grad. 
     
    534535      !!   8.5  !  02-06  (A.Bozec, E. Durand)  Original code (diainit.F) 
    535536      !!   9.0  !  02-12  (G. Madec)  merge of diabort and diainit, F90 
     537      !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization 
    536538      !!---------------------------------------------------------------------- 
    537539      !! * Modules used 
     
    584586      CALL histdef( id_i, "votemper", "Temperature"           , "C"      ,   &   ! temperature 
    585587         &          jpi, jpj, nh_i, jpk, 1, jpk, nz_i, 32, clop, zsto, zout ) 
     588#if defined key_dynspg_rl 
     589      CALL histdef( id_i, "sobarstf","Barotropic StreamFunction", "m3/s2"  ,   &  ! bsf 
     590         &          jpi, jpj, nh_i, 1  , 1, 1  , nz_i, 32, clop, zsto, zout ) 
     591#else 
     592      CALL histdef( id_i, "sossheig", "Sea Surface Height"    , "m"      ,   &  ! ssh 
     593         &          jpi, jpj, nh_i, 1  , 1, 1  , nz_i, 32, clop, zsto, zout ) 
     594#endif 
    586595      CALL histdef( id_i, "vozocrtx", "Zonal Current"         , "m/s"    ,   &   ! zonal current 
    587596         &          jpi, jpj, nh_i, jpk, 1, jpk, nz_i, 32, clop, zsto, zout ) 
     
    615624      CALL histwrite( id_i, "votemper", 1, tn    , jpi*jpj*jpk, idex )    ! now temperature 
    616625      CALL histwrite( id_i, "vosaline", 1, sn    , jpi*jpj*jpk, idex )    ! now salinity 
     626#if defined key_dynspg_rl 
     627      CALL histwrite( id_i, "sobarstf", 1, bsfn  , jpi*jpj    , idex )    ! barotropic streamfunction 
     628#else 
     629      CALL histwrite( id_i, "sossheig", 1, sshn  , jpi*jpj    , idex )    ! sea surface height 
     630#endif 
    617631      CALL histwrite( id_i, "vozocrtx", 1, un    , jpi*jpj*jpk, idex )    ! now i-velocity 
    618632      CALL histwrite( id_i, "vomecrty", 1, vn    , jpi*jpj*jpk, idex )    ! now j-velocity 
  • trunk/NEMO/OPA_SRC/DIA/diawri_dimg.h90

    r320 r359  
    6969    !!      additions : 97-2002 ( Clipper Group ) dimg files 
    7070    !!                  dec 2003 ( J.M. Molines) f90, mpp output for OPA9.0 
     71    !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization 
    7172    !!---------------------------------------------------------------------- 
    7273    !! * modules used 
     
    163164       fsel(:,:,4 ) = fsel(:,:,4 ) + emp (:,:) 
    164165       fsel(:,:,5 ) = fsel(:,:,5 ) + tb  (:,:,1) - sst(:,:) 
    165 #if defined key_dynspg_fsc 
     166#if ! defined key_dynspg_rl 
    166167       fsel(:,:,6 ) = fsel(:,:,6 ) + sshn(:,:)    ! SSH 
    167168#else 
     
    240241          fsel(:,:,5 ) = (tb  (:,:,1) -sst(:,:)) *tmask(:,:,1) 
    241242 
    242 #if defined key_dynspg_fsc 
     243#if ! defined key_dynspg_rl 
    243244          fsel(:,:,6 ) = sshn(:,:) 
    244245#else 
  • trunk/NEMO/OPA_SRC/DOM/dom_oce.F90

    r352 r359  
    182182      rdtmax = 3600._wp ,    &  !: maximum time step on tracers 
    183183      rdth   =  800._wp ,    &  !: depth variation of tracer step 
     184      rdtbt  =   90._wp ,    &  !: barotropic time step for the dynamics (lk_dynspg_ts=T) 
    184185      atfp   = 0.1_wp   ,    &  !: asselin time filter parameter 
    185186      atfp1                     !: asselin time filter coeff. (atfp1= 1-2*atfp) 
  • trunk/NEMO/OPA_SRC/DOM/domain.F90

    r258 r359  
    6868      !!        !  01-05  (E.Durand - G. Madec) insert closed sea 
    6969      !!   8.5  !  02-08  (G. Madec)  F90: Free form and module 
     70      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization 
    7071      !!---------------------------------------------------------------------- 
    7172      !! * Local declarations 
     
    9394      ! Local depth or Inverse of the local depth of the water column at u- and v-points 
    9495      ! ------------------------------ 
    95 #if defined key_dynspg_fsc 
    9696      ! Ocean depth at U- and V-points 
    9797      hu(:,:) = 0. 
    9898      hv(:,:) = 0. 
    99  
    10099      DO jk = 1, jpk 
    101100         hu(:,:) = hu(:,:) + fse3u(:,:,jk) * umask(:,:,jk) 
    102101         hv(:,:) = hv(:,:) + fse3v(:,:,jk) * vmask(:,:,jk) 
    103102      END DO 
    104 # if defined key_trdvor 
    105103      ! Inverse of the local depth 
    106104      hur(:,:) = fse3u(:,:,1)             ! Lower bound : thickness of the first model level 
    107105      hvr(:,:) = fse3v(:,:,1) 
    108        
    109106      DO jk = 2, jpk                      ! Sum of the vertical scale factors 
    110107         hur(:,:) = hur(:,:) + fse3u(:,:,jk) * umask(:,:,jk) 
    111108         hvr(:,:) = hvr(:,:) + fse3v(:,:,jk) * vmask(:,:,jk) 
    112109      END DO 
    113  
    114110      ! Compute and mask the inverse of the local depth 
    115111      hur(:,:) = 1. / hur(:,:) * umask(:,:,1) 
    116112      hvr(:,:) = 1. / hvr(:,:) * vmask(:,:,1) 
    117 # endif 
    118  
    119 #elif defined key_dynspg_rl 
    120       ! Inverse of the local depth 
    121       hur(:,:) = fse3u(:,:,1)             ! Lower bound : thickness of the first model level 
    122       hvr(:,:) = fse3v(:,:,1) 
    123        
    124       DO jk = 2, jpk                      ! Sum of the vertical scale factors 
    125          hur(:,:) = hur(:,:) + fse3u(:,:,jk) * umask(:,:,jk) 
    126          hvr(:,:) = hvr(:,:) + fse3v(:,:,jk) * vmask(:,:,jk) 
    127       END DO 
    128  
    129       ! Compute and mask the inverse of the local depth 
    130       hur(:,:) = 1. / hur(:,:) * umask(:,:,1) 
    131       hvr(:,:) = 1. / hvr(:,:) * vmask(:,:,1) 
    132 #endif 
     113 
    133114 
    134115      CALL dom_stp                        ! Time step 
     
    163144      NAMELIST/namdom/ ntopo , e3zps_min, e3zps_rat, ngrid  , nmsh  ,   & 
    164145         &             nacc  , atfp     , rdt      , rdtmin , rdtmax,   & 
    165          &             rdth  , nfice    , nfbulk  , nclosea 
     146         &             rdth  , rdtbt    , nfice    , nfbulk , nclosea 
    166147      NAMELIST/namcla/ n_cla 
    167148      !!---------------------------------------------------------------------- 
     
    335316         WRITE(numout,*) '           maximum time step on tracers   rdtmax    = ', rdtmax 
    336317         WRITE(numout,*) '           depth variation tracer step    rdth      = ', rdth 
     318         WRITE(numout,*) '           barotropic time step           rdtbt     = ', rdtbt 
    337319      ENDIF 
    338320 
  • trunk/NEMO/OPA_SRC/DOM/dommsk.F90

    r291 r359  
    1818   USE lib_mpp 
    1919   USE solisl          ! ??? 
    20    USE dynspg_fsc      ! 
    21    USE dynspg_fsc_atsk ! 
     20   USE dynspg          ! choice/control of key cpp for surface pressure gradient 
    2221 
    2322   IMPLICIT NONE 
     
    122121      !!        !  01-09  (J.-M. Molines)  Open boundaries 
    123122      !!   8.5  !  02-08  (G. Madec)  F90: Free form and module 
     123      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization 
    124124      !!---------------------------------------------------------------------- 
    125125      !! *Local declarations 
     
    265265       
    266266      ! Computation 
    267       IF( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) THEN 
     267      IF( lk_dynspg_rl ) THEN 
     268         bmask(:,:) = fmask(:,:,1)       ! elliptic equation is written at f-point 
     269      ELSE 
    268270         bmask(:,:) = tmask(:,:,1)       ! elliptic equation is written at t-point 
    269       ELSE 
    270          bmask(:,:) = fmask(:,:,1)       ! elliptic equation is written at f-point 
    271271      ENDIF 
    272272       
     
    285285      !   north fold :  
    286286      IF( nperio == 3 .OR. nperio == 4 ) THEN 
    287          IF( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) THEN 
     287         IF( lk_dynspg_rl ) THEN 
     288            ! T-pt pivot and F-pt elliptic eq. : bmask set to 0. on rows jpj-1 and jpj 
     289            bmask(:,jpj-1) = 0.e0 
     290            bmask(:,jpj  ) = 0.e0 
     291         ELSE 
    288292            ! T-pt pivot and T-pt elliptic eq. : bmask set to 0. on row jpj and on half jpjglo-1 row 
    289293            DO ji = 1, jpi 
     
    292296               bmask(ji,jpj  ) = 0.e0 
    293297            END DO 
    294          ELSE 
    295             ! T-pt pivot and F-pt elliptic eq. : bmask set to 0. on rows jpj-1 and jpj 
    296             bmask(:,jpj-1) = 0.e0 
    297             bmask(:,jpj  ) = 0.e0 
    298298         ENDIF 
    299299      ENDIF 
    300300      IF( nperio == 5 .OR. nperio == 6 ) THEN 
    301          IF( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) THEN 
    302             ! F-pt pivot and T-pt elliptic eq. : bmask set to 0. on row jpj 
    303             bmask(:,jpj) = 0.e0 
    304          ELSE 
     301         IF( lk_dynspg_rl ) THEN 
    305302            ! F-pt pivot and F-pt elliptic eq. : bmask set to 0. on row jpj and on half jpjglo-1 row 
    306303            DO ji = 1, jpi 
     
    309306               bmask(ji,jpj  ) = 0.e0 
    310307            END DO 
     308         ELSE 
     309            ! F-pt pivot and T-pt elliptic eq. : bmask set to 0. on row jpj 
     310            bmask(:,jpj) = 0.e0 
    311311         ENDIF 
    312312      ENDIF 
     
    323323         ! north fold : bmask must be set to 0. on rows jpj-1 and jpj  
    324324         IF( npolj == 3 .OR. npolj == 4 ) THEN 
    325             IF( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) THEN 
     325            IF( lk_dynspg_rl ) THEN 
     326               DO ji = 1, nlci 
     327                  bmask(ji,nlcj-1) = 0.e0 
     328                  bmask(ji,nlcj  ) = 0.e0 
     329               END DO 
     330            ELSE 
    326331               DO ji = 1, nlci 
    327332                  ii = ji + nimpp - 1 
     
    329334                  bmask(ji,nlcj  ) = 0.e0 
    330335               END DO 
    331             ELSE 
     336            ENDIF 
     337         ENDIF 
     338         IF( npolj == 5 .OR. npolj == 6 ) THEN 
     339            IF( lk_dynspg_rl ) THEN 
    332340               DO ji = 1, nlci 
    333                   bmask(ji,nlcj-1) = 0.e0 
    334                   bmask(ji,nlcj  ) = 0.e0 
    335                END DO 
    336             ENDIF 
    337          ENDIF 
    338          IF( npolj == 5 .OR. npolj == 6 ) THEN 
    339             IF( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) THEN 
    340                DO ji = 1, nlci 
     341                  ii = ji + nimpp - 1 
     342                  bmask(ji,nlcj-1) = bmask(ji,nlcj-1) * fpol(ii) 
    341343                  bmask(ji,nlcj  ) = 0.e0 
    342344               END DO 
    343345            ELSE 
    344346               DO ji = 1, nlci 
    345                   ii = ji + nimpp - 1 
    346                   bmask(ji,nlcj-1) = bmask(ji,nlcj-1) * fpol(ii) 
    347347                  bmask(ji,nlcj  ) = 0.e0 
    348348               END DO 
  • trunk/NEMO/OPA_SRC/DYN/dynhpg.F90

    r258 r359  
    2828   !! * Accessibility 
    2929   PUBLIC dyn_hpg                ! routine called by step.F90 
    30  
    31 #if defined key_autotasking 
    32    !!---------------------------------------------------------------------- 
    33    !!   'key_autotasking' :                             j-k-i loop (j-slab) 
    34    !!---------------------------------------------------------------------- 
    35    LOGICAL, PUBLIC, PARAMETER ::   lk_dynhpg_tsk = .TRUE.    !: autotasked hpg flag 
    36    LOGICAL, PUBLIC, PARAMETER ::   lk_dynhpg     = .FALSE.   !: vector hpg flag 
    37 #else 
    38    !!---------------------------------------------------------------------- 
    39    !!   default case :                             k-j-i loop (vector opt.) 
    40    !!----------------------------------------------------------------------    
    41    LOGICAL, PUBLIC, PARAMETER ::   lk_dynhpg_tsk = .FALSE.   !: autotasked hpg flag 
    42    LOGICAL, PUBLIC, PARAMETER ::   lk_dynhpg     = .TRUE.    !: vector hpg flag 
    43 #endif 
    4430 
    4531   !! * Substitutions 
  • trunk/NEMO/OPA_SRC/DYN/dynnxt.F90

    r258 r359  
    3636      !!      After velocity is compute using a leap-frog scheme environment: 
    3737      !!         (ua,va) = (ub,vb) + 2 rdt (ua,va) 
    38       !!      Note that if lk_dynspg_fsc=T, the time stepping has already been 
     38      !!      Note that if lk_dynspg_flt=T, the time stepping has already been 
    3939      !!      performed in dynspg module 
    4040      !!      Time filter applied on now horizontal velocity to avoid the 
     
    5656      !!   8.5  !  02-08  (G. Madec)  F90: Free form and module 
    5757      !!        !  02-10  (C. Talandier, A-M. Treguier) Open boundary cond. 
     58      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization 
    5859      !!---------------------------------------------------------------------- 
    5960      !! * Arguments 
     
    8889         ! Next velocity 
    8990         ! ------------- 
    90 #if defined key_dynspg_fsc 
     91#if defined key_dynspg_flt 
    9192         ! Leap-frog time stepping already done in dynspg.F routine 
    9293#else 
  • trunk/NEMO/OPA_SRC/DYN/dynspg_exp.F90

    r358 r359  
    3434#  include "vectopt_loop_substitute.h90" 
    3535   !!---------------------------------------------------------------------- 
    36    !!   OPA 9.0 , LODYC-IPSL  (2005) 
    37    !!---------------------------------------------------------------------- 
     36   !!  OPA 9.0 , LOCEAN-IPSL (2005)  
     37   !! $Header$  
     38   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt  
     39   !!---------------------------------------------------------------------- 
     40 
    3841 
    3942CONTAINS 
  • trunk/NEMO/OPA_SRC/DYN/dynspg_rl.F90

    r314 r359  
    1818   USE ldfdyn_oce      ! ocean dynamics: lateral physics 
    1919   USE zdf_oce         ! ocean vertical physics 
    20    USE trdmod          ! ocean dynamics trends  
    21    USE trdmod_oce      ! ocean variables trends 
    22    USE in_out_manager  ! I/O manager 
    2320   USE sol_oce         ! ocean elliptic solver 
    2421   USE solpcg          ! preconditionned conjugate gradient solver 
     
    3027   USE lib_mpp         ! distributed memory computing library 
    3128   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
     29   USE in_out_manager  ! I/O manager 
    3230 
    3331   IMPLICIT NONE 
     
    3634   !! * Accessibility 
    3735   PUBLIC dyn_spg_rl   ! called by step.F90 
    38  
    39    !! * Shared module variables 
    40    LOGICAL, PUBLIC, PARAMETER ::   lk_dynspg_rl = .TRUE.    !: rigid-lid flag 
    4136 
    4237   !! * Substitutions 
     
    8075      !! 
    8176      !! ** Action : - Update (ua,va) with the surf. pressure gradient trend 
    82       !!             - Save the trends in (ztdua,ztdva) ('key_trddyn') 
    8377      !! 
    8478      !! References : 
     
    9791      !!        !  02-11  (C. Talandier, A-M Treguier) Open boundaries 
    9892      !!   9.0  !  04-08  (C. Talandier)  New trends organization 
     93      !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization 
    9994      !!--------------------------------------------------------------------- 
    100       !! * Modules used      
    101       USE oce, ONLY :    ztdua => ta,    & ! use ta as 3D workspace    
    102                          ztdva => sa       ! use sa as 3D workspace    
    10395      !! * Arguments 
    10496      INTEGER, INTENT( in  ) ::   kt       ! ocean time-step index 
     
    532524      END DO 
    533525 
    534       ! save the surface pressure gradient trends for diagnostic 
    535       ! momentum trends 
    536       IF( l_trddyn )   THEN 
    537          DO jk = 1, jpkm1 
    538             ztdua(:,:,jk) = - spgu(:,:) 
    539             ztdva(:,:,jk) = - spgv(:,:) 
    540          END DO 
    541  
    542          CALL trd_mod(ztdua, ztdva, jpdtdldf, 'DYN', kt) 
    543       ENDIF 
    544  
    545526   END SUBROUTINE dyn_spg_rl 
    546527 
     
    549530   !!   'key_dynspg_rl'                                        NO rigid lid 
    550531   !!---------------------------------------------------------------------- 
    551    LOGICAL, PUBLIC, PARAMETER ::   lk_dynspg_rl = .FALSE.   !: rigid-lid flag 
    552532CONTAINS 
    553533   SUBROUTINE dyn_spg_rl( kt, kindic )       ! Empty routine 
  • trunk/NEMO/OPA_SRC/DYN/dynspg_ts.F90

    r358 r359  
    3939#  include "vectopt_loop_substitute.h90" 
    4040   !!---------------------------------------------------------------------- 
    41    !!   OPA 9.0 , LODYC-IPSL  (2005) 
     41   !!  OPA 9.0 , LOCEAN-IPSL (2005)  
     42   !! $Header$  
     43   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt  
    4244   !!---------------------------------------------------------------------- 
    4345 
  • trunk/NEMO/OPA_SRC/SBC/flxfwb.F90

    r247 r359  
    44   !! Ocean fluxes   : domain averaged freshwater budget 
    55   !!====================================================================== 
    6 #if defined key_dynspg_fsc 
    7    !!---------------------------------------------------------------------- 
    8    !!   'key_dynspg_fsc'               No free surface with constant volume 
     6#if ! defined key_dynspg_rl 
     7   !!---------------------------------------------------------------------- 
     8   !!   NOT 'key_dynspg_rl'                        Free surface formulation 
    99   !!---------------------------------------------------------------------- 
    1010   !!   flx_fwb      : freshwater budget for global ocean configurations 
     
    245245      !! History : 
    246246      !!   9.0  !  03-09  (G. Madec)  Original code 
     247      !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization 
    247248      !!---------------------------------------------------------------------- 
    248249      !! * Local declarations 
     
    272273      ENDIF 
    273274      ! Option consistency 
    274 #if ! defined key_dynspg_fsc 
     275#if defined key_dynspg_rl 
    275276      IF(lwp) WRITE '               Rigid-lid option, fwb correction is useless, but valid' 
    276277#endif 
  • trunk/NEMO/OPA_SRC/SBC/ocesbc.F90

    r296 r359  
    4646      qrp ,         &  !: heat flux damping (w/m2) 
    4747      erp              !: evaporation damping (kg/m2/s = mm/s) 
    48 #if defined key_dynspg_fsc 
     48#if ! defined key_dynspg_rl 
    4949   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &  !: 
    5050      dmp              !: internal dampind term 
     
    8080      !!   1.0  !  00-10  (O. Marti)  Original code 
    8181      !!   2.0  !  02-12  (G. Madec)  F90: Free form and module 
     82      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization 
    8283      !!---------------------------------------------------------------------- 
    8384      !! * Arguments 
     
    101102         emps  (:,:) = 0.e0 
    102103         erp   (:,:) = 0.e0 
    103 #if defined key_dynspg_fsc  
     104#if ! defined key_dynspg_rl  
    104105         dmp   (:,:) = 0.e0 
    105106#endif 
     
    135136         qsr(:,:) = fsolar(:,:) 
    136137 
    137 #if defined key_dynspg_fsc   
     138#if ! defined key_dynspg_rl   
    138139         ! total concentration/dilution effect (use on SSS) 
    139140         emps(:,:) = fmass(:,:) + fsalt(:,:) + runoff(:,:) + erp(:,:) 
     
    190191      !!        !  01-03  (D. Ludicone, E. Durand, G. Madec) free surf. 
    191192      !!   2.0  !  02-09  (G. Madec, C. Ethe)  F90: Free form and module 
     193      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization 
    192194      !!---------------------------------------------------------------------- 
    193195      !! * arguments 
     
    209211         emps   (:,:) = 0.e0 
    210212         erp    (:,:) = 0.e0 
    211 #if defined key_dynspg_fsc  
     213#if ! defined key_dynspg_rl  
    212214         dmp    (:,:) = 0.e0 
    213215#endif 
     
    227229         qsr (:,:) = fsolar(:,:)                     ! solar flux 
    228230 
    229 #if defined key_dynspg_fsc      
     231#if ! defined key_dynspg_rl      
    230232         ! total concentration/dilution effect (use on SSS) 
    231233         emps(:,:) = fmass(:,:) + fsalt(:,:) + runoff(:,:) + erp(:,:) + empold 
     
    393395      !!        !  01-03  (D. Ludicone, E. Durand, G. Madec) free surf. 
    394396      !!   2.0  !  02-09  (G. Madec, C. Ethe)  F90: Free form and module 
     397      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization 
    395398      !!---------------------------------------------------------------------- 
    396399      !! * Modules used 
     
    430433         emps   (:,:) = 0.e0 
    431434         erp    (:,:) = 0.e0 
    432 #if defined key_dynspg_fsc  
     435#if ! defined key_dynspg_rl  
    433436         dmp    (:,:) = 0.e0 
    434437#endif 
     
    510513         END DO 
    511514 
    512 #if defined key_dynspg_fsc  
     515#if ! defined key_dynspg_rl  
    513516         ! Free-surface 
    514517 
     
    756759      !! History : 
    757760      !!   9.0  !  04-01  (G. Madec, C. Ethe)  Original code 
     761      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization 
    758762      !!---------------------------------------------------------------------- 
    759763      !! * Local declarations 
     
    762766      REAL(wp) ::   zerp, ztrp, zsrp 
    763767      CHARACTER (len=71) :: charout 
    764 #if defined key_dynspg_fsc 
     768#if ! defined key_dynspg_rl 
    765769      REAL(wp) ::   zwei 
    766770      REAL(wp) ::   zerpplus(jpi,jpj), zerpminus(jpi,jpj) 
     
    798802      ENDIF 
    799803 
    800 #if defined key_dynspg_fsc  
     804#if ! defined key_dynspg_rl  
    801805      ! Free-surface 
    802806          
  • trunk/NEMO/OPA_SRC/SOL/solfet.F90

    r247 r359  
    3737      !!     Solve the ellipic equation for the barotropic stream function 
    3838      !!     system (default option) or the transport divergence system 
    39       !!     (lk_dynspg_fsc=T) using a Finite Elements Tearing and  
     39      !!     (lk_dynspg_flt=T) using a Finite Elements Tearing and  
    4040      !!      Interconnecting (FETI) approach. 
    4141      !!     In the former case, the barotropic stream function trend has a 
  • trunk/NEMO/OPA_SRC/SOL/solmat.F90

    r315 r359  
    1919   USE lbclnk          ! lateral boudary conditions 
    2020   USE lib_mpp         ! distributed memory computing 
    21    USE dynspg_rl 
    22    USE dynspg_fsc 
    2321 
    2422   IMPLICIT NONE 
     
    4644      !!      The matrix is built for the barotropic stream function system. 
    4745      !!      a diagonal preconditioning matrix is also defined. 
    48       !!       * lk_dynspg_fsc=T: free surface formulation 
     46      !!       * lk_dynspg_flt=T: free surface formulation 
    4947      !!      The matrix is built for the divergence of the transport system 
    5048      !!      a diagonal preconditioning matrix is also defined. 
     
    6765      !!   8.5  !  02-08  (G. Madec)  F90: Free form 
    6866      !!        !  02-11  (C. Talandier, A-M. Treguier) Free surface & Open boundaries 
     67      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization 
    6968      !!---------------------------------------------------------------------- 
    7069      !! * Local declarations 
     
    9695      z2dt = 2. * rdt 
    9796 
    98 #if defined key_dynspg_fsc && ! defined key_obc 
    99 !!cr      IF( lk_dynspg_fsc .AND. .NOT.lk_obc ) THEN   !bug missing lk_dynspg_fsc_atsk 
     97#if defined key_dynspg_flt && ! defined key_obc 
     98!!cr      IF( lk_dynspg_flt .AND. .NOT.lk_obc ) THEN   !bug missing lk_dynspg_flt_atsk 
    10099 
    101100      ! defined the coefficients for free surface elliptic system 
     
    117116      END DO 
    118117       
    119 #  elif defined key_dynspg_fsc && defined key_obc 
    120 !!cr      ELSEIF( lk_dynspg_fsc .AND. lk_obc ) THEN     !bug missing lk_dynspg_fsc_atsk  
     118#  elif defined key_dynspg_flt && defined key_obc 
     119!!cr      ELSEIF( lk_dynspg_flt .AND. lk_obc ) THEN     !bug missing lk_dynspg_flt_atsk  
    121120 
    122121      !   defined gcdmat in the case of open boundaries 
     
    200199      ! account for the existence of the south symmetric bassin. 
    201200       
    202 !!cr      IF( .NOT.lk_dynspg_fsc ) THEN   !bug missing lk_dynspg_fsc_atsk 
    203 #if ! defined key_dynspg_fsc 
     201!!cr      IF( .NOT.lk_dynspg_flt ) THEN   !bug missing lk_dynspg_flt_atsk 
     202#if ! defined key_dynspg_flt 
    204203      IF( nperio == 2 ) THEN 
    205204         DO ji = 1, jpi 
  • trunk/NEMO/OPA_SRC/SOL/solpcg.F90

    r247 r359  
    3838      !! ** Purpose :   Solve the ellipic equation for the barotropic stream  
    3939      !!      function system (lk_dynspg_rl=T) or the transport divergence  
    40       !!      system (lk_dynspg_fsc=T) using a diagonal preconditionned 
     40      !!      system (lk_dynspg_flt=T) using a diagonal preconditionned 
    4141      !!      conjugate gradient method. 
    4242      !!      In the former case, the barotropic stream function trend has a 
  • trunk/NEMO/OPA_SRC/SOL/solsor.F90

    r247 r359  
    3737      !! ** Purpose :   Solve the ellipic equation for the barotropic stream  
    3838      !!      function system (lk_dynspg_rl=T) or the transport divergence  
    39       !!      system (lk_dynspg_fsc=T) using a red-black successive-over- 
     39      !!      system (lk_dynspg_flt=T) using a red-black successive-over- 
    4040      !!      relaxation method. 
    4141      !!       In the former case, the barotropic stream function trend has a 
  • trunk/NEMO/OPA_SRC/SOL/solsor_e.F90

    r313 r359  
    3737      !! ** Purpose :   Solve the ellipic equation for the barotropic stream  
    3838      !!      function system (lk_dynspg_rl=T) or the transport divergence  
    39       !!      system (lk_dynspg_fsc=T) using a red-black successive-over- 
     39      !!      system (lk_dynspg_flt=T) using a red-black successive-over- 
    4040      !!      relaxation method. 
    4141      !!       In the former case, the barotropic stream function trend has a 
  • trunk/NEMO/OPA_SRC/SOL/solver.F90

    r312 r359  
    1919   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    2020   USE lib_mpp 
    21    USE dynspg_rl        
    22    USE dynspg_fsc       
    23    USE dynspg_fsc_atsk       
     21   USE dynspg          ! choice/control of key cpp for surface pressure gradient 
    2422 
    2523   IMPLICIT NONE 
     
    4038      !!       * default option: barotropic stream function system 
    4139      !!         and islands initialization (if lk_isl=T) 
    42       !!       * lk_dynspg_fsc = T : transport divergence system. No specific 
     40      !!       * lk_dynspg_flt = T : transport divergence system. No specific 
    4341      !!         treatment of islands. 
    4442      !!       
    4543      !! ** Method : 
    4644      !!       - Compute the local depth of the water column at u- and v-point 
    47       !!      (lk_dynspg_fsc = T) or its inverse (lk_dynspg_rl = T). 
     45      !!      (lk_dynspg_flt = T) or its inverse (lk_dynspg_rl = T). 
    4846      !!      The local depth of the water column is computed by summing  
    4947      !!      the vertical scale factors. For its inverse, the thickness of 
     
    6462      !!                                u- and v-point. (lk_dynspg_rl = T) 
    6563      !!             - hu, hv   : masked local depth at u- and v- points 
    66       !!                                (lk_dynspg_fsc = T) 
     64      !!                                (lk_dynspg_flt = T) 
    6765      !!             - c_solver_pt : nature of the gridpoint at which the 
    6866      !!                                solver is applied 
     
    7775      !!        !  98-10  (G. Roullet, G. Madec)  free surface  
    7876      !!   9.0  !  03-07  (G. Madec)  free form, F90 
     77      !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization 
    7978      !!---------------------------------------------------------------------- 
    8079      !! * Local declarations 
     
    126125      ENDIF 
    127126 
    128       IF( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) THEN 
     127      IF( lk_dynspg_flt ) THEN 
    129128         IF(lwp) WRITE(numout,*) 
    130129         IF(lwp) WRITE(numout,*) '          free surface formulation' 
    131130         IF( lk_isl ) THEN 
    132131            IF(lwp) WRITE(numout,cform_err) 
    133             IF(lwp) WRITE(numout,*) ' key_islands inconsistent with key_dynspg_fsc' 
     132            IF(lwp) WRITE(numout,*) ' key_islands inconsistent with key_dynspg_flt' 
    134133            nstop = nstop + 1 
    135134         ENDIF 
     
    139138      ELSE 
    140139         IF(lwp) WRITE(numout,cform_err) 
    141          IF(lwp) WRITE(numout,*) '          Chose at least one surface pressure gradient calculation: free surface or rigid-lid' 
     140         IF(lwp) WRITE(numout,*) '          Choose only one surface pressure gradient calculation: filtered or rigid-lid' 
     141         IF(lwp) WRITE(numout,*) '          Should not call this routine if dynspg_exp or dynspg_ts has been chosen' 
    142142         nstop = nstop + 1 
    143143      ENDIF 
    144       IF( ( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) .AND. lk_dynspg_rl ) THEN 
     144      IF( lk_dynspg_flt .AND. lk_dynspg_rl ) THEN 
    145145         IF(lwp) WRITE(numout,cform_err) 
    146146         IF(lwp) WRITE(numout,*) '          Chose between free surface or rigid-lid, not both' 
  • trunk/NEMO/OPA_SRC/TRA/traadv_cen2.F90

    r258 r359  
    2222   USE in_out_manager  ! I/O manager 
    2323   USE diaptr          ! poleward transport diagnostics 
    24    USE dynspg_fsc      !  
    25    USE dynspg_fsc_atsk !  
     24   USE dynspg          ! choice/control of key cpp for surface pressure gradient 
    2625   USE prtctl          ! Print control 
    2726 
     
    135134      !!   8.5  !  02-06  (G. Madec)  F90: Free form and module 
    136135      !!   9.0  !  04-08  (C. Talandier) New trends organization 
     136      !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization 
    137137      !!---------------------------------------------------------------------- 
    138138      !! * Modules used 
     
    332332 
    333333      ! Surface value 
    334       IF( lk_dynspg_fsc ) THEN 
    335          ! free surface-constant volume 
     334      IF( lk_dynspg_rl ) THEN 
     335         ! rigid lid : flux set to zero 
     336         zwx(:,:, 1 ) = 0.e0    ;    zwy(:,:, 1 ) = 0.e0 
     337      ELSE 
     338         ! free surface 
    336339         zwx(:,:, 1 ) = zwn(:,:,1) * tn(:,:,1) 
    337340         zwy(:,:, 1 ) = zwn(:,:,1) * sn(:,:,1) 
    338       ELSE 
    339          ! rigid lid : flux set to zero 
    340          zwx(:,:, 1 ) = 0.e0    ;    zwy(:,:, 1 ) = 0.e0 
    341341      ENDIF 
    342342 
  • trunk/NEMO/OPA_SRC/TRA/traadv_cen2_atsk.h90

    r258 r359  
    7979      !!        zcenu = centered flux = wn * mk(tn) 
    8080      !!         The surface boundary condition is :  
    81       !!      rigid-lid (lk_dynspg_frd = T) : zero advective flux 
    82       !!      free-surf (lk_dynspg_fsc = T) : wn(:,:,1) * tn(:,:,1) 
     81      !!      rigid-lid (lk_dynspg_rl = T) : zero advective flux 
     82      !!      free-surf                   : wn(:,:,1) * tn(:,:,1) 
    8383      !!         Add this trend now to the general trend of tracer (ta,sa): 
    8484      !!            (ta,sa) = (ta,sa) + ( zta , zsa ) 
     
    9494      !!   8.5  !  02-06  (G. Madec)  F90: Free form and module 
    9595      !!   9.0  !  04-08  (C. Talandier) New trends organization 
     96      !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization 
    9697      !!---------------------------------------------------------------------- 
    9798      !! * Modules used 
     
    286287 
    287288         ! Surface value 
    288          IF( lk_dynspg_fsc_tsk ) THEN 
    289             ! free surface-constant volume 
     289         IF( lk_dynspg_rl ) THEN 
     290            ! rigid lid : flux set to zero 
     291            zwz(:,jj, 1 ) = 0.e0    ;    zww(:,jj, 1 ) = 0.e0 
     292         ELSE 
     293            ! free surface 
    290294            zwz(:,jj, 1 ) = zwn(:,jj,1) * tn(:,jj,1) 
    291295            zww(:,jj, 1 ) = zwn(:,jj,1) * sn(:,jj,1) 
    292          ELSE 
    293             ! rigid lid : flux set to zero 
    294             zwz(:,jj, 1 ) = 0.e0    ;    zww(:,jj, 1 ) = 0.e0 
    295296         ENDIF 
    296297          
  • trunk/NEMO/OPA_SRC/TRA/traadv_ctl.F90

    r247 r359  
    99   !!---------------------------------------------------------------------- 
    1010   !! * Modules used 
    11    USE oce             ! ocean dynamics and active tracers 
    1211   USE dom_oce         ! ocean space and time domain 
    1312   USE in_out_manager  ! I/O manager 
     
    2625      ln_traadv_muscl2 = .FALSE.        ! MUSCL2 scheme flag 
    2726 
    28    !! * Substitutions 
    29 #   include "domzgr_substitute.h90" 
    30 #   include "vectopt_loop_substitute.h90" 
    3127   !!---------------------------------------------------------------------- 
    3228   !!   OPA 9.0 , LOCEAN-IPSL (2005)  
     
    4743      !!   8.5  !  02-11  (G. Madec)  Original code 
    4844      !!---------------------------------------------------------------------- 
    49       !! * Modules used 
    50       USE traadv_tvd 
    51       USE traadv_muscl 
    52       USE traadv_muscl2 
    53       USE in_out_manager  ! I/O manager 
    54  
    5545      !! * Local declarations 
    5646      INTEGER ::   ioptio 
  • trunk/NEMO/OPA_SRC/TRA/traadv_muscl.F90

    r258 r359  
    1515   USE trdmod_oce      ! ocean variables trends 
    1616   USE in_out_manager  ! I/O manager 
    17    USE dynspg_fsc      ! surface pressure gradient  
    18    USE dynspg_fsc_atsk ! autotasked surface pressure gradient 
     17   USE dynspg          ! choice/control of key cpp for surface pressure gradient 
    1918   USE trabbl          ! tracers: bottom boundary layer 
    2019   USE lib_mpp         ! distribued memory computing 
     
    6261      !!   8.5  !  02-06  (G. Madec)  F90: Free form and module 
    6362      !!   9.0  !  04-08  (C. Talandier) New trends organization 
     63      !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization 
    6464      !!---------------------------------------------------------------------- 
    6565      !! * modules used 
     
    369369      END DO 
    370370      ! surface values 
    371       IF( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) THEN   ! free surface-constant volume 
     371      IF( lk_dynspg_rl ) THEN                           ! rigid lid : flux set to zero 
     372         zt1(:,:, 1 ) = 0.e0 
     373         zs1(:,:, 1 ) = 0.e0 
     374      ELSE                                              ! free surface 
    372375         zt1(:,:, 1 ) = zwn(:,:,1) * tb(:,:,1) 
    373376         zs1(:,:, 1 ) = zwn(:,:,1) * sb(:,:,1) 
    374       ELSE                                              ! rigid lid : flux set to zero 
    375          zt1(:,:, 1 ) = 0.e0 
    376          zs1(:,:, 1 ) = 0.e0 
    377377      ENDIF 
    378378 
  • trunk/NEMO/OPA_SRC/TRA/traadv_muscl2.F90

    r258 r359  
    1515   USE trdmod_oce      ! ocean variables trends 
    1616   USE in_out_manager  ! I/O manager 
    17    USE dynspg_fsc      ! surface pressure gradient  
    18    USE dynspg_fsc_atsk ! autotasked surface pressure gradient 
     17   USE dynspg          ! choice/control of key cpp for surface pressure gradient 
    1918   USE trabbl          ! tracers: bottom boundary layer 
    2019   USE lib_mpp 
     
    6261      !!   8.5  !  02-06  (G. Madec)  F90: Free form and module 
    6362      !!   9.0  !  04-08  (C. Talandier) New trends organization 
     63      !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization 
    6464      !!---------------------------------------------------------------------- 
    6565      !! * modules used 
     
    443443 
    444444      ! surface values 
    445       IF( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) THEN   ! free surface-constant volume 
     445      IF( lk_dynspg_rl ) THEN                           ! rigid lid : flux set to zero 
     446         zt1(:,:, 1 ) = 0.e0 
     447         zs1(:,:, 1 ) = 0.e0 
     448      ELSE                                              ! free surface 
    446449         zt1(:,:, 1 ) = zwn(:,:,1) * tb(:,:,1) 
    447450         zs1(:,:, 1 ) = zwn(:,:,1) * sb(:,:,1) 
    448       ELSE                                              ! rigid lid : flux set to zero 
    449          zt1(:,:, 1 ) = 0.e0 
    450          zs1(:,:, 1 ) = 0.e0 
    451451      ENDIF 
    452452 
  • trunk/NEMO/OPA_SRC/TRA/traadv_tvd.F90

    r282 r359  
    1717   USE trdmod_oce      ! ocean variables trends 
    1818   USE in_out_manager  ! I/O manager 
    19    USE dynspg_fsc      ! surface pressure gradient  
    20    USE dynspg_fsc_atsk ! autotasked surface pressure gradient 
     19   USE dynspg          ! choice/control of key cpp for surface pressure gradient 
    2120   USE trabbl          ! Advective term of BBL 
    2221   USE lib_mpp 
     
    6564      !!   8.5  !  02-06  (G. Madec)  F90: Free form and module 
    6665      !!   9.0  !  04-01  (A. de Miranda, G. Madec, J.M. Molines ): advective bbl 
    67       !!   9.0  !  08-04  (S. Cravatte) add the i-, j- & k- trends computation 
     66      !!    "   !  08-04  (S. Cravatte) add the i-, j- & k- trends computation 
     67      !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization 
    6868      !!---------------------------------------------------------------------- 
    6969      !! * Modules used 
     
    159159      ! upstream tracer flux in the k direction 
    160160      ! Surface value 
    161       IF( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk ) THEN   ! free surface-constant volume 
     161      IF( lk_dynspg_rl ) THEN          ! rigid lid : flux set to zero 
     162         ztw(:,:,1) = 0.e0 
     163         zsw(:,:,1) = 0.e0 
     164      ELSE                 ! free surface 
    162165         DO jj = 1, jpj 
    163166            DO ji = 1, jpi 
     
    167170            END DO 
    168171         END DO 
    169       ELSE                                              ! rigid lid : flux set to zero 
    170          ztw(:,:,1) = 0.e0 
    171          zsw(:,:,1) = 0.e0 
    172172      ENDIF 
    173173 
  • trunk/NEMO/OPA_SRC/istate.F90

    r352 r359  
    7878      rn2  (:,:,:) = 0.e0  
    7979 
    80 #if defined key_dynspg_fsc 
    81       ! free surface formulation 
    82       sshb(:,:) = 0.e0      ! before sea-surface height 
    83       sshn(:,:) = 0.e0      ! now    sea-surface height 
    84 #endif 
    8580#if defined key_dynspg_rl 
    8681      ! rigid-lid formulation 
     
    8883      bsfn(:,:) = 0.e0      ! now    barotropic stream-function 
    8984      bsfd(:,:) = 0.e0      ! barotropic stream-function trend 
    90 #endif  
     85#endif 
     86      ! free surface formulation 
     87      sshb(:,:) = 0.e0      ! before sea-surface height 
     88      sshn(:,:) = 0.e0      ! now    sea-surface height 
    9189 
    9290 
     
    222220      !!   8.0  !  01-09  (M. Levy, M. Ben Jelloul)  read file for EEL 2 & 6 
    223221      !!   9.0  !  03-09  (G. Madec, C. Talandier)  EEL 5 
     222      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization 
    224223      !!---------------------------------------------------------------------- 
    225224      !! * Modules used 
     
    239238         zh1, zh2, zslope, zcst       ! temporary scalars 
    240239      REAL(wp) ::   & 
    241          zt1  = 12.e0,             &  ! surface temperature value (EEL R5) 
    242          zt2  =  2.e0,             &  ! bottom  temperature value (EEL R5) 
    243          zsal = 35.5                  ! constant salinity (EEL R2, R5 and R6) 
     240         zt1  = 12._wp,            &  ! surface temperature value (EEL R5) 
     241         zt2  =  2._wp,            &  ! bottom  temperature value (EEL R5) 
     242         zsal = 35.5_wp                ! constant salinity (EEL R2, R5 and R6) 
    244243      REAL(wp) ::   & 
    245244         zdt,  zdate0                 ! temporary scalars 
     
    248247      REAL(wp), DIMENSION(jpiglo,jpjglo) ::   & 
    249248         zlamt, zphit                 ! temporary workspace 
    250 # if defined key_dynspg_fsc 
     249# if ! defined key_dynspg_rl 
    251250      REAL(wp), DIMENSION(jpiglo,jpjglo) ::   & 
    252251         zssh                         ! initial ssh over the global domain 
     
    290289       
    291290 
    292 # if defined key_dynspg_fsc 
     291# if ! defined key_dynspg_rl 
    293292            ! set the dynamics: U,V, hdiv, rot (and ssh if necessary) 
    294293            ! ---------------- 
     
    451450      !!   8.1  !  01-09  (M. Levy, M. Ben Jelloul)  Original code 
    452451      !!   8.5  !  02-09  (G. Madec)  F90: Free form 
     452      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization 
    453453      !!---------------------------------------------------------------------- 
    454454      !! * Modules used 
    455455      USE eosbn2          ! eq. of state, Brunt Vaisala frequency (eos     routine) 
    456       USE dynspg_fsc      ! surface pressure gradient         (dyn_spg_fsc routine) 
    457       USE dynspg_fsc_atsk ! surface pressure gradient    (dyn_spg_fsc_atsk routine) 
    458       USE dynspg_rl       ! surface pressure gradient          (dyn_spg_rl routine) 
     456      USE dynspg          ! surface pressure gradient             (dyn_spg routine) 
    459457      USE divcur          ! hor. divergence & rel. vorticity      (div_cur routine) 
    460458      USE lbclnk          ! ocean lateral boundary condition (or mpp link) 
     
    484482      DO jk = 2, jpkm1 
    485483         zprn(:,:,jk) = zprn(:,:,jk-1)   & 
    486                       + zalfg * fse3w(:,:,jk) * ( 2. + rhd(:,:,jk) + rhd(:,:,jk-1) ) 
     484            &         + zalfg * fse3w(:,:,jk) * ( 2. + rhd(:,:,jk) + rhd(:,:,jk-1) ) 
    487485      END DO   
    488486 
     
    550548      va(:,:,:) = vb(:,:,:) / rdt 
    551549 
    552       ! calls dyn_spg. we assume euler time step, strating from rest. 
     550      ! calls dyn_spg. we assume euler time step, starting from rest. 
    553551      indic = 0 
    554       !                                                     ! surface pressure gradient 
    555       IF( lk_dynspg_fsc     )   CALL dyn_spg_fsc     ( nit000, indic )  ! free surface constant volume case 
    556       IF( lk_dynspg_fsc_tsk )   CALL dyn_spg_fsc_atsk( nit000, indic )  ! autotask free surface constant volume case 
    557       IF( lk_dynspg_rl      )   CALL dyn_spg_rl      ( nit000, indic )  ! rigid-lid case 
     552      CALL dyn_spg( nit000, indic )       ! surface pressure gradient 
    558553 
    559554      ! the new velocity is ua*rdt 
  • trunk/NEMO/OPA_SRC/oce.F90

    r247 r359  
    66   !! History : 
    77   !!   8.5  !  02-11  (G. Madec)  F90: Free form and module 
     8   !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization 
    89   !!---------------------------------------------------------------------- 
    910   !!  OPA 9.0 , LOCEAN-IPSL (2005)  
     
    6263#endif 
    6364 
    64 #if defined key_dynspg_fsc   ||   defined key_esopa 
    65    !! free surface - constant volume formulation 
    66    !! ------------------------------------------ 
     65   !! free surface 
     66   !! ------------ 
    6767   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &   !: 
    6868      sshb, sshn,         &  !: before, now sea surface height (meters) 
    69       hu, hv                 !: depth at u- and v-points (meters) 
    70 # if defined key_obc 
     69      hu  , hv  ,         &  !: depth at u- and v-points (meters) 
     70      hur , hvr              !: inverse of u and v-points ocean depth (1/m) 
     71#if defined key_obc 
    7172   REAL(wp), PUBLIC ::    &  !: 
    7273      obcsurftot       !: Total lateral surface of open boundaries 
     
    7475      obcumask, obcvmask     !: u-, v- Force filtering mask for the open  
    7576      !                      !  boundary condition on grad D 
    76 # endif 
    77 # if defined key_trdvor 
    78    REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &   !: 
    79        hur, hvr             !: inverse of u and v-points ocean depth (1/m) 
    80 # endif 
    8177#endif 
     78 
    8279#if defined key_dynspg_rl   ||   defined key_esopa 
    8380   !! rigid-lid formulation 
    8481   !! --------------------- 
    8582   REAL(wp), PUBLIC, DIMENSION(jpi,jpj) ::   &   !: 
    86       hur, hvr,           &  !: inverse of u and v-points ocean depth (1/m) 
    8783      bsfb, bsfn,         &  !: before, now barotropic streamfunction (m3/s) 
    8884      bsfd                   !: now trend of barotropic streamfunction (m3/s2) 
  • trunk/NEMO/OPA_SRC/opa.F90

    r300 r359  
    4747 
    4848   USE step            ! OPA time-stepping                  (stp     routine) 
     49   USE dynspg          ! Control choice of surface pressure gradient schemes 
    4950   USE prtctl          ! Print control                 (prt_ctl_init routine) 
    5051   USE ini1d           ! re-initialization of u-v mask for the 1D configuration 
     
    100101      !!    "   !  04-08  (C. Talandier) New trends organization 
    101102      !!    "   !  05-06  (C. Ethe) Add the 1D configuration possibility 
     103      !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization 
    102104      !!---------------------------------------------------------------------- 
    103105      !! * Local declarations 
     
    162164      IF( lk_obc    )   CALL obc_init       ! Open boundaries  
    163165 
    164       CALL solver_init                      ! Elliptic solver 
     166      IF( lk_dynspg_flt .OR. lk_dynspg_rl ) THEN 
     167         CALL solver_init                   ! Elliptic solver 
     168      ENDIF 
    165169 
    166170      CALL day( nit000 )                    ! Calendar 
  • trunk/NEMO/OPA_SRC/par_ORCA_R05.h90

    r323 r359  
    1717      jpidta  = 722,         &  !: 1st lateral dimension > or = to jpiglo 
    1818      jpjdta  = 511,         &  !: 2nd   "         "     > or = to jpjglo 
    19       jpkdta  =  31,         &  !: number of levels      > or = to jpkglo 
     19      jpkdta  =  31             !: number of levels      > or = to jpkglo 
    2020 
    2121#if defined key_antarctic 
     22   INTEGER, PARAMETER ::     & 
    2223      ! zoom domain size       !!! * antarctic zoom * 
    2324      jpiglo  = jpidta,      &  !: 1st dimension of global domain --> i 
     
    3334 
    3435#elif defined key_arctic 
     36   INTEGER, PARAMETER ::     & 
    3537      ! zoom domain size       !!! *  arctic zoom  * 
    3638      jpiglo  = 562,         &  !: 1st dimension of global domain --> i 
     
    4648 
    4749#else 
     50   INTEGER, PARAMETER ::     & 
    4851      ! global domain size     !!! * full domain * 
    4952      jpiglo  = jpidta,      &  !: 1st dimension of global domain --> i 
  • trunk/NEMO/OPA_SRC/par_ORCA_R2.h90

    r323 r359  
    1717      jpidta  = 182,         &  !: 1st lateral dimension ( >= jpiglo ) 
    1818      jpjdta  = 149,         &  !: 2nd    "       "      ( >= jpjglo ) 
    19       jpkdta  = 31,          &  !: number of levels      ( >= jpk    ) 
     19      jpkdta  = 31              !: number of levels      ( >= jpk    )  
    2020 
    2121#if defined key_antarctic 
    2222      ! zoom domain size       !!! *  antarctic zoom  *  
     23   INTEGER, PARAMETER ::     & 
    2324      jpiglo  = jpidta,      &  !: 1st dimension of global domain --> i 
    2425      jpjglo  = 50,          &  !: 2nd    "                  "    --> j 
     
    3435#elif defined key_arctic 
    3536      ! zoom domain size       !!! *  arctic zoom  * 
     37   INTEGER, PARAMETER ::     & 
    3638      jpiglo  = 142   ,      &  !: 1st dimension of global domain --> i 
    3739      jpjglo  = jpjdta-97+1, &  !: 2nd    "                  "    --> j 
     
    4749#elif defined key_cfg_1d 
    4850      ! global domain size     !!! *  global domain  * 
     51   INTEGER, PARAMETER ::     & 
    4952      jpiglo  = 3     ,      &  !: 1st dimension of global domain --> i 
    5053      jpjglo  = 3     ,      &  !: 2nd    "                  "    --> j 
     
    7174#else 
    7275      ! global domain size     !!! *  global domain  * 
     76   INTEGER, PARAMETER ::     & 
    7377      jpiglo  = jpidta,      &  !: 1st dimension of global domain --> i 
    7478      jpjglo  = jpjdta,      &  !: 2nd    "                  "    --> j 
  • trunk/NEMO/OPA_SRC/par_oce.F90

    r311 r359  
    77   !!   4.0  !  91     (Imbard, Levy, Madec)  Original code 
    88   !!   9.0  !  04-01  (G. Madec, J.-M. Molines)  Free form and module 
     9   !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization 
    910   !!---------------------------------------------------------------------- 
    1011   !!  OPA 9.0 , LOCEAN-IPSL (2005)  
     
    196197#endif 
    197198 
     199#if defined key_autotasking 
     200   LOGICAL, PUBLIC, PARAMETER ::   lk_jki = .TRUE.   !: j-k-i loop flag 
     201#else 
     202   LOGICAL, PUBLIC, PARAMETER ::   lk_jki = .FALSE.  !: k-j-i loop flag 
     203#endif 
     204 
    198205   !!====================================================================== 
    199206END MODULE par_oce 
  • trunk/NEMO/OPA_SRC/restart.F90

    r352 r359  
    2121   USE blk_oce         ! bulk variables 
    2222   USE flx_oce         ! sea-ice/ocean forcings variables 
    23  
    24    USE dynspg_fsc,      ONLY : lk_dynspg_fsc       ! ( mpp version ) 
    25    USE dynspg_fsc_atsk, ONLY : lk_dynspg_fsc_tsk   !  
     23   USE dynspg          ! choice/control of key cpp for surface pressure gradient 
     24   USE dynspg_ts       ! free surface time splitting scheme variables 
    2625   USE cpl_oce,         ONLY : lk_cpl              ! 
    2726 
     
    3736      crestart = 'initial.nc'   ! restart file name 
    3837   !!---------------------------------------------------------------------- 
     38   !!  OPA 9.0 , LOCEAN-IPSL (2005)  
     39   !! $Header$  
     40   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt  
     41   !!---------------------------------------------------------------------- 
     42 
    3943 
    4044CONTAINS 
     
    6973      !!        !  99-11  (M. Imbard)  Original code 
    7074      !!   8.5  !  02-08  (G. Madec)  F90: Free form 
     75      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization 
    7176      !!---------------------------------------------------------------------- 
    7277      !! * Modules used 
     
    8489      REAL(wp), DIMENSION(10) ::   zinfo(10) 
    8590      REAL(wp), DIMENSION(jpi,jpj) :: ztab  
    86       !!---------------------------------------------------------------------- 
    87       !!  OPA 9.0 , LOCEAN-IPSL (2005)  
    88       !! $Header$  
    89       !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt  
    9091      !!---------------------------------------------------------------------- 
    9192 
     
    164165         ztab(:,:) = gcxb(1:jpi,1:jpj) 
    165166         CALL restput( numwrs, 'gcxb'   , jpi, jpj, 1  , 0, ztab    ) 
    166 # if defined key_dynspg_fsc 
    167          CALL restput( numwrs, 'sshb'   , jpi, jpj, 1  , 0, sshb    )   ! free surface formulation (ssh) 
    168          CALL restput( numwrs, 'sshn'   , jpi, jpj, 1  , 0, sshn    ) 
    169 # else 
     167# if defined key_dynspg_rl 
    170168         CALL restput( numwrs, 'bsfb'   , jpi, jpj, 1  , 0, bsfb    )   ! Rigid-lid formulation (bsf) 
    171169         CALL restput( numwrs, 'bsfn'   , jpi, jpj, 1  , 0, bsfn    ) 
    172170         CALL restput( numwrs, 'bsfd'   , jpi, jpj, 1  , 0, bsfd    ) 
     171# else 
     172         CALL restput( numwrs, 'sshb'   , jpi, jpj, 1  , 0, sshb    )   ! free surface formulation (ssh) 
     173         CALL restput( numwrs, 'sshn'   , jpi, jpj, 1  , 0, sshn    ) 
     174#  if defined key_dynspg_ts 
     175         CALL restput( numwrs, 'sshb_b' , jpi, jpj, 1  , 0, sshb_b  )   ! free surface formulation (ssh) 
     176         CALL restput( numwrs, 'sshn_b' , jpi, jpj, 1  , 0, sshn_b  )   ! issued from barotropic loop 
     177         CALL restput( numwrs, 'un_b'   , jpi, jpj, 1  , 0, un_b    )   ! horizontal transports 
     178         CALL restput( numwrs, 'vn_b'   , jpi, jpj, 1  , 0, vn_b    )   ! issued from barotropic loop 
     179#  endif 
    173180# endif 
    174181# if defined key_zdftke   ||   defined key_esopa 
     
    212219      !!      - prognostic variables on the second record 
    213220      !!      - elliptic solver arrays  
    214       !!      - barotropic stream function arrays (default option) 
    215       !!        or free surface arrays ("key_dynspg_fsc" defined) 
     221      !!      - barotropic stream function arrays ("key_dynspg_rl" defined) 
     222      !!        or free surface arrays  
    216223      !!      - tke arrays (lk_zdftke=T) 
    217224      !!      for this last three records,  the previous characteristics  
     
    233240      !!        !  99-05  (M. Imbard)  Original code 
    234241      !!   8.5  !  02-09  (G. Madec)  F90: Free form 
     242      !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization 
    235243      !!---------------------------------------------------------------------- 
    236244      !! * Modules used 
     
    239247      !! * Local declarations 
    240248      LOGICAL ::   llog 
    241       CHARACTER (len=8 ) ::   clvnames(30) 
     249      CHARACTER (len=8 ) ::   clvnames(50) 
    242250      CHARACTER (len=32) ::   clname = 'restart' 
    243251      INTEGER  ::   & 
     
    354362      CALL restget( inum, 'gcx'    , jpi, jpj, 1  , 0, llog, ztab    ) 
    355363      gcx(1:jpi,1:jpj) = ztab(:,:)  
    356 # if defined key_dynspg_fsc 
    357       CALL restget( inum, 'sshb'   , jpi, jpj, 1  , 0, llog, sshb    )   ! free surface formulation (ssh) 
    358       CALL restget( inum, 'sshn'   , jpi, jpj, 1  , 0, llog, sshn    ) 
    359 # else 
     364# if defined key_dynspg_rl 
    360365      CALL restget( inum, 'bsfb'   , jpi, jpj, 1  , 0, llog, bsfb    )   ! Rigid-lid formulation (bsf) 
    361366      CALL restget( inum, 'bsfn'   , jpi, jpj, 1  , 0, llog, bsfn    ) 
    362367      CALL restget( inum, 'bsfd'   , jpi, jpj, 1  , 0, llog, bsfd    ) 
     368# else 
     369      CALL restget( inum, 'sshb'   , jpi, jpj, 1  , 0, llog, sshb    )   ! free surface formulation (ssh) 
     370      CALL restget( inum, 'sshn'   , jpi, jpj, 1  , 0, llog, sshn    ) 
     371#  if defined key_dynspg_ts 
     372      CALL restget( inum, 'sshb_b' , jpi, jpj, 1  , 0, llog, sshb_b  )   ! free surface formulation (ssh) 
     373      CALL restget( inum, 'sshn_b' , jpi, jpj, 1  , 0, llog, sshn_b  )   ! issued from barotropic loop 
     374      CALL restget( inum, 'un_b'   , jpi, jpj, 1  , 0, llog, un_b    )   ! horizontal transports 
     375      CALL restget( inum, 'vn_b'   , jpi, jpj, 1  , 0, llog, vn_b    )   ! issued from barotropic loop 
     376#  endif 
    363377# endif 
    364378# if defined key_zdftke   ||   defined key_esopa 
     
    436450      rotb(:,:,:)=rotn(:,:,:) 
    437451      hdivb(:,:,:)=hdivn(:,:,:) 
    438 #if defined key_dynspg_fsc 
     452#if defined key_dynspg_rl 
     453    ! rigid lid 
     454      bsfb(:,:)=bsfn(:,:) 
     455#else 
    439456    ! free surface formulation (eta) 
    440457      sshb(:,:)=sshn(:,:) 
    441 #else 
    442     ! rigid lid 
    443       bsfb(:,:)=bsfn(:,:) 
    444458#endif 
    445459    ENDIF 
  • trunk/NEMO/OPA_SRC/restart_dimg.h90

    r311 r359  
    22   !!                     ***  restart_dimg.h90  ***  
    33   !!--------------------------------------------------------------------- 
     4   !!  OPA 9.0 , LOCEAN-IPSL (2005)  
     5   !! $Header$  
     6   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt  
     7   !!---------------------------------------------------------------------- 
    48 
    59   SUBROUTINE rst_write(kt) 
     
    2428     !!        !  99-11  (M. Imbard)  NetCDF FORMAT with ioipsl 
    2529     !!   8.5  !  03-06  (J.M. Molines)  F90: Free form, mpp support 
     30     !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization 
    2631     !!---------------------------------------------------------------------- 
    2732     !! * Arguments  
     
    4045 
    4146     REAL(wp), DIMENSION( 1) ::   zfice, zfblk   ! used only in case of ice & bulk 
    42      !!---------------------------------------------------------------------- 
    43      !!  OPA 9.0 , LOCEAN-IPSL (2005)  
    44      !! $Header$  
    45      !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt  
    4647     !!---------------------------------------------------------------------- 
    4748 
     
    8889       IF ( lk_ice_lim                           )   ios1 = 1 
    8990       IF ( l_bulk                               )   ios2 = 1 
    90        IF ( lk_dynspg_fsc .OR. lk_dynspg_fsc_tsk )   ios3 = 1 
     91       IF ( lk_dynspg_flt                        )   ios3 = 1 
    9192       IF ( lk_cpl                               )   ios4 = 1 
    9293 
     
    102103 
    103104       ! 'before' fields 
    104  
    105        DO jk = 1, jpk 
    106           WRITE(inum,REC=irec) ub(:,:,jk) 
    107           irec = irec +1 
    108        END DO 
    109  
    110        DO jk = 1, jpk 
    111           WRITE(inum,REC=irec) vb(:,:,jk) 
    112           irec = irec +1 
    113        END DO 
    114  
    115        DO jk = 1, jpk 
    116           WRITE(inum,REC=irec) tb(:,:,jk) 
    117           irec = irec +1 
    118        END DO 
    119  
    120        DO jk = 1, jpk 
    121           WRITE(inum,REC=irec) sb(:,:,jk) 
    122           irec = irec +1 
    123        END DO 
    124  
    125        DO jk = 1, jpk 
    126           WRITE(inum,REC=irec) rotb(:,:,jk) 
    127           irec = irec +1 
    128        END DO 
    129  
    130        DO jk = 1, jpk 
    131           WRITE(inum,REC=irec) hdivb(:,:,jk) 
    132           irec = irec +1 
     105       DO jk = 1, jpk 
     106          WRITE(inum,REC=irec) ub(:,:,jk)   ;    irec = irec +1 
     107       END DO 
     108       DO jk = 1, jpk 
     109          WRITE(inum,REC=irec) vb(:,:,jk)   ;    irec = irec +1 
     110       END DO 
     111       DO jk = 1, jpk 
     112          WRITE(inum,REC=irec) tb(:,:,jk)   ;    irec = irec +1 
     113       END DO 
     114       DO jk = 1, jpk 
     115          WRITE(inum,REC=irec) sb(:,:,jk)   ;    irec = irec +1 
     116       END DO 
     117       DO jk = 1, jpk 
     118          WRITE(inum,REC=irec) rotb(:,:,jk)   ;    irec = irec +1 
     119       END DO 
     120       DO jk = 1, jpk 
     121          WRITE(inum,REC=irec) hdivb(:,:,jk)   ;    irec = irec +1 
    133122       END DO 
    134123 
    135124       ! 'now' fields 
    136  
    137        DO jk = 1, jpk 
    138           WRITE(inum,REC=irec) un(:,:,jk) 
    139           irec = irec +1 
    140        END DO 
    141  
    142        DO jk = 1, jpk 
    143           WRITE(inum,REC=irec) vn(:,:,jk) 
    144           irec = irec +1 
    145        END DO 
    146  
    147        DO jk = 1, jpk 
    148           WRITE(inum,REC=irec) tn(:,:,jk) 
    149           irec = irec +1 
    150        END DO 
    151  
    152        DO jk = 1, jpk 
    153           WRITE(inum,REC=irec) sn(:,:,jk) 
    154           irec = irec +1 
    155        END DO 
    156  
    157        DO jk = 1, jpk 
    158           WRITE(inum,REC=irec) rotn(:,:,jk) 
    159           irec = irec +1 
    160        END DO 
    161  
    162        DO jk = 1, jpk 
    163           WRITE(inum,REC=irec) hdivn(:,:,jk) 
    164           irec = irec +1 
     125       DO jk = 1, jpk 
     126          WRITE(inum,REC=irec) un(:,:,jk)   ;   irec = irec +1 
     127       END DO 
     128       DO jk = 1, jpk 
     129          WRITE(inum,REC=irec) vn(:,:,jk)   ;   irec = irec +1 
     130       END DO 
     131       DO jk = 1, jpk 
     132          WRITE(inum,REC=irec) tn(:,:,jk)   ;   irec = irec +1 
     133       END DO 
     134       DO jk = 1, jpk 
     135          WRITE(inum,REC=irec) sn(:,:,jk)   ;   irec = irec +1 
     136       END DO 
     137       DO jk = 1, jpk 
     138          WRITE(inum,REC=irec) rotn(:,:,jk)   ;   irec = irec +1 
     139       END DO 
     140       DO jk = 1, jpk 
     141          WRITE(inum,REC=irec) hdivn(:,:,jk)   ;   irec = irec +1 
    165142       END DO 
    166143 
    167144       ! elliptic solver arrays 
    168        WRITE(inum,REC=irec ) gcx(1:jpi,1:jpj) 
    169        irec = irec +1 
    170  
    171        WRITE(inum,REC=irec ) gcxb(1:jpi,1:jpj) 
    172        irec = irec +1 
    173  
    174 #if defined key_dynspg_fsc 
    175  
     145       WRITE(inum,REC=irec ) gcx(1:jpi,1:jpj)   ;   irec = irec +1 
     146       WRITE(inum,REC=irec ) gcxb(1:jpi,1:jpj)   ;   irec = irec +1 
     147#if defined key_dynspg_rl 
     148       ! Rigid-lid formulation (bsf) 
     149       WRITE(inum,REC=irec ) bsfb(:,:)   ;   irec = irec +1 
     150       WRITE(inum,REC=irec ) bsfn(:,:)   ;   irec = irec +1 
     151       WRITE(inum,REC=irec ) bsfd(:,:)   ;   irec = irec +1 
     152# else 
    176153       ! free surface formulation (ssh) 
    177  
    178        WRITE(inum,REC=irec ) sshb(:,:) 
    179        irec = irec +1 
    180  
    181        WRITE(inum,REC=irec ) sshn(:,:) 
    182        irec = irec +1 
    183 #else 
    184  
    185        ! Rigid-lid formulation (bsf) 
    186  
    187        WRITE(inum,REC=irec ) bsfb(:,:) 
    188        irec = irec +1 
    189  
    190        WRITE(inum,REC=irec ) bsfn(:,:) 
    191        irec = irec +1 
    192  
    193        WRITE(inum,REC=irec ) bsfd(:,:) 
    194        irec = irec +1 
    195  
     154       WRITE(inum,REC=irec ) sshb(:,:)   ;   irec = irec +1 
     155       WRITE(inum,REC=irec ) sshn(:,:)   ;   irec = irec +1 
     156# if defined key_dynspg_ts 
     157       ! free surface formulation issued from barotropic loop 
     158       WRITE(inum,REC=irec ) sshb_b(:,:)   ;   irec = irec +1 
     159       WRITE(inum,REC=irec ) sshn_b(:,:)   ;   irec = irec +1 
     160 
     161       ! horizontal transports issued from barotropic loop 
     162       WRITE(inum,REC=irec) un_b(:,:)   ;   irec = irec +1 
     163       WRITE(inum,REC=irec) vn_b(:,:)   ;   irec = irec +1 
     164# endif 
    196165#endif 
    197166 
    198167       ! TKE arrays 
    199  
    200168#if defined key_zdftke 
    201169         DO jk = 1, jpk 
    202             WRITE(inum,REC=irec) en(:,:,jk) ; irec = irec + 1  
     170            WRITE(inum,REC=irec) en(:,:,jk)   ;  irec = irec + 1  
    203171         END DO 
    204172#endif 
     
    206174#if defined key_ice_lim 
    207175          zfice(1) = FLOAT( nfice )                                      ! Louvain La Neuve Sea Ice Model 
    208           WRITE(inum,REC=irec) zfice(:)     ; irec = irec + 1 
    209           WRITE(inum,REC=irec) sst_io(:,:)  ; irec = irec + 1 
    210           WRITE(inum,REC=irec) sss_io(:,:)  ; irec = irec + 1 
    211           WRITE(inum,REC=irec) u_io  (:,:)  ; irec = irec + 1 
    212           WRITE(inum,REC=irec) v_io  (:,:)  ; irec = irec + 1 
     176          WRITE(inum,REC=irec) zfice(:)      ;  irec = irec + 1 
     177          WRITE(inum,REC=irec) sst_io(:,:)   ;  irec = irec + 1 
     178          WRITE(inum,REC=irec) sss_io(:,:)   ;  irec = irec + 1 
     179          WRITE(inum,REC=irec) u_io  (:,:)   ;  irec = irec + 1 
     180          WRITE(inum,REC=irec) v_io  (:,:)   ;  irec = irec + 1 
    213181#    if defined key_coupled 
    214           WRITE(inum,REC=irec) alb_ice(:,:)  ; irec = irec + 1 
     182          WRITE(inum,REC=irec) alb_ice(:,:)  ;   irec = irec + 1 
    215183#    endif 
    216184#endif 
    217185# if defined key_flx_bulk_monthly || defined key_flx_bulk_daily 
    218186          zfblk(1) = FLOAT( nfbulk )                                 ! Bulk 
    219           WRITE(inum,REC=irec) zfblk(:)   ; irec = irec + 1 
    220           WRITE(inum,REC=irec) gsst(:,:)  ; irec = irec + 1 
     187          WRITE(inum,REC=irec) zfblk(:)   ;   irec = irec + 1 
     188          WRITE(inum,REC=irec) gsst(:,:)  ;   irec = irec + 1 
    221189# endif 
    222190 
     
    225193 
    226194  END SUBROUTINE rst_write 
     195 
    227196 
    228197  SUBROUTINE rst_read 
    229198    !!--------------------------------------------------------------------- 
    230     !!                       ROUTINE rst_read 
    231     !!                     ****************** 
     199    !!                  ***  ROUTINE rst_read  *** 
    232200    !! ** Purpose : 
    233201    !!        Read restart fields in direct access format, one per process 
    234202    !! 
    235     !! ** Method : 
    236     !!        Just does the oposit than rst_wri 
     203    !! ** Method :   Just does the opposit than rst_wri 
    237204    !! 
    238205    !! History : 
     
    245212    !!        !  99-11  (M. Imbard)  NetCDF FORMAT with ioipsl 
    246213    !!   8.5  !  03-06  (J.M. Molines)  F90: Free form, mpp support 
    247     !!---------------------------------------------------------------------- 
    248  
    249  
     214    !!   9.0  !  05-11  (V. Garnier) Surface pressure gradient organization 
    250215    !!---------------------------------------------------------------------- 
    251216    USE lib_mpp 
     
    264229    LOGICAL   :: lstop 
    265230 
    266       REAL(wp), DIMENSION( 1) ::   zfice, zfblk   ! used only in case of ice & bulk 
    267  
    268     !!---------------------------------------------------------------------- 
    269     !!  OPA 8.5, LODYC-IPSL (2002) 
     231    REAL(wp), DIMENSION( 1) ::   zfice, zfblk   ! used only in case of ice & bulk 
    270232    !!---------------------------------------------------------------------- 
    271233 
     
    316278    ! -------------- 
    317279 
    318  
    319     READ(inum,REC=1) irecl8, ino1, it1, isor1, ipcg1, itke1, & 
    320      &  iice1, ibulk1, ios1, ios2, ios3, ios4, & 
    321      &  idast1, adatrj0,  ipi,ipj,ipk,ipni,ipnj,ipnij,iarea 
     280    READ(inum,REC=1) irecl8, ino1, it1, isor1, ipcg1, itke1,   & 
     281       &             iice1, ibulk1, ios1, ios2, ios3, ios4,    & 
     282       &             idast1, adatrj0,  ipi,ipj,ipk,ipni,ipnj,ipnij,iarea 
    322283 
    323284    ! Performs checks on the file 
     
    393354 
    394355    ! 'before' fields 
    395  
    396     DO jk = 1, jpk 
    397        READ(inum,REC=irec) ub(:,:,jk) 
    398        irec = irec +1 
    399     END DO 
    400  
    401     DO jk = 1, jpk 
    402        READ(inum,REC=irec) vb(:,:,jk) 
    403        irec = irec +1 
    404     END DO 
    405  
    406     DO jk = 1, jpk 
    407        READ(inum,REC=irec) tb(:,:,jk) 
    408        irec = irec +1 
    409     END DO 
    410  
    411     DO jk = 1, jpk 
    412        READ(inum,REC=irec) sb(:,:,jk) 
    413        irec = irec +1 
    414     END DO 
    415  
    416     DO jk = 1, jpk 
    417        READ(inum,REC=irec) rotb(:,:,jk) 
    418        irec = irec +1 
    419     END DO 
    420  
    421     DO jk = 1, jpk 
    422        READ(inum,REC=irec) hdivb(:,:,jk) 
    423        irec = irec +1 
     356    DO jk = 1, jpk 
     357       READ(inum,REC=irec) ub(:,:,jk)   ;   irec = irec +1 
     358    END DO 
     359    DO jk = 1, jpk 
     360       READ(inum,REC=irec) vb(:,:,jk)   ;   irec = irec +1 
     361    END DO 
     362    DO jk = 1, jpk 
     363       READ(inum,REC=irec) tb(:,:,jk)   ;   irec = irec +1 
     364    END DO 
     365    DO jk = 1, jpk 
     366       READ(inum,REC=irec) sb(:,:,jk)   ;   irec = irec +1 
     367    END DO 
     368    DO jk = 1, jpk 
     369       READ(inum,REC=irec) rotb(:,:,jk)   ;   irec = irec +1 
     370    END DO 
     371    DO jk = 1, jpk 
     372       READ(inum,REC=irec) hdivb(:,:,jk)   ;   irec = irec +1 
    424373    END DO 
    425374 
    426375    ! 'now' fields 
    427  
    428     DO jk = 1, jpk 
    429        READ(inum,REC=irec) un(:,:,jk) 
    430        irec = irec +1 
    431     END DO 
    432  
    433     DO jk = 1, jpk 
    434        READ(inum,REC=irec) vn(:,:,jk) 
    435        irec = irec +1 
    436     END DO 
    437  
    438     DO jk = 1, jpk 
    439        READ(inum,REC=irec) tn(:,:,jk) 
    440        irec = irec +1 
    441     END DO 
    442  
    443     DO jk = 1, jpk 
    444        READ(inum,REC=irec) sn(:,:,jk) 
    445        irec = irec +1 
    446     END DO 
    447  
    448     DO jk = 1, jpk 
    449        READ(inum,REC=irec) rotn(:,:,jk) 
    450        irec = irec +1 
    451     END DO 
    452  
    453     DO jk = 1, jpk 
    454        READ(inum,REC=irec) hdivn(:,:,jk) 
    455        irec = irec +1 
     376    DO jk = 1, jpk 
     377       READ(inum,REC=irec) un(:,:,jk)   ;   irec = irec +1 
     378    END DO 
     379    DO jk = 1, jpk 
     380       READ(inum,REC=irec) vn(:,:,jk)   ;   irec = irec +1 
     381    END DO 
     382    DO jk = 1, jpk 
     383       READ(inum,REC=irec) tn(:,:,jk)   ;   irec = irec +1 
     384    END DO 
     385    DO jk = 1, jpk 
     386       READ(inum,REC=irec) sn(:,:,jk)   ;   irec = irec +1 
     387    END DO 
     388    DO jk = 1, jpk 
     389       READ(inum,REC=irec) rotn(:,:,jk)   ;   irec = irec +1 
     390    END DO 
     391    DO jk = 1, jpk 
     392       READ(inum,REC=irec) hdivn(:,:,jk)   ;   irec = irec +1 
    456393    END DO 
    457394 
    458395    ! elliptic solver arrays 
    459     READ(inum,REC=irec ) gcx(1:jpi,1:jpj) 
    460     irec = irec +1 
    461  
    462     READ(inum,REC=irec ) gcxb(1:jpi,1:jpj) 
    463     irec = irec +1 
    464  
    465 #if defined key_dynspg_fsc 
    466  
     396    READ(inum,REC=irec ) gcx(1:jpi,1:jpj)   ;   irec = irec +1 
     397    READ(inum,REC=irec ) gcxb(1:jpi,1:jpj)   ;   irec = irec +1 
     398#if defined key_dynspg_rl 
     399    ! Rigid-lid formulation (bsf) 
     400    READ(inum,REC=irec ) bsfb(:,:)   ;   irec = irec +1 
     401    READ(inum,REC=irec ) bsfn(:,:)   ;   irec = irec +1 
     402    READ(inum,REC=irec ) bsfd(:,:)   ;   irec = irec +1 
     403#else 
    467404    ! free surface formulation (eta) 
    468  
    469     READ(inum,REC=irec ) sshb(:,:) 
    470     irec = irec +1 
    471  
    472     READ(inum,REC=irec ) sshn(:,:) 
    473     irec = irec +1 
    474 #else 
    475  
    476     ! Rigid-lid formulation (bsf) 
    477  
    478     READ(inum,REC=irec ) bsfb(:,:) 
    479     irec = irec +1 
    480  
    481     READ(inum,REC=irec ) bsfn(:,:) 
    482     irec = irec +1 
    483  
    484     READ(inum,REC=irec ) bsfd(:,:) 
    485     irec = irec +1 
    486  
     405    READ(inum,REC=irec ) sshb(:,:)   ;   irec = irec +1 
     406    READ(inum,REC=irec ) sshn(:,:)   ;   irec = irec +1 
     407# if defined key_dynspg_ts 
     408    ! free surface formulation issued from barotropic loop 
     409    READ(inum,REC=irec ) sshb_b(:,:)   ;   irec = irec +1 
     410    READ(inum,REC=irec ) sshn_b(:,:)   ;   irec = irec +1 
     411    ! horizontal transports issued from barotropic loop 
     412    READ(inum,REC=irec) un_b(:,:)   ;   irec = irec +1 
     413    READ(inum,REC=irec) vn_b(:,:)   ;   irec = irec +1 
     414# endif 
    487415#endif 
    488416 
    489417    ! TKE arrays 
    490  
    491418#if defined key_zdftke 
    492419    IF ( itke1 == 1 ) THEN 
    493420       DO jk = 1, jpk 
    494           READ(inum,REC=irec) en(:,:,jk) 
    495           irec = irec +1 
     421          READ(inum,REC=irec) en(:,:,jk)   ;   irec = irec +1 
    496422       END DO 
    497423    ELSE 
     
    507433    ! check if it was in the previous run 
    508434    IF ( ios1 == 1 ) THEN 
    509        READ(inum,REC=irec) zfice(:)    ; irec = irec + 1 
    510        READ(inum,REC=irec) sst_io(:,:) ; irec = irec + 1 
    511        READ(inum,REC=irec) sss_io(:,:) ; irec = irec + 1 
    512        READ(inum,REC=irec) u_io  (:,:) ; irec = irec + 1 
    513        READ(inum,REC=irec) v_io  (:,:) ; irec = irec + 1 
    514 #  if defined key_coupled 
    515        READ(inum,REC=irec) alb_ice(:,:) ; irec = irec + 1 
    516 #  endif 
     435       READ(inum,REC=irec) zfice(:)      ;  irec = irec + 1 
     436       READ(inum,REC=irec) sst_io(:,:)   ;  irec = irec + 1 
     437       READ(inum,REC=irec) sss_io(:,:)   ;  irec = irec + 1 
     438       READ(inum,REC=irec) u_io  (:,:)   ;  irec = irec + 1 
     439       READ(inum,REC=irec) v_io  (:,:)   ;  irec = irec + 1 
     440# if defined key_coupled 
     441       READ(inum,REC=irec) alb_ice(:,:)   ;  irec = irec + 1 
     442# endif 
    517443    ENDIF 
    518444    IF ( zfice(1) /= FLOAT(nfice) .OR. ios1 == 0 ) THEN 
     
    528454            END DO 
    529455         END DO 
    530 #    if defined key_coupled 
     456# if defined key_coupled 
    531457         alb_ice(:,:) = 0.8 * tmask(:,:,1) 
    532 #    endif 
    533     ENDIF 
    534    
    535 #endif 
    536 # if defined key_flx_bulk_monthly || defined key_flx_bulk_daily 
     458# endif 
     459    ENDIF 
     460#endif 
     461#if defined key_flx_bulk_monthly || defined key_flx_bulk_daily 
    537462      ! bulk forcing  
    538463      IF( ios2 == 1 ) THEN 
     
    547472         gsst(:,:) = gsst(:,:) + ( nfbulk-1 )*( tn(:,:,1) + rt0 ) 
    548473      ENDIF 
    549 # endif 
     474#endif 
    550475    CLOSE(inum) 
    551476  ! In case of restart with neuler = 0 then put all before fields = to now fields 
     
    557482      rotb(:,:,:)=rotn(:,:,:) 
    558483      hdivb(:,:,:)=hdivn(:,:,:) 
    559 #if defined key_dynspg_fsc 
    560     ! free surface formulation (eta) 
    561       sshb(:,:)=sshn(:,:) 
     484#if defined key_dynspg_rl 
     485      bsfb(:,:)=bsfn(:,:)      ! rigid lid 
    562486#else 
    563     ! rigid lid 
    564       bsfb(:,:)=bsfn(:,:) 
    565 #endif 
    566     ENDIF 
    567  
     487      sshb(:,:)=sshn(:,:)      ! free surface formulation (eta) 
     488#endif 
     489    ENDIF 
    568490 
    569491  END SUBROUTINE rst_read 
  • trunk/NEMO/OPA_SRC/step.F90

    r345 r359  
    3535   USE dynhpg          ! hydrostatic pressure grad.       (dyn_hpg routine) 
    3636   USE dynhpg_atsk     ! hydrostatic pressure grad.  (dyn_hpg_atsk routine) 
    37    USE dynspg_fsc      ! surface pressure gradient   (dyn_spg_fsc  routine) 
    38    USE dynspg_fsc_atsk ! surface pressure gradient (dyn_spgfsc_atsk routine) 
    39    USE dynspg_rl       ! surface pressure gradient     (dyn_spg_rl routine) 
     37   USE dynspg          ! surface pressure gradient        (dyn_spg routine) 
    4038   USE dynkeg          ! kinetic energy gradient          (dyn_keg routine) 
    4139   USE dynvor          ! vorticity term              (dyn_vor_... routines) 
     
    166164      !!    "   !  04-08  (C. Talandier) New trends organization 
    167165      !!    "   !  05-01  (C. Ethe) Add the KPP closure scheme 
     166      !!    "   !  05-11  (V. Garnier) Surface pressure gradient organization 
    168167      !!---------------------------------------------------------------------- 
    169168      !! * Arguments 
     
    369368 
    370369      !                                                       ! horizontal gradient of Hydrostatic pressure  
    371       IF( lk_dynhpg        )   CALL dyn_hpg     ( kstp )             ! default case  (k-j-i loop) 
    372       IF( lk_dynhpg_tsk    )   CALL dyn_hpg_atsk( kstp )             ! autatask case (j-k-i loop) 
     370      IF ( lk_jki ) THEN 
     371                               CALL dyn_hpg_atsk( kstp )             ! autotask case (j-k-i loop) 
     372      ELSE 
     373                               CALL dyn_hpg     ( kstp )             ! default case  (k-j-i loop) 
     374      ENDIF 
    373375 
    374376                               CALL dyn_zad    ( kstp )       ! vertical advection        
     
    387389      CALL lbc_lnk( emp, 'T', 1. ) 
    388390!i 
    389       !                                                       ! surface pressure gradient 
    390       IF( lk_dynspg_fsc     )   CALL dyn_spg_fsc     ( kstp, indic )  ! free surface constant volume case 
    391       IF( lk_dynspg_fsc_tsk )   CALL dyn_spg_fsc_atsk( kstp, indic )  ! autotask free surface constant volume case 
    392       IF( lk_dynspg_rl      )   CALL dyn_spg_rl      ( kstp, indic )  ! rigid-lid case 
    393  
    394                                 CALL dyn_nxt( kstp )          ! lateral velocity at next time step  
     391                               CALL dyn_spg( kstp, indic )    ! surface pressure gradient 
     392 
     393                               CALL dyn_nxt( kstp )           ! velocity at next time step  
    395394 
    396395 
  • trunk/NEMO/OPA_SRC/stpctl.F90

    r247 r359  
    1717   USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
    1818   USE lib_mpp         ! distributed memory computing 
     19   USE dynspg          ! pressure gradient schemes  
    1920 
    2021   IMPLICIT NONE 
     
    7677 
    7778 
    78       ! elliptic solver statistics 
    79       ! ----------------------------- 
    80       ! Solver 
    81       IF(lwp) WRITE(numsol,9200) kt, niter, res, SQRT(epsr)/eps 
    82 9200  FORMAT(' it :', i8, ' niter :', i4, ' res :',e20.10,' b :',e20.10) 
     79      ! elliptic solver statistics (if required) 
     80      ! -------------------------- 
     81      IF( lk_dynspg_flt .OR. lk_dynspg_rl ) THEN 
     82         ! Solver 
     83         IF(lwp) WRITE(numsol,9200) kt, niter, res, SQRT(epsr)/eps 
    8384 
    84       ! Islands (if exist) 
    85       IF( lk_isl )   CALL isl_stp_ctl( kt, kindic ) 
     85         ! Islands (if exist) 
     86         IF( lk_isl )   CALL isl_stp_ctl( kt, kindic ) 
    8687 
    8788 
    88       ! Output in numwso and numwvo IF kindic<0 
    89       ! --------------------------------------- 
    90       !    (i.e. problem for the solver) 
    91       IF( kindic < 0 ) THEN 
    92          IF(lwp) THEN 
    93             WRITE(numout,*) ' stpctl: the elliptic solver DO not converge or explode' 
    94             WRITE(numout,*) ' ====== ' 
    95             WRITE(numout,9200) kt, niter, res, sqrt(epsr)/eps 
    96             WRITE(numout,*) 
    97             WRITE(numout,*) ' stpctl: output of last fields in numwso' 
    98             WRITE(numout,*) '                                  numwvo' 
    99             WRITE(numout,*) ' ======  *******************************' 
     89         ! Output in numwso and numwvo IF kindic<0 
     90         ! --------------------------------------- 
     91         !    (i.e. problem for the solver) 
     92         IF( kindic < 0 ) THEN 
     93            IF(lwp) THEN 
     94               WRITE(numout,*) ' stpctl: the elliptic solver DO not converge or explode' 
     95               WRITE(numout,*) ' ====== ' 
     96               WRITE(numout,9200) kt, niter, res, sqrt(epsr)/eps 
     97               WRITE(numout,*) 
     98               WRITE(numout,*) ' stpctl: output of last fields in numwso' 
     99               WRITE(numout,*) '                                  numwvo' 
     100               WRITE(numout,*) ' ======  *******************************' 
     101            ENDIF 
     102            CALL dia_wri( kt, kindic ) 
    100103         ENDIF 
    101          CALL dia_wri( kt, kindic ) 
    102104      ENDIF 
     105 
     1069200  FORMAT(' it :', i8, ' niter :', i4, ' res :',e20.10,' b :',e20.10) 
    103107 
    104108      ! Test maximum of velocity (zonal only) 
Note: See TracChangeset for help on using the changeset viewer.