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 3651 for branches/2012/dev_NOC_MERCATOR_2012/NEMOGCM/NEMO/OPA_SRC/OBS/obs_surf_def.F90 – NEMO

Ignore:
Timestamp:
2012-11-26T11:46:39+01:00 (11 years ago)
Author:
cbricaud
Message:

merge dev_MERCATOR_2012_rev3555 into dev_NOC_MERCATOR_2012 ; see ticket 1020

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2012/dev_NOC_MERCATOR_2012/NEMOGCM/NEMO/OPA_SRC/OBS/obs_surf_def.F90

    r2287 r3651  
    4747      INTEGER :: nextra     !: Number of extra fields at observation points 
    4848      INTEGER :: nstp       !: Number of time steps 
     49      INTEGER :: npi        !: Number of 3D grid points 
     50      INTEGER :: npj 
    4951      INTEGER :: nsurfup    !: Observation counter used in obs_oper 
    5052 
     
    7981         & rext           !: Extra fields interpolated to observation points 
    8082 
     83      REAL(KIND=wp), POINTER, DIMENSION(:,:) :: & 
     84         & vdmean         !: Time averaged of model field 
     85 
    8186      ! Arrays with size equal to the number of time steps in the window 
    8287 
     
    103108CONTAINS 
    104109    
    105    SUBROUTINE obs_surf_alloc( surf, ksurf, kvar, kextra, kstp ) 
     110   SUBROUTINE obs_surf_alloc( surf, ksurf, kvar, kextra, kstp, kpi, kpj ) 
    106111      !!---------------------------------------------------------------------- 
    107112      !!                     ***  ROUTINE obs_surf_alloc  *** 
     
    120125      INTEGER, INTENT(IN) :: kextra  ! Number of extra fields at observation points 
    121126      INTEGER, INTENT(IN) :: kstp    ! Number of time steps 
     127      INTEGER, INTENT(IN) :: kpi     ! Number of 3D grid points 
     128      INTEGER, INTENT(IN) :: kpj 
    122129 
    123130      !!* Local variables 
     
    131138      surf%nvar     = kvar 
    132139      surf%nstp     = kstp 
     140      surf%npi      = kpi 
     141      surf%npj      = kpj 
    133142       
    134143      ! Allocate arrays of number of surface data size 
     
    174183         & ) 
    175184 
     185      ! Allocate arrays of size number of grid points 
     186 
     187      ALLOCATE( & 
     188         & surf%vdmean(kpi,kpj) & 
     189         & ) 
     190 
    176191      ! Set defaults for compression indices 
    177192       
     
    242257         & ) 
    243258 
     259      ! Deallocate arrays of size number of grid points size times 
     260      ! number of variables 
     261 
     262      DEALLOCATE( & 
     263         & surf%vdmean & 
     264         & ) 
     265 
    244266      ! Deallocate arrays of number of time step size 
    245267 
     
    300322      IF ( lallocate ) THEN 
    301323         CALL obs_surf_alloc( newsurf,  insurf, surf%nvar, & 
    302             & surf%nextra, surf%nstp ) 
     324            & surf%nextra, surf%nstp, surf%npi, surf%npj ) 
    303325      ENDIF 
    304326 
Note: See TracChangeset for help on using the changeset viewer.