function add_doc(oafile,climfile,inifile,gridfile,seas_datafile,... ann_datafile,cycle,makeoa,makeclim); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % function [longrd,latgrd,doc]=add_doc(climfile,gridfile,... % seas_datafile,ann_datafile,... % cycle); % % pierrick 2001 % % Add DOC (mMol C m-3) in a CROCO climatology file % take seasonal data for the upper levels and annual data for the % lower levels % % input: % % climfile : croco climatology file to process (netcdf) % gridfile : croco grid file (netcdf) % seas_datafile : regular longitude - latitude - z seasonal data % file used for the upper levels (netcdf) % ann_datafile : regular longitude - latitude - z annual data % file used for the lower levels (netcdf) % cycle : time length (days) of climatology cycle (ex:360 for % annual cycle) - 0 if no cycle. % % output: % % [longrd,latgrd,doc] : surface field to plot (as an illustration) % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % Read in the grid % nc=netcdf(gridfile,'r'); hmax=max(max(nc{'h'}(:))); close(nc); % % read in the datafiles % nc=netcdf(seas_datafile,'r'); t=nc{'T'}(:); close(nc) nc=netcdf(ann_datafile,'r'); zdoc=nc{'Z'}(:); kmax=max(find(zdoc