function add_o2(oafile,climfile,inifile,gridfile,month_datafile,... ann_datafile,cycle,makeoa,makeclim); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % function [longrd,latgrd,o2]=add_o2(climfile,gridfile,... % month_datafile,ann_datafile,... % cycle); % % pierrick 2001 % % Add oxygen (mMol 0 m-3) in a CROCO climatology file % take monthly 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) % month_datafile : regular longitude - latitude - z monthly 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,o2] : 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(month_datafile,'r'); t=nc{'T'}(:); close(nc) nc=netcdf(ann_datafile,'r'); zo2=nc{'Z'}(:); kmax=max(find(zo2