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 3152 for branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90 – NEMO

Ignore:
Timestamp:
2011-11-18T10:19:26+01:00 (12 years ago)
Author:
smasson
Message:

dev_NEMO_MERGE_2011: new dynamical allocation in IOM and SBC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/SBC/sbcice_lim_2.F90

    r3116 r3152  
    4444   USE lbclnk           ! lateral boundary condition - MPP link 
    4545   USE lib_mpp          ! MPP library 
     46   USE wrk_nemo_2       ! work arrays 
    4647   USE iom              ! I/O manager library 
    4748   USE in_out_manager   ! I/O manager 
     
    8384      !!                utau, vtau, taum, wndm, qns , qsr, emp , emps 
    8485      !!--------------------------------------------------------------------- 
    85       USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released 
    86       USE wrk_nemo, ONLY:   wrk_3d_1 , wrk_3d_2 , wrk_3d_3   ! 3D workspace 
    87       !! 
    8886      INTEGER, INTENT(in) ::   kt      ! ocean time step 
    8987      INTEGER, INTENT(in) ::   ksbc    ! type of sbc ( =3 CLIO bulk ; =4 CORE bulk ; =5 coupled ) 
    9088      !! 
    9189      INTEGER  ::   ji, jj   ! dummy loop indices 
    92       ! Pointers into workspaces contained in the wrk_nemo module 
    9390      REAL(wp), DIMENSION(:,:,:), POINTER :: zalb_ice_os   ! albedo of the ice under overcast sky 
    9491      REAL(wp), DIMENSION(:,:,:), POINTER :: zalb_ice_cs   ! albedo of ice under clear sky 
     
    9693      !!---------------------------------------------------------------------- 
    9794 
    98       IF( wrk_in_use(3, 1,2,3) ) THEN 
    99          CALL ctl_stop('sbc_ice_lim_2: requested workspace arrays are unavailable')   ;   RETURN 
    100       ENDIF 
    101       ! Use pointers to access only sub-arrays of workspaces 
    102       zalb_ice_os => wrk_3d_1(:,:,1:1) 
    103       zalb_ice_cs => wrk_3d_2(:,:,1:1) 
    104       zsist       => wrk_3d_3(:,:,1:1) 
     95      CALL wrk_alloc( jpi,jpj,1, zalb_ice_os, zalb_ice_cs, zsist ) 
    10596 
    10697      IF( kt == nit000 ) THEN 
     
    230221      IF( ln_limdyn    )   CALL lim_sbc_tau_2( kt, ub(:,:,1), vb(:,:,1) )  ! using before instantaneous surf. currents 
    231222      ! 
    232       IF( wrk_not_released(3, 1,2,3) )   CALL ctl_stop('sbc_ice_lim_2: failed to release workspace arrays') 
     223      CALL wrk_dealloc( jpi,jpj,1, zalb_ice_os, zalb_ice_cs, zsist ) 
    233224      ! 
    234225   END SUBROUTINE sbc_ice_lim_2 
Note: See TracChangeset for help on using the changeset viewer.