! Description: reads in lat and lon of data pts along TP tracks ! ----------------------------------------------------------------------- ! converts the point number to the latitudinal axis ! v2 differs from eariler version in that it creates the z-axis ! from the lat variable of the `long_line` track. ! ! output to ASCII to allow changing axis order ! ----------------------------------------------------------------------- ! by Rob Scot, June 2004: ! ----------------------------------------------------------------------- ! MUST SPECIFY: ! file info: ! ----------------------------------------------------------------------- DEFINE SYMBOL infile = ssha_lat_lon_raw_xxC.cdf LET long_line = 29 LET kmax = 796 !214 !796 DEFINE SYMBOL out_ssha = ssha_unilat_xxC.dat DEFINE SYMBOL out_latlon = lat_lon_unilat_xxC.dat SET MEMORY/SIZE=120 !********************************************************************** ! Grid info: ! ----------------------------------------------------------------------- USE ($infile) ! destination axis: DEFINE AXIS/Z/FROM_DATA/NAME=zaxis_lat/UNITS=latitude \ zsequence(lat_tmp[j=`long_line`,k=1:`kmax`]) LET dummie = z[GZ=zaxis_lat] ! ----------------------------------------------------------------------- LET/Title="point latitude"/units=latitude lat = ZAXREPLACE(lat_tmp, lat_tmp, dummie) LET/Title="point lonitude"/units=longitude lon = ZAXREPLACE(lon_tmp, lat_tmp, dummie) !********************************************************************** ! Process data: ! --------------------------------------------------------------------- ! latitude is always increasing with index k ! --------------------------------------------------------------------- !---------------------------------------------------------------------- ! Get ssha day data -> ssha on uniform latitude axis: !---------------------------------------------------------------------- LET ssha = ZAXREPLACE(ssha_tmp, lat_tmp, dummie) LET aviso_day = ZAXREPLACE(aviso_day_tmp, lat_tmp, dummie) LET cycle = ZAXREPLACE(cycle_tmp, lat_tmp, dummie) LET land_mask = ZAXREPLACE(land, lat_tmp, dummie) SPAWN rm ($out_latlon) ($out_ssha) SAVE/FILE=($out_latlon)/FORMAT=(3(1X,E14.7))/ORDER=YZ lat,lon,land_mask SAVE/FILE=($out_ssha)/FORMAT=(3(1X,E14.7))/ORDER=YZT ssha,aviso_day, \ cycle !**********************************************************************