| 1 | % CLIMODE: potential vorticity toolbox | 
| 2 | % | 
| 3 | % This package tries to provide some useful and simple routines to compute, visualize and | 
| 4 | % analyze Potential Vorticity from the global high resolution (1/8deg) simulation of the | 
| 5 | % MITgcm. | 
| 6 | % Routines are as general as possible for extended applications, but note that they were | 
| 7 | % developped to focus on the Western Atlantic region for the CLIMODE project. | 
| 8 | % Enjoy ! | 
| 9 | % | 
| 10 | % gmaze@mit.edu | 
| 11 | % Last update: 07/06/06 | 
| 12 | % | 
| 13 | % --------------------------------------------------------------------------------------------- | 
| 14 | % PROGRAMS LIST (NOT A FUNCTIONS): | 
| 15 | % | 
| 16 | % main_getPV_eg | 
| 17 | %                             This program is an exemple of how to define global setup and | 
| 18 | %                             to launch the PV computing. | 
| 19 | % | 
| 20 | % --------------------------------------------------------------------------------------------- | 
| 21 | % FUNCTIONS LIST 1: NETCDF FILES DIAGNOSTICS | 
| 22 | % From netcdf files contained into SNAPSHOT sub-directory of the | 
| 23 | % ./netcdf-files/ home folder, these functions ... | 
| 24 | % | 
| 25 | % A_compute_potential_density(SNAPSHOT) | 
| 26 | %                             Computes potential density SIGMATHETA from potential | 
| 27 | %                             temperature THETA and anomalous salinity SALTanom. | 
| 28 | % B_compute_relative_vorticity(SNAPSHOT) | 
| 29 | %                             Computes the 3 components of the relative vorticity from the | 
| 30 | %                             horizontal flow. | 
| 31 | % C_compute_potential_vorticity(SNAPSHOT,[WANT_SPL_PV]) | 
| 32 | %                             Computes the potential vorticity field from the relative | 
| 33 | %                             vorticity components and the potential density. Option | 
| 34 | %                             WANT_SPL_PV turned 1 (0 by default) makes the function only | 
| 35 | %                             computing the PV based on the planetary vorticity. | 
| 36 | % D_compute_potential_vorticity(SNAPSHOT,[WANT_SPL_PV]) | 
| 37 | %                             Multiplies the potential vorticity computed with | 
| 38 | %                             C_COMPUTE_POTENTIAL_VORTICITY by the coefficient: -1/RHO | 
| 39 | %                             Optional flag WANTSPLPV is turned to 0 by default. Turn it to 1 | 
| 40 | %                             if the PV computed was the simple one (f.dSIGMATHETA/dz). It's | 
| 41 | %                             needed for the output netcdf file informations. | 
| 42 | % compute_JBz(SNAPSHOT) | 
| 43 | %                             Computes the surface PV flux due to diabatic processes. | 
| 44 | % compute_JFz(SNAPSHOT) | 
| 45 | %                             Computes the surface PV flux due to frictionnal forces. | 
| 46 | % compute_density(SNAPSHOT) | 
| 47 | %                             Computes density RHO from potential temperature THETA | 
| 48 | %                             and anomalous salinity SALTanom. | 
| 49 | % compute_alpha(SNAPSHOT) | 
| 50 | %                             Computes the thermal expansion coefficient ALPHA from potential | 
| 51 | %                             temperature THETA and salinity anomaly SALTanom. | 
| 52 | % compute_QEk(SNAPSHOT) | 
| 53 | %                             Computes QEk, the lateral heat flux induced by Ekman currents | 
| 54 | %                             from JFz, the PV flux induced by frictional forces. | 
| 55 | % | 
| 56 | % --------------------------------------------------------------------------------------------- | 
| 57 | % FUNCTIONS LIST 2: ANALYSIS FUNCTIONS | 
| 58 | % | 
| 59 | % volbet2iso(TRACER,LIMITS,DEPTH,LAT,LONG) | 
| 60 | %                             This function computes the volume embedded between two | 
| 61 | %                             iso-TRACER values and limited eastward, westward and southward | 
| 62 | %                             by fixed limits. | 
| 63 | % surfbet2outcrops(TRACER,LIMITS,LAT,LONG) | 
| 64 | %                             This function computes the horizontal surface limited | 
| 65 | %                             by two outcrops of a tracer. | 
| 66 | % intbet2outcrops(TRACER,LIMITS,LAT,LONG) | 
| 67 | %                             This function computes the horizontal surface integral | 
| 68 | %                             of the field TRACER on the area limited by two outcrops. | 
| 69 | % subfct_getisoS(TRACER,ISO) | 
| 70 | %                             This function determines the iso-surface ISO of the | 
| 71 | %                             3D field TRACER(Z,Y,X). | 
| 72 | % | 
| 73 | % --------------------------------------------------------------------------------------------- | 
| 74 | % LOWER LEVEL AND SUB-FUNCTIONS LIST: | 
| 75 | % | 
| 76 | % pv_checkpath | 
| 77 | %                             This function, systematicaly called by the others, ensures that | 
| 78 | %                             all needed sub-directories of the package are in the path. | 
| 79 | % | 
| 80 | % --------------------------------------------------------------------------------------------- | 
| 81 | % PS: | 
| 82 | % | 
| 83 | % > Functions name are case sensitive. | 
| 84 | % > See sub-directory "subfct" for further functions. | 
| 85 | % > Following packages are required: | 
| 86 | %   M_MAP:    http://www.eos.ubc.ca/~rich/map.html | 
| 87 | %   SEAWATER: http://www.marine.csiro.au/datacentre/processing.htm | 
| 88 | % | 
| 89 | % --------------------------------------------------------------------------------------------- | 
| 90 | % |