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 3294 for trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90 – NEMO

Ignore:
Timestamp:
2012-01-28T17:44:18+01:00 (12 years ago)
Author:
rblod
Message:

Merge of 3.4beta into the trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg.F90

    r2715 r3294  
    1515   USE dom_oce        ! ocean space and time domain variables 
    1616   USE phycst         ! physical constants 
    17    USE obc_oce        ! ocean open boundary conditions 
    1817   USE sbc_oce        ! surface boundary condition: ocean 
    1918   USE sbcapr         ! surface boundary condition: atmospheric pressure 
     
    2928   USE lib_mpp        ! MPP library 
    3029   USE solver          ! solver initialization 
     30   USE wrk_nemo        ! Memory Allocation 
     31   USE timing          ! Timing 
     32 
    3133 
    3234   IMPLICIT NONE 
     
    7476      !!        of the physical meaning of the results.  
    7577      !!---------------------------------------------------------------------- 
    76       USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released 
    77       USE wrk_nemo, ONLY:   ztrdu => wrk_3d_4 , ztrdv => wrk_3d_5    ! 3D workspace 
    7878      ! 
    7979      INTEGER, INTENT(in   ) ::   kt       ! ocean time-step index 
     
    8282      INTEGER  ::   ji, jj, jk                             ! dummy loop indices 
    8383      REAL(wp) ::   z2dt, zg_2                             ! temporary scalar 
    84       !!---------------------------------------------------------------------- 
    85  
    86       IF( wrk_in_use(3, 4,5) ) THEN 
    87          CALL ctl_stop('dyn_spg: requested workspace arrays unavailable')   ;   RETURN 
    88       ENDIF 
     84      REAL(wp), POINTER, DIMENSION(:,:,:) ::  ztrdu, ztrdv 
     85      !!---------------------------------------------------------------------- 
     86      ! 
     87      IF( nn_timing == 1 )  CALL timing_start('dyn_spg') 
     88      ! 
    8989 
    9090!!gm NOTA BENE : the dynspg_exp and dynspg_ts should be modified so that  
     
    9494 
    9595      IF( l_trddyn )   THEN                      ! temporary save of ta and sa trends 
     96         CALL wrk_alloc( jpi, jpj, jpk, ztrdu, ztrdv )  
    9697         ztrdu(:,:,:) = ua(:,:,:) 
    9798         ztrdv(:,:,:) = va(:,:,:) 
     
    149150         END SELECT 
    150151         CALL trd_mod( ztrdu, ztrdv, jpdyn_trd_spg, 'DYN', kt ) 
     152         ! 
     153         CALL wrk_dealloc( jpi, jpj, jpk, ztrdu, ztrdv )  
    151154      ENDIF 
    152155      !                                          ! print mean trends (used for debugging) 
     
    154157         &                       tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
    155158      ! 
    156       IF( wrk_not_released(3, 4,5) )   CALL ctl_stop('dyn_spg: failed to release workspace arrays') 
     159      IF( nn_timing == 1 )  CALL timing_stop('dyn_spg') 
    157160      ! 
    158161   END SUBROUTINE dyn_spg 
     
    168171      INTEGER ::   ioptio 
    169172      !!---------------------------------------------------------------------- 
    170  
     173      ! 
     174      IF( nn_timing == 1 )  CALL timing_start('dyn_spg_init') 
     175      ! 
    171176      IF(lwp) THEN             ! Control print 
    172177         WRITE(numout,*) 
     
    221226         IF( .NOT.ln_dynadv_vec )   CALL ctl_stop( 'Flux form not implemented for this free surface formulation' ) 
    222227      ENDIF 
    223  
    224 #if defined key_obc 
    225       !                        ! Conservation of ocean volume (key_dynspg_flt) 
    226       IF( lk_dynspg_flt )   ln_vol_cst = .true. 
    227  
    228       !                        ! Application of Flather's algorithm at open boundaries 
    229       IF( lk_dynspg_flt )   ln_obc_fla = .false. 
    230       IF( lk_dynspg_exp )   ln_obc_fla = .true. 
    231       IF( lk_dynspg_ts  )   ln_obc_fla = .true. 
    232 #endif 
     228      ! 
     229      IF( nn_timing == 1 )  CALL timing_stop('dyn_spg_init') 
    233230      ! 
    234231   END SUBROUTINE dyn_spg_init 
Note: See TracChangeset for help on using the changeset viewer.