/[MITgcm]/MITgcm/utils/matlab/pcolorfv.m
ViewVC logotype

Contents of /MITgcm/utils/matlab/pcolorfv.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1.6.1 - (show annotations) (download)
Tue Feb 26 16:04:50 2002 UTC (22 years, 2 months ago) by adcroft
Branch: release1
CVS Tags: release1_p13_pre, release1_p13, release1_p8, release1_p9, release1_p1, release1_p2, release1_p3, release1_p4, release1_p5, release1_p6, release1_p7, release1_chkpt44d_post, release1_p12, release1_p10, release1_p11, release1_p16, release1_p17, release1_p14, release1_p15, release1_p12_pre
Branch point for: release1_50yr
Changes since 1.1: +1 -1 lines
Merging changes on MAIN between checkpoint43 and checkpoint43a-release1mods
Command: cvs -q update -jcheckpoint43 -jcheckpoint43a-release1mods -d -P

These changes are most of the changes between c43 and c44 except those
that occured after "12:45 11 Jan 2002". As far as I can tell it is
checkpoint43 with the following mods:

  o fix bug in mom_vi_del2uv
  o select when filters are applied ; add options to zonal_filter (data.zonfilt)  o gmredi: fix Pb in the adiabatic form ; add options (.e.g. Bolus advection)
  o update AIM experiments (NCEP input files)
  o improve and extend diagnostics (Monitor, TimeAve with NonLin-FrSurf)
  o added some stuff for AD
  o Jamar wet-points

This update does not contain the following mods that are in checkpoint44

  o bug fix in pkg/generic_advdiff/
    - thread related bug, bi,bj arguments in vertical advection routines
  o some changes to pkg/autodiff, pkg/cost, pkg/exf, pkg/ecco,
    verification/carbon and model/src/ related to adjoint
  o some new Matlab scripts for diagnosing model density
    - utils/matlab/dens_poly3.m and ini_poly3.m

The list of exclusions is accurate based on a "cvs diff". The list of
inclusions is based on the record in doc/tag-index which may not be complete.

1 function [hc,hh,hcf] = pcolorfv(x,z,h,a,varargin)
2 % PCOLORFV(X,Z,H,A)
3 %
4 % Is the same as PCOLORFV except it automatically extends the dataset
5 % to the depth of the topography "H". This is srictly for plotting
6 % vertical (x,z) sections in conjuction with "partial cells" in the MITgcm.
7 %
8 % X is horizontal coordinate (vector)
9 % Z is vertical coordinate (vector)
10 % H is depth of bottom (vector)
11 % A is field to be plotted (matrix)
12 %
13 % Optional arguments are passed on to PCOLOR
14 %
15 % $Header: /u/gcmpack/MITgcm/utils/matlab/pcolorfv.m,v 1.1 2001/11/21 19:18:10 adcroft Exp $
16
17 nx=prod(size(x));
18 nz=prod(size(z));
19 %max(size(h))
20 %prod(size(h))
21 if max(size(h)) ~= prod(size(h)) | prod(size(h)) ~= nx
22 error('H must have dimensions of size(X)');
23 end
24 ndims(squeeze(a))
25 size(squeeze(a))
26 if ndims(squeeze(a)) ~= 2 | sum(size(squeeze(a)) ~= [nx nz])
27 error('A must have dimensions of size(X) x size(H)');
28 end
29
30 % Create extended Z coordinate
31 zz=zeros(1,nz+2);
32 zz(2:nz+1)=z;
33 zz(1)=0;
34 zz(nz+2)=1.5*z(nz)-0.5*z(nz-1);
35
36 [Z,X]=meshgrid(zz,x);
37
38 aa=squeeze(a);
39 au=aa(:,[1 1:nz-1]);
40 aa(isnan(aa))=au(isnan(aa));
41 A=zeros(nx,nz+2);
42 A(:,2:nz+1)=aa;
43 A(:,1)=aa(:,1);
44 A(:,nz+2)=aa(:,nz);
45 clear aa au
46
47 [Hz,Hx]=meshgrid(zz,h);
48 clear Hz
49
50
51 % H might be positive...
52 if min(z)*min(h) > 0
53 Z=max(Z,Hx);
54 else
55 Z=max(Z,-Hx);
56 end
57 clear Hx
58
59 pcolor(X,Z,A,varargin{:});

  ViewVC Help
Powered by ViewVC 1.1.22