/[MITgcm]/MITgcm_contrib/gael/profilesMatlabProcessing/netcdf_ecco_GenericgridPolarPlaneCoords.m
ViewVC logotype

Contents of /MITgcm_contrib/gael/profilesMatlabProcessing/netcdf_ecco_GenericgridPolarPlaneCoords.m

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Thu May 13 19:42:33 2010 UTC (14 years ago) by gforget
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
FILE REMOVED
moving to profiles_genericgrid directory

1 function [x_out,y_out]=netcdf_ecco_GenericgridPolarPlaneCoords(x_in,y_in,pole_sign);
2
3 %pole_sign==1 -> north
4 %pole_sign==-1 -> south
5
6 if pole_sign==-1|pole_sign==+1
7
8 if ~isempty(find(pole_sign*y_in(:)<=0))
9 fprintf('polarcoords is ill-defined for this combination of tile and hemisphere combination \n => stop \n');
10 return;
11 end
12
13 x_out=zeros(size(x_in)); y_out=x_out;
14
15 x_out(:)=(90-pole_sign*y_in(:)).*cos(pole_sign*x_in(:)*pi/180);
16 y_out(:)=(90-pole_sign*y_in(:)).*sin(pole_sign*x_in(:)*pi/180);
17
18 else
19
20 x_out=x_in; y_out=y_in;
21
22 end%if pole_sign==-1|pole_sign==+1
23
24

  ViewVC Help
Powered by ViewVC 1.1.22