--- MITgcm_contrib/gmaze_pv/main_getPV.m 2006/06/16 21:12:20 1.1 +++ MITgcm_contrib/gmaze_pv/main_getPV.m 2006/06/22 18:13:30 1.2 @@ -26,12 +26,19 @@ % where netcdf_domain and netcdf_suff are also in global % THE DOT IS ADDED IN SUB-PROG, SO AVOID IT IN DEFINITIONS % -% 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). % % A simple potential vorticity (splQ) computing is also available. % It is defined as: splQ = f. dSIGMATHETA/dz % -% 06/07/2006 +% It's also possible to add a real last step 4 to compute PV as: +% Q = -1/RHO * [Ox.dSTdx + Oy.dSTdy + (f+Oz).dSTdz] +% Note that in this case, program loads the PV output from the +% routine C_compute_potential_vorticity and simply multiply it +% by: -1/RHO. +% RHO may be computed with the routine compute_density.m +% +% 06/21/2006 % gmaze@mit.edu % clear @@ -47,7 +54,7 @@ % Files are looked for in subdirectory defined by: ./netcdf-files// % So let's define the snapshot: -snapshot = '200103'; +snapshot = ''; % File's name: @@ -58,19 +65,24 @@ netcdf_THETA = 'THETA'; netcdf_SALTanom = 'SALTanom'; netcdf_suff = 'nc'; -netcdf_domain = 'north_atlantic'; +netcdf_domain = 'north_atlantic'; % Must not be empty ! -% FLAGS: +% FLAGS: % Turn 0/1 the following flag to determine which PV to compute: wantsplPV = 0; % (turn 1 for simple PV computing) - % Turn 0/1 this flag to get online computing informations: global toshow toshow = 0; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% COMPUTING PV: +if isempty('snapshot') + disp(' THIS FILE IS AN EXAMPLE OF USE, COPY IT INTO YOUR') + disp(' WORKING DIRECTORY WITH A DIFFERENT NAME AND') + disp(' CUSTOMIZE IT !'); +end + % STEP 1: % Output netcdf file is: % ./netcdf-files//SIGMATHETA.. @@ -92,5 +104,13 @@ % ./netcdf-files//PV.. C_compute_potential_vorticity(snapshot,wantsplPV) +% STEP 4: +% Output netcdf file is (replace last one): +% ./netcdf-files//PV.. +global netcdf_RHO netcdf_PV +netcdf_RHO = 'RHO'; +netcdf_PV = 'PV'; +D_compute_potential_vorticity(snapshot) + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% THAT'S IT !