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 3183 for branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/OBS/obs_readmdt.F90 – NEMO

Ignore:
Timestamp:
2011-11-25T16:31:02+01:00 (13 years ago)
Author:
davestorkey
Message:

Update dynamic allocation in OBS and ASM modules.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2011/dev_NEMO_MERGE_2011/NEMOGCM/NEMO/OPA_SRC/OBS/obs_readmdt.F90

    r2715 r3183  
    1212   !!   obs_offset_mdt : Remove the offset between the model MDT and the used one 
    1313   !!---------------------------------------------------------------------- 
     14   USE wrk_nemo_2       ! Memory Allocation 
    1415   USE par_kind         ! Precision variables 
    1516   USE par_oce          ! Domain parameters 
     
    5657      !!---------------------------------------------------------------------- 
    5758      USE iom 
    58       USE wrk_nemo, ONLY:   wrk_in_use, wrk_not_released 
    59       USE wrk_nemo, ONLY:   z_mdt   => wrk_2d_1   ! Array to store the MDT values 
    60       USE wrk_nemo, ONLY:   mdtmask => wrk_2d_2   ! Array to store the mask for the MDT 
    6159      ! 
    6260      INTEGER                          , INTENT(IN)    ::   kslano    ! Number of SLA Products 
     
    7977      REAL(wp), DIMENSION(:,:,:), ALLOCATABLE ::   zmask, zmdtl, zglam, zgphi 
    8078      INTEGER , DIMENSION(:,:,:), ALLOCATABLE ::   igrdi, igrdj 
     79      ! 
     80      REAL(wp), POINTER, DIMENSION(:,:) ::  z_mdt, mdtmask 
    8181          
    8282      REAL(wp) :: zlam, zphi, zfill, zinfill    ! local scalar 
    8383      !!---------------------------------------------------------------------- 
    8484 
    85       IF( wrk_in_use(2, 1,2) ) THEN 
    86          CALL ctl_stop('obs_rea_mdt : requested workspace array unavailable')   ;   RETURN 
    87       ENDIF 
     85      CALL wrk_alloc(jpi,jpj,z_mdt,mdtmask)  
    8886 
    8987      IF(lwp)WRITE(numout,*)  
     
    172170      END DO 
    173171 
    174       IF( wrk_not_released(2, 1,2) )   CALL ctl_stop('obs_rea_mdt: failed to release workspace arrays') 
     172      CALL wrk_dealloc(jpi,jpj,z_mdt,mdtmask)  
    175173      ! 
    176174   END SUBROUTINE obs_rea_mdt 
Note: See TracChangeset for help on using the changeset viewer.