diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..94d526f --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +docs/_build +.ipynb_checkpoints +octave-workspace +release2_climatology +GRID +devel + diff --git a/gcmfaces.pdf b/gcmfaces.pdf index c07ed2e..55eb303 100644 Binary files a/gcmfaces.pdf and b/gcmfaces.pdf differ diff --git a/gcmfaces_calc/calc_UEVNfromUXVY.m b/gcmfaces_calc/calc_UEVNfromUXVY.m index 9f1a322..1b29e26 100644 --- a/gcmfaces_calc/calc_UEVNfromUXVY.m +++ b/gcmfaces_calc/calc_UEVNfromUXVY.m @@ -3,25 +3,9 @@ %inputs: fldU/fldV are the X/Y vector fields at velocity points %outputs: fldUe/fldVn are the Eastward/Northward vectors at tracer points -global mygrid; +gcmfaces_global; %fldU(mygrid.hFacW==0)=NaN; fldV(mygrid.hFacS==0)=NaN; nr=size(fldU.f1,3); fldU(mygrid.hFacW(:,:,1:nr)==0)=NaN; fldV(mygrid.hFacS(:,:,1:nr)==0)=NaN; -[FLDU,FLDV]=exch_UV(fldU,fldV); - -fldUe=fldU; fldVn=fldV; -for iF=1:fldU.nFaces; -tmp1=FLDU{iF}(1:end-1,:,:); tmp2=FLDU{iF}(2:end,:,:); -fldUe{iF}=reshape(nanmean([tmp1(:) tmp2(:)],2),size(tmp1)); -tmp1=FLDV{iF}(:,1:end-1,:); tmp2=FLDV{iF}(:,2:end,:); -fldVn{iF}=reshape(nanmean([tmp1(:) tmp2(:)],2),size(tmp1)); -end; - -FLDU=fldUe; FLDV=fldVn; -cs=mk3D(mygrid.AngleCS,FLDU); sn=mk3D(mygrid.AngleSN,FLDU); - -fldUe=+FLDU.*cs-FLDV.*sn; -fldVn=FLDU.*sn+FLDV.*cs; - - +[fldUe,fldVn]=calc_UV_zonmer(fldU,fldV); \ No newline at end of file diff --git a/gcmfaces_calc/calc_UV_zonmer.m b/gcmfaces_calc/calc_UV_zonmer.m new file mode 100644 index 0000000..52cd8da --- /dev/null +++ b/gcmfaces_calc/calc_UV_zonmer.m @@ -0,0 +1,26 @@ +function [fldUe,fldVn]=calc_UV_zonmer(fldU,fldV); +%object: compute Eastward/Northward vectors form X/Y vectors +%inputs: fldU/fldV are the X/Y vector fields at velocity points +%outputs: fldUe/fldVn are the Eastward/Northward vectors at tracer points +% +%note: this routine does no apply any mask -- unlike the old calc_UEVNfromUXVY.m + +gcmfaces_global; + +[FLDU,FLDV]=exch_UV(fldU,fldV); + +fldUe=fldU; fldVn=fldV; +for iF=1:fldU.nFaces; +tmp1=FLDU{iF}(1:end-1,:,:); tmp2=FLDU{iF}(2:end,:,:); +fldUe{iF}=reshape(nanmean([tmp1(:) tmp2(:)],2),size(tmp1)); +tmp1=FLDV{iF}(:,1:end-1,:); tmp2=FLDV{iF}(:,2:end,:); +fldVn{iF}=reshape(nanmean([tmp1(:) tmp2(:)],2),size(tmp1)); +end; + +FLDU=fldUe; FLDV=fldVn; +cs=mk3D(mygrid.AngleCS,FLDU); sn=mk3D(mygrid.AngleSN,FLDU); + +fldUe=+FLDU.*cs-FLDV.*sn; +fldVn=FLDU.*sn+FLDV.*cs; + + diff --git a/gcmfaces_diags/diags_driver_tex.m b/gcmfaces_diags/diags_driver_tex.m index cde025a..611eb94 100644 --- a/gcmfaces_diags/diags_driver_tex.m +++ b/gcmfaces_diags/diags_driver_tex.m @@ -222,6 +222,9 @@ elseif strcmp(setDiags{ii},'SEAICE'); write2tex(fileTex,1,'seaice and snow fields',1); diags_display({dirMat,dirMatRef},'SEAICE',dirTex,nameTex); + elseif strcmp(setDiags{ii},'drwn3'); + write2tex(fileTex,1,'Plankton and related fields',1); + diags_display({dirMat,dirMatRef},'drwn3',dirTex,nameTex); elseif strcmp(setDiags{ii},'controls'); %controls write2tex(fileTex,1,'controls',1);