function add_no3(oafile,climfile,inifile,gridfile,seas_datafile,... ann_datafile,cycle,makeoa,makeclim); %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % function [longrd,latgrd,no3]=add_no3(climfile,gridfile,... % seas_datafile,ann_datafile,... % cycle); % % Add nitrate (mMol N 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,no3] : surface field to plot (as an illustration) % % Further Information: % http://www.croco-ocean.org % % This file is part of CROCOTOOLS % % CROCOTOOLS is free software; you can redistribute it and/or modify % it under the terms of the GNU General Public License as published % by the Free Software Foundation; either version 2 of the License, % or (at your option) any later version. % % CROCOTOOLS is distributed in the hope that it will be useful, but % WITHOUT ANY WARRANTY; without even the implied warranty of % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the % GNU General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program; if not, write to the Free Software % Foundation, Inc., 59 Temple Place, Suite 330, Boston, % MA 02111-1307 USA % % Copyright (c) 2001-2006 by Pierrick Penven % e-mail:Pierrick.Penven@ird.fr % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % 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'}(:); t; close(nc) nc=netcdf(ann_datafile,'r'); zno3=nc{'Z'}(:); kmax=max(find(zno3