You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: roms_from_stdlev_mw.m
    path of file: ./repos/tracacode/1911-COAWST/script/mfiles/roms_clm
    
    the code of the file until where you have to start completion: function roms = roms_from_stdlev_mw(lon,lat,zlev,data,grd,CgridPos,do_interp2)
% Interpolate a 3D gridded (e.g. climatology or synthetic t(z),s(z) analysis
% to a 3D ROMS grid
%
% roms = roms_from_stdlev(lon,lat,zlev,data,grd,CgridPos,do_interp2)
%
% Inputs: 
%         standard level data:
%            data is dimensioned (time,zlev,x,y) 
%            lon is (x,y)
%            lat is (x,y) [like from meshgrid]
%            zlev(z) vector of standard levels; zlev(1) being the deepest 
%               if isempty(zlev) the interpolation is assumed to be for 
%               a 2D (e.g. surface or depth-averaged) dataset, and 
%               interpolation is to the horizontal grid only
%            grd = roms grid structure
%            CgridLocation = target grid 'rho' (default), 'u' or 'v'
%
% Outputs: 
%         roms = data interpolated to the ROMS grid, preserving the time

    
function roms = roms_from_stdlev_mw(lon,lat,zlev,data,grd,CgridPos,do_interp2)
% Interpolate a 3D gridded (e.g. climatology or synthetic t(z),s(z) analysis
% to a 3D ROMS grid
%
% roms = roms_from_stdlev(lon,lat,zlev,data,grd,CgridPos,do_interp2)
%
% Inputs: 
%         standard level data:
%            data is dimensioned (time,zlev,x,y) 
%            lon is (x,y)
%            lat is (x,y) [like from meshgrid]
%            zlev(z) vector of standard levels; zlev(1) being the deepest 
%               if isempty(zlev) the interpolation is assumed to be for 
%               a 2D (e.g. surface or depth-averaged) dataset, and 
%               interpolation is to the horizontal grid only
%            grd = roms grid structure
%            CgridLocation = target grid 'rho' (default), 'u' or 'v'
%
% Outputs: 
%         roms = data interpolated to the ROMS grid, preserving the time
%            dimension of the input data
%
% John Wilkin Dec 2000

if nargin < 6
  CgridPos = 'rho';
end