/[MITgcm]/MITgcm_contrib/gmaze_pv/compute_JBz.m
ViewVC logotype

Diff of /MITgcm_contrib/gmaze_pv/compute_JBz.m

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

revision 1.2 by gmaze, Fri Oct 6 21:44:51 2006 UTC revision 1.3 by gmaze, Thu Feb 1 17:02:02 2007 UTC
# Line 1  Line 1 
1  %  %
2  % [] = compute_JBz(SNAPSHOT)  % [JBz] = compute_JBz(SNAPSHOT)
3  %  %
4  % Here we compute the PV flux due to diabatic processes as  % Here we compute the PV flux due to diabatic processes as
5  % JFz = - alpha * f * Qnet / MLD / Cw  % JFz = - alpha * f * Qnet / MLD / Cw
# Line 22  Line 22 
22  % 06/27/06  % 06/27/06
23  % gmaze@mit.edu  % gmaze@mit.edu
24    
25  function compute_JBz(snapshot)  function varargout = compute_JBz(snapshot)
26    
27  global sla toshow  global sla toshow
28  global netcdf_suff netcdf_domain  global netcdf_suff netcdf_domain
# Line 123  nc{'Z'}.uniquename = ncchar('Z'); Line 123  nc{'Z'}.uniquename = ncchar('Z');
123  nc{'Z'}.long_name  = ncchar('depth');  nc{'Z'}.long_name  = ncchar('depth');
124  nc{'Z'}.gridtype   = nclong(0);  nc{'Z'}.gridtype   = nclong(0);
125  nc{'Z'}.units      = ncchar('m');  nc{'Z'}.units      = ncchar('m');
126  nc{'Z'}(:)         = Qdpt;  nc{'Z'}(:)         = Qdpt(1);
127    
128  % And main field:  % And main field:
129  nc{ncid}               = ncfloat('Z', 'Y', 'X');  nc{ncid}               = ncfloat('Z', 'Y', 'X');
# Line 135  nc{ncid}.uniquename    = ncchar(uniquena Line 135  nc{ncid}.uniquename    = ncchar(uniquena
135  nc{ncid}(:,:,:)        = JBz;  nc{ncid}(:,:,:)        = JBz;
136    
137  nc=close(nc);  nc=close(nc);
138    close(ncQ);
139    close(ncMLD);
140    
141    
142    
143    % Output:
144    output = struct('JBz',JBz,'lat',Qlat,'lon',Qlon);
145    switch nargout
146     case 1
147      varargout(1) = {output};
148    end

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.22