Home > fvcom_prepro > get_POLCOMS_sigma.m

get_POLCOMS_sigma

PURPOSE ^

Extract bathymetry and sigma layer information from NOC Operation Tide

SYNOPSIS ^

function pc = get_POLCOMS_sigma(pc,inputConf)

DESCRIPTION ^

 Extract bathymetry and sigma layer information from NOC Operation Tide
 Surge model.

 function pc = get_POLCOMS_sigma(pc,inputConf)

 DESCRIPTION:
   Extract bathymetry and sigma layer information from NOC Operation Tide
   Surge model.

 INPUT:
    inputConf   = MATLAB structure which must contain: 
                   - inputConf.polcoms_ts - location of NOC Operational
                   Model output containing 4D variables of temperature
                   (tem) and salinity (sal). They should have dimensions
                   (x, y, sigma, time).
                   - inputConf.polcoms_z - location of NOC Operational
                   Model output containing 4D variables of bathymetry
                   (XXX) and sigma layer thickness (XXX).
                   - inputConf.startDate - start date and time for FVCOM
                   model run
                   - inputConf.endDate - end date and time for FVCOM
                   model run
    pc          = MATLAB structure which must contain:
 
 OUTPUT:
    pc     = MATLAB structure to which three new fields (called temperature,
           salinity and ts_time) have been added.

 EXAMPLE USAGE
    pc = get_POLCOMS_sigma(pc,inputConf)

 Author(s):
    Karen Thurston (National Oceanography Centre, Liverpool)

 KJT Revision history:
    2013-02-05 First version, adapted from Laurent Amoudry's
    'readparameters.m' and 'plot_bathymetry.m' files.

==========================================================================

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function pc = get_POLCOMS_sigma(pc,inputConf)
0002 % Extract bathymetry and sigma layer information from NOC Operation Tide
0003 % Surge model.
0004 %
0005 % function pc = get_POLCOMS_sigma(pc,inputConf)
0006 %
0007 % DESCRIPTION:
0008 %   Extract bathymetry and sigma layer information from NOC Operation Tide
0009 %   Surge model.
0010 %
0011 % INPUT:
0012 %    inputConf   = MATLAB structure which must contain:
0013 %                   - inputConf.polcoms_ts - location of NOC Operational
0014 %                   Model output containing 4D variables of temperature
0015 %                   (tem) and salinity (sal). They should have dimensions
0016 %                   (x, y, sigma, time).
0017 %                   - inputConf.polcoms_z - location of NOC Operational
0018 %                   Model output containing 4D variables of bathymetry
0019 %                   (XXX) and sigma layer thickness (XXX).
0020 %                   - inputConf.startDate - start date and time for FVCOM
0021 %                   model run
0022 %                   - inputConf.endDate - end date and time for FVCOM
0023 %                   model run
0024 %    pc          = MATLAB structure which must contain:
0025 %
0026 % OUTPUT:
0027 %    pc     = MATLAB structure to which three new fields (called temperature,
0028 %           salinity and ts_time) have been added.
0029 %
0030 % EXAMPLE USAGE
0031 %    pc = get_POLCOMS_sigma(pc,inputConf)
0032 %
0033 % Author(s):
0034 %    Karen Thurston (National Oceanography Centre, Liverpool)
0035 %
0036 % KJT Revision history:
0037 %    2013-02-05 First version, adapted from Laurent Amoudry's
0038 %    'readparameters.m' and 'plot_bathymetry.m' files.
0039 %
0040 %==========================================================================
0041 
0042 subname = 'get_POLCOMS_sigma';
0043 
0044 global ftbverbose;
0045 if ftbverbose
0046     fprintf('\n')
0047     fprintf(['begin : ' subname '\n'])
0048 end
0049 %
0050 
0051 % Coefficients for the sigma level transformation
0052 hc = 150;  % limit of near-surface high-resolution region
0053 theta = 8;
0054 b = 0.05;
0055 s = 1;  % leave this as 1
0056 
0057 % Extract the bathymetry ('pdepth' is cell thickness, 'depth' is cell
0058 % centre depth).
0059 [l,m,n,x,y,D]=readparameters(fullfile(inputConf.polcoms_z,'parameters.dat'),...
0060     fullfile(inputConf.polcoms_z,'bathymetry.dat'));
0061 
0062 % Mask the land points
0063 temp = D==0;
0064 D(temp)=NaN;
0065 
0066 % Calculate the sigma levels
0067 [sigma,pc.depth.data,zreg] = scoord3d(D,n,hc,theta,b,s);
0068 
0069 if ftbverbose
0070     fprintf(['end   : ' subname '\n'])
0071 end

Generated on Wed 20-Feb-2019 16:06:01 by m2html © 2005