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: ww3gb_2TPAR.m
    path of file: ./repos/tracacode/1911-COAWST/script/mfiles/swan_forc
    
    the code of the file until where you have to start completion: function ww3gb_2TPAR(modelgrid,yearww3,mmww3,ww3_area,ddww3,specpts)

%this assumes data is historical data and is already downloaded to working
%directory
eval(['dpname=''',ww3_area,'.dp.',yearww3,mmww3,'.grb2'';']);
eval(['hsname=''',ww3_area,'.hs.',yearww3,mmww3,'.grb2'';']);
eval(['tpname=''',ww3_area,'.tp.',yearww3,mmww3,'.grb2'';']);

hsnc=ncgeodataset(hsname);
tpnc=ncgeodataset(tpname);
dpnc=ncgeodataset(dpname);
disp('We are subtracting 360 from the Longitude - line 14 ww3gb_2TPAR.m')
xg=dpnc{'lon'}(:);%lat of ww3 data
xg(xg>0)=xg(xg>0)-360;                % maybe 0 for reference on other grids
yg=dpnc{'lat'}(:);%lon of ww3 data

    
function ww3gb_2TPAR(modelgrid,yearww3,mmww3,ww3_area,ddww3,specpts)

%this assumes data is historical data and is already downloaded to working
%directory
eval(['dpname=''',ww3_area,'.dp.',yearww3,mmww3,'.grb2'';']);
eval(['hsname=''',ww3_area,'.hs.',yearww3,mmww3,'.grb2'';']);
eval(['tpname=''',ww3_area,'.tp.',yearww3,mmww3,'.grb2'';']);

hsnc=ncgeodataset(hsname);
tpnc=ncgeodataset(tpname);
dpnc=ncgeodataset(dpname);
disp('We are subtracting 360 from the Longitude - line 14 ww3gb_2TPAR.m')
xg=dpnc{'lon'}(:);%lat of ww3 data
xg(xg>0)=xg(xg>0)-360;                % maybe 0 for reference on other grids
yg=dpnc{'lat'}(:);%lon of ww3 data
[xg,yg]=meshgrid(xg,yg);
time=dpnc{'time'}(:);%time interval 3 hours
time2=datenum(str2num(yearww3),str2num(mmww3),str2num(ddww3)+1):3/24:datenum(str2num(yearww3),str2num(mmww3),str2num(ddww3)+((length(time)-1)/(24/3))+1);
time=time2;
%  limit the length of time.  Could use better logic here
%  for user to set this in ww3_swan_input file.
tstart=1; tend