anchor.diff:    allocate(r%hgrid%h(r%hgrid%xi_rho,r%hgrid%eta_rho))
     err = NF90_GET_VAR(r%fid,ii,r%hgrid%h)
     if (err.NE.NF90_NOERR) stop 'ERROR while reading h'
  +
  +  err = NF90_INQ_VARID(r%fid,'hraw',ii)
  +  if (err.NE.NF90_NOERR) then
  +    write(*,*) 'ERROR: while loooking for variable hraw'
  +    stop 'variable not found'
  +  endif
  +  allocate(r%hgrid%hraw(r%hgrid%xi_rho,r%hgrid%eta_rho))
  +  err = NF90_GET_VAR(r%fid,ii,r%hgrid%hraw)
  +  if (err.NE.NF90_NOERR) stop 'ERROR while reading hraw'
   
     ! ... masks
     ! ...
  
positive.code: 
    err = NF90_INQ_VARID(r%fid,'lon_psi',ii)
    if (err.EQ.NF90_NOERR) then
      allocate(r%hgrid%lon_psi(r%hgrid%xi_psi, r%hgrid%eta_psi))
      err = NF90_GET_VAR(r%fid,ii,r%hgrid%lon_psi)
      if (err.NE.NF90_NOERR) stop 'ERROR: Reading variable lon_psi'
    endif
  
    err = NF90_INQ_VARID(r%fid,'lat_psi',ii)
    if (err.EQ.NF90_NOERR) then
      allocate(r%hgrid%lat_psi(r%hgrid%xi_psi, r%hgrid%eta_psi))
      err = NF90_GET_VAR(r%fid,ii,r%hgrid%lat_psi)
      if (err.NE.NF90_NOERR) stop 'ERROR: Reading variable lat_psi'
    endif
  
negative.code:   endif
  
  
    ! ... Read h and hraw
    ! ...
    err = NF90_INQ_VARID(r%fid,'h',ii)
    if (err.NE.NF90_NOERR) then
  