anchor.diff:      return
     endif
     err = NF90_INQUIRE_DIMENSION(r%fid,ii,len=r%vgrid%N)
  +  r%vgrid%S%N = r%vgrid%N
   
     err = NF90_INQ_DIMID(r%fid,'s_w',ii)
     if (err.ne.NF90_NOERR) then
  
positive.code: END TYPE MHgrid
  
  TYPE MVgrid
    integer                             :: N   = -1
    integer                             :: N_r = -1
    integer                             :: N_w = -1
    integer                             :: Vtransform
    integer                             :: Vstretching
    real(dp)                            :: theta_s
    real(dp)                            :: theta_b
    real(dp)                            :: Tcline
    real(dp)                            :: hc
    real(dp), dimension(:), pointer     :: s_r
    real(dp), dimension(:), pointer     :: s_w
    real(dp), dimension(:), pointer     :: Cs_r
    real(dp), dimension(:), pointer     :: Cs_w
    real(dp), dimension(:,:,:), pointer :: z0_r
    real(dp), dimension(:,:,:), pointer :: z0_w
    real(dp), dimension(:,:,:), pointer :: z_r
  
negative.code: 
    call roms_read_hgrid(r%fid,r%hgrid,err)
  
    nullify(r%vgrid%S%sc_r)
    nullify(r%vgrid%S%sc_w)
    nullify(r%vgrid%S%Cs_r)
    nullify(r%vgrid%S%Cs_w)
  
    call roms_read_vgrid(r%fid,r%vgrid,err)
  
  