Home > utilities > get_polcoms_fixed_vars.m

get_polcoms_fixed_vars

PURPOSE ^

SYNOPSIS ^

function [polcoms]=get_polcoms_fixed_vars(fileU,fileB,fileparams,filebathy,filescoord,ipexfile)

DESCRIPTION ^

 fileU = '/data/perseus1/to_archive/suka_VECTORS/MEDI29_RA/daily/dmeanUVT.MEDI29.RA.2000.01.U.nc'
 fileB =  '/data/perseus1/to_archive/suka_VECTORS/MEDI29_RA/daily/dmeanUVT.MEDI29.RA.2000.01.B.nc'
 filebio='/data/perseus1/to_archive/suka_VECTORS/MEDI29_RA/daily/dmeaneco3d.MEDI29.RA.2000.01.nc'
 ipexfile='/users/modellers/rito/Models/MEDINA/polcoms/zet_UBVB.MEDI29.RA.2009.12'
 filescoord='/users/modellers/rito/Models/MEDINA/polcoms/scoord_params.dat'
 fileparams='/users/modellers/rito/Models/MEDINA/polcoms/MEDI29.parameters'
 filebathy='/users/modellers/rito/Models/MEDINA/polcoms/MEDI29.bathy'
 Read Tseries file with number and locations of timeseries

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [polcoms]=get_polcoms_fixed_vars(fileU,fileB,fileparams,filebathy,filescoord,ipexfile)
0002 %
0003 % fileU = '/data/perseus1/to_archive/suka_VECTORS/MEDI29_RA/daily/dmeanUVT.MEDI29.RA.2000.01.U.nc'
0004 % fileB =  '/data/perseus1/to_archive/suka_VECTORS/MEDI29_RA/daily/dmeanUVT.MEDI29.RA.2000.01.B.nc'
0005 % filebio='/data/perseus1/to_archive/suka_VECTORS/MEDI29_RA/daily/dmeaneco3d.MEDI29.RA.2000.01.nc'
0006 % ipexfile='/users/modellers/rito/Models/MEDINA/polcoms/zet_UBVB.MEDI29.RA.2009.12'
0007 % filescoord='/users/modellers/rito/Models/MEDINA/polcoms/scoord_params.dat'
0008 % fileparams='/users/modellers/rito/Models/MEDINA/polcoms/MEDI29.parameters'
0009 % filebathy='/users/modellers/rito/Models/MEDINA/polcoms/MEDI29.bathy'
0010 % Read Tseries file with number and locations of timeseries
0011 varlistU = {'lon', 'lat'};
0012 varlistB = {'lon', 'lat'};
0013 % varlistbio = {'depth', 'pdepth'};
0014 
0015 % read s_coord file from polcoms setup
0016 
0017 
0018 polcoms.scoord=read_scoord_params(filescoord);
0019 % Read domain parameters
0020 polcoms.params=read_polcoms_params(fileparams);
0021 % read ipexu and ipexb
0022 %fid is for the input file
0023 fid=fopen(ipexfile,'r','n');
0024 dump= fread(fid,1,'int32');
0025 polcoms.iesub= fread(fid,1,'int32');
0026 polcoms.jesub= fread(fid,1,'int32');
0027 polcoms.n= fread(fid,1,'int32');
0028 polcoms.npsea= fread(fid,1,'int32');
0029 dump = fread(fid,2,'int32');
0030 polcoms.isea= fread(fid,polcoms.npsea,'int32');
0031 dump = fread(fid,2,'int32');
0032 polcoms.jsea= fread(fid,polcoms.npsea,'int32');
0033 dump = fread(fid,2,'int32');
0034 
0035 l= fread(fid,1,'int32');
0036 m= fread(fid,1,'int32');
0037 n= fread(fid,1,'int32');
0038 polcoms.npusea= fread(fid,1,'int32');
0039 dump = fread(fid,2,'int32');
0040 polcoms.iusea= fread(fid,polcoms.npusea,'int32');
0041 dump = fread(fid,2,'int32');
0042 polcoms.jusea= fread(fid,polcoms.npusea,'int32');
0043 dump = fread(fid,2,'int32');
0044 fclose(fid);
0045 % read bathymetry and calculate scoords.
0046 polcoms.bathy = textread(filebathy,'%f','delimiter',' ');
0047 polcoms.bathy = reshape(polcoms.bathy,polcoms.iesub,polcoms.jesub);
0048 %
0049 pcU = get_POLCOMS_netCDF(fileU, varlistU);
0050 pcB = get_POLCOMS_netCDF(fileB, varlistB);
0051 % pcbio=get_POLCOMS_netCDF(filebio, varlistbio);
0052 [polcoms.lonb,polcoms.latb]=meshgrid(pcB.lon.data,pcB.lat.data);
0053 [polcoms.lonu,polcoms.latu]=meshgrid(pcU.lon.data,pcU.lat.data);
0054 
0055 polcoms.lonb=polcoms.lonb';
0056 polcoms.latb=polcoms.latb';
0057 polcoms.lonu=polcoms.lonu';
0058 polcoms.latu=polcoms.latu';
0059 [polcoms]=calc_scoord(polcoms);
0060 return

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