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

Diff of /MITgcm_contrib/gmaze_pv/A_compute_potential_density.m

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

revision 1.1 by gmaze, Fri Jun 16 21:12:20 2006 UTC revision 1.3 by gmaze, Mon Jul 10 15:09:00 2006 UTC
# Line 1  Line 1 
1  %  %
2  % [] = A_COMPUTE_POTENTIAL_DENSITY(SNAPSHOT)  % [] = A_compute_potential_density(SNAPSHOT)
3  %  %
4  % For a time snapshot, this program computes the  % For a time snapshot, this program computes the
5  % 3D potential density from potential temperature and salinity.  % 3D potential density from potential temperature and salinity.
6  % THETA and SALTanom are supposed to be defined on the same  % THETA and SALTanom are supposed to be defined on the same
7  % domain and grid.  % domain and grid.
8  %  %
9    % Files names are:
10    % INPUT:
11    % ./netcdf-files/<SNAPSHOT>/<netcdf_THETA>.<netcdf_domain>.<netcdf_suff>
12    % ./netcdf-files/<SNAPSHOT>/<netcdf_SALTanom>.<netcdf_domain>.<netcdf_suff>
13    % OUPUT:
14    % ./netcdf-files/<SNAPSHOT>/SIGMATHETA.<netcdf_domain>.<netcdf_suff>
15    %
16  % 06/07/2006  % 06/07/2006
17  % gmaze@mit.edu  % gmaze@mit.edu
18  %  %
# Line 70  for iz = 1 : nz Line 77  for iz = 1 : nz
77    S = SALTavariables{4}(iz,:,:) + 35; % Move the anom to an absolute field    S = SALTavariables{4}(iz,:,:) + 35; % Move the anom to an absolute field
78    T = THETAvariables{4}(iz,:,:);    T = THETAvariables{4}(iz,:,:);
79    SIGMATHETA(iz,:,:) = densjmd95(S,T,zeros(ny,nx)) - 1000;    SIGMATHETA(iz,:,:) = densjmd95(S,T,zeros(ny,nx)) - 1000;
80        
81    % Eventualy make a plot of the field:    % Eventualy make a plot of the field:
82    if 0    if 0
83      clf;pcolor(squeeze(SIGMATHETA(iz,:,:)));      clf;pcolor(squeeze(SIGMATHETA(iz,:,:)));

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

  ViewVC Help
Powered by ViewVC 1.1.22