| 1 | % ----------------------------------------------------------------- | % CLIMODE: potential vorticity toolbox | 
|  | % MITgcm_contrib > G. MAZE contribution > Matlab routines |  | 
| 2 | % | % | 
| 3 | % This package tries to provide some useful and simple routines to | % This package tries to provide some useful and simple routines to compute, visualize and | 
| 4 | % compute, visualize and analyze Potential Vorticity from the | % analyze Potential Vorticity from the global high resolution (1/8deg) simulation of the | 
| 5 | % global high resolution (1/8deg) simulation of the MITgcm. | % MITgcm. | 
| 6 | % Routines are as general as possible for extended applications, but | % Routines are as general as possible for extended applications, but note that they were | 
| 7 | % note that they were developped to focus on the Western Atlantic | % developped to focus on the Western Atlantic region for the CLIMODE project. | 
|  | % region for the CLIMODE project. |  | 
| 8 | % Enjoy ! | % Enjoy ! | 
| 9 | % | % | 
| 10 | % gmaze@mit.edu | % gmaze@mit.edu | 
| 11 |  | % Last update: 10/06/06 | 
| 12 | % | % | 
| 13 | % ----------------------------------------------------------------- | % --------------------------------------------------------------------------------------------- | 
| 14 | % PROGRAMS LIST (NOT FUNCTIONS): | % PROGRAMS LIST (NOT A FUNCTIONS): | 
| 15 | % | % | 
| 16 | % MAIN_GETPV | % main_getPV_eg | 
| 17 | % This program defines the global setup and launch the PV computing. | %                             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 |  | % compute_EKL(SNAPSHOT) | 
| 56 |  | %                             Compute the Ekman Layer Depth from the wind stress and the density | 
| 57 |  | %                             fields. | 
| 58 |  | % compute_MLD(SNAPSHOT) | 
| 59 |  | %                             Compute the Mixed Layer Depth from the SST, SSS and potential | 
| 60 |  | %                             density fields. | 
| 61 |  | % | 
| 62 |  | % --------------------------------------------------------------------------------------------- | 
| 63 |  | % FUNCTIONS LIST 2: ANALYSIS FUNCTIONS | 
| 64 |  | % | 
| 65 |  | % volbet2iso(TRACER,LIMITS,DEPTH,LAT,LONG) | 
| 66 |  | %                             This function computes the volume embedded between two | 
| 67 |  | %                             iso-TRACER values and limited eastward, westward and southward | 
| 68 |  | %                             by fixed limits. | 
| 69 |  | % surfbet2outcrops(TRACER,LIMITS,LAT,LONG) | 
| 70 |  | %                             This function computes the horizontal surface limited | 
| 71 |  | %                             by two outcrops of a tracer. | 
| 72 |  | % intbet2outcrops(TRACER,LIMITS,LAT,LONG) | 
| 73 |  | %                             This function computes the horizontal surface integral | 
| 74 |  | %                             of the field TRACER on the area limited by two outcrops. | 
| 75 |  | % subfct_getisoS(TRACER,ISO) | 
| 76 |  | %                             This function determines the iso-surface ISO of the | 
| 77 |  | %                             3D field TRACER(Z,Y,X). | 
| 78 |  | % | 
| 79 |  | % --------------------------------------------------------------------------------------------- | 
| 80 |  | % LOWER LEVEL AND SUB-FUNCTIONS LIST: | 
| 81 |  | % | 
| 82 |  | % pv_checkpath | 
| 83 |  | %                             This function, systematicaly called by the others, ensures that | 
| 84 |  | %                             all needed sub-directories of the package are in the path. | 
| 85 | % | % | 
| 86 | % ----------------------------------------------------------------- | % --------------------------------------------------------------------------------------------- | 
|  | % FUNCTIONS LIST: |  | 
|  | % |  | 
|  | % A_COMPUTE_POTENTIAL_DENSITY(SNAPSHOT) |  | 
|  | % From netcdf files contained into the SNAPSHOT directory of the |  | 
|  | % ./netcdf-files/ home folder, this function computes potential |  | 
|  | % density from potential temperature THETA and anomalous salinity |  | 
|  | % SALTanom |  | 
|  | % |  | 
|  | % B_COMPUTE_RELATIVE_VORTICITY(SNAPSHOT) |  | 
|  | % From netcdf files contained into the SNAPSHOT directory of the |  | 
|  | % ./netcdf-files/ home folder, this function computes the three |  | 
|  | % components of the relative vorticity from horizontal flow UVEL |  | 
|  | % and VVEL. |  | 
|  | % |  | 
|  | % C_COMPUTE_POTENTIAL_VORTICITY(SNAPSHOT,[WANT_SPL_PV]) |  | 
|  | % From netcdf files contained into the SNAPSHOT directory of the |  | 
|  | % ./netcdf-files/ home folder, this function computes the |  | 
|  | % potential vorticity field from the relative vorticity components |  | 
|  | % and the potential density field. Option WANT_SPL_PV turned 1 |  | 
|  | % makes the function only computing the PV based on the planetary |  | 
|  | % vorticity. |  | 
|  | % |  | 
|  | % VOLBET2ISO(TRACER,LIMITS,DEPTH,LAT,LONG) |  | 
|  | % This function computes the volume embedded between two |  | 
|  | % iso-TRACER values and limited eastward, westward and southward |  | 
|  | % by fixed limits. |  | 
|  | % Very simple test available with: TEST_VOLBET2ISO |  | 
|  | % |  | 
|  | % SURFBET2OUTCROPS(TRACER,LIMITS,LAT,LONG) |  | 
|  | % This function computes the horizontal surface limited |  | 
|  | % by two outcrops of a tracer. |  | 
|  | % Very simple test available with: TEST_SURFBET2OUTCROPS |  | 
|  | % |  | 
|  | % INTBET2OUTCROPS(TRACER,LIMITS,LAT,LONG) |  | 
|  | % This function computes the horizontal surface integral |  | 
|  | % of the field TRACER on the area limited by two outcrops. |  | 
|  | % Very simple test available with: TEST_INTBET2OUTCROPS |  | 
|  | % |  | 
|  | % ----------------------------------------------------------------- |  | 
|  | % LOWER LEVEL FUNCTIONS LIST: |  | 
|  | % |  | 
|  | % PV_CHECKPATH |  | 
|  | % This function, systematicaly called by the others, ensures that |  | 
|  | % all needed sub-directories of the package are in the path. |  | 
|  | % |  | 
|  | % ----------------------------------------------------------------- |  | 
| 87 | % PS: | % PS: | 
| 88 | % | % | 
| 89 | % > Several functions use the m_map package. | % > Functions name are case sensitive. | 
| 90 | %   Ensure to get it in the Matlab path. | % > See sub-directory "subfct" for further functions. | 
| 91 | %   (M_MAP is available at: http://www.eos.ubc.ca/~rich/map.html) | % > Following packages are required: | 
| 92 |  | %   M_MAP:    http://www.eos.ubc.ca/~rich/map.html | 
| 93 |  | %   SEAWATER: http://www.marine.csiro.au/datacentre/processing.htm | 
| 94 | % | % | 
| 95 | % ----------------------------------------------------------------- | % --------------------------------------------------------------------------------------------- | 
| 96 | % | % |