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

Diff of /MITgcm_contrib/gmaze_pv/main_getPV.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.2 by gmaze, Thu Jun 22 18:13:30 2006 UTC
# Line 26  Line 26 
26  % where netcdf_domain and netcdf_suff are also in global  % where netcdf_domain and netcdf_suff are also in global
27  % THE DOT IS ADDED IN SUB-PROG, SO AVOID IT IN DEFINITIONS  % THE DOT IS ADDED IN SUB-PROG, SO AVOID IT IN DEFINITIONS
28  %  %
29  % Note that Q is not defined with the ratio by SIGMA  % Note that Q is not initialy defined with the ratio by RHO (see below).
30  %  %
31  % A simple potential vorticity (splQ) computing is also available.  % A simple potential vorticity (splQ) computing is also available.
32  % It is defined as: splQ = f. dSIGMATHETA/dz  % It is defined as: splQ = f. dSIGMATHETA/dz
33  %  %
34  % 06/07/2006  % It's also possible to add a real last step 4 to compute PV as:
35    % Q = -1/RHO * [Ox.dSTdx + Oy.dSTdy + (f+Oz).dSTdz]
36    % Note that in this case, program loads the PV output from the
37    % routine C_compute_potential_vorticity and simply multiply it
38    % by: -1/RHO.
39    % RHO may be computed with the routine compute_density.m
40    %
41    % 06/21/2006
42  % gmaze@mit.edu  % gmaze@mit.edu
43  %  %
44  clear  clear
# Line 47  disp('') Line 54  disp('')
54    
55  % Files are looked for in subdirectory defined by: ./netcdf-files/<snapshot>/  % Files are looked for in subdirectory defined by: ./netcdf-files/<snapshot>/
56  % So let's define the snapshot:  % So let's define the snapshot:
57  snapshot = '200103';  snapshot = '';
58    
59    
60  % File's name:  % File's name:
# Line 58  netcdf_VVEL     = 'VVEL'; Line 65  netcdf_VVEL     = 'VVEL';
65  netcdf_THETA    = 'THETA';  netcdf_THETA    = 'THETA';
66  netcdf_SALTanom = 'SALTanom';  netcdf_SALTanom = 'SALTanom';
67  netcdf_suff     = 'nc';  netcdf_suff     = 'nc';
68  netcdf_domain   = 'north_atlantic';  netcdf_domain   = 'north_atlantic'; % Must not be empty !
69    
 % FLAGS:  
70    
71    % FLAGS:
72  % Turn 0/1 the following flag to determine which PV to compute:  % Turn 0/1 the following flag to determine which PV to compute:
73  wantsplPV = 0; % (turn 1 for simple PV computing)  wantsplPV = 0; % (turn 1 for simple PV computing)
   
74  % Turn 0/1 this flag to get online computing informations:  % Turn 0/1 this flag to get online computing informations:
75  global toshow  global toshow
76  toshow = 0;  toshow = 0;
77    
78    
79  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   COMPUTING PV:  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   COMPUTING PV:
80    if isempty('snapshot')
81      disp(' THIS FILE IS AN EXAMPLE OF USE, COPY IT INTO YOUR')
82      disp(' WORKING DIRECTORY WITH A DIFFERENT NAME AND')
83      disp(' CUSTOMIZE IT !');
84    end  
85    
86  % STEP 1:  % STEP 1:
87  % Output netcdf file is:  % Output netcdf file is:
88  %       ./netcdf-files/<snapshot>/SIGMATHETA.<netcdf_domain>.<netcdf_suff>  %       ./netcdf-files/<snapshot>/SIGMATHETA.<netcdf_domain>.<netcdf_suff>
# Line 92  end %if Line 104  end %if
104  %       ./netcdf-files/<snapshot>/PV.<netcdf_domain>.<netcdf_suff>  %       ./netcdf-files/<snapshot>/PV.<netcdf_domain>.<netcdf_suff>
105  C_compute_potential_vorticity(snapshot,wantsplPV)  C_compute_potential_vorticity(snapshot,wantsplPV)
106    
107    % STEP 4:
108    % Output netcdf file is (replace last one):
109    %       ./netcdf-files/<snapshot>/PV.<netcdf_domain>.<netcdf_suff>
110    global netcdf_RHO netcdf_PV
111    netcdf_RHO = 'RHO';
112    netcdf_PV  = 'PV';
113    D_compute_potential_vorticity(snapshot)
114    
115    
116  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% THAT'S IT !  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% THAT'S IT !

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

  ViewVC Help
Powered by ViewVC 1.1.22