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 6225 for branches/2014/dev_r4704_NOC5_MPP_BDY_UPDATE/NEMOGCM/NEMO/OPA_SRC/LBC/mppini_2.h90 – NEMO

Ignore:
Timestamp:
2016-01-08T10:35:19+01:00 (8 years ago)
Author:
jamesharle
Message:

Update MPP_BDY_UPDATE branch to be consistent with head of trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2014/dev_r4704_NOC5_MPP_BDY_UPDATE/NEMOGCM/NEMO/OPA_SRC/LBC/mppini_2.h90

    r4671 r6225  
    4545      INTEGER ::  inum                        ! temporary logical unit 
    4646      INTEGER ::  idir                        ! temporary integers 
     47      INTEGER ::  jstartrow                   ! temporary integers 
    4748      INTEGER ::   ios                        ! Local integer output status for namelist read 
    4849      INTEGER ::   & 
     
    6768         imask                                ! temporary global workspace 
    6869      REAL(wp), DIMENSION(jpiglo,jpjglo) ::   & 
    69          zdta                   ! temporary data workspace 
     70         zdta, zdtaisf                     ! temporary data workspace 
    7071      REAL(wp) ::   zidom , zjdom          ! temporary scalars 
    7172 
    7273      ! read namelist for ln_zco 
    73       NAMELIST/namzgr/ ln_zco, ln_zps, ln_sco 
     74      NAMELIST/namzgr/ ln_zco, ln_zps, ln_sco, ln_isfcav 
    7475 
    7576      !!---------------------------------------------------------------------- 
     
    100101      ! open the file 
    101102      ! Remember that at this level in the code, mpp is not yet initialized, so 
    102       ! the file must be open with jpdom_unknown, and kstart amd kcount forced  
     103      ! the file must be open with jpdom_unknown, and kstart and kcount forced  
     104      jstartrow = 1 
    103105      IF ( ln_zco ) THEN  
    104106         CALL iom_open ( 'bathy_level.nc', inum )   ! Level bathymetry 
    105          CALL iom_get ( inum, jpdom_unknown, 'Bathy_level', zdta, kstart=(/jpizoom,jpjzoom/), kcount=(/jpiglo,jpjglo/) ) 
     107          ! Optionally use a file attribute (open_ocean_jstart) to set a start row for reading from the global file 
     108          ! This allows the unextended grid bathymetry to be stored in the same file as the under ice-shelf extended bathymetry 
     109         CALL iom_getatt(inum, 'open_ocean_jstart', jstartrow ) ! -999 is returned if the attribute is not found 
     110         jstartrow = MAX(1,jstartrow) 
     111         CALL iom_get ( inum, jpdom_unknown, 'Bathy_level', zdta, kstart=(/jpizoom,jpjzoom+jstartrow-1/), kcount=(/jpiglo,jpjglo/) ) 
    106112      ELSE 
    107113         CALL iom_open ( 'bathy_meter.nc', inum )   ! Meter bathy in case of partial steps 
    108          CALL iom_get ( inum, jpdom_unknown, 'Bathymetry' , zdta, kstart=(/jpizoom,jpjzoom/), kcount=(/jpiglo,jpjglo/) ) 
     114         IF ( ln_isfcav ) THEN 
     115             CALL iom_get ( inum, jpdom_unknown, 'Bathymetry_isf' , zdta, kstart=(/jpizoom,jpjzoom/), kcount=(/jpiglo,jpjglo/) ) 
     116         ELSE 
     117             ! Optionally use a file attribute (open_ocean_jstart) to set a start row for reading from the global file 
     118             ! This allows the unextended grid bathymetry to be stored in the same file as the under ice-shelf extended bathymetry 
     119             CALL iom_getatt(inum, 'open_ocean_jstart', jstartrow ) ! -999 is returned if the attribute is not found 
     120             jstartrow = MAX(1,jstartrow) 
     121             CALL iom_get ( inum, jpdom_unknown, 'Bathymetry' , zdta, kstart=(/jpizoom,jpjzoom+jstartrow-1/)   & 
     122                &                                                   , kcount=(/jpiglo,jpjglo/) ) 
     123         ENDIF 
    109124      ENDIF 
    110125      CALL iom_close (inum) 
     126       
     127      ! used to compute the land processor in case of not masked bathy file. 
     128      zdtaisf(:,:) = 0.0_wp 
     129      IF ( ln_isfcav ) THEN 
     130         CALL iom_open ( 'bathy_meter.nc', inum )   ! Meter bathy in case of partial steps 
     131         CALL iom_get ( inum, jpdom_unknown, 'isf_draft' , zdtaisf, kstart=(/jpizoom,jpjzoom/), kcount=(/jpiglo,jpjglo/) ) 
     132      END IF 
     133      CALL iom_close (inum) 
    111134 
    112135      ! land/sea mask over the global/zoom domain 
    113136 
    114137      imask(:,:)=1 
    115       WHERE ( zdta(:,:) <= 0. ) imask = 0 
     138      WHERE ( zdta(:,:) - zdtaisf(:,:) <= rn_isfhmin ) imask = 0 
    116139 
    117140      !  1. Dimension arrays for subdomains 
Note: See TracChangeset for help on using the changeset viewer.